Repository navigation
Conversation
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The unchanged bugs cache can retain an old lower-bound count after an upgrade, undercounting bugs until revalidation; the cache namespace needs versioning to force recomputation.
1 open issue
What changed in this PR
This PR makes the Bugs tab appear before its API count resolves, then updates or hides it based on the result. It also extends the shared navigation store to support this behavior.
Changes:
- Initialize the Bugs tab from cached data, hide zero-count tabs, and place it after Issues.
- Combine label discovery and bug counting into one request for most repositories.
- Apply overrides to added tabs and update navigation-store tests.
| File | Description |
|---|---|
source/features/bugs-tab.tsx |
Adds immediate tab rendering, cached visibility, and streamlined counting. |
source/features/bugs-tab.gql |
Combines label lookup with an advanced-search count. |
source/components/extensible-nav-store.ts |
Adds after-anchor insertion and overrides for extra tabs. |
source/components/extensible-nav-store.test.ts |
Updates insertion tests and covers extra-tab overrides. |
Review effort: Balanced
Co-authored-by: Claude <noreply@anthropic.com>
…s-show # Conflicts: # source/features/bugs-tab.tsx
This branch has not been deployed
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.

Depends on #10336, which should be merged first. Its commit is the first one here, because its branch is in a fork and can't be stacked on natively.
Before, the Bugs tab was only added after an API call showed that the repo had bugs, then its count was fetched again and updated. Now:
extensible-navaddTabtakesafterinstead ofbefore. If the tab to follow is missing, the tab is not added. The Bugs tab usesafter: 'issues', so it's never shown when Issues are disabled. This replaces theasLongAscheck, which was always true because it wrapped a promise inBoolean().hrefas a new overridable property, so the tab's link and visibility are updated withoverrideTab.(label:bug OR type:Bug). A label that doesn't exist doesn't affect the search results, so that count is exact when the repo has abuglabel or no bug label at all. Only repos with another bug label name (likeType: Bug) need a second request. ThetypeBug, per-label andissuescounts are gone.exact-bugscache and theexactCount > 0assertion are gone. They only existed for the second fetch.AI-assisted (Claude Code).
Test URLs