feat(client): sidebar redesign per design package #267
No reviewers
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!267
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sidebar-design-refresh"
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?
Summary
Refactors the (app) sidebar to mirror the canonical design package at
/var/home/wynnj/projects/carol-design/design_files/Sidebar.jsx. The visual + structural shape matches the design, while the behavioural plumbing from #210 (collapse/expand, mobile drawer, theme + locale persistence) keeps working.The sidebar now:
react-native-svgfromapps/client/lib/nav/CarolIcon.tsx; the SVG source-of-truth is also copied toapps/client/assets/carol-icon.svg).Chat/Applications→Profile/Skills/Experience/Projects/Network→Account.MessagesSquare,ClipboardList,UserRound,Sparkles,Briefcase,FolderGit2,UsersRound,Settings.getProfilePictureSource()so off-origin (Android + Tauri) gets the same bearer header + absolute URL rewrite as the profile screen.The theme + locale switchers move out of the sidebar footer into a new Preferences card on the Account screen. Theme keeps its three-state shape (Auto / Light / Dark) — preserving Auto avoids a destructive change for users whose persisted setting is
auto. Locale stays in the client-side persistence layer (lib/i18n/persistence.ts).Structure changes
apps/client/lib/nav/items.ts— typedNavLink | NavDividerunion, withNAV_ITEMSordered to match the design. Icons live inSidebar.tsxvia aNAV_ICONS: Record<NavNs, LucideIcon>map so the data module stays import-safe under the Node-environment vitest harness.apps/client/lib/nav/Sidebar.tsx— refactored to render the brand row, sectioned nav, and user-card footer. Drops therenderFooterControlsslot.apps/client/lib/nav/FooterControls.tsx— deleted (its responsibilities split between the newPreferencesCardon Account and the user-card footer inSidebar).apps/client/app/(app)/_layout.tsx— dropsrenderFooterControls; pins the drawer'sbackgroundColortodarkTokens.bgso the slide-in drawer matches the sidebar.apps/client/app/(app)/account.tsx— adds thePreferencesCard(theme tri-state segmented + locale segmented).packages/i18n/messages/en.json+es.json— addsaccount.preferences.*keys, drops unusednav.theme/locale/toggleTheme.apps/client/tests/navItems.test.ts— pins the three-group / two-divider shape so future contributors can't silently drop dividers or reorder groups without an explicit diff.Notes dropped from sidebar
The
/notesscreen file atapps/client/app/(app)/notes.tsxstays — users can still reach it by URL and the TanStack scaffolding it carries remains useful as a reference. It's just no longer listed in the sidebar (the design omits it).Decisions worth flagging
useTranslationinfrastructure.darkTokensfromlib/theme/tokens.tsrather than introducing a new dedicated token. The sidebar imports it directly, bypassinguseTheme(), so the surface stays dark regardless of the user's overall theme.Design source
Mirrored from
carol-design/design_files/Sidebar.jsx(the JSX prototype + the matching CSS rules indesign_files/index.html).Test plan
pnpm install --frozen-lockfilepnpm -F @carol/api typecheck/lint/testpnpm -F @carol/api-client typecheck/lint/test/checkpnpm -F @carol/client typecheck/lint/test/export:webtests/navItems.test.tscovers divider count, group ordering, no-Notes, no-orphan-divider invariants.Context: #210 (original sidebar PR).
📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.