merge queue: embarking main (5be035f) and #395 together#399
Closed
mergify[bot] wants to merge 2 commits intomainfrom
Closed
merge queue: embarking main (5be035f) and #395 together#399mergify[bot] wants to merge 2 commits intomainfrom
mergify[bot] wants to merge 2 commits intomainfrom
Conversation
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
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 (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
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