Repository navigation
Preserve typed conversation fidelity and streaming reader state (CF-4, lands #295) - #333
Merged
Merged
Conversation
Lands #295, which another session wrote, onto current main. It was stacked on #283's pre-squash history and had sat for a day with conflicts. This applies #295's own net change, 74833f7..dad15cd (its commits cce0a40, 00576be, c974d0f and dad15cd), and resolves the conflicts against what has landed since. From #295: typed records take their final answer only from the CLI's own final phase, never by position; failed, denied, stopped and unknown messages and reasoning stay visible, including after a retry; reasoning summaries keep their label while streaming; a streaming reply keeps its code controls, focus and selection; and returning to a thread restores its expansion and scroll position for the session. Its verification record is in docs/reviews/2026-10-18-cf4-completion/. Resolutions: - TurnContent keeps main's footer and #295's remembered expansion. - ThreadView keeps both import additions. - turn-layout keeps both new tests. - typed-turns.spec keeps main's version (setTheme, and the expanded-turn check from #301). #295's selectTheme duplicated setTheme, so conversation-rendering.spec now uses setTheme and the duplicate is gone. - status.md takes #295's corrected streaming sentence and lists the change under On main, unreleased, not In flight. Supersedes #295. Part of #277, tracker #273. Coven-Harness: Claude Code / claude-opus-5-5
… an explicit final #295 made every typed turn answer only with an explicit final message. That fixed a real case: a Codex turn of partial answers (codex-cli 0.163.0's partial_answer, stored as unspecified) could make its last partial the final answer by position. It also removed CF-1's documented fallback for a CLI that reports no message phase at all. Claude Code then never showed a final answer, and CF-8's golden path failed waiting for one. finalAnswerIndex now treats a turn as typed when any message carries a final or commentary phase, or any native phase the CLI sent. Such a turn answers only with an explicit final. A turn whose CLI reports no phase (Claude, old history, older Codex models) keeps the last reply, and layoutTurn uses this rule again for the latest attempt. Tests: a Claude turn answers with its last reply (red against #295's rule: final -1, expected 2), and a Codex partial-answer turn never invents one. turn-layout and conversation-events pass 39/39. The golden path, typed-turns, conversation-rendering and conversation-continuity specs pass 22/22. Coven-Harness: Claude Code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
#295 rewrote app, approvals, layout and routines specs for its explicit-final-only rule. For example: "The scripted adapter reports an unspecified phase. Do not invent a final answer by position: its successful work remains visible." The offline mock reports no message phase, so with CF-1's fallback restored (0532b8b) its last reply is the answer again and its finished work folds, as on main. CI failed nine of these tests on 0532b8b ("Expected: 0, Received: 1" final answers). These four specs are main's versions again. Locally, app, approvals, layout, routines, conversation-fidelity and typed-turns pass 50/50. Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
…nding Both entries kept in docs/status.md. The CF-4 entry now says when the last reply stays the answer. Coven-Harness: Claude Code / claude-opus-5-5
Code coverage overviewLanguages: TypeScript TypeScript / code-coverage-agent
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
This was referenced Oct 20, 2026
14 tasks
This branch was successfully deployed
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.
Supersedes #295 (CF-4 completion), with Val's approval on 2026-10-19. #295 was stacked on #283's pre-squash history and had conflicted with
mainfor a day, and its session was idle. This lands #295's own work on currentmainand credits it. #295's branch is untouched. Part of #277, tracker #273.What it carries from #295
Commit
ba3dcc7applies #295's net change,74833f7..dad15cd(commitscce0a40,00576be,c974d0f,dad15cd):docs/reviews/2026-10-18-cf4-completion/.Markdown.tsx,conversation-rendering.spec.tsandmarkdown-render.test.tswere byte-identical between #295's base andmain, so its changes there apply as written.Conflicts resolved:
TurnContent.tsx:main'sfooterplus Preserve typed conversation fidelity and streaming reader state #295's remembered expansion.ThreadView.tsx: both import additions.turn-layout.test.ts: both new tests.typed-turns.spec.ts:main's version, which has Capture fidelity states in every theme, measure a long transcript, and fix what they found (CF-8) #301'ssetThemeand expanded-turn check. Preserve typed conversation fidelity and streaming reader state #295'sselectThemeduplicatedsetTheme, so it's removed andconversation-rendering.spec.tsusessetTheme.docs/status.md: Preserve typed conversation fidelity and streaming reader state #295's corrected streaming sentence, plus an entry under On main, unreleased. Preserve typed conversation fidelity and streaming reader state #295's In flight entry is dropped, since In flight is a tracker pointer now.One change from #295, for Val to confirm
Commit
0532b8b. #295 made a typed turn answer only with an explicitfinalmessage.partial_answer, stored asunspecified) no longer shows its last partial as the final answer.main, failed for that reason (conversation-fidelity.spec.ts:170, with nodata-finalelement).finalAnswerIndexnow keeps both cases:finalorcommentary, or any native phase from the CLI (nativePhase). A typed turn answers only with an explicitfinal.If Val prefers #295's stricter rule for Claude too, the CF-8 golden path's assertion has to change with it.
Tests
turn-layout.test.ts:-1, expected2.nativePhase: "partial_answer", passes.turn-layoutandconversation-eventspass 39/39, including CF-1'sfinalAnswerIndextests.Checks on
0532b8bmacOS (Apple Silicon), Node 24.18.1, pnpm 10.34.5.
pnpm buildpnpm typecheckpnpm --filter @modex/desktop testconversation-fidelity,typed-turns,conversation-rendering,conversation-continuityOn
ba3dcc7, before the final-answer fix, e2e ran overconversation-continuity,conversation-rendering,typed-turns,app,approvals,layout,routines,conversation-evidence,markdown-narrowandconversation-fidelity: 64 passed, 1 failed. The failure was the golden path, fixed above.conversation-evidence.spec.ts:60and:75, which Wait for the evidence turn to render before unfolding it (e2e race) #297's race fix onmaincovers, andconversation-rendering.spec.ts:138. All three pass here.Not run locally: the full
pnpm test:e2e. CI runs it.Remaining gates (from #295): live native Claude and Codex acceptance (see #332) and human keyboard and VoiceOver review.
Update: CI on
0532b8band the fix (e412c61)unit + e2e (macOS)failed 9 tests inapp.spec.ts,approvals.spec.tsandlayout.spec.ts, with 342 passed. For example:.turn-content > [data-final="true"], expected 0, received 1.#295 had rewritten those specs, and
routines.spec.ts, for its explicit-final-only rule. For example: "The scripted adapter reports an unspecified phase. Do not invent a final answer by position."The offline mock reports no phase, so under the restored CF-1 fallback its last reply is the answer and finished work folds, as on
main. Those four specs aremain's versions again. Locally, app, approvals, layout, routines, conversation-fidelity and typed-turns pass 50/50.c7b1f5athen mergesmain(#332).Coven-Harness: Claude Code / claude-opus-5-5