fix(web): pull request action menus no longer show duplicate dividers - #6500
fix(web): pull request action menus no longer show duplicate dividers#6500RakshithBhat03 wants to merge 1 commit into
Conversation
Co-authored-by: Codex <codex@openai.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved 65562f3 This is a straightforward UI bug fix that prevents duplicate menu dividers. The changes extract existing conditions into variables and add a well-tested helper function to control separator visibility. No functional behavior changes beyond the visual fix. You can customize Macroscope's approvability policy. Learn more. |
Pull request action menus could show two dividers back to back when every permission-gated management action was unavailable. The empty section made the menu look like an action had failed to render.
Dividers around the optional management section now render only when it contains an action, and the merge-method divider only appears when another management action precedes it. This covers every combination of draft and ready-for-review actions, auto-merge, and merge-method choices without changing the surrounding environment, conflict, or close and reopen groups.
Verification
vp test run apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts apps/web/src/components/pullRequest/PullRequestListFilters.test.tsx— 67 tests passed.vp run -F @t3tools/web typecheckvp lint apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx apps/web/src/components/pullRequest/pullRequestDetail.logic.ts apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts --report-unused-disable-directivesBuilt by GPT-5.6 in T3 Code through the Codex harness.
Note
Low Risk
Presentation-only menu layout change in the pull request detail panel; no API or permission behavior changes.
Overview
Fixes duplicate menu dividers in the pull request detail ⋯ actions menu when draft/ready, auto-merge, and merge-method entries are all hidden by permissions or state.
Adds
resolvePullRequestManagementMenuLayoutso the optional management block (and its separators) render only when at least one of those actions is visible, and the divider before merge-method radios appears only when another management item sits above them.PullRequestDetailPaneluses explicitshow*flags for each item instead of inlined conditions. Covered by an exhaustive combination test inpullRequestDetail.logic.test.ts.Reviewed by Cursor Bugbot for commit 65562f3. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix duplicate dividers in pull request action menus
Adds
resolvePullRequestManagementMenuLayoutinpullRequestDetail.logic.tsto compute whether the management menu group and its internal separator should render. InPullRequestDetailPanel, the entire management block is now conditional on at least one action being available, and the separator before merge methods only renders when a management action is also present.Macroscope summarized 65562f3.