Commit Graph

134 Commits

Author SHA1 Message Date
dekun 6b872b1f43 feat: 内照明心交易日历与交易所口径成交额/手续费统计
新增按 08:00 切日的月历(盈亏、笔数、犯病日高亮与点击筛选);平仓时从交易所 fill 写入双边成交额与手续费,统计表与明细同步展示。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 08:05:46 +08:00
dekun 924a385d6c Fix plan history detail modal unreadable text over stats table.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 11:17:31 +08:00
dekun b18b2143b5 Restore hub iframe soft nav to cut blank tab switch gap.
Use fetch in-frame navigation with overlay and hover prefetch; show delayed hub loading spinner instead of hiding the iframe.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 00:32:03 +08:00
dekun 7f8ae97a98 Fix hub iframe nav flicker with normal navigation and loading overlay
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 00:06:17 +08:00
dekun acc158f85d Use auto-fit grid for funds and dashboard account cards
Account cards expand to fill available width when fewer exchanges are enabled instead of staying in fixed four-column tracks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:57:24 +08:00
dekun ea5c6cddb4 Add per-card save and collapse on settings page
Each settings section and exchange card gets its own save button and fold toggle with state persisted in localStorage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:37:16 +08:00
dekun 0dedaa2b4d Fix supervisor settings panel inner padding
Align the trading supervision card with other settings panels so content is not flush against the border.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:30:14 +08:00
dekun bfbd6879d6 Add AI trading supervisor with WeChat push and daily session
Proactive monitoring for manual/hub closes and new opens prevents overtrading via in-app alerts, configurable WeChat links, and supervisor chat.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:25:01 +08:00
dekun faa41eece1 Make calculator cards equal height on desktop layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:34:15 +08:00
dekun 5e507d0b66 Use hub exchange instances for calculator contract precision.
Load enabled instances from settings, fetch market info via /api/hub/market, and apply exchange-specific amount and price precision in trend and roll calculators.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:13:02 +08:00
dekun d938bc6c59 Redesign roll calculator with auto first entry and chained add legs.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:44:27 +08:00
dekun 253d353206 Add hub strategy calculator page with trend and roll risk-based sizing.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:35:06 +08:00
dekun 1ba0014fff Add padding to macro settings panel so text is not flush to edges.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:24:07 +08:00
dekun 8e810154ca Add open-instance to trade page and mobile/tablet responsive layouts.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:38:30 +08:00
dekun ed3709dddf Move entry scheme to active plans only, required on archive.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:56:34 +08:00
dekun 091317276d Add entry plan page with CRUD, archive flow, and win-rate stats.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:19:56 +08:00
dekun e470c5952f feat(hub): add macro calendar for pre-release risk alerts
Manual FOMC/CPI/employment entries in settings drive ±1h monitor banners without touching exchange instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 11:52:30 +08:00
dekun d8dccb8606 fix(hub): stop instance iframe nav flash after account status badge
Load account_risk_badge.css before body paint, skip redundant hub theme re-apply, remove iframe hide overlay, and disable badge transitions in hub embed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 19:36:48 +08:00
dekun 6520234bd8 fix(hub): eliminate iframe flash when switching instance nav tabs
Use soft in-frame navigation and loading overlay in hub instance shell; pass embed=1 for iframe SSO opens.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 19:27:52 +08:00
dekun 850ffcd7d2 style(risk): polish account status badge for light and dark themes
Extract shared account_risk_badge.css with theme-aware contrast, dot indicator, and hub/instance layout fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 17:37:32 +08:00
dekun e307eef690 feat(risk): add account cooldown and daily freeze after manual/external close
Implements shared account_risk_lib with 4h/1h cooloff and daily freeze rules, wires hooks into all four exchange apps and hub monitor UI, with tests and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 17:05:19 +08:00
dekun 28a23008f3 feat(hub-ai): paste screenshots in chat and include position TP/SL in coach context
Let users paste images into AI chat with removable pending attachments, and feed exchange/monitor stop-loss and take-profit into trading coach snapshots so replies reflect actual protection on open positions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 01:53:24 +08:00
dekun c95ca6ac35 fix(hub): color host status summary metrics green/red and bust css cache
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 14:26:26 +08:00
dekun 47910e6cb3 fix(hub): use green/red host status indicator at 85% CPU memory disk threshold
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 14:22:49 +08:00
dekun 9e395b6732 feat(hub): fold host status by default, add entrust on grid positions, alert on high CPU/memory
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 14:14:48 +08:00
dekun a89b446d74 fix(hub): improve monitor host status bar layout and document psutil setup
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 14:10:00 +08:00
dekun 1fd0003fc8 feat(hub): show server CPU memory disk and network status on monitor page
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 14:04:05 +08:00
dekun 180aff5310 feat(hub): add archive quote AI coach review from inner light page
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 21:10:39 +08:00
dekun bb8bb3ae34 feat(hub): fix archive quotes inline expand and mobile archive layout
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 20:50:58 +08:00
dekun cf1265763c feat(hub): refactor archive quotes to list-detail with top-form edit
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 20:42:35 +08:00
dekun e7e3a49151 feat(hub): enlarge archive quotes panel and show full text on expand
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 20:33:51 +08:00
dekun a9c40097b3 feat(hub): time-close countdown in monitor position table
Show timed-close badge with live countdown next to contract name in the grid holdings table.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 20:24:30 +08:00
dekun 0d82cd2ad3 feat: show time-close countdown after symbol in monitor area
Move timed-close badge next to contract name on hub board and instance position cards; refresh countdown on board render.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 20:20:13 +08:00
dekun 035060b68a feat(hub): click archive trade row to switch chart
When the K-line panel is open, clicking a trade row switches selection and chart markers without re-fetching candles for the same symbol.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 20:10:56 +08:00
dekun a87234f627 fix(hub): archive chart perpetual label and trade row highlight
Label archive K-lines as USDT swap in title and API; highlight the full trade row when opening its chart.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 19:56:55 +08:00
dekun a9637fafb2 fix(hub): archive labels, symbol column, and time-close dropdown
Force exchange_key on archive sync; add contract column and tag select styles on inner-light-mind; serve time_close_ui.js on instances so order/key time-close duration can be selected.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 19:44:51 +08:00
dekun 879ea5e228 feat(hub): stats table and adaptive trades list height on archive page
Show period stats in a table; limit trades to 10 rows when chart is open and fill viewport when collapsed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 18:18:08 +08:00
dekun 7b0b8996fe feat(hub): add period date range and trade stats to inner-light-mind
Support today/week/month/custom range selection with sick count, PnL, and per-exchange breakdown; update docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 18:09:39 +08:00
dekun 5f79a62b13 fix(hub): sick trade rows use red text only, widen AI history
Remove red background on 犯病 archive rows; fix AI markdown ordered lists; widen chat history sidebar.
2026-06-11 18:01:52 +08:00
dekun 2388ecc882 fix(hub): inner-light-mind chart, exchange column and layout
Preserve exchange_key from archive cache, fix chart resize in details panel, move filters above quotes, align panel heights, and style sick trades with red/cyan.
2026-06-11 17:53:25 +08:00
dekun bb800b876b feat(hub): redesign archive as inner-light-mind journal
Rename archive to 内照明心 with daily trade records by default, review quotes sidebar, on-demand chart, sick-row highlighting, and new daily-trades/quotes APIs.
2026-06-11 17:43:45 +08:00
dekun 51252d5dda fix(hub): keep mobile PWA AI navigation visible
Fix keyboard detection in standalone app so top nav and AI tabs stay visible; recognize PWA display mode for mobile layout.
2026-06-11 11:35:44 +08:00
dekun 08ae171e48 feat(hub): mobile AI one-screen and dashboard monitor counts
Fix mobile AI to scroll only in the chat area. Dashboard cards show monitor item counts with expand-to-fullscreen and color-coded position floating P&L.
2026-06-11 11:27:28 +08:00
dekun 1042fdeef3 feat(hub): mobile AI tabs and dashboard position lines
Mobile AI coach uses four top tabs (trading, general, history, new) with single-panel view and wider desktop history. Dashboard account cards show key levels and positions one per line with colored float PnL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 11:16:28 +08:00
dekun c59a17f9ac fix(hub): improve mobile AI coach layout
Move new-chat button to top toolbar to prevent overlap, compact chrome, hide chrome when keyboard opens, and soften mobile tab styling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 11:06:47 +08:00
dekun 007e089121 feat(hub): settings toggles for funds and dashboard nav
Add show_nav_funds and show_nav_dashboard in hub_settings display prefs to hide top nav entries and redirect direct URL access.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 11:00:19 +08:00
dekun 07e8604ea6 feat(hub): dashboard SSE push, light-theme cards, simplify AI coach
Replace dashboard polling with backend SSE and snapshot refresh. Restyle for light/dark theme with soft card glow instead of neon. Remove Today's Summary from AI page; keep trading and general chat only. Update hub documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 10:53:50 +08:00
dekun 582ada7e60 feat(hub): add data dashboard and AI chat with session history
Add /dashboard with daily PnL overview and loss alerts. Extend AI coach chat with history sidebar, delete/switch sessions, message copy, and trading vs general bot modes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 10:42:33 +08:00
dekun a45a3b18e2 feat: hub setting to hide account balances and PnL in monitor
Persist show_account_pnl in hub_settings.json; refine key monitor panel layout with right-aligned live stats and scrollable history (max 8 rows).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 10:15:57 +08:00
dekun 401ee2f130 fix: stabilize AI coach chat against truncation and empty replies
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 06:27:06 +08:00