Skip to content

Reveal streamed replies a whole block at a time (D4) - #456

Merged
sambitcreate merged 17 commits into
mainfrom
stream/desktop-d4-paragraph-reveal
Oct 14, 2026
Merged

sambitcreate merged 17 commits into
mainfrom
stream/desktop-d4-paragraph-reveal

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Desktop slice D4, stacked on D3. Streamed replies are revealed a whole block at a time, the T3 Code way, instead of character by character.

  • A release gate lets new text join at the end of a paragraph, the start of a list item, a table row or a finished code line. Releases happen at most once every 300ms.
  • A tail with no boundary joins after one second. The end of the turn and reduced motion release everything at once.
  • Text closed by a tool step counts as a boundary and joins at the next release slot. The handoff still waits for the end of the turn.
  • The boundary scan resumes from the saved fence and table state instead of rereading the whole reply.
  • Released blocks fade in with an opacity-only @starting-style transition over 450ms while streaming. The translateY lift is gone, and a settled reply no longer fades.
  • .memory/streaming-desktop-follow-reveal.md records the follow, settle and reveal design.

Tests

  • streaming-reveal unit tests cover the gate and check a scan resumed chunk by chunk, at several chunk sizes, against a full scan.
  • The tool-closed and settle tests were updated for the new gating.
  • Playwright: chat-shell-interactions, chat-message-queue and chat-follow-bottom pass locally.

Possible flake

tests/e2e/chat-message-queue.spec.ts:698 failed once in a local D3 run because "Compacting chat…" was not visible at startCompaction. It passed in the full D4 run. It is recorded here to investigate, not retried away.

Flaky tests

🤖 Generated with Claude Code

Flaky-test record

  • Run 38443659642 attempt 1 on 7b6a27e53 (stack top merged with main): tests/e2e/inline-visuals.spec.ts:47 (a reply draws native and HTML visuals inline) failed once, its retry ran, and the Electron E2E (2/3) shard hit its 20-minute timeout and was cancelled before the reporter printed the error. Locally it passed 3/3 and then 6/6 with --repeat-each=6 --retries=0 on the same head.
  • Same run, attempt 2 (the single rerun): AidenChatTests.testChatOpenFetchesTheProgressSnapshotOnceAndReloadsDoNotDuplicateIt() (iOS, unchanged since perf(ios): streaming, Live Activity and network lifecycle #331) failed after 5.2 s on the iOS simulator job, which had passed on attempt 1. This PR doesn't touch iOS. Nothing was changed to hide either one; the next run is on a fresh main merge.

sambitcreate and others added 4 commits October 13, 2026 01:37
Replace the per-unit reveal schedule with a release gate: new text
joins the transcript at paragraph ends, list-item starts, table rows
and finished code lines, no more than once every 300ms. A tail with no
boundary (a lone heading, the last item, a long open paragraph) joins
after one second. The end of the turn, a tool step closing the text,
and reduced motion release everything at once.

Released blocks fade in with an opacity-only @starting-style
transition over 450ms while the reply streams; the keyframes with a
translateY lift are gone, and a settled reply stops fading anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release gate now looks for a boundary only once a release is allowed,
and resumes the scan from the fence and table state where the last one
stopped instead of rereading the whole reply. Text a tool step closes no
longer appears all at once: its end counts as a boundary and joins at the
next release, while the handoff still waits for the end of the turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The streamed reply no longer wraps each block in its own element, so the
follow spec reads the fade from the reveal's top-level blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

Two release-gate integration gaps remain: fast post-tool prose bypasses the release interval, and the one-second fallback can leave released text invisible indefinitely.

Reviewed changes: Reviewed the complete D4 diff against its D3 base, including release timing, Markdown rendering, tool-step transitions, and fade lifecycle.

  • Block release gate: Replaces per-unit pacing with 300ms boundary releases, a one-second tail fallback, and terminal/reduced-motion flushing.
  • Incremental boundaries: Tracks paragraph, list-item, table-row, and fenced-code boundaries across appended chunks.
  • Tool closure and handoff: Adds closed-text gating while retaining the stable streamed-to-settled Markdown tree.
  • Opacity-only reveal: Introduces 450ms starting-style transitions, updates behavioral coverage, and records the desktop streaming design in project memory.

Validation: All 100 focused reveal, settle, bubble, and follow tests pass, as does npm run type-check:e2e. Additional mounted probes reproduce both inline findings. Electron E2E execution was not run because this runner is Linux and the suite requires macOS.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread renderer/components/message-bubble.tsx Resolved
sambitcreate and others added 2 commits October 13, 2026 02:06
…display

Two fixes addressing hanging and missing prose tails:

1. Keep tool-closed text gated when follow-up prose starts before the release slot
   - Tool-closed segments must preserve their gate and due time until the next
     release window, not dump immediately when they stop being the last text row
   - In message-bubble.tsx, change complete logic to respect textClosed flag
   - Test: new case in message-list-settle that adds fast follow-up text before
     the earlier row's 300ms release completes; assert tail stays hidden

2. Make the one-second max-wait timeout advance visible heading/prose output
   - When the deadline releases all content, show it on screen even if incomplete
   - Timeout releases the full content, but renderer treated it as incomplete,
     leaving headings and unfinished sentences invisible while turn still runs
   - In streaming-markdown-reveal.tsx, integrate deadline release with visible
     source selection: show all released content when released === content
   - Tests: two mounted cases that wait past STREAMING_REVEAL_MAX_WAIT_MS and
     assert heading/prose text is visible while complete=false

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every text row of a running turn now stays on the gated reveal path, so
text a tool step closed keeps its release slot when newer prose takes over
the last row, and shows in full once the turn ends instead of staying held.

The gate records where a deadline release ended; the reveal shows that much
as written, so a lone heading or unfinished sentence appears after the
one-second wait and stays visible as the sentence grows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The fixes introduce two regressions: timeout-released text can disappear on the next delta, and earlier tool-separated text rows never enter the terminal rendering lifecycle.

Reviewed changes: Reviewed 2e9493e71 against the prior reviewed head 374cd367, with the full D4 diff as context.

  • Corrected Non-streaming closed-row completion: Changed the completion flag so tool-closed text is not immediately flushed when follow-up prose begins.
  • Exposed Timeout-released tails: Added a visible-source bypass when the release gate has caught up with the current content.
  • Added Mounted regression coverage: Added tests for fast follow-up prose and timeout-visible heading/prose while the turn remains active.

Validation: All 103 focused reveal, settle, bubble, and follow tests pass, and npm run type-check:e2e passes. Additional mounted probes reproduce both new findings and confirm that the original tool-closure timing concern remains partially addressed when the timeline is preserved. Electron E2E execution was not run on this Linux runner because the suite requires macOS.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread renderer/components/message-bubble.tsx Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: Reviewed aa4c8d4 against the prior reviewed head 2e9493e, with the complete D4 diff as context.

  • Kept Per-turn reveal gating: Passed streaming and completion state to every text row, preserving tool-closed release timing and flushing all rows when the turn ends.
  • Preserved Timeout visibility: Recorded the deadline-flushed source offset so later deltas cannot hide previously released heading or prose tails.
  • Extended Mounted coverage: Preserved the tool timeline through fast follow-up prose and asserted that timeout-released prose remains visible after another delta.

Validation: All 103 focused reveal, settle, bubble, motion, and follow tests pass, and npm run type-check:e2e passes. Additional mounted probes verify early terminal flushing, stable multi-row saved handoff, exactly one handoff callback, cleared streaming flags, and heading/prose visibility across later deltas. Electron E2E execution was not run on this Linux runner; hosted CI still has queued checks on this head.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@very-hermes-bot

very-hermes-bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Hermes Review Bot

Confidence: 5

Engine: agy/gemini-3.8-flash-high
Review mode: full
Head: 75c8ffcdab63dba117059a86494fa61e0246d595
Generated: 2026-10-13T23:20:41+00:00
Reviews: 1

Summary

Slice D4 replaces character/unit-paced reply streaming with a block-level release gate that surfaces complete paragraphs, list items, table rows, and fenced code lines at bounded intervals (at most once every 300ms). Tails without standard boundary markers release after a 1,000ms deadline, and text closed by an intermediate tool step joins whole at the next available release slot before handing off. Visual presentation swaps the previous translateY bounce for an opacity-only @starting-style transition that runs while streaming and clears once settled. Maintainers should double-check that the 1,000ms max-wait fallback adequately accommodates slower local models generating complex Markdown before flushing unfinished prose.

Confidence Score: 5/5

Fully traced the incremental boundary scanner, gate scheduler, React layout and animation lifecycles, and tool-closed step propagation across callers, callees, and test suites.

📁 Important Files Changed
  • renderer/lib/streaming-reveal.ts: Implements scanStreamingRevealBoundary for resumable boundary detection across Markdown blocks, list items, tables, and open code fences, along with the advanceStreamingRevealGate rate limiter and fallback timer.
  • renderer/components/streaming-markdown-reveal.tsx: Wires the release gate into the renderer layout pass, schedules subsequent release checks, enforces the opacity fade duration, and defers completion handoff.
  • renderer/components/message-bubble.tsx: Distinguishes completed turns from tool-closed intermediate texts so tool-closed prose stays on the gated path without premature handoff.
  • renderer/components/message-list.tsx: Ensures all intermediate assistant prose rows keep their gated streaming state while the turn proceeds, passing textClosed when subsequent steps follow.
  • renderer/styles.css: Removes legacy translateY keyframes in favor of a 450ms opacity transition governed by @starting-style on .streaming-reveal[data-streaming].
  • renderer/lib/streaming-reveal.test.ts & renderer/components/streaming-markdown-reveal.test.tsx: Provides unit and component test suites validating chunked boundary scans against full scans, release gating, max-wait flushes, and reduced motion behavior.
  • renderer/components/message-list-settle.test.tsx & tests/e2e/chat-follow-bottom.spec.ts: Validates DOM preservation, tool-step closures, settled transition clearing, and scroll follow pin behavior.

Findings

No findings.

Sequence Diagram

sequenceDiagram
  autonumber
  participant Stream as Stream / Host
  participant Bubble as MessageBubble
  participant Reveal as StreamingMarkdownReveal
  participant Gate as advanceStreamingRevealGate
  participant DOM as MarkdownContent / DOM

  Stream->>Bubble: Streaming chunk arrives (content)
  Bubble->>Reveal: Render with updated content
  Reveal->>Gate: advanceStreamingRevealGate(gate, input, now)
  Gate-->>Reveal: Return released prefix + nextAt timer
  Reveal->>DOM: Render revealed block (@starting-style opacity transition)
  Stream->>Bubble: Tool step starts (textClosed: true)
  Bubble->>Reveal: Render with closed: true
  Reveal->>Gate: Advance at next release slot (joins closed remainder)
  Stream->>Bubble: Turn ends (streamComplete: true)
  Bubble->>Reveal: Render with complete: true
  Reveal->>DOM: Render full response; clear data-streaming after fade delay
Loading
[]

Last reviewed commit: 75c8ffcdab63
Reviews (1) · Comment /hermes review to trigger a new review · /hermes review full for full re-review

@very-hermes-bot very-hermes-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Inline review — 1 finding(s) anchored to the diff. See the pinned summary comment for the overview.

// reply settles in place.
const source = handoffReady
// A tail the deadline released shows as written, even unfinished.
const source = complete

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1 · logic] Reduced motion suppresses trailing prose during streaming
Confidence: 0.95

