feat(scene): render approval/confirm modals as a y/n stub row#996
Merged
Conversation
Under REASONIX_RENDERER=rust the various pending* confirmation modals (shell command, sandbox path, edit review, free-form choice, plan approval) had no scene representation, so the user saw the composer prompt while the loop was actually waiting on a y/n. The composer is now replaced with a `❓ [kind] <prompt> [y/n]` row whenever any of those states is set: - New SceneTraceInput.approvalKind / approvalPrompt scalar pair — primitives keep effect deps stable. - buildTraceFrame: when approvalPrompt is set, push approvalRow in place of composerRow and suppress the slash overlay. - Prompt clipped to 60 chars with a trailing ellipsis so long shell commands stay readable. - App.tsx derives the pair via useMemo from pendingShell / pendingPath / pendingEditReview / pendingChoice / pendingPlan, in that priority order. Per-modal refinement (selected option for choice, diff preview for edits, full plan text, etc.) lives in later sub-PRs — this is the "smallest visible win" stub. Refs #868
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.
Fourth sub-PR under the rust direction-B plan (#868).
What
Under `REASONIX_RENDERER=rust` the various pending* confirmation
modals — shell command, sandbox path, edit review, free-form choice,
plan approval — had no scene representation. The user saw the
composer prompt while the loop was actually waiting on a y/n. The
composer is now replaced with a stub row whenever any of those
states is set:
```
❓ [shell] rm -rf /tmp/x [y/n]
```
— primitives keep effect deps stable (no JSON encoding needed for
one object with two strings).
in place of `composerRow`, and suppress the slash overlay so the
modal owns the bottom of the frame.
shell command stays readable.
`pendingPath` / `pendingEditReview` / `pendingChoice` /
`pendingPlan`, in that priority order.
Deliberately a stub
Per-modal refinement (the choice options for `pendingChoice`, a diff
preview for `pendingEditReview`, the full plan text and Approve/Refine/
Cancel for `pendingPlan`, etc.) lives in later sub-PRs — this is the
"smallest visible win" so the user at least knows the loop is blocked
on a yes/no question.
Also skipped on purpose: `pendingSessionsPicker` /
`pendingCheckpointPicker` / `pendingMcpHub` (list-pickers, get their
own scene step — handoff step #5), `pendingReviseEditor` (full editor
takeover, owns the screen), `stagedInput` / `stagedChoiceCustom`
(free-form input where the composer should remain visible).
Tests
`tests/scene-trace-frame.test.ts` — 4 new cases:
tag, the prompt, and the `[y/n]` suffix
`npm run verify` green via prepush gate.
Refs #868