Commit Graph

269 Commits

Author SHA1 Message Date
dekun d3d366d0ee Hide disabled exchanges from dashboard and fund overview.
Only aggregate and display exchanges with enabled monitoring in system settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:41:52 +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 f4d7dec111 Trim trailing zeros in calculator market info display.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:29:08 +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 caf4996159 Add settings toggles for plan, archive, and AI coach nav items.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:19:12 +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 a837cfd14c Fix broken hub_macro_calendar_lib import in hub.py.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:50:09 +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 c0f3606ecc Add win rate and profit-loss ratio to archive stats.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 09:13:37 +08:00
dekun c05afbbedf Add win/loss metrics to archive stats with symbol filter sync.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 09:03:21 +08:00
dekun 073a382d41 Unify key support/resistance monitor type and fix form parity.
Merge 关键阻力位/关键支撑位 into 关键支撑阻力, share key_monitor_form.js across hub and new-tab views, and add hub shortcut to /key_monitor.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 08:31:14 +08:00
dekun 9330e356fc Fix freeze countdown exceeding configured cooloff hours.
Clamp future last_close anchors, cap remaining time server-side, prefer freeze_remaining_sec in the badge JS, and auto-repair stale DB rows on read.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 22:11:09 +08:00
dekun f8e760961e fix(risk): reset badge to normal when freeze countdown expires
Also expand account-risk-cooldown docs with countdown format, API fields, and frontend assets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 17:47:47 +08:00
dekun 97370926d6 feat(risk): show live countdown on freeze status badges
Expose freeze_until_ms from risk API and tick hub/instance badges with remaining 1h/4h/daily time.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 17:41:04 +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 be7f5d5072 fix(auth): stop pre-filling login username on new devices
Remove username_hint from hub auth status API and disable autocomplete on hub and instance login forms.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 19:21:46 +08:00
dekun b6acbf4b2c fix(risk): trigger cooldown only on user-initiated closes
Remove external-close risk hooks; register user_instance, user_hub, and user_trend_stop via hub API and trend stop; update docs and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 19:14:05 +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 869728ce10 feat: archive trades by close time and show open time on live positions
Sort inner-archive daily trades by closed_at_ms; add open time and live hold duration to instance and hub position cards, with exchange margin on hub footer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 06:20:18 +08:00
dekun ad1c08a2cc fix(hub): remove duplicate AI chat declarations causing white screen
Drop redeclared AI_CHAT_MAX_ATTACHMENTS and aiChatPendingFiles in app.js that broke script parsing after the chat perf update.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 02:02:33 +08:00
dekun 467d160f4d perf(hub-ai): reduce CPU load during trading coach chat
Cache chat context, parallelize exchange fetches, skip fund history writes, defer rolling summary to a background thread, and cache markdown rendering on the client.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 01:59:43 +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 c1e0e52f8c fix(hub): restore monitor host status panel after missing pref helpers
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 14:18:34 +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 ab862efc4e feat(hub): add yesterday close and high-low price line toggles on market chart
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 20:45:09 +08:00
dekun 6a1f2608b5 feat(hub): rolling chat summary to cap AI context and prevent mid-session failures
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 21:51:34 +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 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