Repository navigation
perf(app): avoid reprocessing settled history during v1 streaming - #4614
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
Test evidence — a-streaming-answer-renders-as-markdown-block-by-block-and-settles-to-the-same-do — ✅ passedSHA a95dda4 · engine v1 ✅ passed · 0 expectations passed · 0 failed · 0 pending
[world] mock(mcp) · den(daytona) · desktop(as admin) · workspace(/tmp/openwork-streamed-markdown-answer-1788853311562) · [seed:raw] evalIn() ×5 · session("New task") Test run created 2026-09-08T07:38:13.942Z · Source: |
Test evidence — v1-keeps-long-tool-rich-history-ordered-and-its-detected-links-available-as-the- — ✅ passedSHA a95dda4 · engine v1 ✅ passed · 0 expectations passed · 0 failed · 0 pending
[world] mock(mcp) · den(daytona) · desktop(as admin) · workspace(/tmp/openwork-streamed-markdown-answer-1788853602880) · [seed:raw] evalIn() ×5 · session("New task") · mock(mcp) · den(daytona) · desktop(as admin) · workspace(/tmp/openwork-streamed-tool-history-1788853831839) · [seed:raw] evalIn() ×3 · session("Unrelated history review") · session("Long tool history") · [seed:raw] evalIn() Test run created 2026-09-08T07:43:03.505Z · Source: |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (a95dda45850974a55d3109d9e0310902dc2504aa). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
…tended transcript load (#4792) * fix(app): close the restart prompt and command palette synchronously on dismiss Base UI keeps a dialog popup mounted (and partially opaque) until its exit animation or transition finishes, so the restart prompt and the command palette stayed visible for 100-200 ms after Keep working / Escape. Hide the popup with display:none as soon as it is closed; Base UI then unmounts it on the next frame. * fix(session): keep a focus reveal as the reading position instead of snapping back to the tail * fix(app): keep the reading position and its saved anchor stable when Find opens or closes The find bar's clearance toggled padding-top on the scroll container. A padding change on the scroller is a scroll-anchoring suppression trigger, so the transcript shifted 48px under the reader with no scroll event and the persisted reading anchor stayed 48px stale. Render the clearance inside the content column instead; the browser anchors it and the controller re-saves the anchor. * test(evals): expect the whole transcript after a cold reload in the long-history journey `de965e2b1` (#4695) deliberately fetches the session snapshot without a `limit`, so a cold open renders every message instead of the newest 140. The step written by #4614 still expected the bounded 97-row tail after `user.reload()` and failed once #4780 let the lane reach it. Re-express the claim as `toEqual(world.history)`, keep the reading-anchor restore and the tool-link checks, and keep the engine's `?limit=140` page as the negative witness: it still lacks the oldest turn that the reopened surface must show. --------- Signed-off-by: Guillaume Loret <[email protected]>
Problem
V1 text streaming updates the transcript array every render flush. Two preparation paths repeated work over unchanged history before React could reuse the message rows:
Change
Deterministic work measurements
Fixed 140-message snapshot, one delta after warming the merge cache. Both merge functions have the same counts:
100 unchanged 10,000-character tool outputs across 20 text-only updates: 2,000 repeated serializations before; zero after warmup. Initial extraction still runs once. These are operation counts, not claims about frame rate or total app speed. History iteration, target merging, sorting, and changed-text scanning remain.
Verification — Passed (v1)
Exact head:
a95dda45850974a55d3109d9e0310902dc2504aa.Cold-boot: 2 passed, 0 failed, 0 skipped, exit 0.
placement: daytona (daytona CLI authenticated).pnpm --filter @openwork/app typecheck: passed.Earlier attempts: the added journey first exhausted its overall timeout after completing streaming assertions; it now explicitly allows 15 minutes including cold resource setup. A later assertion assumed full cache retention after lengthy palette checks; the existing inactive cache expires at 15 seconds. The final journey separates immediate warm returns from cold reload instead of changing cache policy. All owned sandboxes were deleted.
Broader eval typecheck/ratchet checks were not green during authoring and are not classified as pre-existing. A separate scripts render-state suite could not load a missing export; focused maintained tests above passed. Cross-platform, v2 E2E, frame-time profiling, composer memoization, Markdown tail payload reuse, and cache-lifetime changes remain deferred.
The new journey is an independent addition to the existing streaming spec; it leaves #4585 video/recovery sections unchanged.