Commit Graph

676 Commits

Author SHA1 Message Date
dekun 0ce14c8822 Add missing last_alert_message column migration for key_monitors.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 12:54:07 +08:00
dekun dbd8764b0d Fix light-mode system logs readability and add calendar day card frames.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 12:42:51 +08:00
dekun 944673cac1 Improve hub and instance navigation contrast for light and dark themes.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 12:33:54 +08:00
dekun 66d0721c12 Fix archive chart visibility and contrast in light theme.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 12:19:03 +08:00
dekun e4893a6306 Refine archive cumulative PnL chart proportions and axis layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 12:14:17 +08:00
dekun 8714bb6fd3 Fix archive.js syntax error that broke the entire archive page.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 12:04:31 +08:00
dekun daf023b403 Improve archive stats chart layout and fix invisible bar colors.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 11:58:27 +08:00
dekun f3af6e2a53 Add collapsible archive stats charts and calendar sections.
Show win rate ring, PnL and sick bars, exchange breakdown, hold-time comparison, and cumulative curve below the stats table; wrap the trading calendar in a foldable panel.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 11:49:09 +08:00
dekun d1ab2d5172 Add options stats holding time metrics and lightweight charts.
Show average hold duration for wins and losses, open positions, and CSS ring/bar visualizations in the stats tab.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 11:32:45 +08:00
dekun 9f255f13dd Add ITM and OTM filter toggles to options chain.
Default to in-the-money view with at-the-money contracts included; update expiry counts and empty states for the active filter.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 11:25:24 +08:00
dekun b70ce510ef Add tabbed layout for options positions card.
Split current positions, stats, and history into tabs to save vertical space and improve readability.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 11:19:33 +08:00
dekun b6d116ec7a Fix options positions API 500 from sync throttle UnboundLocalError.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 18:19:45 +08:00
dekun f99900ac40 Fix intermittent loss of options positions and realtime PnL on refresh.
Use stale-while-revalidate for positions API and UI, throttle sync calls, and avoid overwriting displayed PnL with null on transient failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 18:09:58 +08:00
dekun 5a97e14f3e Fix false options close sync, restore bar layout, and show open premium in history.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 17:51:07 +08:00
dekun 08a61fd4ae Tighten options position bar grouping and compact history table status layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 17:43:24 +08:00
dekun af7a397816 Fix options position bar layout so Put badge and contract id display on one line.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 17:37:24 +08:00
dekun 3d11b91869 Expand options position card inline below the clicked bar.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 17:06:22 +08:00
dekun ff83f6eebc Refine options position accordion: default collapsed, 2dp PnL, card outside scroll.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 17:00:06 +08:00
dekun f41af0bf1c Improve OKX options sizing, expiry sync, and multi-position accordion UI.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 16:51:48 +08:00
dekun d092f213a7 Fix hub system logs by resolving PM2 log paths from jlist and glob fallback.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 10:38:24 +08:00
dekun 5214794f95 Add hub system logs page with PM2 stdout/stderr tabs for all exchanges.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 10:33:14 +08:00
dekun 9eb10ba771 Align risk policy cards per row with equal-height stretch in 2x2 grid.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 10:21:25 +08:00
dekun db8a9296a7 Fix risk policy layout to 2x2 grid with content-based card heights.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 10:17:15 +08:00
dekun f4361e3eeb Make risk policy cards responsive with auto-fit grid layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 10:09:49 +08:00
dekun 23ba725c89 Fix intraday profit amount and hide TP/SL cancel for day trades.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 09:55:09 +08:00
dekun 44546d1a96 chore: enforce LF line endings for docs/
Prevents spurious CRLF diffs when editing documentation on Windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 09:34:21 +08:00
dekun d3a44b23db Split journal order type from entry reason and fix review edit toggle in embed shell.
Adds order_type to journal uploads, removes legacy swing/trend labels from entry reason options, and ensures review-edit buttons sync when the records tab loads dynamically.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 09:27:03 +08:00
dekun 4abe8a6ca9 Fix instance settings prefs JS 404 on static route.
Register instance_settings_prefs.js (and options_panel.js) in install_instance_theme_static; add delegated click handlers for embed lazy tabs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 00:07:30 +08:00
dekun f5bdaee886 Fix instance nav display prefs save in embed shell.
Re-bind save button when settings tab loads lazily; scope form lookup to settings pane.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 23:58:06 +08:00
dekun bb0f328f2f Fix hub AI save PM2 restart NameError in hub_env_lib.
Import restart_instances_then_hub_pm2 so background restart after AI env sync actually runs on the server.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 23:48:40 +08:00
dekun b733e551a0 Normalize fullwidth punctuation to ASCII across codebase.
Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 23:42:26 +08:00
dekun aaa72c7961 Fix hub AI save: background PM2 restart after JSON response.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 23:06:31 +08:00
dekun 823aeda42a Add hub AI config tab with sync to instances and deploy secret bootstrap.
Wire bootstrap_deploy_secrets into setup_env.sh (one-time HUB_BRIDGE_TOKEN, FLASK_SECRET_KEY, HUB_SESSION_SECRET). Remove AI section from instance env UI; hub saves OPENAI settings to all four .env files. SSO unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 22:50:58 +08:00
dekun 886f7740f2 Remove redundant reload toolbar from hub settings page.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 22:17:06 +08:00
dekun 79962d2cf3 Remove redundant Save All button from hub settings page.
Each settings tab already has its own save action; keep reload only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 22:07:41 +08:00
dekun 88f7f0cfca Add hub settings tabs and account password change UI.
Restructure manual-trading-hub settings with CSS tabs matching instance layout; add password API writing HUB_USERNAME/HUB_PASSWORD to hub .env.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 22:01:26 +08:00
dekun d339971c26 Fix env config UI to show runtime defaults when keys are missing from .env.
Account risk fields now match the risk policy page; uncomment RISK_* defaults in .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 21:54:47 +08:00
dekun 2e0bde9cc2 Fix settings 500: pop display before building instance settings view.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 21:50:31 +08:00
dekun 1ee9eb02c3 Add settings page tabs and show env API keys with last four digits.
System settings now use the same CSS tab layout as env config; sensitive env fields display masked values from .env while keeping save-on-empty behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 21:31:14 +08:00
dekun 12e44ab26d Fix env config tabs with CSS radio labels, no JS required
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 21:19:23 +08:00
dekun 4b3373a68d Fix env config tab clicks via document event delegation
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 21:14:42 +08:00
dekun 576f6fbcfc Redesign env config UI: tabs, 2-col form, remove per-field badges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 21:10:54 +08:00
dekun 0d2ce9c126 Add curated env config UI with Chinese labels and deploy secret bootstrap
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 21:03:00 +08:00
dekun 0b91d26f71 Fix Jinja conflict: rename display meta items to entries
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 20:38:52 +08:00
dekun 68e03ccd97 Fix settings tab 500 and env config grouping in UI
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 20:33:31 +08:00
dekun aa966114b1 Fix settings and env config stuck on loading via SSR form render
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 20:24:15 +08:00
dekun 6975da8575 Fix settings loading and use 2-column card layout.
Merge Flask GET/POST routes, refresh prefs on tab revisit after preload, and reorganize system settings into separate cards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 20:12:22 +08:00
dekun ef4b2f17ca Add instance nav prefs, env config UI, and PM2 restart.
P1-P4: configurable nav/section visibility in system settings, full .env editor with restart badges, password change, runtime hot overrides, and single-instance pm2 restart. Works in hub embed iframe.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 20:07:06 +08:00
dekun d84a265b67 Split risk policy into its own navigation tab.
Move read-only risk control docs to /risk_policy before settings; keep transfers and exports on the settings page.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 19:42:29 +08:00
dekun fd6391b734 Remove manual refresh funds button from header.
Account snapshot already refreshes automatically on load, interval, and tab switch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 19:18:44 +08:00