feat(code): top-level app nav rail (Home / Inbox / Code)#2491
feat(code): top-level app nav rail (Home / Inbox / Code)#2491adamleithp wants to merge 2 commits into
Conversation
Add a Slack-like vertical rail that switches between three top-level spaces: Home (empty placeholder), Inbox (the existing inbox, full-screen), and Code (the existing app, unchanged). Gated behind the project-bluebird flag and default-on in dev — when the flag is off the app is byte-for-byte today's code-only shell, so this is a safe dark-launch. - AppNav rail with active-space highlighting and the inbox actionable-report badge (useInboxSignalCount). - / renders an empty Home space (was a redirect to /code); /inbox mounts the existing InboxView full-screen. - Root layout renders the rail + branches Home/Inbox to a chrome-less Outlet, Code keeps header/sidebar/space-switcher. Stranded rail-only paths redirect to /code once flags resolve when the flag is off. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/components/AppNav.tsx:38-45
**Code item active-state gap for sibling top-level routes**
`/command-center`, `/mcp-servers`, and `/skills` are rendered as root-level routes (not under `/code/`), so when a user navigates to any of them with the rail visible, no item in the rail is highlighted. Since `isRailSpace` is false for these paths, the Code chrome (header/sidebar) also renders alongside the rail, meaning the user is visually inside the Code context with an unlit Code button. Extending the `isActive` predicate to cover these paths (or alternatively treating them as non-rail-space paths and hiding the rail) would keep the active state consistent.
Reviews (1): Last reviewed commit: "feat(code): top-level app nav rail (Home..." | Re-trigger Greptile |
| { | ||
| id: "code", | ||
| label: "Code", | ||
| icon: CodeIcon, | ||
| to: "/code", | ||
| isActive: (pathname) => | ||
| pathname === "/code" || pathname.startsWith("/code/"), | ||
| }, |
There was a problem hiding this comment.
Code item active-state gap for sibling top-level routes
/command-center, /mcp-servers, and /skills are rendered as root-level routes (not under /code/), so when a user navigates to any of them with the rail visible, no item in the rail is highlighted. Since isRailSpace is false for these paths, the Code chrome (header/sidebar) also renders alongside the rail, meaning the user is visually inside the Code context with an unlit Code button. Extending the isActive predicate to cover these paths (or alternatively treating them as non-rail-space paths and hiding the rail) would keep the active state consistent.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/components/AppNav.tsx
Line: 38-45
Comment:
**Code item active-state gap for sibling top-level routes**
`/command-center`, `/mcp-servers`, and `/skills` are rendered as root-level routes (not under `/code/`), so when a user navigates to any of them with the rail visible, no item in the rail is highlighted. Since `isRailSpace` is false for these paths, the Code chrome (header/sidebar) also renders alongside the rail, meaning the user is visually inside the Code context with an unlit Code button. Extending the `isActive` predicate to cover these paths (or alternatively treating them as non-rail-space paths and hiding the rail) would keep the active state consistent.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Clears the window titlebar / macOS traffic lights on all platforms (replaces the mac-only 28px inset). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
raquelmsmith
left a comment
There was a problem hiding this comment.
Hmmmm I'm not convinced we need this. Why add another sidebar instead of just using the inbox item in the existing left sidebar?
Dev-only for now
This is gated behind the
project-bluebirdfeature flag and is not enabled for any real users. It only shows up for people who have the flag turned on — i.e. us, internally, while the Home space is built out./and/inboxredirect to/code, and the Code chrome is untouched.So merging this is a no-op for users until we deliberately flip the flag. It's safe to land and iterate on behind the flag.
What
Adds a Slack-like vertical app nav rail that switches between three top-level spaces:
This is the minimal top-nav extraction from the larger canvas branch — none of the canvas / dashboards / channels machinery comes along.
Changes
components/AppNav.tsx— the rail: active-space highlighting, the inbox actionable-report badge (useInboxSignalCount, reuses the inbox feature's existing query — no extra polling), and 2.5rem top padding to clear the titlebar.routes/index.tsx—/renders an empty Home space (was aredirect → /code).routes/inbox.tsx— new top-level route mounting the existingInboxView.routes/__root.tsx— renders the rail (only when the flag is on) and branches Home/Inbox to a chrome-lessOutlet; Code keeps its existing chrome. Redirect guard sends stranded rail-only paths to/codeonce flags resolve when the flag is off.shared/constants.ts—PROJECT_BLUEBIRD_FLAG.hooks/useFeatureFlag.ts—useFeatureFlagsLoaded()so the redirect waits for a trustworthy flag value rather than the pre-loadfalsedefault.Testing
pnpm --filter code typecheck— clean.Created with PostHog Code