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>
Use exchange TP/SL for display and DB sync on price_snapshot polls, refresh instance UI cells on each tick, and merge live values into hub monitor board.
Co-authored-by: Cursor <cursoragent@cursor.com>
Shrink summary context and prompts to today's trades and positions only, and tighten anti-fabrication rules.
Co-authored-by: Cursor <cursoragent@cursor.com>
Unify gate_bot with shared enrich_trend_plan for strategy pages and hub monitor, reconcile DCA avg with live entry price, and fix missing fill price display.
Co-authored-by: Cursor <cursoragent@cursor.com>
Align running-plan header and DCA table with risk-budget RR, record actual fill prices after each leg, and save pre-close snapshots on stop/TP/handoff across hub and exchanges.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add 15-day fund snapshot store and /api/hub/account on all instances
- Summary includes yesterday/today trades, fund columns, and section 5 操作建议
- Chat context distinguishes empty positions from local monitors
- Support image/document attachments in AI chat
Co-authored-by: Cursor <cursoragent@cursor.com>
Show emoji headings for overview, accounts, alerts, and data notes; apply green/red styling to table PnL columns.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace pipe-separated account lines with a structured table from stats_snapshot, including exchange icons and position remarks.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse shared ai_review_render.js so summaries and coach replies display formatted lists and bold text instead of raw syntax.
Co-authored-by: Cursor <cursoragent@cursor.com>
Aggregate four-account trades via hub_ai module and /api/hub/trades/today; store sessions in JSON; default OpenAI config matches instances.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use plan margin x leverage x price change with latest K-line close instead of stale board snapshot floating_pnl.
Co-authored-by: Cursor <cursoragent@cursor.com>
Gate hedge position triggers use close=false; stop silent ccxt fallback on cross margin. Hub merges agent and Flask TP/SL by trigger price and labels Gate orders correctly.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use order monitor plan prices on handoff cards and fill exchange TP/SL rows when Gate shows reduce-only orders without algo labels.
Co-authored-by: Cursor <cursoragent@cursor.com>
Pass unrealized PnL from monitor jump context, refresh from board snapshot, and let users drag the SL price line to call the same place-tpsl API as the monitor entrust dialog.
Co-authored-by: Cursor <cursoragent@cursor.com>
Proxy /api/hub/trend/stop and breakeven to instances; enable offset input and actions in hub UI. Add horizontal padding on strategy records page.
Co-authored-by: Cursor <cursoragent@cursor.com>
Left column shows plan metrics, right column DCA table, footer for breakeven and snapshot info; update strategy and exchange usage docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Persist ended trend pullback and roll group snapshots to a unified records page; show replenishment tiers on instance and hub cards with horizontal single-position layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
Position and trend plan cards read sizing from trend_pullback_plans; merge agent mark/PnL; compute position_ratio_pct in hub enrich.
Co-authored-by: Cursor <cursoragent@cursor.com>
Position cards show trend plan source, risk%, program TP price and RR; trend section uses plan grid; hub API enriches floating PnL and planned_rr.
Co-authored-by: Cursor <cursoragent@cursor.com>
Set order monitor and trade record source to trend pullback after handoff; unify hub and instance display; add migration script for legacy rows.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use shared cyan for breakout/fib keys, purple for watch keys, green for trends, and orange for roll groups.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add per-card strategy stats chips for breakout, fib, and watch key levels plus trend and roll plan counts when non-zero.
Co-authored-by: Cursor <cursoragent@cursor.com>
Phone monitor list shows per-exchange tiles with offline, >10% float loss, and missing SL alerts; tap opens full desktop-style detail view.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sync hub positions with instance price_snapshot (order_prices and position_marks).
Fix monitor board UI when hub restarts (version rewind) and queue snapshot fetches.
Expose board aggregate status on /api/ping for diagnostics.
Co-authored-by: Cursor <cursoragent@cursor.com>