Skip to content

fix(web): related PRs menu no longer crashes in production builds - #57

Merged
kalvenschraut merged 1 commit into
rtvisionfrom
fix/pr-branch-menu-group-label
Sep 15, 2026
Merged

kalvenschraut merged 1 commit into
rtvisionfrom
fix/pr-branch-menu-group-label

Conversation

@kalvenschraut

Copy link
Copy Markdown
Member

Problem

Opening the Related PRs menu on a pull request without a native stack crashed the desktop app in 0.0.53 with Base UI error #31. That is the minified form of "MenuGroupContext is missing. Menu group parts must be used within Menu.Group or Menu.RadioGroup". The menu rendered its heading, notices, and status labels directly under the popup with no group ancestor, and the heading is unconditional, so the menu crashed every time it was opened in a production build.

Fix

Wrap the loose labels in MenuGroup, matching how the rest of the file and the stack menus already do it. The header, notice, and retry item share one group. Each standalone status note gets its own group via a small helper.

No behavior change beyond the crash going away. Web typecheck passes.

Written by Claude Fable 5.1 through Claude Code in T3 Code.

🤖 Generated with Claude Code

Base UI's MenuGroupLabel throws when it has no Menu.Group ancestor. The
"Related PRs" menu rendered its heading, notices, and status labels directly
under the popup, so opening it in a production build surfaced Base UI error
pingdotgg#31 as an app crash. Wrap those labels in MenuGroup like the rest of the file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 15, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB +36 B (+0.3%) 15.1 KiB ✅
Codex Thread snapshot wire 7.0 KiB 7.0 KiB −2 B (−0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.5 KiB 6.6 KiB +38 B (+0.6%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 57.0 KiB 57.1 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 13.6 KiB 13.6 KiB +32 B (+0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +11 B (+0.2%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.6 KiB +21 B (+0.3%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.8 KiB 57.9 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 9 10 +1 (+11.1%) 21 ✅

Baseline: f733754 · PR result: a1bff13 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please review this one-file fix at head a1bff13. Base UI's MenuGroupLabel throws error pingdotgg#31 without a Menu.Group ancestor, which crashed the Related PRs menu in the 0.0.53 production build. The change wraps the loose labels in MenuGroup so they match the rest of the file.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git status --short
git show --no-ext-diff --format=fuller --stat a1bff13a5a7ff70989e4e64384200d8f6cf4fc5e
git diff --no-ext-diff a1bff13a5a7ff70989e4e64384200d8f6cf4fc5e^ a1bff13a5a7ff70989e4e64384200d8f6cf4fc5e --

changed_files=$(git diff-tree --no-commit-id --name-only -r a1bff13a5a7ff70989e4e64384200d8f6cf4fc5e)
printf '\n--- Changed file outlines ---\n'
while IFS= read -r file; do
  [ -n "$file" ] || continue
  printf '\n### %s\n' "$file"
  ast-grep outline "$file" --items all || true
done <<< "$changed_files"

Length of output: 6334


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- PullRequestBranchMenu.tsx ---'
sed -n '1,220p' apps/web/src/components/pullRequest/PullRequestBranchMenu.tsx

printf '%s\n' '--- Menu component candidates ---'
fd -t f . apps/web/src/components/ui | rg '/menu(\.|/|$)' || true

printf '%s\n' '--- Menu exports and group implementations ---'
rg -n -C 5 '\b(MenuGroup|MenuGroupLabel|MenuPopup)\b' apps/web/src/components/ui --glob '*.{ts,tsx}'

Length of output: 10260


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- apps/web/src/components/ui/menu.tsx: popup, group, and label wrappers ---'
sed -n '1,90p' apps/web/src/components/ui/menu.tsx
sed -n '185,220p' apps/web/src/components/ui/menu.tsx

printf '%s\n' '--- Base UI dependency declarations ---'
rg -n -C 2 '"`@base-ui/react`"|`@base-ui/react`@' --glob 'package.json' --glob 'pnpm-lock.yaml' --glob 'yarn.lock' --glob 'package-lock.json' .

printf '%s\n' '--- All MenuGroupLabel elements in the changed component, with enclosing line context ---'
rg -n -C 3 '<MenuGroupLabel\b' apps/web/src/components/pullRequest/PullRequestBranchMenu.tsx

Length of output: 6816


@kalvenschraut: I found no defects in this fix.

MenuGroup maps to MenuPrimitive.Group. Every affected MenuGroupLabel in PullRequestBranchMenu.tsx now has the required group ancestor. The patch preserves the existing retry and pull request selection behavior.

You are interacting with an AI system.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai approve

All CI checks passed on a1bff13 (Check, Test, Test Server 1-3, Rust, Release Smoke) and your review found no defects.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

@kalvenschraut Approved. The reviewed fix correctly adds the required MenuGroup ancestors, and the reported CI checks passed.

🐇 ✅

✅ Action performed

Comments resolved and changes approved.

@kalvenschraut
kalvenschraut merged commit 52839dc into rtvision Sep 15, 2026
17 checks passed
@kalvenschraut
kalvenschraut deleted the fix/pr-branch-menu-group-label branch September 15, 2026 15:52
kalvenschraut added a commit that referenced this pull request Sep 15, 2026
Bump release package versions to 0.0.54 so the RTVision release workflow
builds installers, CLI archives, and the @rtvision/t3 npm tarball for the
upstream sync in #59 and the fixes in #57 and #58.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant