Skip to content

fix(web): draw one divider where the actions menu has one group - #2

Open
nkyryliuk wants to merge 1 commit into
Bil0000:feat/pull-requests-pagefrom
nkyryliuk:fix/pull-request-menu-divider
Open

fix(web): draw one divider where the actions menu has one group#2
nkyryliuk wants to merge 1 commit into
Bil0000:feat/pull-requests-pagefrom
nkyryliuk:fix/pull-request-menu-divider

Conversation

@nkyryliuk

@nkyryliuk nkyryliuk commented Aug 7, 2026

Copy link
Copy Markdown

Fixes a doubled divider in the pull request actions menu on feat/pull-requests-page.

The problem

The menu's action group — the draft toggle and the merge strategies — opens with a divider whether or not it holds anything, and the merge strategies draw a second divider above themselves whether or not the draft toggle is there to be separated from.

Two reachable cases:

A host with no draft of its own. Bitbucket declares actions: ["merge", "close"], so the draft toggle never renders. Nothing lands between the divider that opens the group and the one the merge strategies draw, and the two sit together.

A draft whose "Ready for review" is already the header button. The toggle is withheld so the action is not offered twice, and the strategies are hidden because a draft cannot be merged — so the group is empty and the dividers that open and close it sit together.

Before / after

Captured on this branch, before and after the fix, in one browser session. The server was pointed at a local Bitbucket API double serving a synthetic repository and pull request, so the app exercises its real Bitbucket path end to end. The doubled hairline sits above Merge; counted from the DOM, role="separator" inside the open menu goes from 4 to 3 with the menu items unchanged.

Before After
The actions menu with a doubled divider above Merge The actions menu with a single divider above Merge

The change

The two members of the group are named once, and every divider around it is drawn from the same answer as its contents:

  • the group's own divider stays where it is, since the items below it are always there
  • the merge strategies draw a divider only when the draft toggle is above them
  • the divider closing the group is drawn only when the group has something in it

One file, no behaviour change beyond the dividers. apps/web typechecks with no new errors and the tests under src/components/pullRequest pass.

The group holding the draft toggle and the merge strategies opened with a
divider whether or not it held anything, and the merge strategies drew a
second one above themselves whether or not the draft toggle was above them.

Both cases are reachable:

- On a host with no draft of its own — Bitbucket declares merge and close —
  nothing renders between the divider that opens the group and the one the
  merge strategies draw, so the two land together.
- On a draft whose "Ready for review" is already the header button, the
  toggle is withheld to avoid offering it twice and the strategies are
  hidden because a draft cannot be merged, so the group is empty and the
  dividers that open and close it land together.

Both dividers are now drawn from the same answer as the group's contents.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added size:S vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant