{{ message }}
clean-repo-tabs - Restore feature#9185
Draft
daresTheDevil wants to merge 2 commits intorefined-github:mainfrom
Draft
clean-repo-tabs - Restore feature#9185daresTheDevil wants to merge 2 commits intorefined-github:mainfrom
clean-repo-tabs - Restore feature#9185daresTheDevil wants to merge 2 commits intorefined-github:mainfrom
Conversation
GitHub replaced the repo nav with a React Primer UnderlineNav component, breaking every code path in clean-repo-tabs. The feature was silently doing nothing on the new DOM. Changes: - Find tabs via [data-tab-item] selectors instead of [data-hotkey] - Hide tabs with li.hidden instead of the old onlyShowInDropdown() mechanism (dropdown no longer exists in React DOM) - Update mustKeepTab to check aria-current="page" alongside .selected - Update setTabCounter and getTabCount for new counter structure ([data-component="counter"] instead of .Counter) - Add shared tab selectors to selectors.ts supporting old, anonymous, and React DOM variants - Remove dependency on unhideOverflowDropdown from more-dropdown-links Closes refined-github#8867
Per maintainer feedback, drop backward compat for the old DOM. Tab selectors simplified to plain `[data-tab-item]` strings. Remove deprecated `deduplicate: 'has-rgh'` (refined-github#7000) so the feature re-runs correctly on SPA navigation.
1 task
clean-repo-tabs - Restore feature for React UnderlineNavclean-repo-tabs - Restore feature
fregante
reviewed
Apr 14, 2026
Member
fregante
left a comment
There was a problem hiding this comment.
The code looks good so far but I don't see any code adding the hidden tabs to the dropdown. We need an additional observer to append items to it. It's ok if they're not in the exact order they appear on the tab bar.
Member
There was a problem hiding this comment.
If the two issues in the comment are still applicable, restore the comment
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.

Part of #8867 (partially --
clean-repo-tabsonly, other affected features are separate)GitHub replaced the repo nav with a React
UnderlineNavcomponent. Every selector inclean-repo-tabswas targeting DOM that no longer exists -- hotkey attributes,.selected,.Counter,.UnderlineNav-body, the overflow dropdown mechanism. The feature was silently doing nothing.What changed
[data-tab-item="..."]selectors inselectors.ts. Plain strings, not arrays -- old DOM support dropped per @fregante's feedback.mustKeepTabchecksaria-current="page"instead of.selectedsetTabCounter/getTabCounttarget[data-component="counter"]instead of.Counter/.numhideTabusesli.hidden = trueinstead of the oldonlyShowInDropdownmechanism. React handles the remaining layout correctly, no visual glitches.moveRareTabsand its dependency onunhideOverflowDropdownfrommore-dropdown-links. Security and insights tabs just get hidden directly.deduplicate: 'has-rgh'per the migration tracked in 🍰 Code migrations #7000. The init functions already bail early when tabs don't exist ormustKeepTabreturns true, so re-running on SPA navigation is safe. Cached API calls (wikiPageCount,hasActionRuns) prevent redundant fetches.Test URLs
Screenshot
Tested across all URLs above. Tabs hide correctly on both hard refresh and SPA navigation.




