{{ message }}
extensible-nav - Fix duplicate nav when the header re-renders - #10046
Open
HasselNot7 wants to merge 4 commits into
Open
extensible-nav - Fix duplicate nav when the header re-renders#10046HasselNot7 wants to merge 4 commits into
extensible-nav - Fix duplicate nav when the header re-renders#10046HasselNot7 wants to merge 4 commits into
Conversation
HasselNot7
marked this pull request as ready for review
September 5, 2026 01:38
fregante
approved these changes
Sep 5, 2026
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.

Closes #10038
Toggling a repository feature (Issues, Wikis, ...) makes GitHub rebuild the header. The native
nav[aria-label="Repository"]gets re-added, soobserverunsreplaceagain. Eachreplacemounted a freshExtensibleNavbut never tore down the previous one, so the bars stack up.replacenow returns an unmount function and is wrapped insingleton, the same helperrgh-feature-descriptionsuses to keep a single instance alive. On a rebuild the old nav is unmounted before the new one is mounted, so only one is ever present.Test URLs
The duplicate only shows on a repository's settings page, which needs admin access. On any repo you manage, open its settings and toggle "Issues" (or another feature) off and on: the repository nav stacks up before the fix and stays single after it. See the gif below.
A public page to confirm the nav still renders correctly (no regression):
https://github.com/sindresorhus/awesome
I checked this on Chromium (Edge on Windows). There is no Safari for Windows, so I could not run it here, and the report came from Safari. I'd appreciate someone confirming it on Safari. The change only affects how the nav component is mounted and torn down, which is the same on every browser, so I'd expect it to behave the same on Safari. :D
Screenshot
Before

After
