Lxy
3d7ddd5892
fix: align reflection frontend API calls with backend
...
- trReflSaveEdit now uses POST /reflections for new and PUT /reflections/{id} for updates
- Tags are synced separately via /trade-pairs/{id}/tags endpoints
- trReflSaveDaily uses correct field names: overall_rating, market_judgment, improvements
- trReflOpenAIModal now calls /reanalyze/{id}/latest and falls back to POST /reanalyze
- trReflSaveExperience uses /ai-analysis/{id}/save-experience with analysis_id
- Added save-and-analyze flow and tag sync helpers
- Verified JS syntax with node --check
2 weeks ago
Lxy
e2c8d5976d
feat: add AI reanalysis backend for trade reflections
...
- Added TradeAIAnalysis model for multi-version AI analysis results
- Created reflection_ai_analysis.py service with reflection-enhanced prompt
- Implemented analyze_with_reflection(): builds prompt, calls AI, parses JSON, saves version
- Added get_analysis_history(), get_latest_analysis(), save_suggestion_as_experience()
- Added 4 new API endpoints: POST /reanalyze, GET /reanalyze/{id}/history,
GET /reanalyze/{id}/latest, POST /ai-analysis/{id}/save-experience
- Updated analysis_db.py to import TradeAIAnalysis
- Verified app imports successfully
2 weeks ago
Lxy
476ea0930f
feat: add trade reflection frontend sub-tabs and views
...
- Added subtabs to trade-review view: 统计分析 / 交易反思 / 经验库
- Implemented 交易反思 view with date selector, daily stats, daily reflection section, trade pair cards, unpaired trades list
- Implemented reflection edit modal, daily reflection modal, tag management modal, AI analysis result modal
- Implemented 经验库 view with search, filters, list/timeline/category views
- Added '进入反思' links in daily summary table to switch to reflection tab
- Reused existing CSS variables and Apple-style design
- Added frontend JS integration with /api/v1/trade-review endpoints
2 weeks ago
Lxy
f85ae2bced
feat: add trade reflection system backend APIs and pairing engine
...
- Created trade_pairing_engine.py with auto/manual pairing logic
- Added daily trades view API with pairing and reflection status
- Added reflection CRUD APIs (POST/PUT/GET /reflections)
- Added daily reflection CRUD APIs (POST/GET /daily-reflections)
- Added tag system APIs (GET/POST /tags, POST/DELETE /trade-pairs/{id}/tags)
- Added experience library APIs (GET/POST/PUT/DELETE /experiences)
- Updated trade_review.py imports and added 20+ new endpoints
- Updated tasks.md to mark tasks 1-4, 6 as complete
2 weeks ago
Lxy
bceb57c0c3
feat: add trade reflection system data models and preset tags initialization
...
- Added TradePair, TradeReflection, DailyReflection, TradeTag, TradeRecordTag, TradeExperience models
- Updated analysis_db.py to include new models in init functions
- Added _init_preset_tags() function with 19 preset tags in 4 categories
- Updated tasks.md to mark task 1 as complete
2 weeks ago
Lxy
bded945ec5
fix: 动态读取 MySQLSessionLocal,避免模块导入顺序导致迁移跳过
2 weeks ago
Lxy
713984cea3
fix: 检查 _save_to_mysql 返回值,迁移时 JSON 损坏不回填
2 weeks ago
Lxy
58bf54f7bf
fix: 修复 ConfigStore 写入顺序、JSON 原子写入、JSON 损坏不回填、清理未使用导入
2 weeks ago
Lxy
a599130a51
feat: 将 symbols/ai 配置迁移到 MySQL,保留 JSON fallback
2 weeks ago
Lxy
27974474f8
fix: 修复 MySQL session 创建失败降级和迁移对象 detached 问题
2 weeks ago
Lxy
1111963c5f
feat: 将 futures_analysis.db 迁移到 MySQL 并支持 Redis 缓存
2 weeks ago
Lxy
98567a3204
fix: 修复时区不匹配导致行情数据读取失败
2 weeks ago
Lxy
0a519d5c7d
fix(cache): fallback to SQLite when StorageManager timestamp write fails
2 weeks ago
Lxy
d9bda2c4cf
fix(storage): use CACHE_TTL_SECONDS for is_fresh and REDIS_TTL_SECONDS for cache TTL
2 weeks ago
Lxy
e17a183262
fix(storage): address final review findings on atomic writes, migration, config and URL encoding
2 weeks ago
Lxy
46f5846c99
fix(migration): ensure SQLite records are correctly inserted into MySQL
2 weeks ago
Lxy
177a10fbd1
fix(storage): inject Redis/MySQL clients into StorageManager singleton
2 weeks ago
Lxy
bf4f571f0e
fix(cache): remove redundant filtering and avoid mutating StorageManager results
2 weeks ago
Lxy
2720ddb728
fix(cache): resolve StorageManager integration compatibility issues
2 weeks ago
Lxy
7ee6794095
feat(cache): integrate StorageManager into cache service with SQLite fallback
2 weeks ago
Lxy
5db0546e5f
feat(app): trigger SQLite to MySQL migration on startup
2 weeks ago
Lxy
a26a44e5c9
feat(migration): add SQLite to MySQL data migration script
2 weeks ago
Lxy
59e461a163
fix(storage): use input timestamp in save and expand test coverage
2 weeks ago
Lxy
8f3c2b6fdb
feat(storage): add StorageManager write logic with dual-write consistency
2 weeks ago
Lxy
beba383a92
feat(storage): add StorageManager read logic with Redis -> MySQL fallback
2 weeks ago
Lxy
48f976530f
feat(storage): add StorageManager skeleton with fallback detection
2 weeks ago
Lxy
72d81ce7ea
feat(app): create MySQL tables for market data in lifespan
2 weeks ago
Lxy
a4c3af6c78
feat(app): initialize Redis and MySQL connections in lifespan
2 weeks ago
Lxy
b7ae8973a8
feat(cache): add Redis client module
2 weeks ago
Lxy
7c46ffccb3
feat(db): add MySQL connection module
2 weeks ago
Lxy
17b77c150a
fix(config): unify REDIS_TTL_SECONDS env var name
2 weeks ago
Lxy
4c0bbbb031
feat(config): add Redis and MySQL connection settings
2 weeks ago
Lxy
874d02fb91
fix: 修复配置页面错误问题
3 weeks ago
Lxy
e9e291e063
fix: 重构交易复盘
3 weeks ago
Lxy
5b938ee7f5
fix: 修复交易复盘打不开问题
3 weeks ago
Lxy
e5a30ab63c
fix: 修复标题栏多余问题
4 weeks ago
Lxy
8478210dd9
fix:修复标注问题
4 weeks ago
Lxy
79502d00de
fix: 修复ai分析失败问题
4 weeks ago
Lxy
8ec4d212c5
fix: k线图下载正常
4 weeks ago
Lxy
59af9d9c2f
fix: 交易复盘中的k线加载成功
4 weeks ago
Lxy
e2f620c783
fix: 修复交易复盘bug,目前依然存在k线图bug
4 weeks ago
Lxy
1498532e05
feat: 增加交易记录导入及分析
4 weeks ago
Lxy
8a1918fc8d
fix: 修复复盘计划bug
4 weeks ago
Lxy
90cccbf1df
fix: 修复复盘计划小数点问题
4 weeks ago
Lxy
a1a334b23f
fix: 修复加载复盘与计划失败问题
1 month ago
Lxy
94d06fea27
增加复盘与计划模块功能
1 month ago
Lxy
0ade46805a
fix: 增加批量导出功能
1 month ago
Lxy
693a359010
fix: 增加数据导出功能
1 month ago
Lxy
56c87386bf
fix: 增加复盘计划功能;修复ai分析超时问题;自选功能移到页签上
1 month ago
Lxy
36c33eb005
fix: 添加自选功能;修复细节问题
2 months ago