Repository navigation
Open Plan approval forms automatically - #4929
Merged
Merged
Conversation
ymichael
force-pushed
the
bb/expand-plan-approval-thr_88iux8zkcc
branch
from
October 5, 2026 19:37
472c5a2 to
a51f78d
Compare
ymichael
force-pushed
the
bb/expand-plan-approval-thr_88iux8zkcc
branch
from
October 5, 2026 19:43
a51f78d to
8aff221
Compare
ymichael
pushed a commit
that referenced
this pull request
Oct 8, 2026
## Human comments Small change, I think it's definitely a mistake that you need to expand first before you can take an action. <img width="1120" height="122" alt="image" src="https://github.com/user-attachments/assets/c3124477-b730-443f-a2c6-1eaac5808606" /> ## What was wrong A pending approval (command, file edit, or tool use) arrived above the composer as a collapsed row that only said "Approval needed". That row has no decision buttons, so every approval cost a click before you could read what was being asked or answer it. Questions, plugin forms, and plan reviews (since #4929) already arrived open, so approvals were the only request card that started collapsed. #3094 introduced the collapsed strip with every decision button on it, so it was fully actionable. #3147 moved the decisions into the expanded card to keep the compact row on a single line on mobile, which turned the collapsed default into an extra step with nothing to do on it. ## What changed - Approvals now arrive open with the command preview and the decision buttons, like every other pending interaction card. - With every caller opening on arrival, `PendingInteractionShell` drops its `initiallyExpanded` prop and always starts open. A request card is only collapsed when you collapse it, and new request types cannot come back collapsed by default. - The chevron, the title, and Esc still collapse the card. The next request arrives open again. No wire, CLI, or SDK changes. ## How you verified - `ThreadPendingInteractionBanner.test.tsx`: the approval tests now start from the open card. They cover the open default, deciding without expanding first, collapsing to the label-only row and reopening, Esc, and a new request arriving open after the previous one was collapsed. Against main's banner, 7 of these 16 tests fail. - `pnpm exec turbo run typecheck lint test --filter=@bb/app`: clean (5639 tests). - Ladle, Approval / Compact Permissions story at 1280 px and 390 px: main shows two label-only "Approval needed" rows; this branch shows both cards open with Deny / Allow for session / Allow once. - `pnpm start:worktree` with a real Claude Code approval (`curl` outside the sandbox): the card arrives open with the command and decisions on desktop and mobile. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: qa <qa@x> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Human comments
What was wrong
Plan approval cards started collapsed, hiding both the plan and the decision buttons. A thread could be waiting for approval while showing only a small “Plan review” strip above the composer.
What changed
Open Plan approval cards automatically, matching the existing question behavior. Users can still collapse the card, and each new plan request starts expanded. Ordinary command approvals retain their current collapsed default. No CLI, SDK, server/daemon wire, or protocol changes.
How you verified
The expanded-default and next-plan regression tests fail on origin/main before the fix and pass afterward.
pnpm exec turbo run test --filter=@bb/app -- src/components/thread/pending-interactionspasses all 17 tests; app lint and typecheck pass (lint has existing warnings).In an isolated built BB app, use real Claude Code to request a Plan approval. The base build shows the collapsed strip; the changed build opens the plan and decisions automatically. Browser checks cover manual collapse/reopen and a compact viewport; clicking Approve plan resolves the actual server interaction and Claude replies APPROVED. A fresh pending plan is retained privately for review. Matching before/after captures use the same prompt and viewport in separate real threads because stopping the base server cancelled its pending interaction.
The first CI run exposed a workspace route budget overage also reproduced on unchanged main: both builds contained exactly 1,087,984 raw bytes, 120 over the prior limit. Main subsequently fixed that budget in #4933. This PR is rebased onto that fix and contains only the two Plan UI files; no separate budget allowance remains. The local bundle check passes with unchanged payload. Final-head checks: 30 passed, 0 failed, 3 skipped; only the contributor gate remains queued waiting for a GitHub runner (requeued once).