feat(hub): mobile AI tabs and dashboard position lines

Mobile AI coach uses four top tabs (trading, general, history, new) with single-panel view and wider desktop history. Dashboard account cards show key levels and positions one per line with colored float PnL.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-11 11:16:28 +08:00
parent c59a17f9ac
commit 1042fdeef3
7 changed files with 185 additions and 39 deletions
+2
View File
@@ -8,6 +8,7 @@ from hub_ai.context import (
build_daily_context,
collect_closed_trades_snapshot,
format_account_remark,
format_dashboard_account_lines,
)
from hub_ai.config import trading_day_reset_hour
from hub_trades_lib import current_trading_day
@@ -63,6 +64,7 @@ def _enrich_account_row(ac: dict) -> dict:
"float_pnl_u": ac.get("float_pnl_u"),
"open_position_count": ac.get("open_position_count"),
"remark": format_account_remark(ac),
"remark_lines": format_dashboard_account_lines(ac),
"issues": ac.get("issues") or [],
"daily_loss_pct": loss_pct,
"loss_alert": loss_alert,