fix(web): the Run on / Workspace menu closes after a pick #12685
main fromrefs/pull/12685/head·merged by maria-rcks View on GitHubFixes #12684.
Problem#
In the combined Run on / Workspace menu under the composer (MobileRunContextSelector, used whenever the composer is narrower than @3xl/composer-surface, which is the usual case with a sidebar), picking a machine applied the change but the menu stayed open until an outside click or Escape. The rows are Base UI MenuRadioItems, and closeOnClick defaults to false for radio items.
Fix#
As suggested in the triage, all five radio items in that menu now pass closeOnClick: Auto balance and each machine under Run on, and Current checkout, New worktree, and the previous worktree under Workspace, so the two groups behave the same. This mirrors #5879 for the traits menu. The wide-layout controls are Selects and already close on pick, so they are untouched.
Verification#
Web typecheck and targeted lint are clean. No unit test: the change is a prop on five menu rows and a test would only assert that wiring.
Recorded in a real browser against the dev server at a 900px-wide window (single environment, so only the Workspace group shows; both groups get the same prop).
| Before: the pick applies, the menu stays open | After: the menu closes on pick |
|---|---|
![]() | ![]() |
![]() | ![]() |
Implemented with Claude Code (Claude Fable 5.1).
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Approvability#
Verdict: Approved at
9a1d440Macroscope's review found this PR approvable — This is a narrowly scoped UI bug fix that adds menu dismissal to five existing radio options without changing selection logic or broader application behavior. The implementation follows existing usage of
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).closeOnClickand introduces no schema, security, deployment, default, or static-analysis changes.No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
8eb2385a-a791-4255-a104-e2b161bff963📥 Commits
Reviewing files that changed from the base of the PR and between 7445aa733ada33e45289e5aa5055f79142556513 and 9a1d440fa9f83a06f4bcc3f6584171d03fed94ac.
📒 Files selected for processing (1)
apps/web/src/components/BranchToolbar.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
MobileRunContextSelectornow closes its popup after selecting an environment, “Auto balance,” or a workspace mode.Changes#
Environment picker
Layer / File(s) Summary Menu selection dismissal
apps/web/src/components/BranchToolbar.tsxThe run environment, “Auto balance,” and workspace MenuRadioItementries now usecloseOnClick.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
t3dotgg🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Linked Issues check ✅ Passed The change addresses #12684inapps/web/src/components/BranchToolbar.tsx.MobileRunContextSelectornow setscloseOnClickon the machine items,Auto balance, and all workspace radio items. This…Out of Scope Changes check ✅ Passed The diff contains only five closeOnClickadditions in the narrow-composer environment and workspace menu. These changes directly support#12684and the stated scope. No unrelated source or public AP…Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1… Title check ✅ Passed The title clearly and concisely describes the main fix: the Run on / Workspace menu closes after a selection. Description check ✅ Passed The description explains the problem, the fix, scope, verification, and UI behavior with before/after evidence. It does not reproduce the checklist, but the required information is otherwise complete. ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
Comment `@coderabbitai help` to get the list of available commands.maria-rcks merged this7ade2d2
maria-rcks closed this
Sign in to join this conversation.




macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes