Skip to content

merge queue: embarking main (5be035f) and #395 together#399

Closed
mergify[bot] wants to merge 2 commits intomainfrom
mergify/merge-queue/a13755be4e
Closed

merge queue: embarking main (5be035f) and #395 together#399
mergify[bot] wants to merge 2 commits intomainfrom
mergify/merge-queue/a13755be4e

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Apr 30, 2026

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

Branch main (5be035f) and #395 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #395.
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: 5be035fcd3ece3bfbfff7368068dd09827a236f9
previous_failed_batches: []
pull_requests:
  - number: 395
    scopes: []
scopes: []
...

jd and others added 2 commits April 29, 2026 16:14
mergify-cli embeds two structured JSON markers in the PR comments it
posts: `mergify-stack-data` (which PRs make up the stack and which one
is current) and `mergify-revision-data` (the per-PR amend timeline).
The extension now renders this information in two places.

A "Mergify Stacks" card appears above the conversation timeline. It
lists every PR in the stack, base on top, with the current PR
highlighted and a per-PR status dot (open / merged / closed / draft)
fetched once and cached in localStorage with a 1-hour TTL keyed on
head_sha. Below the stack list a horizontal revision strip shows each
amend with its short SHA, change type, and date; consecutive `rebase`
runs are squashed into one entry, and any reason text from the markdown
table is rendered inline. The panel only renders when at least one
marker is present.

A second row inside GitHub's sticky PR header (Conversation and Files
tabs) shows \`← prev #N title | STACK i/N | next #M title →\` so
reviewers can hop through the stack without scrolling back to the
panel. It is injected as a child of the sticky element with flex-wrap
so it inherits stickiness without fighting the toolbar's flex layout.

Implementation notes:

- Comment markdown is fetched via the cookie-authenticated github.com
  \`/<org>/<repo>/issue_comments/<id>/edit_form\` endpoint so the panel
  works on private repos (api.github.com would 404 unauthenticated).
- Comment IDs are scanned from the live DOM each tick (cheap) and
  cached individually by ID. We don't cache per-PR — that would let
  a stale-DOM read during an SPA transition poison a PR's entry for
  the full TTL.
- \`parseStackMarker\` rejects markers whose is_current PR doesn't
  match the URL we're rendering for, so a stale fetch from the
  previous PR is discarded instead of rendered as the wrong "current"
  PR.
- A render-generation counter cancels in-flight status fetches when
  the user navigates, so old responses don't paint dots on a freshly-
  rendered panel.
- 138 Jest tests cover marker parsing (both 4-col and 5-col formats,
  malformed JSON, schema_version bumps, latest-wins semantics,
  is_current filter, escape handling), the localStorage caches (TTL
  expiry, head_sha invalidation, clearAll, reload-clears-cache), the
  comment-bodies fetcher (cache reuse, DOM scan, edit_form parse),
  the panel builder (graceful absence, base-on-top order, accent
  stripe, status dot painting, revision timeline, rebase squashing,
  ellipsis collapse, reason rendering, position indicator), the
  context-panel injector (idempotency via content hash), the stack-
  nav builder/injector (prev/next, base/tip muted halves, sticky
  target match, idempotency), and the orchestrator (including SPA
  stale-data resistance).

Change-Id: I04449ee28e499d3d00dd79552868a02a210bed2b
@mergify mergify Bot deployed to Mergify Merge Protections April 30, 2026 08:45 Active
@mergify mergify Bot closed this Apr 30, 2026
@mergify mergify Bot deleted the mergify/merge-queue/a13755be4e branch April 30, 2026 08:47
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