Commit Graph

833 Commits

Author SHA1 Message Date
dekun 2f7e6355a1 Add section badges to strategy TOC/headings and fill cards to viewport height.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 17:41:04 +08:00
dekun 023bf6a814 Simplify strategy TOC to h2-only one level.
Drop nested h3 entries from the sidebar directory so the outline stays flat and easier to scan.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 17:37:39 +08:00
dekun 9198aa0dcd Fix strategy checklist hidden class so tabs do not stack.
Generic .hidden was missing display:none, so 执行清单 stayed visible beside 策略正文.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 17:32:04 +08:00
dekun 82c910fbf8 Add blog-style TOC to strategy doc; checklist as separate tab.
Strategy page uses 策略正文 (MD + sticky h2/h3 TOC) and 执行清单 tabs so full playbook detail stays readable with jump navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 17:29:18 +08:00
dekun 778a215ad7 Fix strategy checklist print closing too early.
Stop auto-closing the print tab on afterprint (short checklist pages were especially fragile), load print HTML via fetch into a blank window, and use CSS checkboxes instead of Unicode ballot boxes.

Co-authored-by: Cursor <cursoragent@cursor.com>
snapshot/pre-strategy-mindmap-20260718
2026-07-18 16:16:34 +08:00
dekun faf21da955 Show trade record prices at exchange tick precision.
API enriches entry/SL/TP with price_to_precision display strings; OKX formatter now uses the same path as Gate/Binance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 15:41:49 +08:00
dekun 0a14fe73c1 Add key auto-order toggle to instance env config UI.
Expose KEY_AUTO_ORDER_ENABLED and KEY_AUTO_MIN_PLANNED_RR under 交易执行 so the frontend matches the settings readout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 15:31:39 +08:00
dekun 27c116f872 Stop embed form interceptor from blanking trade records after journal save.
Exclude journal-form from InstanceEmbed submit reload, stopImmediatePropagation on AJAX save, and force-reload trades when the table is stuck on loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 15:28:52 +08:00
dekun a244850b25 Fix journal AJAX save in embed so trades stay loaded.
Delegate submit handling for late-mounted #journal-form across OKX/Binance/Gate, avoid full reload fallback, and soft-refresh trade rows after save.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 15:23:48 +08:00
dekun 8f4ae8ad31 Speed up journal save with AJAX and async K-line charts.
Defer exchange chart generation to a background thread and save via XHR so fill-from-trade no longer blocks on full page reload.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 15:15:24 +08:00
dekun 813ecdd4ac Lighten hub options snapshot by skipping history stats.
Monitor board only needs positions, balances, and targets; drop the OKX positions-history pull each poll, and surface timeout errors via msg.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 15:00:55 +08:00
dekun 217e752ee6 Shrink instance dashboard header type and show options net PnL.
Header copy is smaller; options column uses bid-recycle net PnL like the options card.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 22:04:21 +08:00
dekun 173f09300b Align instance dashboard with hub snapshot+SSE pattern.
Background poll builds a memory snapshot; the page reads snapshot and refreshes on SSE instead of hitting heavy exchange APIs on each load.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 22:00:30 +08:00
dekun aabbbef0a9 Turn position/margin/sizing/direction env fields into dropdown selects.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 19:41:47 +08:00
dekun 53e55aa4b4 Redirect Gate and Binance page routes into the embed shell like OKX.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 19:36:39 +08:00
dekun 041692a763 Retry pip installs during deploy to tolerate flaky mirrors.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 16:02:51 +08:00
dekun 572239f69c Fix pip --progress-bar for pip 26+ so instance deploy can install deps.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 15:47:33 +08:00
dekun 0f12e0a8ea Add single-exchange instance-only deploy menu options.
Manage menu 4/5/6 install OKX/Binance/Gate Flask only without hub or agents; reuse setup_env --only and narrowed PM2 verify.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 15:40:25 +08:00
dekun 2269bc51ff Deduct round-trip taker fees from estimated perp PnL.
Unify hub/instance TP profit, calc_pnl, and push/accounting to net of 0.05% per side; leave exchange floating PnL unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 15:12:52 +08:00
dekun d5e6132b13 Spread dashboard KPI items evenly across the card.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:55:15 +08:00
dekun 89148bb119 Merge dashboard KPIs into one compact card.
Put status badge and expand on one row; drop funds footnote, win/loss, and separate options float KPI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:52:05 +08:00
dekun 549d8a015c Show pure-option source and net PnL on dashboard.
Restore 纯期权 label for non-hedge option rows and use close-preview net PnL instead of exchange upl.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:32:43 +08:00
dekun c4c8ad172a Label dashboard positions from monitor sources with priority.
Match hedge/roll/trend/order/key monitors for source badges, show option target monitors in green, and refresh the dashboard with the board 5s cycle.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:25:36 +08:00
dekun 0bda44248f Show only positioned accounts on the dashboard.
Drop per-exchange fund metrics and render open positions as labeled tables while keeping closed-trade details.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:13:44 +08:00
dekun 33b3e5f54b Keep calendar day trades inline and hide K-line by default.
Show selected-day trades under the calendar without tab jumps, put trades first, and open the chart only via toolbar or row actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:05:59 +08:00
dekun e70e6c7b13 Split archive into four content tabs.
Move chart overview and calendar into their own tabs so trades and quotes stay focused.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:59:44 +08:00
dekun b7f3a5c289 Add top-nav Quotes blog feed page.
Surface recent review quotes grouped by trading day with expand, day PnL summary, and AI review jump.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:54:24 +08:00
dekun 7a0d015416 Add archive tabs for trades vs review quotes.
Switch hub 内照明心 to a single-column tab layout and auto-show that day's closed trades under the quote form for AI review context.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:41:13 +08:00
dekun afb771fef1 Shrink hub archive panels to content height instead of filling the viewport.
Remove 100vh min-heights and flex-grow on quotes/trades so idle space below 5-row lists collapses.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:30:15 +08:00
dekun e5e1d5edcc Paginate hub archive trade records at 5 per page.
Match the instance records pager so 内照明心 lists stay compact with prev/next controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:27:42 +08:00
dekun c2a40e3cc5 Fix empty AI review content from gemma reasoning token use.
Parse alternate reasoning fields, retry with a larger max_tokens budget, cap review images, and fall back to text-only when vision returns empty.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:21:06 +08:00
dekun 4126784056 Make env config panel full width like the funds header strip.
Match settings/risk-policy: span the page grid so the card aligns with account stats.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:16:06 +08:00
dekun af7fb44650 Raise Nginx proxy timeouts so AI daily/weekly review is not cut at 60s.
POST /ai_daily_review was returning 504 while the model was still running; patch BT reverse-proxy read/send timeouts to 360s on deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:12:32 +08:00
dekun 5bd3f3250a Restore vertical gaps between cards on the records/review panel.
The pagination wrap stacked cards without inheriting the page grid gap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:05:54 +08:00
dekun f27b4bc1ec Fix OKX header trade stats stuck at zero after settings shell load.
Always SSR records summary on embed shell (including settings/risk/env), and refresh total/win-rate/PL ratio via account_snapshot so soft-nav cannot leave the strip blank.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:03:04 +08:00
dekun 3a20546782 Make risk policy and settings panels full width.
Match the funds header span by spanning the two-column content grid.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 12:55:40 +08:00
dekun 35117ba84e Polish dashboard tables: hub-style orders, options source/expiry, hedge status.
Show 进行中 in green for active hedges; options columns include source/target/expiry; merge live mark/contracts/pnl from price snapshot.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 12:23:25 +08:00
dekun cd2dfac2ba Hide empty dashboard sections and render data as tables.
Orders/keys/strategy/options/hedge only appear when they have rows, shown in table layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 12:14:03 +08:00
dekun c7aae67881 Add instance data dashboard (default off).
Read-only overview of live orders, key monitors, and strategy; show options/hedge only when present. Toggle via system settings nav prefs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 12:09:29 +08:00
dekun f7ba7c2f7d Auto-fill journal direction from trade records.
Add a required direction field on the review form, persist it, and set long/short when clicking 填入复盘.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 12:00:09 +08:00
dekun f435e9dfaa Render saved journals as a table like trade records.
Desktop journal list now uses columns for coin, direction, PnL, times, and actions instead of stacked entry cards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:55:18 +08:00
dekun d9b8069906 Add shared records review pagination for all three exchanges.
Paginate trade records, journals, and AI history at 5 per page with soft in-card flips; hide the journal form until 填入复盘.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:52:02 +08:00
dekun 57f8d6761c Keep options review paging in-card without layout jump.
Soft-load table rows on prev/next so height stays stable and the page below does not flash.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:40:23 +08:00
dekun 77ab7503a1 Show total pages and card-local AJAX paging on options review.
Trades and reviewed lists now report page X / Y and flip without full-page sync refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:34:21 +08:00
dekun 06ffb6ee0f Keep page scrollbars at the window right edge across hub pages.
Move funds scrolling to body, keep monitor/market on a full-width shell, and stretch other desktop shells so page scroll is never inset.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:27:29 +08:00
dekun 78c44fdeab Fix funds overview clipping on 1920x1080.
Make the funds stage scrollable, give the equity chart a fixed height so date labels fit, and stop truncating account cards without a scrollbar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:24:41 +08:00
dekun cb2fcd283a Give funds equity curve more room on 1920x1080.
Drop the 42vh chart cap, let the curve fill remaining height, and scroll account cards so the curve is not clipped.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:19:58 +08:00
dekun 3f6e4329d9 Fix market chart collapse while keeping edge scrollbar.
Restore app-shell to full-viewport height for flex charts, and stretch the shell full width so the scrollbar stays at the window edge.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:15:23 +08:00
dekun 353c09ea0d Put hub page scroll on body so the scrollbar sits at the window edge.
Revert the host-status chevron move; the inset scrollbar came from scrolling the centered app-shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:10:15 +08:00
dekun ee9608dc80 Move monitor host-status chevron to the right edge.
Align the server-status disclosure arrow with the common right-side fold pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:07:41 +08:00