web: stage partial input — replay tool-input-partial before final tool input#1659
web: stage partial input — replay tool-input-partial before final tool input#1659cliffhall wants to merge 3 commits into
Conversation
…l input AppRenderer: - New `partialInputs` prop (ordered fragments), snapshotted into pendingPartials at bridge-build time (read via a ref so prop churn never rebuilds the iframe) and cleared on dispose. flushPending replays them via bridge.sendToolInputPartial BEFORE the complete tool-input, per spec. AppsScreen: - New `partialStages` state + `handleStagePartialInput` (snapshots current form values). resetAppChannels gains a `keepPartials` option so Open App preserves the staged fragments (they're consumed by the renderer) while select/close/ back clear them. - Adds a "Stage partial input" control (fielded apps only) with a staged count and "Clear staged", wired to AppRenderer's `partialInputs`. Adds AppRenderer tests (ordered replay before tool-input; none when omitted) and AppsScreen tests (stage/count/clear gated on fields; staged partials survive Open and are replayed). Closes #1571 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
|
@claude review |
|
Claude finished @cliffhall's task in 2m 42s —— View job Review: PR #1659 — stage partial input
Reviewed against What's done well
Minor observations (non-blocking)
One thing to double-check
Nice work — nothing here needs to change to merge. |
Address the claude[bot] review's observation #2: add a comment at the handleOpen call site clarifying that partialStages is intentionally NOT cleared there — AppRenderer snapshots the fragments into its own pendingPartialsRef at build time, and the staging UI only renders while not running, so the surviving state is invisible until the next reset drains it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
|
Thanks — LGTM appreciated. Responses: 1. Shallow snapshot of 2. 3. Fire-and-forget ordering — no change. Agreed it introduces no new risk — the Double-check ( |
Closes #1571
Adds a "Stage partial input" control so progressive-render widgets can be exercised in the inspector (re-implementation of the relevant slice of PR #1510).
Changes
AppRenderer
partialInputsprop (ordered fragments), snapshotted intopendingPartialsRefat bridge-build time (read via a ref so prop churn never rebuilds the iframe) and cleared on dispose.flushPendingreplays them viabridge.sendToolInputPartialbefore the completetool-input, per spec.AppsScreen
partialStagesstate +handleStagePartialInput(snapshots current form values).resetAppChannelsgains akeepPartialsoption so Open App preserves the staged fragments (they're consumed by the renderer) while select/close/back clear them.partialInputs..withProps()constants, no inline styles.Tests
tool-input; none when omitted.npm run cipasses locally.Stacking
Stacked on #1570 (
v2/1570-message-logs). Merge order: #1565 → #1566 → #1567 → #1568 → #1569 → #1570 → this.🤖 Generated with Claude Code
https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw