fix(hub): inner-light-mind chart, exchange column and layout

Preserve exchange_key from archive cache, fix chart resize in details panel, move filters above quotes, align panel heights, and style sick trades with red/cyan.
This commit is contained in:
dekun
2026-06-11 17:53:25 +08:00
parent bb800b876b
commit 2388ecc882
4 changed files with 138 additions and 45 deletions
+17
View File
@@ -420,6 +420,23 @@ def _trade_row_to_dict(row: sqlite3.Row, overlay: dict | None = None) -> dict[st
except (json.JSONDecodeError, TypeError):
payload = {}
out = {**payload, **{k: d[k] for k in d.keys() if k not in payload}}
for key in (
"exchange_key",
"symbol",
"trade_id",
"direction",
"result",
"pnl_amount",
"opened_at",
"closed_at",
"opened_at_ms",
"closed_at_ms",
"monitor_type",
"entry_reason",
"synced_at",
):
if key in d and d[key] not in (None, ""):
out[key] = d[key]
ov = overlay or {}
out["behavior_tag"] = ov.get("behavior_tag") or ""
out["note"] = ov.get("note") or ""