Repository navigation
perf(chat): prioritize visible thread history and preserve scroll - #4838
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Passed · 12/12 tests · 18/18 assertions · 8 images Commit |
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 (161507 ms), confidentiality-review (265461 ms), spec-provenance-review (169783 ms), desktop-den-sync-review (351524 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 (d71c725fb7f043d52e1eb7583b2091af87475f46). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
…s mid-send (#4894) Since #4838 an explicit send awaits the uncapped snapshot read (ensureFullSnapshot) so it can decide against complete history whether to interrupt delegated work. That read is owned by the surface's useQuery observer. Development builds run every mount effect twice (StrictMode simulates an unmount), so the hero's one-step Run task, which fires from a mount effect, always saw its reader drop and re-subscribe while the read was in flight; TanStack cancelled the read (CancelledError, revert) and the send treated it as a failure: the pending row vanished, the draft and attachments came back as ready chips, a CancelledError card appeared, and no upload started. When the reader is still present after the cancellation, read again instead of failing the send. Once nobody observes the thread anymore the cancellation stands, so history actions abandoned by navigation behave as before. Signed-off-by: Guillaume Loret <[email protected]>
…read After a restart, reopening a thread whose turn was interrupted and typing the next message could show it as pending and then hand the text back to the composer with an error. Since #4838 the send waited on the uncapped complete-history read so a follow-up could tell whether it must interrupt a delegated task; on a cold engine that read can outlast the renderer's request timeout, and the timed-out read failed the send itself. Decide the interruption from cached complete history when the thread has it, otherwise from one bounded newest read, and never block a send on the uncapped read. Keep a transport failure's own message when the SDK settles without a response instead of surfacing a TypeError in its place. Proof: evals/specs/thread-continues-after-restart.e2e.test.ts covers a crash (SIGKILL of the process group), an ordinary quit, and a relaunch whose complete-history read is slower than the request timeout; each case requires the typed continuation to be accepted exactly once, answered, and never returned to the composer, with earlier history intact and no replay of the interrupted tool. The slow-read case bounces the message on the previous send path. Unit coverage in session-history.test.tsx and opencode-session-native.test.ts.
…read (#4958) After a restart, reopening a thread whose turn was interrupted and typing the next message could show it as pending and then hand the text back to the composer with an error. Since #4838 the send waited on the uncapped complete-history read so a follow-up could tell whether it must interrupt a delegated task; on a cold engine that read can outlast the renderer's request timeout, and the timed-out read failed the send itself. Decide the interruption from cached complete history when the thread has it, otherwise from one bounded newest read, and never block a send on the uncapped read. Keep a transport failure's own message when the SDK settles without a response instead of surfacing a TypeError in its place. Proof: evals/specs/thread-continues-after-restart.e2e.test.ts covers a crash (SIGKILL of the process group), an ordinary quit, and a relaunch whose complete-history read is slower than the request timeout; each case requires the typed continuation to be accepted exactly once, answered, and never returned to the composer, with earlier history intact and no replay of the interrupted tool. The slow-read case bounces the message on the previous send path. Unit coverage in session-history.test.tsx and opencode-session-native.test.ts.
Summary
Opening a conversation currently waits for the entire transcript, mounts all message groups, and delays loading feedback for two seconds. This change prioritizes the part the person is reading while retaining access to the complete history.
No permanent history truncation or virtualized eviction. No message bodies or tool outputs are added to persisted scroll state. The independent PageUp and Find-clearance fixes in #4742 and #4780 are not included.
Verification
Verdict: Incomplete. The selected component/native-adapter checks pass, but exact-head real-app evidence and latency measurements are still missing. No measured speedup is claimed.
Candidate:
d71c725fb7f043d52e1eb7583b2091af87475f46, rebased ondevat23143497940c871bda4a9aaebb82bd86c3f95530. Both included commits are signed.Passed, from
apps/app:bun test --isolate ./tests/session-history.test.tsx ./tests/session-scroll.test.tsx ./tests/progressive-message-list.test.tsx ./tests/opencode-session-native.test.ts ./tests/message-list-loading.test.tsx ./tests/chat-message-grouping.test.ts ./node_modules/.bin/tsc --noEmit git diff --checkDeferred / not passing evidence:
session-full-history-on-openjourney now checks the newest message is visible without scrolling and stays visible while the rest mounts, but has not been run on this candidate. Run from the repository root with the authorized placement:PlatformProviderfixture setup. It was not revalidated and is not counted as passing or classified as pre-existing.One unusually large assistant group still mounts as a unit. Required repository CI remains unchanged.