From fb5a4f0db6971a96dc969d12e4fd3bcf9fd1d08d Mon Sep 17 00:00:00 2001 From: dawn <90008@klbr.net> Date: Sat, 21 Nov 2026 19:28:39 +0300 Subject: [PATCH] test(web): check chat rows while replies arrive in the web perf gate Signed-off-by: dawn <90008@klbr.net> --- test/manual/ux/README.md | 9 +++++---- test/manual/ux/perf.py | 12 ++++++++++-- test/manual/ux/seed.py | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/test/manual/ux/README.md b/test/manual/ux/README.md index 345702410..5e3d1cc26 100644 --- a/test/manual/ux/README.md +++ b/test/manual/ux/README.md @@ -200,10 +200,11 @@ helper before using it to understand which state it changes. take snapshots last or call `await perf.fresh_browser(ui)` afterward. - `python3 test/manual/ux/perf.py check [--seed] [--base PATH] [--dist PATH]` runs the standalone count and wheel-scroll budget gate across `huge_chat`, - `tiles-basic` (focused and unfocused terminal), and `dense`. Without - `--dist`, it builds this checkout's `web/` into a temporary directory so a - stale `/dist` is never tested by accident; `--seed` rebuilds this - checkout's CLI and seeds a fresh base first (used by `perf-web.yml` in CI). + `tiles-basic` (focused and unfocused terminal), and `dense`, then + `transcript_paging_check.check_history_arriving`. Without `--dist`, it + builds this checkout's `web/` into a temporary directory so a stale + `/dist` is never tested by accident; `--seed` rebuilds this checkout's + CLI and seeds a fresh base first (used by `perf-web.yml` in CI). `ALBEDO_UX_CLI` selects an explicit prebuilt CLI instead. - In an Albedo kernel, run long benchmark loops directly in a cell (which backgrounds at 60 s and wakes the session on completion) rather than via diff --git a/test/manual/ux/perf.py b/test/manual/ux/perf.py index 0a250a4c9..1f2c55bec 100644 --- a/test/manual/ux/perf.py +++ b/test/manual/ux/perf.py @@ -13,7 +13,8 @@ Subcommands (run in their own process): - `python3 test/manual/ux/perf.py heap a.heapsnapshot [b.heapsnapshot]` lists what holds a snapshot's memory, or what grew from a to b. - `python3 test/manual/ux/perf.py check [--base PATH] [--dist PATH] [--out PATH]` - runs the count-based web performance and wheel-scroll gate against a seeded base. + runs the count-based web performance and wheel-scroll gate against a seeded base, + then checks the chat's rows while replies arrive. Numbers come from headless Chrome with a software GPU: compare runs with each other, not with a person's browser. @@ -901,6 +902,13 @@ async def check( if page_errors: failures.append(f"page errors observed: {page_errors}") + import transcript_paging_check + + try: + await transcript_paging_check.check_history_arriving(ui) + except AssertionError as torn: + failures.append(f"chat rows tore while replies arrived: {torn}") + return { "verdict": "fail" if failures else "pass", "elapsed_s": round(time.monotonic() - started, 2), @@ -985,7 +993,7 @@ def _seed_fresh_base(base: Path) -> Path: def _run_check_cli(argv: list[str]) -> int: parser = argparse.ArgumentParser( prog="perf.py check", - description="Run count-based web performance and wheel-scroll checks.", + description="Run count-based web performance, wheel-scroll and chat layout checks.", ) parser.add_argument("--base", type=Path, default=None, help="Seeded ALBEDO_UX base") parser.add_argument( diff --git a/test/manual/ux/seed.py b/test/manual/ux/seed.py index b21bfa4f3..f313ee0c9 100644 --- a/test/manual/ux/seed.py +++ b/test/manual/ux/seed.py @@ -186,7 +186,7 @@ CHATS = [ ( "a brisk chat", "beta", - ["run a tool" if i % 4 == 0 else f"brief {i}" for i in range(240)], + ["run a tool" if i % 4 == 0 else f"brief {i}" for i in range(120)], ), *( (f"short {n}", "alpha" if i % 2 else "beta", ["hi"]) -- knotmirror 0.0.1