Skip to content

merge queue: embarking main (789d776) and #494 together#497

Closed
mergify[bot] wants to merge 2 commits into
mainfrom
mergify/merge-queue/55bbdcc0ef
Closed

merge queue: embarking main (789d776) and #494 together#497
mergify[bot] wants to merge 2 commits into
mainfrom
mergify/merge-queue/55bbdcc0ef

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 29, 2026

🎉 This pull request has been checked successfully and will be merged soon. 🎉

Branch main (789d776) and #494 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #494.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue rule default for merge:

Required conditions to stay in the queue:

---
checking_base_sha: 789d7769c41ec9df6a3cb2e38c93c55d92485b29
previous_failed_batches: []
pull_requests:
  - number: 494
    scopes: []
scopes: []
...

sileht and others added 2 commits May 27, 2026 19:50
GitHub serves PR pages with up to three different merge-box layouts
right now:

  1. The new merge-status sidebar (a Primer dialog at the document
     root, anchored on `[data-testid="mergebox-border-container"]`),
     being rolled out.
  2. The current bottom merge box (`[data-testid="mergebox-partial"]`
     with `.border.rounded-2`, optionally wrapped by
     `.discussion-timeline-actions .merge-pr`).
  3. The classic `.mergeability-details` merge box.

Some users only see one variant; others — depending on the rollout —
see the new sidebar alongside the bottom merge box on the same page.
The extension needs to render the Mergify row on every variant so the
queue/refresh affordance is visible wherever GitHub shows merge
controls.

Refactor injectRowIntoMergeBox around a MERGE_BOX_ANCHORS table that
walks every variant and attaches a row to every container that does
not already contain one. The single-row id is replaced by a
`data-mergify-merge-box-row` attribute since multiple instances must
coexist; updateMergifyRow callers route through a new
updateAllMergifyRows helper so post-command refreshes and the
queue-state poll cover every instance.

While there, fix a latent collision: GitHub's new sidebar renders a
native `<section id="mergify">` for the Mergify GitHub App check,
which made the previous `document.querySelector("#mergify")` gate
short-circuit our injection logic to update that native section
instead of our row. The attribute-based marker sidesteps that, and
the per-container guard inside injectRowIntoMergeBox keeps the
function idempotent on repeated MutationObserver ticks.

Tests cover the new sidebar anchor, coexistence with the native
`<section id="mergify">`, the legacy mergebox-partial fallback, the
no-merge-box case, multi-anchor coexistence (all three injected at
once), and per-anchor idempotency on repeated calls.

Fixes MRGFY-7396

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: I5fbcee2590a13a5e0da0c7e5ffc05f0cf2432b02
@mergify mergify Bot deployed to Mergify Merge Protections May 29, 2026 08:56 Active
@mergify mergify Bot closed this May 29, 2026
@mergify mergify Bot deleted the mergify/merge-queue/55bbdcc0ef branch May 29, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant