feat(ui): global project tab nav on every /projects/[id]/* route - #13
Merged
Merged
Conversation
Old behavior: the layout-client only rendered the project header + tab
nav for autoblog/social paths. Other tabs (overview, scans, performance,
stats, repos, getting-started) rendered their own ProjectShell. Pages
not covered by either branch — most notably /projects/[id]/runs/[runId],
and any deep autoblog/social sub-routes that hadn't been wrapped — got
no nav at all and felt like dead ends.
Fix: hoist the header + status controls + tab nav into the project
layout (layout-client.tsx) unconditionally. ProjectTabsNav already
derives currentTab from usePathname() so the layout doesn't need to
know the active tab.
Refactor:
- layout-client.tsx: drop the isSubTab gate; always render the chrome.
- components/project-tabs-nav.tsx: rewrite as the single source of truth
for the tabs list + per-tab matchers (Scans tab also lights up on
/runs/[runId]; Overview matches the bare project URL only).
- components/project-shell.tsx: now a pass-through. Six existing pages
still call <ProjectShell>{children}</ProjectShell>; making it a
noop avoids touching every page in this PR. The original render is
deprecated and a follow-up can drop the wrappers entirely.
After this PR every project sub-route shows the same chrome at the
same Y, including run-detail and any future deep links.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Hoists the project chrome (logo/title/action bar + tab nav) into the project layout unconditionally so every project sub-route shows the same nav — including /projects/[id]/runs/[runId] and any deep autoblog/social pages. ProjectShell becomes a pass-through; the six pages that still wrap themselves keep working without edits.