Commit Graph

65 Commits

Author SHA1 Message Date
mindesbunister
a6d12e9cb0 Fix duplicate screenshots in batch analysis gallery
- Make screenshot galleries mutually exclusive
- Single analysis: show result.screenshots only
- Multi-timeframe/batch: show organized screenshots directly
- Use result.screenshots for batch_comparative instead of nested structure
- Prevents duplicate display of same screenshots in UI
2025-07-17 14:34:08 +02:00
mindesbunister
8688151239 Implement batch comparative analysis for multi-timeframe
- Create new /api/batch-analysis endpoint for collecting all screenshots first
- Modified AIAnalysisPanel to use batch analysis for multiple timeframes
- All screenshots captured before AI analysis (no immediate analysis per timeframe)
- Enables AI to compare across timeframes for better trend analysis
- Maintains UI compatibility with existing display logic
2025-07-17 14:21:51 +02:00
mindesbunister
abbabe7e8d Fix multi-timeframe analysis sync issues
- Ensure analysisInProgress flag is always reset in finally block
- Remove duplicate concurrency flag resets from progress handlers
- Fix inconsistent concurrency protection between single/multi timeframe
- Prevents sync issues when selecting multiple timeframes for analysis
2025-07-17 14:04:50 +02:00
mindesbunister
4ff35b8e04 🔒 Implement concurrency protection and remove marketing text
- Add analysisInProgress useRef to prevent multiple simultaneous analyses
- Protect all analysis entry points (performAnalysis, quickAnalyze, etc.)
- Update button disabled state to include concurrency check
- Remove marketing text from analysis page and AIAnalysisPanel
- Fix remaining TypeScript compilation errors in chart components
- Ensure clean UI without promotional content

Fixes sync issues caused by overlapping analysis sessions
2025-07-17 14:00:24 +02:00
mindesbunister
8372b271cb Fix screenshot gallery layout and timeframe descriptions
- Extract both layout and timeframe information from filenames
- Group screenshots by layout (AI Layout, DIY Module)
- Sort timeframes within each layout group ascending (5m -> 4h)
- Display proper layout names and timeframes in descriptions
- Organize display as: first layout ascending, then second layout ascending
- Improve screenshot alt text with layout and timeframe info

Screenshots now properly show:
Top row: AI Layout (5m, 15m, 30m)
Bottom row: DIY Module (5m, 15m, 30m)
2025-07-17 13:09:46 +02:00
mindesbunister
142d271c2c Fix progress tracking synchronization issues
- Enhanced EventSource message handling to properly reset UI state on completion
- Added completion detection based on all steps being finished
- Extended session deletion timeout from 1s to 3s for better UI updates
- Separated loading state management for single vs multi-timeframe analysis
- Ensured loading state is only reset by progress tracking for single timeframe
- Added immediate UI reset on errors to prevent stuck loading states
- Improved completion logging and state management
2025-07-17 12:35:59 +02:00
mindesbunister
954092fb0b Reorganize AI Analysis Panel structure
- Remove Quick Actions section with individual timeframe buttons
- Update coin selection to only show BTC, ETH, SOL with CoinGecko icons
- Move Analysis Timeframes section between presets and coin selection
- Change coin grid layout to 3 columns for better visual balance
- Replace Unicode coin symbols with proper CoinGecko image URLs
2025-07-17 12:28:46 +02:00
mindesbunister
19c764f9bc Fix layout names to match exact TradingView account names
- Use exact layout names: 'ai' and 'Diy module' (as in TradingView)
- Update default selected layouts to ['ai', 'Diy module']
- Keep display names exactly as they appear in TradingView
- Add lowercase fallback mapping in backend for 'diy module'
- Remove normalization that was changing the exact names

This ensures UI shows exactly what's in the TradingView account and selection state matches display.
2025-07-17 12:20:27 +02:00
mindesbunister
0399103f8a Fix progress tracking synchronization issues
- Pre-generate sessionId on client side before API call to avoid race conditions
- Add small delays in progress tracker to ensure EventSource connection is established
- Improve logging and error handling in progress streaming
- Add connection confirmation messages in EventSource stream
- Fix TypeScript interface to include sessionId in AnalysisProgress

This should resolve the lag between actual analysis progress and progress bar display.
2025-07-17 12:10:47 +02:00
mindesbunister
7e8f033bb2 Merge development branch: improved UI, coin icons, and comprehensive documentation
- Add proper CoinGecko coin icons for BTC, ETH, SOL
- Clean up homepage layout and remove clutter
- Add comprehensive .github/copilot-instructions.md with full architecture documentation
- Include timeframe fixes, trading integration improvements, and Docker optimizations
- Maintain all trading functionality and AI analysis features
2025-07-17 12:01:15 +02:00
mindesbunister
fba41aaf78 Restore improved layout and coin icons from development branch
- Restore clean homepage with only StatusOverview component
- Restore improved StatusOverview with CoinGecko coin icons
- Restore unified layout with gradient cards instead of fragmented sections
2025-07-17 11:55:09 +02:00
mindesbunister
525da07948 Replace Unicode coin symbols with proper CoinGecko coin icons
- Replace ₿, Ξ, ◎ symbols with actual coin logos from CoinGecko CDN
- Update Bitcoin, Ethereum, and Solana icons across StatusOverview component
- Improve visual appeal and professional appearance of wallet balance, available coins, and market price sections
- Use 24x24px rounded coin images for better UI consistency
2025-07-17 11:46:28 +02:00
mindesbunister
4f328fab48 feat: update timeframe presets and improve sorting
- Add 30m and 2h timeframes to available options
- Update Scalping preset: 5m, 15m, 30m (was 5m, 15m, 1h)
- Update Day Trading preset: 1h, 2h, 4h (was 1h, 4h, 1d)
- Enhance sorting logic for screenshots and analysis results
- Ensure consistent timeframe order: 5m → 15m → 30m → 1h → 2h → 4h → 1d
- Improve multi-timeframe analysis display with proper sorting
- Update filename parsing to handle new timeframes

Changes improve trading workflow with more logical timeframe progressions
for scalping and day trading strategies.
2025-07-17 11:25:11 +02:00
mindesbunister
ff4e9737fb fix: timeframe handling and progress tracking improvements
- Fix timeframe parameter handling in enhanced-screenshot API route
- Support both 'timeframe' (singular) and 'timeframes' (array) parameters
- Add proper sessionId propagation for real-time progress tracking
- Enhance MACD analysis prompt with detailed crossover definitions
- Add progress tracker service with Server-Sent Events support
- Fix Next.js build errors in chart components (module variable conflicts)
- Change dev environment port from 9000:3000 to 9001:3000
- Improve AI analysis layout detection logic
- Add comprehensive progress tracking through all service layers
2025-07-17 10:41:18 +02:00
mindesbunister
b6c19c100e CRITICAL: Fix leveraged trading routing
- Add leverage detection in executeTrade function to route correctly
- Leveraged positions (leverage > 1) now route to execute-perp API (Drift Protocol)
- Spot trades (leverage = 1) continue to use execute-dex API (Jupiter DEX)
- Enhanced success messages to distinguish between spot trades and leveraged positions
- Fixes issue where 5x leveraged positions were incorrectly executed as spot swaps
- Added proper console logging for debugging trade routing
2025-07-16 16:43:45 +02:00
mindesbunister
bd04e0b6a8 FINAL FIX: Docker API URL resolution for internal service communication
- Fixed internal API calls in Docker environment to use port 3000 instead of 9000
- Added DOCKER_ENV detection to properly route internal fetch requests
- Resolves ECONNREFUSED errors when APIs try to call each other within container
- Trade validation now works correctly in Docker: 5 USD position validates properly
- Successfully tested: amountUSD field properly passed through validation pipeline
- Both development and Docker environments now fully functional
2025-07-16 16:35:09 +02:00
mindesbunister
b7e4801e45 feat: Complete Jupiter-style trading interface with navigation integration
Major accomplishments:
- Fully restored complete Jupiter Perps-style trading interface
- Added Chart Trading page to main navigation menu with 📈 icon
- Complete real trading functionality with live wallet balances
- Professional leverage controls (1x-100x) with risk warnings
- Working token selection dropdowns with balance display
- Real-time position management and P&L tracking
- Integration with backend APIs for DEX and perp trading
- Stop Loss and Take Profit functionality
- Live market data and price updates

