merge queue: embarking main (789d776) and #494 together#497
Closed
mergify[bot] wants to merge 2 commits into
Closed
merge queue: embarking main (789d776) and #494 together#497mergify[bot] wants to merge 2 commits into
mergify[bot] wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 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
defaultfor merge:check-success=actionlintcheck-success=testtitle ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by >= 2author = dependabot[bot]body ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0Required conditions to stay in the queue:
#approved-reviews-by>=2#changes-requested-reviews-by=0#review-requested=0#review-threads-unresolved=0check-success=actionlintcheck-success=testtitle ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by >= 2author = dependabot[bot]body ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0