Commit Graph

491 Commits

Author SHA1 Message Date
dekun 3ef0750ea9 fix(hub): archive trade row selection by exchange+id
Use composite trade key so Gate accounts with duplicate trade IDs no longer highlight two rows at once.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 20:01:20 +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 959593cdab feat: add timed position close (1h/2h/4h) for key levels and live orders
Program monitors open positions and market-closes at deadline; UI shows label and countdown on instance and hub boards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 19:30:16 +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 65d2bc5e00 fix(hub): restore desktop monitor layout in PWA
Split mobile AI layout from viewport-only mobile detection so standalone desktop app uses full monitor cards again.
2026-06-11 11:41:03 +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 b671c05b1b fix: equalize key monitor and history card heights
Stretch both cards in the dual panel grid while keeping list areas scrollable inside.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 10:04:03 +08:00
dekun acce230a0d chore: normalize line endings in fund overview doc
Keep manual_trading_hub fund overview markdown consistent with Windows CRLF.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 09:51:17 +08:00
dekun 0647bba5f5 fix: make key level history list vertically scrollable
Prevent history rows from shrinking when the list grows; show a stable right-side scrollbar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 09:49:03 +08:00
dekun 324aa1c5c6 fix: include created_at in price_snapshot key monitor query
Avoid IndexError when rendering false breakout gate preview after the gate UI change.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:26:15 +08:00
dekun fa59fc1273 fix: show limit-order gate for false breakout monitors
False breakout used box/convergence volume/break gates in the UI; now shows pending limit order status like fib monitors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:22:41 +08:00
dekun 8c5b9681a9 fix: backfill key_signal_type without sqlite3.Row in init_db
Use tuple indices because init_db connects before row_factory is set.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:15:12 +08:00
dekun 3bdf7cf384 fix: show box/convergence breakout labels in key level trade records
Persist 箱体突破/收敛突破 as key_signal_type and backfill historical records on startup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:11:57 +08:00
dekun f6e3d54d29 revert: restore original order monitor form layout with SL/TP mode width fix
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:01:06 +08:00
dekun 91c8cd8c2a fix: redesign order monitor open form for clearer SL/TP inputs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 07:56:55 +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
dekun 7f1015f852 fix: AI coach chat continuation now carries full draft text
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 00:53:45 +08:00
dekun 6169fee7b9 fix: prevent AI coach chat replies from truncating mid-sentence
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 00:44:08 +08:00
dekun 0e2e360ccf fix: improve AI coach chat context, 128k window, and output limits
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 00:35:01 +08:00
dekun 6977bce64f fix: tighten key monitor rule table typography and copy
Use smaller fonts and shorter cell text so the rule reference fits better on the key monitor page.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 18:50:46 +08:00
dekun 9c7290dea5 feat: add tabular key monitor rule reference on all exchanges
Replace the pipe-separated rule blurb with a detailed five-column table driven by .env-backed gate parameters for easier trading reference.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 18:40:36 +08:00
dekun 5faedfbfb7 feat: collapse fund overview help and bind start day to env
Fold the stats description by default and render history_start_day and keep_days from the API so HUB_FUND_HISTORY_START_DAY in .env drives the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 17:23:54 +08:00
dekun 4f5a982b63 fix: improve fund overview readability and layout
Use tabular mono for amounts, show four account columns on desktop, and remove the scanning line animation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 17:19:19 +08:00
dekun 9602acafb2 feat: restyle fund overview with HUD UI and nav reorder
Move funds before monitor in nav while keeping monitor the default landing page; use card layout with curves in fullscreen and a tech/AI-themed funds dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 17:12:58 +08:00
dekun ec8607932b feat: circular fund account cards with fullscreen detail view
Show per-exchange balances as clickable circles with mini curves; open a fullscreen panel for equity history and drawdown.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 17:04:21 +08:00
dekun ba629ea0ee fix: fund overview history starts from 2026-06-09
Add HUB_FUND_HISTORY_START_DAY so curves and drawdown exclude snapshots before the baseline trading day.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 16:58:57 +08:00
dekun 77c7bbbb13 feat: add hub fund overview tab with 180-day equity curves
Add /funds page for total and per-account balance (funding+trading), drawdown, and daily snapshots from monitor board aggregation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 16:50:47 +08:00
dekun 6eb17b7ddc feat: add trading day split lines on hub market chart
Add toggle before technical indicators to show blue dashed vertical lines at Beijing 8:00 day boundaries.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 08:35:35 +08:00
dekun b6d343a951 sync gate_bot with gate as identical copy instance
Align gate_bot app, templates, and env template with gate while keeping bot identity (port 5002, hub key gate_bot).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 18:19:50 +08:00
dekun 59a45ed027 fix: Gate hub close sync and trade record open stop-loss snapshot
Sync order monitors from Gate position history after hub flat close. Store and display initial_stop_loss in trade records instead of post-amend exchange stops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 18:01:59 +08:00
dekun 02d2a6c70b fix: mobile hub AI keyboard layout and instance top nav scroll
Sync hub shell to visualViewport when the keyboard opens to prevent white screen above chat input. Make instance tabs horizontally scrollable with active tab centered on phone.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 17:16:00 +08:00
dekun 9aba8ec645 feat: hide instance export and stats on mobile, desktop-only downloads
Mark export bar and summary stat cards as instance-desktop-only. Hide all CSV/MD export actions on phone across four exchange instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 17:07:00 +08:00
dekun e60beeedd3 feat: fix mobile AI full-width layout and simplify instance stats
Move hub AI mobile CSS after desktop grid rules so chat fills the screen. Hide exchange and total-trade stat cards on phone across all instances and compact export bar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:57:47 +08:00
dekun ea3ef71477 feat: optimize hub mobile layout with chat-first AI coach tabs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:47:19 +08:00
dekun 3527c26717 feat: collapse trade/strategy rule tips and color-code key history outcomes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:39:36 +08:00
dekun 04d5d5329e feat: show pending key monitor orders in green on summary line
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:26:07 +08:00
dekun 77aef229e9 fix: show full key history alert when expanded in scroll panel
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:22:46 +08:00
dekun 4a043e65e3 feat: improve light mode key monitor UI and collapse rule tips by default
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:18:10 +08:00