Skip to content

[Bug]: Compact PR header merge button gives no visible cue that it needs a second click #17944

Description

@TonybynMp4

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a mergeable pull request in the PR detail panel.
  2. Make the panel narrow enough that the header buttons collapse to icon only (@max-[30rem]/pr-header).
  3. Click the header Merge button (or Enable auto-merge) once.

Expected behavior

The button visibly shows that it is armed and a second click will merge, even in its icon-only form.

Actual behavior

Since #17710, the first click arms the button and the only visible change is the label switching to "Confirm merge?" / "Confirm auto-merge?". In the compact header that label is hidden (@max-[30rem]/pr-header:hidden in PullRequestDetailPanel.tsx), so the button looks unchanged. Apart from the hover tooltip, nothing tells you a second click is needed, and the armed state expires after 3 seconds. The first click looks like it did nothing.

Approve workflows and the menu items are not affected because their labels never hide.

Impact

Minor bug or occasional failure

Version or commit

main @ 1f093d1 (#17710) and later

Proposed fix

Show the armed state in a way that survives the icon-only form. For example, swap the merge glyph for a confirm icon (e.g. CheckIcon) while armed, alongside the existing label change. Revert already switches to the destructive variant when armed, which would be another option. The change is limited to those two buttons in PullRequestDetailPanel.tsx. I'm happy to open a PR once the direction is approved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions