Repository navigation
Improve support for branches with slashes - #10333
Merged
Merged
Conversation
Member
Author
|
Forgot to fix #10332 (comment):
|
getCurrentGitRef - Read the branch from the picker text
fregante
marked this pull request as ready for review
November 1, 2026 10:58
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
fregante
enabled auto-merge (squash)
November 3, 2026 08:24
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.


Created by Claude, will be reviewed by @fregante first.
getCurrentGitRefreturned only the first path segment (branch) on slashed branches because the branch picker no longer has atitle, soextractCurrentBranchFromBranchPickerreturned an empty string and the lookup fell through to the URL. It now reads the picker text, which always holds the full name.list-prs-for-branchalso now inserts its button after thedefault-branch-buttongroup instead of inside it.Test URLs
https://github.com/refined-github/sandbox/commits/branch/with/slashes
https://github.com/refined-github/sandbox/tree/branch/with/slashes
https://github.com/refined-github/sandbox/commits/main
Long name https://github.com/refined-github/sandbox/commits/very-very-long-long-long-long-branch-name
Long and slashed https://github.com/refined-github/sandbox/commits/copilot/create-empty-file-linkify-pr-review-state
Checked
Chromium, logged out, on the server-rendered markup of the three URLs above:
mainreturnedbranch,branch,main; this branch returnsbranch/with/slashes,branch/with/slashes,main. On the two long-name URLs (41 and 49 characters) the picker still has notitle, anywhere inside it, and its text is the full name; the clipping is CSS only. The result is the full name there too. On the repo root the picker text is the default branch name, whichgetDefaultBranchalso relies on.Not checked (reviewer tasks)
delete-branch,list-prs-for-branchandrepo-wide-file-finderpick up the full name on https://github.com/refined-github/sandbox/tree/branch/with/slashes.