Commit Graph

53 Commits

Author SHA1 Message Date
dekun 0a20ee7eec Show estimated risk, profit, and RR below manual order form.
Add a preview bar under the live order form with risk in red and profit in green; extend preview logic for all SL/TP modes across embed and standalone instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 19:19:32 +08:00
dekun cfc703ae5b Fix double POST on open position in embed shell mode.
Embed capture-phase form handler and allowManualOrderSubmit both submitted /add_order; skip custom forms and use a single fetch reload path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 19:03:25 +08:00
dekun 2dadd93d91 Fix embed date filter reload and classify profitable stops as trailing TP.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 11:27:42 +08:00
dekun 322060de31 Show position-limit freeze on hub and instance risk badges.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 01:58:24 +08:00
dekun bced61b9d7 Avoid hub iframe overlay on embed shell tab switches.
Use in-shell content loading state instead of parent postMessage so tab changes do not trigger the full instance-frame loading mask.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 01:23:40 +08:00
dekun 4ad335ca84 Add hub iframe embed shell with tab fragment API.
Replace full-page soft nav with a persistent shell and /api/embed/page loads so tab switches in the hub iframe avoid document.write flicker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 01:13:34 +08:00
dekun 813ebf0e4e Skip exchange PnL sync on hub iframe soft nav to fix slow records tab.
Remove hover prefetch and mark soft-nav fetches so Gate/OKX render pages from local DB without blocking on exchange history sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 00:39:54 +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 e3559531d9 Revert instance soft nav cache to fix navigation flicker
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 23:59:27 +08:00
dekun 016c93faf2 Add 7-day local page cache for instant instance nav switching
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 23:52:28 +08:00
dekun e03863d780 Add roll leg avg/TP profit display and reduce instance nav flicker
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 23:42:02 +08:00
dekun 89909c64a3 Align trade record detail fields with label-value grid layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:04:50 +08:00
dekun 21f86906da Fix mobile trade records hidden by CSS cascade overriding compact list.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:58:56 +08:00
dekun c302c3e4ea Add mobile compact trade and journal lists with tap-to-expand detail.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:53:56 +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 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 3d29b4f9d9 fix(instance): restore review edit button after hub iframe nav
Sync review-mode checkbox with disabled state after form restore; repair initHubEmbedInFrameNav regression in instance_theme.js.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 11:21:31 +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 58e940629a fix(order): hide estimated RR preview in fixed RR SLTP mode
Only price and percentage modes show estimated profit-loss ratio before open; fixed RR mode keeps the existing estimated take-profit display.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:26:18 +08:00
dekun f9257b64e4 feat(order): show estimated RR before open across four exchanges
Add shared manual_order_rr_preview.js to fetch order_defaults after symbol and TP/SL inputs complete, display estimated profit-loss ratio before submit in price and percentage modes (and fixed RR), unified for risk and full-margin sizing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:19:32 +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 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 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 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 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 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 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 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
dekun ea92160d54 Fix strategy records list showing empty rows after hub close.
Records were still in the database but CSS clipping hid row text; restore visible summary styling and symbol fallback from snapshots.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 08:51:47 +08:00
dekun 674d721072 fix(ui): light-theme contrast for AI daily and weekly review markdown across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 14:05:02 +08:00
dekun 4ac4c062e0 fix: AI review loading UX and Gate preview snapshot time filter SQL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:51:16 +08:00
dekun 995ee8d2e1 fix: prevent theme flash when navigating instance pages from hub iframe
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:23:51 +08:00
dekun e30d24173f fix(ui): light-theme badges, PnL colors, and journal detail across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:16:29 +08:00
dekun 1b51f73ecd fix: journal detail contrast and unify AI review journal format across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:09:59 +08:00
dekun 93e148a3e7 fix: unify order/key focus K-line theme, PnL, RR and exchange price tick
Share focus_chart templates and APIs across four instances; align chart Y-axis, price lines and meta bar with exchange symbol precision and live unrealized PnL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 16:45:51 +08:00
dekun 3b4120a36e fix(instance): light-theme journal AI buttons and mood checkboxes
Fix secondary button contrast, exclude checkboxes from dark input fill, style mood-grid; bump theme assets to v4.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 13:12:44 +08:00
dekun 21b3e97571 fix(instance): light-theme P/L colors, AI review panels, bot stats
Restore plan floating P/L and st-done greens; fix panel-item and stats-split-col in light mode; observe journal lists; bump theme assets to v3.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 13:07:00 +08:00
dekun be3ce18665 style(instance): unify light theme across four exchanges
Extend instance_theme CSS/JS for trade, strategy, records, journal and stats tabs; remap inline dark colors; bump static assets to v2.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 12:59:42 +08:00
dekun d14c629778 feat: add light/dark theme to exchange instances with hub SSO sync
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 12:52:27 +08:00