fix(hub): load full pre-entry history for archive chart pan/zoom
range=history serves archive seed through close (not now). Default view focuses hold period; user can scroll/zoom left to see global morphology before entry. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -111,7 +111,7 @@ def test_fill_missing_bars_continuity():
|
||||
assert any(b.get("filled") for b in filled)
|
||||
|
||||
|
||||
def test_resolve_archive_chart_hold_window():
|
||||
def test_resolve_archive_chart_history_range():
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
db = Path(td) / "archive.db"
|
||||
init_db(db)
|
||||
@@ -125,11 +125,13 @@ def test_resolve_archive_chart_hold_window():
|
||||
opened_ms=open_ms,
|
||||
closed_ms=close_ms,
|
||||
mode="hold",
|
||||
range_mode="history",
|
||||
db_path=db,
|
||||
)
|
||||
assert out["ok"] is True
|
||||
assert out.get("opened_ms") == open_ms
|
||||
assert len(out["candles"]) >= 10
|
||||
assert out.get("range_mode") == "history"
|
||||
assert out.get("window_end_ms") <= close_ms + 4 * 3600_000
|
||||
assert len(out["candles"]) >= 40
|
||||
|
||||
|
||||
def test_list_with_overlay_filters():
|
||||
|
||||
Reference in New Issue
Block a user