When reduced motion is enabled, source falls into the incomplete slice branch because line 106 checks only complete, withholding unpunctuated prose with no timer scheduled to flush it.

Repair: Include reducedMotion in the source ternary (and line 84 parsedComplete) so content is exposed directly without incomplete-stream slicing.

Suggested change
const source = complete
const source = complete || reducedMotion

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 35b7172: Reduced motion now shows all content, including trailing unpunctuated prose during streaming. The fix includes:

  • Added reducedMotion to the parsedComplete condition so unfinished prose is included in parsed blocks
  • Updated source assignment to include reducedMotion so full content is shown when motion is reduced

Behavioral test added to verify trailing prose appears with reduced motion enabled and is withheld without it. All existing tests pass.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: Reviewed the D3 synchronization commits since the prior substantive review at aa4c8d4, focusing on the new 66bd3c5..3bab379 key-collision fix and its integration with D4 reveal gating.

  • Merged Settlement fixes: Retained reply identity across steering and queued runs, preserved images during handoff, and restored preview capacity after Markdown reparsing.
  • Separated Live and saved reply keys: Checked currently rendered saved keys before reusing a live key, with mounted coverage for a saved response that differs from the streamed response.
  • Incorporated Follow interaction fixes: Preserved scrollbar holds during content growth and kept nested scrolling keys from disabling transcript follow.

