feat: label merge-queue batch PRs with a pill and fix detection on the current DOM#616
Conversation
Merge Protections🔴 3 of 7 protections blocking · waiting on 👀 reviews and ⛓️ dependency
🔴 ⛓️ Depends-On RequirementsWaiting for
This rule is failing.Requirement based on the presence of
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
This PR improves merge-queue batch PR UX and robustness in the browser extension by (1) clearly labeling batch PR rows that intentionally have no action buttons, and (2) updating batch detection/base-branch parsing to match GitHub’s current React PR DOM while preserving legacy fallbacks.
Changes:
- Add a “Merge-queue batch PR” state pill (informational accent-blue, no pulse) to label button-less batch PR rows.
- Repoint DOM selectors for batch detection (
isPullRequestAuthoredByMergify) and base ref parsing (getBaseRef) to work on the current GitHub PR DOM with legacy fallbacks. - Add a real current-DOM batch PR fixture and fixture-backed tests covering detection, base ref, pill rendering, and absence of dequeue/actions.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/queue.js | Updates DOM selectors for batch detection/base ref and renders a batch “state pill” for button-less batch rows. |
| src/tests/queue.test.js | Adds fixture-backed tests asserting batch detection/base ref and the new batch pill + button-less row behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1f8a8dc to
cb9d3b0
Compare
Revision history
|
cb9d3b0 to
4a04e75
Compare
|
This pull request is part of a Mergify stack:
|
4a04e75 to
ff253b0
Compare
ff253b0 to
8629292
Compare
…e current DOM A merge-queue batch PR now renders a "Merge-queue batch PR" pill in the injected row, so the button-less batch shape reads as intentional rather than empty. The pill uses the buildStatePill visual language — informational accent-blue, no pulse. Batch detection is repointed at the current React PR DOM, which no longer serves the selectors it relied on: isPullRequestAuthoredByMergify scopes to the opening comment (.js-command-palette-pull-body) instead of .gh-header-meta, and getBaseRef reads the base branch off the first branch-name link's /tree/<branch> href instead of .commit-ref.base-ref. Both keep the legacy selector as a fallback for the older DOM era. Adds a real batch-PR fixture (github_pr_batch_open) recorded on today's DOM, with fixture-backed tests for detection, base ref, the pill, the button-less row, and the absent dequeue button. MRGFY-7874 Test plan: - npx jest (283 passing) — detection/base-ref/pill/row on the real fixture; legacy synthetic + old-fixture paths still green. - npx biome check — clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJbLFjMX9mb8o5T3JXTAXL Change-Id: I3d56072626baaba4158792ac762c3878e6582181
8629292 to
729ac6b
Compare
7e8067d to
c1d67bd
Compare
A merge-queue batch PR now renders a "Merge-queue batch PR" pill in the injected
row, so the button-less batch shape reads as intentional rather than empty. The
pill uses the buildStatePill visual language — informational accent-blue, no pulse.
Batch detection is repointed at the current React PR DOM, which no longer serves
the selectors it relied on: isPullRequestAuthoredByMergify scopes to the opening
comment (.js-command-palette-pull-body) instead of .gh-header-meta, and getBaseRef
reads the base branch off the first branch-name link's /tree/ href instead
of .commit-ref.base-ref. Both keep the legacy selector as a fallback for the older
DOM era. Adds a real batch-PR fixture (github_pr_batch_open) recorded on today's
DOM, with fixture-backed tests for detection, base ref, the pill, the button-less
row, and the absent dequeue button.
MRGFY-7874
Test plan:
synthetic + old-fixture paths still green.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KJbLFjMX9mb8o5T3JXTAXL
Depends-On: #618