feat(console): view-switch nav + non-collapsible admin sidebar#360
Merged
feat(console): view-switch nav + non-collapsible admin sidebar#360
Conversation
Extracted from #323. Depends on #358 for the shared Button and the PanelLeft/SquarePen icons consumed by the sidebar header and new view-switch control. Behavior: - Sidebar collapses to an icon-only rail on the chat page and restores to the full layout on navigation away - Collapsed nav items show title tooltips; brand mark gets a tooltip too - When collapsed on desktop, an expand trigger (aria-expanded="false") appears so keyboard users can restore the sidebar - New view-switch component provides a dedicated toggle for chat vs admin surfaces, wired into the router Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- view-switch: replace window.location.pathname with useRouterState so the active state updates on SPA navigation; replace raw <a href> for internal routes with TanStack <Link> so they no longer trigger full page reloads. External GitHub link opens in a new tab. - router.tsx: drop the ChatErrorBoundary + QueryErrorResetBoundary block — that belongs to the React 19 chat refactor (PR E), not the sidebar/view-switch extraction. - sidebar: skip localStorage write when setOpen resolves to the same value, avoiding a spurious write on every re-click at the current state. - Drop a what-comment in sidebar/index.module.css. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
Code reviewFound 2 issues:
hybridclaw/console/src/styles.css Lines 230 to 236 in 2f6aa55
hybridclaw/console/src/components/sidebar/index.tsx Lines 36 to 40 in 2f6aa55 hybridclaw/console/src/components/sidebar/index.module.css Lines 358 to 364 in 2f6aa55 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
…r mode Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Admin sidebar is always expanded on desktop; mobile still uses the sheet. Keeps the view-switch extraction and Sidebar component's collapsible API (used in 'none' mode by both AppSidebar and ChatSidebar). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
furukama
requested changes
Apr 20, 2026
Contributor
furukama
left a comment
There was a problem hiding this comment.
The admin sidebar changes size on every click to a subcategory. Plus: smaller layouts: no menu hamburger button anymore.
Address PR #360 review. The sidebar `.root` had no explicit flex basis, so wide `.inset` content (tables, jobs board) squeezed it narrower on some admin routes. Pin it with `flex: 0 0 var(--sidebar-width)`. Add a `MobileTopbarTrigger` in the app-shell topbar so mobile users can open the sidebar sheet — previously the only trigger lived inside the sheet header, leaving no way to reopen the sheet once closed.
furukama
approved these changes
Apr 21, 2026
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.
Summary
Extracts the view-switch topbar nav from #323 and simplifies the admin sidebar to always-expanded on desktop (mobile keeps the sheet). Replaces the earlier plan to auto-collapse on
/admin/chat— the sidebar is no longer collapsible at all.Behavior
ViewSwitchNavcomponent for switching between Chat / Agents / Admin / Docs in the topbarcollapsible=\"none\"on desktop (no toggle button); mobile still opens/closes via the sheet + trigger/admin/*and chat lives at/chat(outside the admin layout)Files
components/app-shell.{tsx,test.tsx}components/sidebar/{index.tsx, app-sidebar.tsx, navigation.ts, sidebar.test.tsx, index.module.css}components/admin-nav.tscomponents/view-switch.tsx(new)routes/{dashboard.tsx, gateway.tsx},router.tsx,styles.cssTest plan
🤖 Generated with Claude Code