Commit cb9d3b0
committed
feat: label merge-queue batch PRs with a pill and fix detection on the 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.
The dashboard links move to the current path-scoped form
(/orgs/<org>/repos/<repo>/…): the retired ?login=&repository= query form no longer
resolves, so getActivityLogLink and getMergeQueueLink — batch and non-batch — were
landing on a dead route. batch_pull is preserved on the batch activity-log link;
the dashboard frontend does not parse it yet, so that filter is a no-op until it
does.
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; every
dashboard link asserts the path-scoped URL; 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: I3d56072626baaba4158792ac762c3878e65821811 parent f213e46 commit cb9d3b0
3 files changed
Lines changed: 4147 additions & 21 deletions
0 commit comments