Validation: All 120 focused reveal, settlement, bubble, preview, and follow tests pass on 3bab379; npm run type-check:e2e also passes. Electron E2E execution was not run on this Linux runner because it requires macOS. Hosted CI on this exact head is still pending.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

Reduced motion should show all content as written, even unfinished prose that would normally be withheld during streaming. The component now checks for both `complete` and `reducedMotion` before showing everything.

Changes:
- parsedComplete now includes reducedMotion so unfinished prose is included in parsed blocks
- source now includes reducedMotion so the full content is rendered when motion is reduced

Tests: Added behavioral test that verifies trailing unpunctuated prose is shown with reduced motion enabled, and content is withheld without reduced motion.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The reduced-motion fix passes locally, but its new regression suite is omitted from normal CI.

Reviewed changes: Reviewed 35b7172 against the prior reviewed head 3bab379, with the complete D4 diff as context.

  • Fixed Reduced-motion visibility: Included reduced motion in parser completion and visible-source selection so trailing unpunctuated prose appears during an active turn.
  • Added Rendering coverage: Added three behavioral tests for reduced-motion visibility, normal-motion withholding, and completed replies, and inspected their test-script integration.

Validation: All 114 focused streaming, settlement, bubble, preview, and follow tests pass; all 10 CI registry tests and npm run type-check:e2e pass. Electron E2E execution was not run on this Linux runner because it requires macOS. Hosted CI on this exact head is still pending.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread package.json Resolved
Register streaming-markdown-reveal.test.tsx with the rich-links suite and
the renderer-other lane so normal CI runs it, and tighten the tests to use
real paragraph breaks and one rendering helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: Reviewed 2a36bade5 against the prior reviewed head 35b7172, with the complete D4 diff as context.

  • Registered Normal CI coverage: Added the reduced-motion regression suite to test:rich-links and the renderer-other registry lane; verified that the generated CI command includes it exactly once.
  • Simplified Rendering fixtures: Shared the motion-preference setup and cleanup, used actual paragraph breaks, and retained behavioral assertions for unfinished streamed prose and completed replies under both motion preferences.

Validation: npm run test:rich-links passes all 67 tests, and npm run test:ci-policy passes all 57 tests. Electron E2E execution was not run on this Linux runner; hosted CI on this exact head still has queued/in-progress checks.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@very-hermes-bot very-hermes-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Inline review — 2 finding(s) anchored to the diff. See the pinned summary comment for the overview.

Comment on lines +44 to +46
test("without reduced motion the unfinished prose waits for the reveal", () => {
assert.doesNotMatch(renderedText(STREAMING, false, false), /Second paragraph still streaming/u);
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2 · logic] Unfinished prose test passes vacuously against empty output
Confidence: 0.95

renderedText() uses renderToStaticMarkup which never runs useLayoutEffect, leaving the initial gate text empty and causing the doesNotMatch assertion to pass vacuously against empty string without proving the first paragraph is revealed.

Repair: Lazily initialize gate in StreamingMarkdownReveal so initial render includes the released prefix, and assert that First paragraph is matched in the test.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 3b1ceef without changing the gate's initial state: the suite now renders with Testing Library under happy-dom, so the layout effect runs. The no-reduced-motion test asserts that the finished first paragraph shows and the unfinished second one does not, so it can no longer pass against empty output.

);

// New blocks keep fading in until the last release has finished its fade.
const [fadeDone, setFadeDone] = React.useState(false);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2 · logic] Initializing fadeDone to false causes complete replies to fade in on mount
Confidence: 0.92

