Skip to content

fix(transcript): keep system rows inside the live-turn walk - #1979

Merged
vastsa merged 1 commit into
vastsa:mainfrom
eatmoreduck:fix/system-rows-in-live-walk
Oct 29, 2026
Merged

vastsa merged 1 commit into
vastsa:mainfrom
eatmoreduck:fix/system-rows-in-live-walk

Conversation

@eatmoreduck

Copy link
Copy Markdown
Contributor

Follow-up to #1976, deciding the case @muzimu217 raised in its review.

#1976 merged seven seconds after approval, before the commit answering that review could land. This is that commit, rebased onto current main (everything else from #1976 is already in).

Problem

liveHistoryTurnId() breaks on any non-steering user or system message. A system update can land during a tool call and render after the running turn's rows; with a system row as the tail, the walk stops before reaching the turn and the header falls back to the settled phase — the #1949 symptom with a different tail.

modelSystem rows never reach the walk either way: isVisibleMessage filters them from the projected entries entirely. The case that needed deciding is the visible system row.

Change

  • System rows now stay inside the run, skipped like steering messages; an ordinary user message remains the only boundary. This deliberately diverges from collectLiveDelegationEntries (which breaks at system rows) — that helper answers a different question and keeps its own rule.
  • The ChatTranscript comment and the component spec (en + zh-CN) now match the walk.
  • Tests: a system-row tail still selects the streaming turn; a modelSystem row produces no entry and does not affect selection; the crashed-turn-behind-an-ordinary-prompt boundary case is unchanged.

Validation

A system update can land during a tool call and render after the running
turn's rows, so a system-row tail must not end the walk the way an
ordinary prompt does - the turn would fall back to the settled phase,
which is the vastsa#1949 symptom with a different tail. System rows now stay
inside the run like steering messages; an ordinary user message remains
the boundary. modelSystem rows never reach the walk either way, because
isVisibleMessage filters them from the projected entries; a fixture pins
that. The ChatTranscript comment and the component spec now match the
walk.
Copilot AI balanced review requested due to automatic review settings October 29, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the changes to live-turn handling around system rows.

No open issues 🎉

What changed in this PR

Follow-up to #1976 addressing another case of #1949: a visible system row after a streaming turn should not make its header appear settled or trigger automatic collapse.

Changes:

  • Skip system rows when locating the live history turn, while preserving ordinary user messages as run boundaries.
  • Add regression coverage for visible system-row tails and filtered modelSystem messages.
  • Align the English and Chinese component specs with the updated liveness rule.
File Description
docs/​zh-CN/​spec/​04-ux/​08-component-spec.md Updates the Chinese specification for system rows within a live run.
docs/​spec/​04-ux/​08-component-spec.md Documents the revised live-turn boundary rule.
apps/​desktop/​test/​turn-process.test.mjs Adds system-row and hidden-message regression cases.
apps/​desktop/​src/​lib/​turn-process.ts Keeps system rows inside the live-turn backward scan.

Review effort: Balanced

@vastsa vastsa left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently confirmed the visible-system-tail failure using the real production transcript projection and TranscriptHistory SSR: current main returns no live turn for a streaming tool followed by a system message; this head renders Running, open and active. All 29 targeted turn-process/transcript-live-turn tests pass, including ordinary-user crash boundaries and hidden modelSystem rows. The production diff is narrowly scoped to the boundary walk; no persistence or protocol changes. Candidate shared/i18n were rebuilt and reused dependency imports temporarily routed to those artifacts; diagnostic edits were restored. Diff check passes. All six remote checks pass. Latest main is an ancestor and PR merge candidate has the identical tested tree 947be1cad3fbef8792bf1db43d01594bd85180a5. Local coverage is real component SSR, not interactive Electron; remote Electron/Windows checks passed. Approved for merge.

@vastsa
vastsa merged commit 454cca2 into vastsa:main Oct 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants