Repository navigation
fix(chat): never read an idle turn with live rows as completed - #1965
Merged
Merged
Conversation
Retire browser-owned smooth scrolling when transcript input takes over. Cancelling the follow frame alone leaves minimap navigation free to move the reader during later stream updates. Cover the interruption in real Chromium, including hidden Linux windows, without changing the original long-history assertion.
Keep button activation and select keys out of transcript scroll input. Apply the same browser navigation cancellation to delegated scrollers without moving it into completion-driven follow release. Cover control input, nested ownership and both scroll paths in Chromium; retain normal completed-turn navigation and the original history probe.
The unchanged x64 displacement recurred after the input ownership fix. Record browser navigation calls and application offset writes without adding layout measurements before the existing assertion.
Persist review rollback state as a small transcript mutation instead of materializing and replacing the complete session and message index. Cache proven message identities with the layout so historical card lookup reads only its selected record. Invalidate unknown generations, preserve message positions, and replay state across windows and session mutations. Refs vastsa#1836
Collect the same navigation parameters on passing and failing probes. Avoid stack allocation in the hot path so observation has less influence on the scheduling race under investigation.
Reader-driven follow release must stop an existing browser navigation, including disclosure and search moves that do not emit scroll input. Keep completion on a state-only transition so its new prompt navigation is preserved. Cover smooth navigation followed by manual disclosure in both scrollers. Remove temporary tracing and retain the original long-history probe.
Update the existing source contract for the extracted state transition. Keep checks for synchronous disclosure release and completion wiring, while real Chromium regressions verify scroll geometry.
Document the exact read-overlay and serialization path that preserves review state through transcript rewrites and revision archives. Cover retained-prefix truncation and equal-sized state appends through warm, cold, and sequential reads without relying on timestamps. Refs vastsa#1836
Combine the reader takeover fix with the current Fast-mode main before comparing fixed revisions under the same Ubuntu Chromium environment. Retain both test specifications and all upstream behavior.
Hidden Linux windows delivered animation frames at roughly one hertz, causing both fixed-head completion probes to exceed their deadline. A visible window preserves the existing assertions and timeout. Run the completion probe in normal Electron CI so reader-takeover changes also preserve the new navigation started by a completed turn.
Seven desktop tests passed new URL(..., import.meta.url).pathname where a filesystem path was needed. That string is a usable path on POSIX CI but yields /C:/... on Windows, which fs and child_process reject with ENOENT: 22 tests failed locally and gen-ui-protocol.test.mjs failed to load at all. Production code builds these paths with join() and is unaffected. Convert each URL with fileURLToPath(): the ModelsDevCatalog catalogPath in four provider suites, the forked plugin-host entry in plugin-remote-files (all seven of its tests died with PLUGIN_CRASHED), the spawned sidecar entry in sidecar-history-restore, and the GenUI kit directory. One more assertion pinned a POSIX-joined literal while production joins with path.join (gen-ui-kit.ts), so its expectation now mirrors that expression, identical on POSIX. Verified on Windows 11: every touched file goes from failing (or not loading) to fully passing under node 22.19, with no POSIX change.
…Require
The e2e certificate probe's esbuild banner derived __dirname with
new URL('.', import.meta.url).pathname - the same Windows-broken form the
rest of this branch fixes, and the one occurrence outside apps/desktop/test.
The banner cannot declare fileURLToPath (the bundled sources import it from
node:url; a same-scope redeclare is a syntax error), but it already injects
createRequire, so resolve through that instead. Both bundles build and pass
node --check with the new banner.
The process header's phase chain ended in an unconditional completed fallback: a turn that was neither failed, nor left an aborted row, nor still active read as running-complete even when nothing had settled it. A tool that never answered - the session stream died mid-turn while the reader watched, or a lost host left the last row streaming forever - was announced as completed the moment the session stopped reporting it as active (vastsa#1923). Insert an unsettled phase before the fallback: an idle turn that still has a streaming row - assistant answer or tool alike - reports an unknown outcome instead. Rows recorded before statuses existed carry no signal and stay completed, and a live turn is unaffected: its streaming rows are just work in progress. The label lands in every locale.
The Windows path fix used createRequire with a module specifier, which aborts the certificate E2E before any TLS check. Use the injected require function to resolve the URL module and preserve the Windows path conversion.
…athnames fix(tests): resolve test resource URLs to real paths on Windows
…iew-state fix(storage): append review state without rewriting history
…roll fix(transcript): stop smooth navigation when the reader takes over
vastsa
approved these changes
Oct 29, 2026
vastsa
left a comment
Owner
There was a problem hiding this comment.
Confirmed the real classification gap: an idle turn with a retained streaming assistant or tool row previously fell through to completed. This patch gives that specific unsettled state an honest label while preserving failed/stopped/live precedence and legacy rows. On the latest main integration tree, 25 targeted tests, desktop build/typecheck/lint, and the Chromium transcript render E2E passed. I merged current main into your branch without changing your fix. The component spec should list the new Outcome unknown label in a follow-up. Thanks for the focused fix.
This was referenced Oct 29, 2026
vastsa
pushed a commit
that referenced
this pull request
Oct 29, 2026
Liveness was decided by tail position alone: the tail entry received isActive from transcriptRunning, and TranscriptHistory hardcoded every history row inactive. A steering message or system row that renders after the live turn therefore read it as idle - the header announced an outcome and the untouched process auto-collapsed while its rows still streamed (#1949), and the complete gate released copy/regenerate over a still-growing reply. Row state now identifies the live turn. liveHistoryTurnId() selects the last assistant-turn with streaming rows whenever the tail entry is not an assistant-turn, ChatTranscript resolves it only while the live tail is in view, and the history list renders that entry active; the memo comparator hears the same signal so a turn that just went live is not frozen inactive. The rule stays narrow: a reading window never claims live status (#1900), an earlier turn with stuck rows keeps the unsettled reading (#1965), and a turn whose rows all settled claims nothing - the window between one row settling and the next row's first streaming event still reads by its rows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1923.
The process header's phase chain ended in an unconditional
completedfallback (turn-process.ts): a turn that was not failed, left no aborted row, and was no longer active read as running-complete even when nothing had settled it. The reporter's case lands exactly there: a complex agent task hangs or loses its host mid-turn, the session stops reporting the turn as active, and the header announces running-complete while the work never produced a terminal answer.Insert an
unsettledphase before the fallback: an idle turn that still has a row stuck atstreaming- the assistant's answer or a tool alike - reports an unknown outcome instead. The tool-row case matters as much as the answer case: a hung tool call is precisely what the reporter watched get announced as done.Two deliberate deviations from the strict reading of the issue diagnosis, both to avoid lying in the other direction:
Contract tests pin the new phase for a crashed answer row, a never-answered tool row, the live-turn non-regression, and the legacy tolerance.
chat.processUnsettledlands in all nine locales.Thanks to @muzimu217 for the exact precedence-chain diagnosis - this implements his evidence direction with the trigger widened from the answer row to any unsettled row, which is what the reporter's own screenshot shows.