fadeDone initializes to false regardless of whether complete is true, causing data-streaming to remain present for 450ms on complete replies mounted in place and triggering unintended opacity transitions.

Repair: Initialize fadeDone to Boolean(complete).

Suggested change
const [fadeDone, setFadeDone] = React.useState(false);
const [fadeDone, setFadeDone] = React.useState(Boolean(complete));

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 3b1ceef: fadeDone starts from complete, so a reply that mounts finished no longer fades in under the 200 ms handoff. The new test only a reply that is still streaming fades its blocks in fails without the change.

A finished reply no longer fades in under the 200 ms handoff. The reveal
tests now render in a DOM so layout effects run, and the withheld-tail
test also checks that the finished paragraph shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: Reviewed 3b1ceeffe against the prior reviewed head 2a36bade5, with the complete D4 diff as context.

  • Fixed Finished-on-mount rendering: Initialized fade completion from complete, so replies that mount finished display immediately while previously streaming replies retain their existing fade lifecycle.
  • Replaced Static rendering fixtures: Mounted the reveal component with Testing Library and happy-dom, asserted that the finished first paragraph actually appears while the unfinished tail waits, and added coverage for the initial fade state.

Validation: npm run test:rich-links passes all 68 tests, including mounted reveal and streamed-to-settled lifecycle coverage; the focused gate/parser suite passes all 21 tests. Electron E2E execution was not run on this Linux runner because it requires macOS. Hosted CI on this exact head still has queued/in-progress checks.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

…aph-reveal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: Reviewed 53b59c8 against the prior reviewed head 3b1ceeffe, with the complete D4 diff as context.

  • Merged Reduced-motion jumps: Made idle transcript jumps land immediately when reduced motion is enabled, preserving the follow latch.
  • Preserved Focused-control activation: Kept Space and Shift+Space on supported controls from being treated as transcript scrolling while retaining reading-key handling.
  • Added Regression coverage and documentation: Checked the mounted jump and keyboard assertions and updated scroll-follow design notes.

Validation: All 79 focused scroll-follow, settlement, and reveal tests pass. Electron E2E was not executed locally; hosted CI on this head is still pending.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

sambitcreate and others added 2 commits October 13, 2026 06:06
…e' into stream/desktop-d4-paragraph-reveal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: Reviewed the base synchronization commits since 53b59c8, focusing on the smooth-jump correction imported by 2472c7e, with the complete D4 diff as integration context.

  • Preserved Smooth-jump completion: Kept the pending jump through near-bottom scroll samples so scrollend can correct content growth within the 40px re-arm band.
  • Added Mounted regression coverage: Checked that 30px of growth during an idle jump lands at the exact new bottom without losing follow; verified the existing interruption and reduced-motion paths.
  • Integrated Base updates: Confirmed all nine D4 patches remain unchanged across synchronization and that reveal, settlement, and CI inventory coverage still pass.

Validation: All 80 focused follow, reveal, and settlement tests pass, and npm run test:ci-policy passes all 57 tests. Electron E2E was not executed locally. Hosted CI on this exact head is still pending, so this review does not establish overall CI mergeability.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The main merge introduces a mirrored-reply handoff regression: steering input can cause the settled reply to remount and discard the reader's expanded reasoning state.

Reviewed changes: Reviewed 2472c7e..7b6a27e, using the authoritative 100-file diff as context and checking the imported behavior against D3/D4's reveal and settlement contracts.

  • Integrated Mirrored turns: Added document-scoped local run observations, live reply projections, host-authority Stop, and per-stream settlement recovery.
  • Imported Compact chat headers: Added title/workspace menus, responsive tool actions, guarded history navigation, and shared header geometry while retaining the follow handlers.
  • Incorporated Native streaming lanes: Added independent Android follow/reveal/foreign-run behavior and iOS transcript follow behavior without changing the Remote protocol revision.
  • Imported Packaged device runtime fixes: Switched local helpers to lazily resolved standalone Node while preserving Retry and revocation cleanup.
  • Preserved D4 gating and test inventory: Kept the gate/parser/message-row implementation unchanged and retained the reveal suite alongside the imported test registrations.

