Repository navigation
fix(app): load the whole transcript when opening a session - #4695
Conversation
The session snapshot asked OpenCode for messages with limit 140. OpenCode pages a limit as the NEWEST n messages and only signals older pages through a Link header the app never followed, so any conversation longer than 140 messages opened mid-way with no route back to its start. Drop the limit on the transcript read (no limit returns every message). The queue drainer's status-only probes keep their small page.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (20518 ms), confidentiality-review (23731 ms), spec-provenance-review (33550 ms), desktop-den-sync-review (59 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (197c8bfb600cdf0296d82e57f0ce84e5fbc632ea). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
The unsigned eval desktop legitimately shows a Cloud Sign in control, so the visual claim must name transcript states only.
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (bb2ac12b05e4cb2459b9baea01b7f98de89f87f2). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Test evidence — opening a long conversation shows it from its first message — ✅ passedSHA bb2ac12 · engine v1 ✅ 1/1 screenshots passed · 2 expectations passed · 0 failed · 0 pending [world] desktop(daytona) · workspace(/tmp/openwork-session-full-history-1788985681085) · session("Long conversation") · [seed:raw] evalIn() · session("Unrelated short task") ✅ PASS — 1. The conversation transcript visibly starts with a user message reading "LONG-HISTORY-FIRST-MESSAGE 7c31"
Test run created 2026-09-09T20:26:15.373Z · Source: |
…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
Opening a long session (e.g. Today: Vercel, Cal.com & Render MCP — support action plans) shows the conversation starting mid-way — the first visible turn was an assistant message, and the user's opening prompt and ~117 earlier messages were nowhere to be found.
Root cause
session-surface.tsxfetched the transcript snapshot withlimit: 140. OpenCode'sGET /session/:id/message?limit=nreturns the newestnmessages and only signals older pages throughx-next-cursor/Link: rel="next"headers. Nothing in the app ever read those headers or sentbefore, and there is no "load older" affordance, so every conversation longer than 140 messages opened at messagetotal − 139with no way back.Verified against the live engine for the reported session: 258 messages stored;
limit=140returned exactly 140, whose first item is the assistant turn the user saw ("Quality-review edits applied…"); the real first message is the Sep 8 investigation prompt. Locally 40 of 353 sessions exceed 140 messages, so ~11% of sessions were affected.Introduced with the incremental React session path (#1362) and carried through the SDK refactor (#4193); OpenCode has honoured
limitserver-side since its cursor-pagination work, which is when the cap started dropping history.Fix
Drop the
limiton the transcript read: without one, OpenCode returns every message. The queue drainer's status-only probes keep their small page (they never render messages). The transcript cache already grows unbounded for live-watched sessions and its merges are union-preserving, so this changes only what a cold open fetches. Payload impact on the largest local session (512 messages): 15 MB served in ~0.2 s vs 1.4 MB for the 140 tail.Follow-up (not in this PR): cursor-based "load older" + virtualization for very large sessions.
Proof
New journey
evals/specs/session-full-history-on-open.e2e.test.ts(worldlongHistoryinevals/worlds/chat.ts): stores 150 messages via the engine (noReply), cold-starts on another session, clicks the long one in the sidebar, and asserts the rendered transcript has all 150 messages (not 140) with the first message visible at the top. It also witnesses the trap: the engine's ownlimit=140page lacks the first message.197c8bfb6: 1 passed, 0 skipped (pnpm evals:e2e session-full-history-on-open --daytona,OPENWORK_EVAL_REF=fix/session-transcript-full-history).dev(df3b1670b): fails atTimed out waiting for rendered transcript length…; last value: 140.pnpm typecheckclean;bun test tests/opencode-session-native.test.ts21 pass; channel/boundary ratchets report nothing for the new spec.Evidence comment follows via
evals:e2e --publish.