- Clean, modern UI matching Jupiter's design aesthetic
- Symbol selection dropdown with live prices and % changes
- Advanced leverage slider with quick-select buttons
- Trade form with 'You're paying' and 'You're receiving' sections
- MAX button for using full token balance
- Real trade execution with confirmation alerts
- Position table with close functionality
- Risk warnings for high leverage positions

- Added Chart Trading link between Trading and Automation
- Professional icon and description
- Maintains consistent styling with other nav items
- Direct access to advanced trading interface

Ready for production use with real trading capabilities.
2025-07-16 16:19:26 +02:00
mindesbunister
ccf73db63d feat: Add Chart Trading page to main navigation menu
Added Chart Trading link to navigation:
- New navigation item with 📈 icon for advanced chart trading
- Positioned between Trading and Automation in the menu
- Links to /chart-trading-demo route
- Maintains consistent styling with other nav items
- Provides access to Jupiter-style trading interface

Users can now easily access the advanced chart trading page from the main menu.
2025-07-16 16:16:17 +02:00
mindesbunister
f0845d0fd1 restore: Complete Jupiter-style trading interface from git history
Fully restored complete trading page with all components:
- Complete Jupiter Perps-style UI with coin selection dropdown
- Real wallet balance integration and live trading capabilities
- Position management with leverage controls (1x-100x)
- Complete trade form with 'You're paying' and 'You're receiving' sections
- Working dropdowns for token selection with balance display
- Professional position table with P&L tracking
- Real trade execution with backend API integration
- Stop Loss and Take Profit functionality
- Risk warnings for leveraged positions
- MAX button for using full balance
- Live market data integration
- Temporary chart placeholder (SimpleChart to be added)

All form sections complete, builds successfully, ready for testing
2025-07-16 16:04:04 +02:00
mindesbunister
497e9ed0be fix: implement trade button integration with AI analysis
- Add trade button next to each analysis result
- Fix TradeModal to properly receive and display analysis data
- Update TypeScript interfaces to match actual data structure
- Pre-fill Entry Price, Stop Loss, and Take Profit values from AI analysis
- Fix duplicate variable declarations causing build errors
- Remove TradeExecutionPanel from analysis page (reverted to original design)

 Trade button now opens modal with correct pre-filled values
 Analysis data properly passed between components
 Build errors resolved
2025-07-16 15:25:11 +02:00
mindesbunister
b0e9cfe113 fix: implement trade button integration with AI analysis
- Add trade button next to each analysis result
- Fix TradeModal to properly receive and display analysis data
- Update TypeScript interfaces to match actual data structure
- Pre-fill Entry Price, Stop Loss, and Take Profit values from AI analysis
- Fix duplicate variable declarations causing build errors
- Remove TradeExecutionPanel from analysis page (reverted to original design)

 Trade button now opens modal with correct pre-filled values
 Analysis data properly passed between components
 Build errors resolved
2025-07-16 15:22:19 +02:00
mindesbunister
0e3a2d7255 feat: Implement Jupiter-style trading interface with token selection
- Add 'You're paying' and 'You're receiving' sections with proper token dropdowns
- Implement balance display and MAX button functionality
- Add automatic receiving amount calculation based on paying amount
- Enhance token selector with icons, names, and balance information
- Improve leverage position value calculations and risk warnings
- Update trade execution to use new paying/receiving token structure
- Maintain all existing functionality including stop loss, take profit, and position management

This creates a more intuitive and professional trading interface that matches Jupiter's UX patterns.
2025-07-16 14:56:53 +02:00
mindesbunister
db6a020028 Fix blank page issue and implement working chart
## Fixed Issues:
-  Resolved blank page caused by problematic chart component imports
-  Removed broken chart components that had library compatibility issues
-  Created SimpleChart component using HTML5 Canvas that works reliably
-  Cleaned up test pages and unused components

## Working Features:
-  Trading page loads correctly without blank screen
-  Professional candlestick chart with grid lines and price labels
-  Clean trading interface with all panels visible
-  No more loading errors or component failures

## Technical Implementation:
- Used native HTML5 Canvas API for chart rendering
- Proper TypeScript types and error handling
- Responsive design that works in Docker environment
- No external library dependencies to cause conflicts

The trading dashboard is now stable and functional.
2025-07-16 13:22:14 +02:00
mindesbunister
c1a7a28cd8 Implement working canvas-based trading chart
- Created SimpleTradingChart component using HTML5 Canvas
- Renders proper candlestick chart with sample SOL/USDC data
- Includes grid lines, price labels, and proper styling
- Replaced problematic lightweight-charts with working solution
- Updated trading page to use the new working chart component

Fixes chart loading issues by using native HTML5 Canvas instead of external library dependencies.
2025-07-16 13:06:58 +02:00
mindesbunister
4fe9c1342c Fix chart loading issues and remove sample position data
- Fixed TradingChart data generation to use unique daily timestamps
- Removed sample position data from trading page
- Added better error handling and logging to chart initialization
- Fixed time format issues that were preventing chart rendering
- Added test pages for debugging chart functionality
2025-07-16 12:54:48 +02:00
mindesbunister
1ee8aa9fe7 Add working TradingChart component with lightweight-charts 2025-07-16 12:39:22 +02:00
mindesbunister
2db2be241b Implement Jupiter-style trading chart with lightweight-charts
- Add TradingView Lightweight Charts library for professional chart display
- Create TradingChart component with real-time candlestick data
- Implement position overlays (entry, stop loss, take profit lines)
- Add chart header with symbol and price information
- Create CompactTradingPanel for Jupiter-style order form
- Build ChartTradingPage combining chart and trading panel
- Add demo and test pages for chart functionality
- Use dynamic imports to avoid SSR issues with lightweight-charts
- Generate sample price data for demonstration

Features:
- Full-screen candlestick chart with dark theme
- Position markers on chart (blue entry, red SL, green TP)
- Real-time price display and P&L tracking
- Responsive design with proper chart resizing
- Professional trading interface similar to Jupiter Perps
2025-07-16 12:31:58 +02:00
mindesbunister
ac50d9622c Enhance trading system: real wallet validation, auto-discovery, and hot reloading
- Update trade validation to use real wallet balances from /api/wallet/balance
- Enhance wallet API to auto-discover all major SPL tokens (USDC, USDT, etc.)
- Improve AIAnalysisPanel to better extract and pass AI values to TradeModal
- Configure Docker Compose for hot reloading with proper volume mounts
- Remove hardcoded balance fallbacks in favor of live wallet data

Result: Trading validation now uses accurate real-time wallet balances
2025-07-16 11:37:20 +02:00
mindesbunister
77eb727f8d Fix spot trade logic: remove incorrect positions and enhance trade history display
- Remove incorrect open positions for spot swaps (instant settlements)
- Add DELETE API route for position removal (/api/trading/positions/[positionId])
- Update existing SOL/USDC trade to clearly mark as SPOT_SWAP
- Enhance TradesHistoryPanel with visual trade type indicators:
  * SPOT_SWAP: Purple badge with  icon
  * MARKET: Blue badge with 📈 icon
  * LIMIT: Orange badge with 🎯 icon
  * STOP: Red badge with 🛑 icon
- Add trade history update functionality for modifying existing trades
- Fix container communication URLs in execute-dex route

Result: Spot trades no longer create open positions, trade history clearly shows trade types
2025-07-16 11:36:58 +02:00
mindesbunister
cd1273b612 Enhanced trading modal UI with professional layout
- Added coin selection cards with price display
- Integrated wallet balance and percentage-based position sizing
- Added leverage slider with real-time calculations
- Improved take profit allocation and risk/reward summary
- Refactored to match advanced trading modal layout
- Fixed TypeScript errors and build issues
2025-07-15 20:32:06 +02:00
mindesbunister
e0a43ca4d6 🚀 Enhance TradeModal with advanced features matching second screenshot
Key Enhancements:
- Visual coin selection cards (SOL/USDC) with prices
- Enhanced position sizing with percentage buttons (25%, 50%, 75%, 100%)
- Improved leverage slider with visual feedback (1x-10x)
- Take Profit sections with profit calculations and percentage sliders
- Better layout matching the target UI design
- Real-time USD/SOL conversions
- Professional styling with gradients and hover effects

- Real wallet balance integration from recent commits
- Position sizing based on actual wallet holdings
- Comprehensive trading setup with entry/TP1/TP2/SL
- Enhanced visual feedback and calculations

- Cards-based coin selection instead of dropdown
- Slider controls for leverage and profit allocation
- Better spacing and visual hierarchy
- Matches the target design from second screenshot
2025-07-15 20:06:28 +02:00
mindesbunister
f8bafceb93 Update TradeModal component and remove package-lock.json
- Modified TradeModal.tsx with latest changes
- Removed package-lock.json file (likely for clean dependency management)
2025-07-15 19:54:59 +02:00
mindesbunister
52454bbf98 🚀 Fix position sizing and add real wallet balance integration
Fixed Position Size Calculation:
- Changed input from SOL to USD for clarity
- Fixed calculation: positionSizeSOL = positionValueUSD / coinPrice
- Resolved issue where entering 0.4 SOL showed incorrect 0.0025 underneath

 Added Real Wallet Balance Integration:
- TradeModal now fetches actual wallet balance from /api/wallet/balance
- Percentage buttons now calculate from real available balance (3.40)
- No more impossible 1 SOL positions when only 3.40 available

 Enhanced Position Sizing UI:
- Added slider for smooth position adjustment ( to full balance)
- Percentage buttons (25%, 50%, 75%, 100%) now accurate
- Real-time display shows both USD and SOL amounts
- Live percentage display of balance usage

 Added Wallet Overview to Dashboard:
- Main dashboard shows real wallet balance prominently
- Trading page displays actual wallet holdings
- StatusOverview component enhanced with wallet info

- Accurate position sizing based on actual 3.40 balance
- Intuitive slider + percentage buttons
- Real-time balance updates every 30 seconds
- Clear USD/SOL conversion display
- No more calculation errors in trading modal
2025-07-15 13:41:02 +02:00
mindesbunister
b0b63d5db0 Fix critical balance validation and add comprehensive trading features
- Fixed CoinGecko API rate limiting with fallback SOL price (68.11)
- Corrected internal API calls to use proper Docker container ports
- Fixed balance validation to prevent trades exceeding wallet funds
- Blocked 0.5 SOL trades with only 0.073 SOL available (~2.24)

- Added persistent storage for positions, trades, and pending orders
- Implemented limit order system with auto-fill monitoring
- Created pending orders panel and management API
- Added trades history tracking and display panel
- Enhanced position tracking with P&L calculations
- Added wallet balance validation API endpoint

- Positions stored in data/positions.json
- Trade history stored in data/trades.json
- Pending orders with auto-fill logic
- Real-time balance validation before trades

- All trades now validate against actual wallet balance
- Insufficient balance trades are properly blocked
- Added comprehensive error handling and logging
- Fixed Docker networking for internal API calls

- SPOT and leveraged trading modes
- Limit orders with price monitoring
- Stop loss and take profit support
- DEX integration with Jupiter
- Real-time position updates and P&L tracking

 Tested and verified all balance validation works correctly
2025-07-14 17:19:58 +02:00
mindesbunister
0d7b46fdcf feat: Implement comprehensive positions tracking system
- Real-time positions tracking with live P&L updates
- PositionsPanel component with auto-refresh every 10s
- Position creation on trade execution (DEX, Perp, Standard)
- One-click position closing functionality
- Stop Loss and Take Profit display with monitoring

- /api/trading/positions API for CRUD operations
- Real-time price updates via CoinGecko integration
- Automatic position creation on successful trades
- In-memory positions storage with P&L calculations
- Enhanced trading page layout with positions panel

- Entry price, current price, and unrealized P&L
- Percentage-based P&L calculations
- Portfolio summary with total value and total P&L
- Transaction ID tracking for audit trail
- Support for leverage positions and TP/SL orders

 Confirmed Working:
- Position created: SOL/USDC BUY 0.02 @ 68.10
- Real-time P&L: -/bin/bash.0052 (-0.15%)
- TP/SL monitoring: SL 60, TP 80
- Transaction: 5qYx7nmpgE3fHEZpjJCMtJNb1jSQVGfKhKNzJNgJ5VGV4xG2cSSpr1wtfPfbmx8zSjwHnzSgZiWsMnAWmCFQ2RVx

- Clear positions display on trading page
- Real-time updates without manual refresh
- Intuitive close buttons for quick position management
- Separate wallet holdings vs active trading positions
- Professional trading interface with P&L visualization
2025-07-14 15:59:44 +02:00
mindesbunister
f1e0be8c79 feat: Fine-tune trading UI with coin dropdown selection
- Remove simulation mode and quick USDC swap sections
- Replace trading pairs with two dropdown fields (From → To)
- Add coin selection for perpetuals with leverage
- Enhanced UX with coin swap button and dynamic labels
- Always use real Jupiter DEX execution

- 7 supported coins: SOL, USDC, USDT, BTC, ETH, RAY, ORCA
- Intuitive From/To dropdowns for spot trading
- Dedicated perpetual coin selection
- Real-time label updates based on selection

- Removed confusing simulation/real toggle
- Streamlined execution always via Jupiter DEX
- Cleaner UI focused on real trading
- Better risk warnings for actual trades

 Tested:
- Real SOL→USDC swap: TX 59QpmZWFnuHFNCVKujaq9tyJThy3fFTHpPSrug2vPQHYnE1Mk33wfwgHbc3oaW8E6m7kH8K7xpExESdV73LSqLT9
- Perpetual position: SOL 5x leverage simulation ready
- All APIs working correctly in Docker Compose v2
2025-07-14 15:45:10 +02:00
mindesbunister
73a3162ecf feat: Complete Jupiter DEX integration and USDC swap functionality
Features Added:
- Real Jupiter DEX integration for SOL/USDC swaps
- Jupiter Perpetuals UI with leveraged trading (1x-10x)
- Enhanced trading panel with SPOT/PERP modes
- Quick USDC swap functionality for stability
- Stop Loss & Take Profit orders with AI suggestions
- Real Solana wallet integration with private key

- jupiter-dex-service.ts: Full Jupiter API integration
- /api/trading/execute-dex: Real DEX trading endpoint
- /api/trading/execute-perp: Perpetuals trading endpoint
- Enhanced TradeExecutionPanel.js with USDC features
- Docker Compose v2 compatibility maintained

 Confirmed Working:
- Real Jupiter DEX swaps executed successfully
- Transaction IDs: 6f4J7e..., TDXem2V1...
- All APIs tested inside Docker container
- Web interface fully functional at localhost:9000

- All features running in Docker Compose v2
- Real wallet balance: 2.51 SOL connected
- USDC trading pairs: SOL/USDC, USDC/SOL supported
- Risk management with liquidation protection
- Background TP/SL monitoring framework ready
2025-07-14 15:30:16 +02:00
mindesbunister
e9517d5ec4 feat: Complete Bitquery trading integration with real wallet support
Features Added:
- Real-time price data via CoinGecko API (BTC: 21k+, SOL: 66+, etc.)
- Actual Solana wallet integration using private key from .env
- Trade execution API with Bitquery simulation
 trade recommendation → execution flow
- Portfolio display showing real wallet balance (~2.49 SOL)

- /api/market - Live cryptocurrency prices
- /api/trading/execute - Execute trades based on analysis
- /api/trading/balance - Real wallet balance
- /api/wallet/balance - Direct Solana wallet access

- TradeExecutionPanel.js - Complete trading interface
- WalletConnection.js - Wallet connection component
- Updated AIAnalysisPanel - Analysis → trade execution flow
- Updated StatusOverview - Real market data + wallet balance

- AI analysis generates trade recommendations
- Users can execute trades based on AI suggestions
- Real portfolio tracking with actual Solana wallet
- Live market prices (no more fake data)
- Ready for production trading

Security: Private key stays in .env, only public data exposed to frontend
2025-07-14 14:58:01 +02:00
mindesbunister
de45349baa Restore working dashboard and TradingView analysis
- Fixed layout conflicts by removing minimal layout.tsx in favor of complete layout.js
- Restored original AI Analysis page with full TradingView integration
- Connected enhanced screenshot API to real TradingView automation service
- Fixed screenshot gallery to handle both string and object formats
- Added image serving API route for screenshot display
- Resolved hydration mismatch issues with suppressHydrationWarning
- All navigation pages working (Analysis, Trading, Automation, Settings)
- TradingView automation successfully capturing screenshots from AI and DIY layouts
- Docker Compose v2 compatibility ensured

Working features:
- Homepage with hero section and status cards
- Navigation menu with Trading Bot branding
- Real TradingView screenshot capture
- AI-powered chart analysis
- Multi-layout support (AI + DIY module)
- Screenshot gallery with image serving
- API endpoints for balance, status, screenshots, trading
2025-07-14 14:21:19 +02:00
mindesbunister
23cab77200 🎉 FIXED: Screenshot gallery preview and enlargement functionality
Major Issues Resolved:
- Screenshot gallery images now load and display correctly
- Click-to-enlarge modal functionality working
- ESC key closes enlarged images (confirmed working)
- Click-outside-to-close functionality added

- Created new /api/image route to serve screenshots (bypasses Next.js 15 route issue)
- Fixed screenshot URL formatting to use query parameter format
- Added proper keyboard event handling for ESC key
- Improved timeframe extraction from screenshot filenames
- Enhanced trade execution error handling with detailed feedback

- Fixed Next.js build cache issues causing route problems
- Cleaned up debugging console logs
- Restored normal conditional gallery rendering
- Proper error handling for image loading failures

The screenshot gallery now fully works:
1. Images display in grid layout 
2. Click any image to enlarge 
3. ESC key closes enlarged view 
4. Click outside modal to close 
5. Proper timeframe labeling 
6. Trade execution shows detailed error messages 
2025-07-14 01:22:30 +02:00
mindesbunister
1e65f5d87a Add test gallery for debugging screenshot functionality
- Add fallback test gallery when no screenshots provided
- Use known working screenshot URLs for testing
- Test click-to-enlarge and modal functionality
- Help isolate if issue is data flow or component rendering
2025-07-14 01:10:02 +02:00
mindesbunister
65994816ab Add extensive debugging to analysis and gallery components
- Add console logging to track result data in AIAnalysisPanel
- Add debugging to ScreenshotGallery rendering conditions
- Track screenshot data flow and component render states
- Help identify why gallery preview/enlargement not working
2025-07-14 01:09:09 +02:00
mindesbunister
8087806a16 Add debugging to ScreenshotGallery component
- Add console logging for props, screenshot data, and image loading
- Add onLoad event to track successful image loads
- Add more detailed error logging for failed images
- Debug data flow to identify why gallery preview/enlargement not working
2025-07-14 01:07:23 +02:00
mindesbunister
045d4a41e3 Fix ScreenshotGallery and improve trade execution feedback
- Add keyboard ESC listener for closing enlarged screenshots
- Fix screenshot URL formatting to use /screenshots/[filename] route
- Improve trade execution error handling with detailed messages
- Show specific feedback for insufficient funds, auth issues, etc.
- Remove unused Modal import that was causing build errors
- Add click-outside-to-close functionality for enlarged images
2025-07-14 00:50:39 +02:00
mindesbunister
aa8ca9846b feat: Add trade execution and screenshot gallery to AI analysis
- Create TradeModal component for executing trades with entry, TP, SL
- Add ScreenshotGallery component with click-to-enlarge functionality
- Integrate trade buttons in both single and multi-timeframe analysis results
- Add screenshot gallery that displays captured TradingView charts
- Parse analysis data to pre-fill trade modal with AI recommendations
- Support trade execution via /api/trading endpoint
- Add visual indicators and smooth transitions for better UX

Trade button features:
- Pre-filled entry, take profit, and stop loss from AI analysis
- Configurable position size and leverage
- Real-time validation and error handling

Screenshot gallery features:
- Grid layout with hover effects
- Click to enlarge in full-screen modal
- Support for both single and multi-timeframe results
- Chart information overlay with timeframe labels
2025-07-14 00:34:13 +02:00
mindesbunister
3c988b47f2 feat: Restructure UI with navigation and separate pages
- Add Navigation component with clean tab-based navigation
- Create StatusOverview component for main dashboard indicators
- Split functionality into separate pages:
  * Overview page with status and quick actions
  * Analysis page for AI analysis
  * Trading page for manual trading and history
  * Automation page for auto-trading settings
  * Settings page for developer configuration
- Add React dependencies to package.json
- Maintain clean separation of concerns
2025-07-14 00:21:44 +02:00
mindesbunister
368e4e43e0 feat: Add detailed progress tracking to AI analysis
- Real-time progress tracking with 7 detailed steps
- Visual progress indicators with status icons and timing
- Multi-timeframe analysis progress with current timeframe display
- Step-by-step breakdown: Init → Browser → Auth → Navigation → Loading → Capture → Analysis
- Individual step timing and status (pending, active, completed, error)
- Overall progress percentage and progress bars
- Better visual feedback with color-coded status indicators

- Users can now see exactly what's happening in the background
- Clear indication of current step and estimated completion
- Separate progress tracking for multi-timeframe analysis
- Error handling with specific step failure details

- Animated progress indicators and status changes
- Gradient backgrounds and modern design
- Real-time step duration tracking
- Responsive layout for all screen sizes

No more wondering 'how long will this take?' - users now have full visibility!
2025-07-13 23:36:58 +02:00
mindesbunister
f6e9c2eaa7 feat: Add missing take profit levels to multi-timeframe analysis
- Display TP1 and TP2 targets in Entry Setup section for each timeframe
- Support both structured take profit format (tp1/tp2) and simple format
- Include proper fallback for different take profit data structures
- Enhanced visual display with emojis and proper formatting
- Now showing complete trading setup: Entry, Stop Loss, and Take Profit levels

Fixes missing take profit display in multi-timeframe analysis view
2025-07-13 23:22:46 +02:00
mindesbunister
85791a2e82 🚀 Enhanced Multi-Timeframe Analysis with Smart Defaults
 Major UI/UX Improvements:
- AI + DIY layouts now default selections for comprehensive analysis
- Multi-timeframe selection support for broader market outlook
- Quick timeframe presets: Scalping, Day Trading, Swing, Position
- Combined coin + timeframe selection workflow

📊 Enhanced Analysis Features:
- Multiple timeframe analysis in single request
- Smart timeframe grouping (5m+15m+1h for scalping, etc.)
- Cross-timeframe consensus display
- Individual timeframe result breakdown
- Visual timeframe selection with active indicators

🎨 Improved User Experience:
- Quick action buttons for instant multi-timeframe analysis
- Clear selection indicators and counters
- Preset combinations for different trading styles
- Streamlined workflow: Select presets → Pick coin → Analyze
- Beautiful multi-timeframe result visualization

🔧 Technical Enhancements:
- Support for analyzing 1-8 timeframes simultaneously
- Automatic delay between requests to prevent rate limiting
- Error handling for individual timeframe failures
- Responsive grid layouts for different screen sizes
2025-07-13 18:07:32 +02:00
mindesbunister
4f125ac6b6 🎨 Beautiful take profit display and enhanced trading UI
- Enhanced take profit section with structured TP1/TP2 display
- Added RSI/OBV expectations for each target with color-coded indicators
- Implemented comprehensive risk management section with R:R ratios
- Added timeframe risk assessment with leverage recommendations
- Enhanced technical indicators section with organized layout
- Added alternative strategies section for tighter stops and scaled entries
- Improved entry point and stop loss display with emojis and better formatting
- Professional trading dashboard with all analysis components beautifully displayed
2025-07-13 17:58:52 +02:00