fix(hub): archive labels, symbol column, and time-close dropdown

Force exchange_key on archive sync; add contract column and tag select styles on inner-light-mind; serve time_close_ui.js on instances so order/key time-close duration can be selected.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-11 19:44:51 +08:00
parent 959593cdab
commit a9637fafb2
16 changed files with 147 additions and 44 deletions
+26
View File
@@ -245,3 +245,29 @@ def test_resolve_archive_chart_history_uses_trade_span_not_200_bars():
assert out["ok"] is True
assert out["range_mode"] == "history"
assert out["bar_count"] > 200
def test_upsert_forces_sync_exchange_key():
with tempfile.TemporaryDirectory() as td:
db = Path(td) / "archive.db"
init_db(db)
upsert_trades_cache(
"gate_bot",
[
{
"id": 77,
"exchange_key": "gate",
"account_exchange_key": "gate",
"symbol": "ETH/USDT",
"result": "止损",
"pnl_amount": -1,
"opened_at_ms": 1_700_000_000_000,
"closed_at_ms": 1_700_007_200_000,
}
],
db_path=db,
)
rows = load_symbol_trades("gate_bot", "ETH/USDT", db_path=db)
assert len(rows) == 1
assert rows[0]["exchange_key"] == "gate_bot"
assert "account_exchange_key" not in rows[0]