Commit Graph

187 Commits

Author SHA1 Message Date
dekun 72dddc5106 Fix options review screenshots missing after journal upload hijack.
Stop journal_upload_slots from binding options slots; resolve journal_* files from static/images root so existing reviews display again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 16:23:37 +08:00
dekun 12574ae88a Fix options review empty lists when search box has symbol text.
Treat the filter as fuzzy q over underlying/inst/strategy (BTCUSDT->BTC) instead of exact strategy_tag, which always wiped pending rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 16:17:45 +08:00
dekun 426afb8dbe Make options review detail a modal and fix screenshot display.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 16:11:45 +08:00
dekun 38ac258497 Color 期期 preview PnL and show RR vs full premium loss.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 15:43:01 +08:00
dekun 7938628485 Fix 期期 sheets bias: split total 2n from same-sheets, not n.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 15:33:00 +08:00
dekun e3cd2a75de Replace 期期 equal-split with long/short bias sizing and env ratio controls.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 15:25:10 +08:00
dekun bc797cb1db Split options review open/close times into separate columns.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 15:08:23 +08:00
dekun 5e0ce43415 Add instance system guide nav (default off) with overview/options/hedge manual.
EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 09:23:30 +08:00
dekun d74d0aeae0 Park partial hedge plans for manual leg complete instead of auto-close.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 09:06:22 +08:00
dekun 899a2de931 Show options position source (纯期权/永期/期期) on holdings cards.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 08:45:17 +08:00
dekun fa2127d66c Make 永期 hedge UI clearer with dir segments and field grid.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 08:34:45 +08:00
dekun d5f3f315dc Show hedge-plan scenario preview in a modal with start/cancel.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 08:28:54 +08:00
dekun 1c155328b4 Move 期期 USDC transfer into T-quote card to free left panel.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 08:20:55 +08:00
dekun 3093d07167 期期: green index after lower target, USDC transfer, clearer selected state.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 08:16:44 +08:00
dekun 79420904f4 Tighten 期期 parameter UI: compact controls, less copy.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 08:10:12 +08:00
dekun 3119486105 Add 期期 close mode (全平/到期平) with scheme-C env toggle.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 08:06:27 +08:00
dekun b3548240cc Auto-fill 期期 sheets from trading balance with same-sheets default.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 00:56:35 +08:00
dekun f21e4d1166 Add env toggles to show/hide perp and options hedge plan tabs.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 00:43:04 +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 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 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 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 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 8842f0b869 Restructure options review into pending trades, form, and reviewed detail.
Show five pending trades per page, reveal the upload form only after clicking 复盘, and list saved reviews with image detail above stats.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 10:50:12 +08:00
dekun 01ca035c2a Add typed options review form presets by source.
Pure options and hedge plans use separate strategy/entry selects, with auto-filled direction and PnL result including breakeven.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 10:27:23 +08:00
dekun d7272c9722 Persist options review deletes across local resync.
Hide deleted rows by history key and contract/close fingerprint so local options_trades imports no longer resurrect them.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 10:03:00 +08:00
dekun 48afc8ebe3 Load options review from local records with compact journal UI.
Drop exchange sync for the review page, auto-import closed local options and hedge plans, and match contract-style multi-timeframe upload styling with smaller fonts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 09:54:35 +08:00
dekun c6142dc246 Show options review upload form always on page.
Keep the multi-timeframe journal card visible like contract review instead of hiding it until a row is selected.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 09:49:14 +08:00
dekun edcc04e88c Improve options review tabs and multi-timeframe uploads.
Add source-type tabs, open an inline journal form from list rows, and match contract-style 5m/15m/1h/4h screenshot slots.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 09:45:44 +08:00
dekun 10128d18bc Add OKX options review module with hedge plan entries.
Import closed OKX option history and closed hedge plans into one list for journaling, images, and stats without mixing contract reviews.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 09:35:19 +08:00
dekun eb5c6a658b Show hedge targets in control center
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 07:29:45 +08:00
dekun 8f71dbe874 Show hedge targets in options monitoring
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 07:15:00 +08:00
dekun 6e6cb7caac Add active hedge plan tab
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 07:04:51 +08:00
dekun 4686cf049a Require real ask depth for options and hedge opens.
Block mark-as-ask opens, show reference mark when no depth, cap sheets to ask size; leave close paths unchanged. Document in docs/更新文档.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:48:53 +08:00
dekun 195eeae295 Fix options select UI and false contract-missing quotes.
Keep the order host out of tbody wipes, sync pick-button labels, and retry/fallback OKX meta under rate limits so live contracts are not reported as missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:18:41 +08:00
dekun b057122d71 Fix options order panel vanishing after select.
Park the panel before strike-table rebuilds so soft chain refresh no longer destroys #opt-order-panel with innerHTML.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:10:45 +08:00
dekun 95e46ab803 Restyle options target-monitor banner for light mode.
Use a light panel with dark text instead of keeping the dark-theme black bar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:06:01 +08:00
dekun 12c4e55f24 Fix intermittent empty options expiry dropdown after coin select.
Retry instrument fetch, reject empty chains instead of caching them, and ignore stale loadChain races.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:04:08 +08:00