Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): the Run on / Workspace menu closes after a pick #12685

MergedMnigos(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/12685/headmerged by maria-rcks View on GitHub

Fixes #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 openAfter: the menu closes on pick
beforeafter
before stillafter still

Implemented with Claude Code (Claude Fable 5.1).

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Approved at 9a1d440

      Macroscope'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 closeOnClick and introduces no schema, security, deployment, default, or static-analysis changes.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review Change StackReview Change Stack

      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

      MobileRunContextSelector now 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.tsx
      The run environment, “Auto balance,” and workspace MenuRadioItem entries now use closeOnClick.

      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 nameStatusExplanation
      Linked Issues check✅ PassedThe change addresses #12684 in apps/web/src/components/BranchToolbar.tsx. MobileRunContextSelector now sets closeOnClick on the machine items, Auto balance, and all workspace radio items. This…
      Out of Scope Changes check✅ PassedThe diff contains only five closeOnClick additions in the narrow-composer environment and workspace menu. These changes directly support #12684 and the stated scope. No unrelated source or public AP…
      Docstring Coverage✅ PassedNo 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✅ PassedThe title clearly and concisely describes the main fix: the Run on / Workspace menu closes after a selection.
      Description check✅ PassedThe 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.
    4. maria-rcks merged this7ade2d2

    5. maria-rcks closed this

Sign in to join this conversation.