feat(extension): preserve current PR tab in stack prev/next nav#413
Merged
mergify[bot] merged 1 commit intomainfrom May 5, 2026
Conversation
The stack prev/next nav at the top of a PR page used to always link to the bare PR URL, dropping the user back onto the Conversation tab. Now the link forwards whatever subpath the user is currently viewing (`/changes`, `/files`, `/commits`, …) so navigating between PRs in a stack keeps you on the same tab. Hash and query are intentionally not preserved — they typically point at PR-specific content (a diff anchor, a comment) that won't apply to the target PR. Change-Id: Ic8087dddcb12b508e8b2837e2b4c43bf41a66d86
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Required ReviewsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
There was a problem hiding this comment.
Pull request overview
Updates the stack prev/next navigation links on GitHub PR pages so they keep the user on the same PR subpage (e.g. /files, /commits) when moving between PRs in a stack, instead of always returning to the Conversation tab.
Changes:
- Extend PR page URL parsing to capture a
subpathafter the PR number. - Pass
subpaththrough the render context and append it when building stack prev/next link URLs. - Add a unit test asserting that prev/next links preserve the current subpath.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/mergify.js | Parse and propagate PR subpath, and include it when generating stack navigation hrefs. |
| src/tests/mergify.test.js | Add coverage to ensure stack prev/next links preserve the current subpath. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kozlek
approved these changes
May 5, 2026
JulianMaurin
approved these changes
May 5, 2026
Contributor
Merge Queue Status
This pull request spent 1 minute 53 seconds in the queue, including 1 minute 24 seconds running CI. Required conditions to merge
|
34 tasks
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.
The stack prev/next nav at the top of a PR page used to always link to
the bare PR URL, dropping the user back onto the Conversation tab. Now
the link forwards whatever subpath the user is currently viewing
(
/changes,/files,/commits, …) so navigating between PRs in astack keeps you on the same tab.
Hash and query are intentionally not preserved — they typically point at
PR-specific content (a diff anchor, a comment) that won't apply to the
target PR.