Skip to content

feat(code): top-level app nav rail (Home / Inbox / Code)#2491

Open
adamleithp wants to merge 2 commits into
mainfrom
code/top-nav
Open

feat(code): top-level app nav rail (Home / Inbox / Code)#2491
adamleithp wants to merge 2 commits into
mainfrom
code/top-nav

Conversation

@adamleithp
Copy link
Copy Markdown
Contributor

@adamleithp adamleithp commented Jun 4, 2026

Dev-only for now

This is gated behind the project-bluebird feature 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.

  • Flag on (default in dev builds, plus anyone we explicitly target): the app rail appears with Home / Inbox / Code.
  • Flag off (every prod user today): the app is byte-for-byte the current code-only shell — no rail, / and /inbox redirect 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.

2026-06-04 23 27 02

What

Adds a Slack-like vertical app nav rail that switches between three top-level spaces:

  • Home — empty placeholder for now (this is what we're still building).
  • Inbox — the existing inbox, full-screen.
  • Code — the existing app, unchanged.

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 a redirect → /code).
  • routes/inbox.tsx — new top-level route mounting the existing InboxView.
  • routes/__root.tsx — renders the rail (only when the flag is on) and branches Home/Inbox to a chrome-less Outlet; Code keeps its existing chrome. Redirect guard sends stranded rail-only paths to /code once flags resolve when the flag is off.
  • shared/constants.tsPROJECT_BLUEBIRD_FLAG.
  • hooks/useFeatureFlag.tsuseFeatureFlagsLoaded() so the redirect waits for a trustworthy flag value rather than the pre-load false default.

Testing

  • pnpm --filter code typecheck — clean.
  • Biome — clean.
  • Did not run the Electron app in this environment.

Created with PostHog Code

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>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 4, 2026

Prompt To Fix All With AI
Fix 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

Comment on lines +38 to +45
{
id: "code",
label: "Code",
icon: CodeIcon,
to: "/code",
isActive: (pathname) =>
pathname === "/code" || pathname.startsWith("/code/"),
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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>
Copy link
Copy Markdown
Member

@raquelmsmith raquelmsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm I'm not convinced we need this. Why add another sidebar instead of just using the inbox item in the existing left sidebar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants