- Add PostgreSQL + SQLite hybrid database support with automatic switching
- Implement frontend AES-GCM + RSA-OAEP encryption for sensitive data
- Add comprehensive DatabaseInterface with all required methods
- Fix compilation issues with interface consistency
- Update all database method signatures to use DatabaseInterface
- Add missing UpdateTraderInitialBalance method to PostgreSQL implementation
- Integrate RSA public key distribution via /api/config endpoint
- Add frontend crypto service with proper error handling
- Support graceful degradation between encrypted and plaintext transmission
- Add directory creation for RSA keys and PEM parsing fixes
- Test both SQLite and PostgreSQL modes successfully
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
Removed unused 'Zap' import from App.tsx that was causing build failure.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
Match main app layout with proven working /competition route layout:
- Use px-6 py-6 pt-24 padding (same as /competition route)
- Ensures HeaderBar doesn't overlap content on /traders and /dashboard pages
- Provides consistent 6rem (96px) top clearance for fixed positioned HeaderBar
- Removes responsive padding variants that differed from competition page
This fixes header overlap issues across all main application routes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
Replace the inline header implementation in main app with HeaderBar component to match landing page:
- Remove duplicate inline header code (168 lines)
- Use HeaderBar component for all main app pages like landing page does
- Ensure consistent header design across all routes (/competition, /traders, /dashboard)
- Maintain proper onPageChange navigation handling
- Keep all header functionality (user info, admin mode, language toggle, logout)
This fixes the header inconsistency where different pages used different header implementations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
- Add authentication checks to SWR calls in App.tsx and AITradersPage.tsx
- Only call api.getTraders when user and token are available
- Modify loadConfigs to skip authenticated API calls when not logged in
- Load only public supported models/exchanges for unauthenticated users
- Update useEffect dependencies to include user and token
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This is a partial fix for issue #311 mobile display problems.
Changes in this commit:
- Add responsive header layout with separate mobile/desktop views in App.tsx
- Fix language selector visibility on mobile (no longer hidden by menu)
- Add responsive breakpoints to ComparisonChart stats grid (2 cols on mobile, 4 on desktop)
- Adjust padding and text sizes for mobile screens
- Preserve all i18n (internationalization) functionality from upstream
Note: Additional components (CompetitionPage, AITradersPage) will need similar mobile
responsive improvements in follow-up commits.
Related to #311
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
- Remove unused imports (LoginModal, Zap) and variables
- Fix Language type mismatches across components
- Update HeaderBar interface to use Language type
- Remove unused onLoginClick parameter
- Fix duplicate translation keys by renaming auth steps
- Remove invalid language prop from CommunitySection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
- Update App, CompetitionPage, CryptoFeatureCard components with improvements
- Enhance Header and LoginPage components
- Update styling in index.css and API configurations
- Add new hand background and hand image assets
- Remove old logo.png file
- Update server configuration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This commit addresses the issue where switching to English still showed Chinese text in many UI elements.
Changes made:
- Added 40+ missing translation keys to translations.ts for both English and Chinese
- Updated App.tsx to use t() function for all hardcoded text (logout button, loading message)
- Updated AITradersPage.tsx extensively:
- Replaced all alert/confirm messages with translation keys
- Updated status labels (inUse, enabled, configured)
- Updated all modal components (SignalSource, ModelConfig, ExchangeConfig)
- Added language prop to all modal components
- Replaced all Chinese UI text with translation function calls
The implementation now properly supports language switching between English and Chinese throughout the entire application.
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
New Features:
- Add 'enabled' field to trader config for selective startup
- Only enabled traders will be initialized and run
- Display skip messages for disabled traders in logs
Bug Fixes:
- Fix Hyperliquid account value calculation
* AccountValue is total equity, no need to add TotalMarginUsed
* Correctly calculate wallet balance without unrealized PnL
* Fix available balance calculation (AccountValue - TotalMarginUsed)
- Fix frontend page refresh navigation issue
* Use URL hash to persist page state across refreshes
* Support browser back/forward buttons
* Prevent Details page from reverting to Competition on refresh
Technical Changes:
- config/config.go: Add Enabled bool field to TraderConfig
- main.go: Skip disabled traders during initialization
- trader/hyperliquid_trader.go: Correct account value logic
- web/src/App.tsx: Implement hash-based routing
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
Previously, the frontend DecisionRecord type was missing the input_prompt
field that exists in the backend DecisionLog, causing the input context
sent to AI to not be displayed in the UI.
Changes:
- Add input_prompt field to DecisionRecord interface in both type files
- Add collapsible Input Prompt section in DecisionCard component
- Display input_prompt before AI Chain of Thought with blue styling
- Use same expand/collapse interaction pattern as CoT trace
Now users can view both the input context and AI's reasoning process
in the decision cards.
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
Previously fixed StatCard components but missed the Debug Info section,
causing "Cannot read properties of undefined (reading 'total_pnl')" error
when account data is loading or incomplete.
Root cause:
- Frontend uses SWR with async data fetching (5s refresh interval)
- During initial load or API delays, account object may exist but fields undefined
- Previous fix (93e331a) only covered StatCard section (lines 369-384)
- Debug Info section (lines 360-362) still used direct property access
Changes:
- Add optional chaining (?.) to all account field accesses in Debug Info
- Add fallback values ('0.00') for undefined fields
- Ensures consistent null safety across all account data displays
This prevents runtime errors during data loading and API failures.
Fixes: TypeError: Cannot read properties of undefined (reading 'total_pnl')
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
Major improvements:
- Use period-level Sharpe ratio (range -2 to +2) instead of annualized
- Save full user prompt in decision logs for debugging
- Format complete market data (3m + 4h candles) for AI analysis
- Prevent position stacking with duplicate position checks
- Update Sharpe ratio interpretation thresholds
Market data enhancements:
- Display full technical indicators in user prompt
- Include 3-minute and 4-hour timeframe data
- Add OI (Open Interest) change and funding rate signals
Risk control:
- Block opening duplicate positions (same symbol + direction)
- Suggest close action first before opening new position
- Prevent margin usage from exceeding limits
UI improvements:
- Update multi-language translations
- Refine AI learning dashboard display
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
- Add language context and translation system (Chinese/English)
- Enhance UI components with i18n support
- Update AILearning, EquityChart, and CompetitionPage
- Add language toggle in header
- Improve user experience with localized text
- Frontend trading records and UI enhancements
- Optimized AI prompts and decision engine
- Performance analysis and comparison features
- Binance-style UI improvements
- Multi-AI competition mode (Qwen vs DeepSeek)
- Binance Futures integration
- AI self-learning mechanism
- Professional web dashboard
- Complete risk management system