Validation: 139 focused renderer/local-run tests, 83 runtime/wire/IPC tests, 57 CI-policy tests, 43 Android follow/reveal tests, iOS release-policy checks, and E2E type-checking pass. An additional mounted probe reproduces the inline finding; the same probe preserves DOM identity and disclosure state when the observed saved ID reaches the existing handoff prop. Native iOS XCTest and Electron E2E were not executed locally; hosted CI on this exact head is still pending.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

streamingUiVisuals={displayedStreamingUiVisuals}
streamingUiDrafts={uiDrafts}
streamComplete={streamComplete || visibleDetachedProjection !== null}
streamComplete={streamComplete || detachedProjectionStreamComplete(visibleDetachedProjection)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Preserve the mirrored reply's handoff key after steering

The observed-run path now uses the gated reveal, but persistedHandoffMessageId still comes only from this pane's own generation. If the owning window steers a run being mirrored here, its saved reply follows the steering message and receives a different key at settlement; a mounted probe confirms the paragraph remounts and expanded reasoning resets to collapsed.

Technical details
# Mirrored runs must participate in the existing stable handoff

## Affected sites
- `renderer/main/chat-pane.tsx:799-810,3114-3116`: the observed projection supplies text, reasoning, timeline, and completion, but not its saved-message identity.
- `renderer/lib/hosts/observed-local-run.ts:138-140,164-175`: the projection is cleared once a read contains its reply, without registering that reply with the rendered handoff.
- `renderer/lib/chat-terminal-sync.ts:391-405`: another cache read can hide the projection as soon as the saved reply arrives.
- `renderer/components/message-list.tsx:844-899`: the live row retains the original prompt key through steering; the saved row reuses it only when the handoff ID establishes the mapping.

## Reproduction
1. Mirror an active run from another window under `user-1`, showing prose and reasoning.
2. Expand the reasoning disclosure, then persist steering guidance `user-steer-1` from the owning window.
3. Deliver `done` with `messageId=assistant-1`, then resolve the transcript read with `[user-1, user-steer-1, assistant-1]`.
4. The live paragraph survives steering and terminal completion, but is replaced when the saved reply takes over; the disclosure changes from expanded to collapsed.

The mounted probe uses the real observer, projection helpers, `withCommittedRunInput`, and `MessageList`. It fails with the current null handoff ID and passes when the observed saved ID is supplied to the existing handoff prop; an unsteered mirror also passes.

## Required outcome
- Register the observed run's saved reply with the existing keyed handoff before hiding/clearing its live projection, preserving the original reply DOM and reader-selected disclosure state.
- Cover mirrored steering and settlement in an existing mounted behavioral suite, including a fast cache read that need not paint a separate terminal frame.
- Keep exactly one visible reply and preserve the existing distinction between turn completion and tool-text closure.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues found in this delta. Approval remains withheld because the existing mirrored-reply handoff finding is still open and unchanged.

Reviewed changes: Reviewed 5e98603 against the last reviewed head 7b6a27e. The merge changes only the Android instrumented-test helper, so this review focused on that delta, its callers, and the prior finding rather than repeating the review of unchanged inherited code.

  • Replaced Wall-clock scroll polling with bounded, frame-by-frame test-clock advancement and UI-thread reads of scroll progress.
  • Preserved Accessibility follow coverage by retaining the existing detach, reader-position, and live-edge re-arm assertions and advancing the latch delay after the animation ends.

Validation: Android instrumented-test compilation succeeds; all 9 focused Android scroll unit tests and all 43 desktop reveal/settlement tests pass. Android UI execution was not performed because no emulator is connected. Hosted CI on this exact head is still pending.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Base automatically changed from stream/desktop-d3-settle-in-place to main October 13, 2026 23:04
@sambitcreate
sambitcreate merged commit cf342dd into main Oct 14, 2026
27 checks passed
@sambitcreate
sambitcreate deleted the stream/desktop-d4-paragraph-reveal branch October 14, 2026 00:12
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.

2 participants