Bug: recursive repository view

After creating a new repository, there is a strange bug that results in the screenshot provided in Actual Behavior.
This bug does not emerge after pushing at least one commit to the repository.

Expected behavior

First Screenshot can not be provided due to

Sorry, new users can only put one embedded media item in a post.

I’m sorry… but you actually know how a new, empty repository looks like. :wink:

Actual behavior

How to reproduce


As a GitHub Pro user using https://github.com in a Firefox browser, do…


  1. Create a new, empty, private repository
  2. Navigate to settings page of GitHub Pages (https://github.com/user/repo/settings/pages)
  3. Click on the #code-tab aka <> Code in the .repo-nav

I’m not sure what the bug is supposed to be. You see that screen whenever a repository doesn’t have any commits, that’s the expected behaviour.

E.g. I often start working on a repository locally, but nevertheless create an empty repository on GitHub, so I have my origin remote that I can set locally, and being adding on GitHub various settings, start Discussion, the Wiki, setup the Dashboard Projects, etc. (all tool that can be used to discuss pre-first commit Issues with collaborators).

Once I push my local repository to origin that screen goes away.

If you don’t want to see that screen, all you have to do is pick at least one of the proposed files by GitHub’s repository creation Wizard: either adding a README file, a LICENSE, or a .gitignore template.

@tajmone thanks for replying
But I think there is a misunderstanding.
I did not mean the view of an empty repository, but the behavior that by the described steps, as seen in the screenshot, the navigation bar is displayed twice.

Ah! Now I see it, I missed it entirely (forgive me, my vision is impaired so I struggle with screenshots, especially dark ones).

Basically, a nested navigation bar… Never seen that before. You confirm that this can be reproduced multiple times with your suggested steps? Then is looks like there is indeed a bug in the code that handles generating the HTML page here (“spaghetti code” gone wrong?).

No problem :slight_smile:

Yes, I can confirm that - at least within the same (described) context - the nesting navbar can be reproduced.
(Reproducible in the sense that it occurs again by the same navigation in the same repository but also in other, newly created repositories.)

As far as I can see this behavior is indeed not limited to the “GitHub Pages” settings page but also all other setting pages… :see_no_evil:

… and not limited to the settings pages but also all navbar tabs (“Wiki”, “Insights”, “Pull Request”, “Issues”, “Projects”, “Security”) excluding “Actions”.

This should help narrowing down the problem, since probably is some shared HTML generating function at play here.

1 Like

Now it is me who missed it :wink:
Sorry for the late addendum / clarification.