[P3] Admin page context separation #112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent Epic
#100
Problem
On Admin pages, the sidebar still shows Applications/Agents/Routes navigation — it's not actionable in the admin context and creates visual noise. The status filter buttons (OK/Warn/Error/Running) also appear on admin pages where they have no effect.
Proposed Solution
When on Admin pages:
This creates a cleaner admin experience and reinforces that admin is a separate context from operational monitoring.
Acceptance Criteria
Design Specification
Sidebar collapses to 32px icon-only rail on admin pages. Rail shows Cameleer logo + back-arrow to last operational tab. 200ms width transition. Status filters and KPI strip already hidden via existing
isAdminPageguard.Implementation: Pass
SidebarRailcomponent (orcollapsedprop) whenisAdminPageis true in LayoutShell.Analysis: Current State & What Already Works
Already handled:
ContentTabs(Exchanges/Dashboard/Runtime/Logs) is hidden on admin pages viaisAdminPageguard inLayoutShellAdminLayoutprovides its own 6-tab navigation (RBAC, Audit, OIDC, App Config, Database, ClickHouse)1.5remon adminThe actual problem:
The full operational sidebar (Applications tree, Agents tree, Routes tree, starred items, search box) still renders at full width (~240px) on admin pages. It's completely non-functional in the admin context — clicking an app navigates away from admin. It wastes ~20% of screen width and creates cognitive noise.
Status filters — these are part of
ContentTabswhich is already hidden. The KPI strip (TabKpis) is also insideContentTabs. So this acceptance criterion is already met.Proposed Approaches (3 options)
Option A: No Sidebar (recommended)
Hide the sidebar entirely. Admin already has its own tab nav — the sidebar adds nothing. Use the full viewport width for admin content.
Pros: Maximum content width, cleanest separation, simplest to implement (just pass
collapsed={true}or don't render<Sidebar>at all).Cons: Need a "back" affordance to return to operational view.
Option B: Icon Rail (32-48px)
Collapse sidebar to a narrow rail with just the logo and a back arrow. No tree navigation, no search.
Pros: Visual continuity with operational view (sidebar "collapses" rather than disappearing), logo stays visible.
Cons: 40px of wasted space for just two icons. Over-engineered for what it does.
Option C: Admin Sidebar
Replace the operational sidebar with an admin-specific one listing the 6 admin sections vertically.
Pros: Familiar sidebar pattern, admin sections always visible.
Cons: Duplicates the
AdminLayouttabs — now there are two nav mechanisms for the same 6 pages. Confusing. Also wastes width for only 6 items that already fit in a horizontal tab bar.Recommendation: Option A
Option A is the cleanest. The admin context already has its own horizontal tab navigation (6 tabs in
AdminLayout). Adding a sidebar — whether icon rail or admin-specific — either wastes space (B) or duplicates navigation (C).Implementation is simple:
LayoutShell, conditionally render<Sidebar>only when!isAdminPageAppShellfrom the design system likely needs to handle the "no sidebar" case gracefully (full-width content)The back affordance could be as simple as making the breadcrumb's first segment ("Admin") a link back to the last operational tab, or adding a
[<-]icon to the left of the breadcrumb.Revised Proposal: Option A-Slim
After discussion, the refined approach hides both the sidebar and the TopBar on admin pages. The TopBar's features (breadcrumb, search, time range, status filters) are all irrelevant in admin context. Only logout and a back button are needed.
Final Mock
Implementation Summary
<Sidebar>and<TopBar>whenisAdminPage, render<Outlet>full-width/exchanges(or last visited tab if we track it)This is the approved direction for implementation.
Implemented: Composable Sidebar with Admin Accordion & Icon-Rail Collapse
Migrated from the old monolithic
<Sidebar apps={[...]}/>to the new composable compound API from@cameleer/design-systemv0.1.23.What changed
Design system (separate repo, v0.1.23):
Sidebarrefactored into compound component:Sidebar.Header,Sidebar.Section,Sidebar.Footer,Sidebar.FooterLinkSidebarTreeanduseStarredexported as standalone building blocksServer UI:
sidebar-utils.ts— tree-building functions and domain types moved from DSLayoutShell.tsx— rewritten with compound Sidebar API, accordion behavior, icon-rail collapseAdminLayout.tsx— simplified to<Outlet>only (sidebar handles admin navigation)Features
/admin/*expands Admin section at top with 6 sub-pages, collapses operational sections. Clicking an operational section header (chevron) exits admin and restores previous states.<<toggle collapses sidebar to ~48px with section icons. Click any icon to expand.Commits
bc913eefeat: extract sidebar tree builders and types from DSfe49eb5feat: migrate to composable sidebar with accordion and collapse00042b1feat: remove admin tabs, sidebar handles navigationd5f5601fix: add missing Routes section, fix admin double paddingd21d8b2fix: initialize sidebar accordion state from initial route