chore: add desktop sidebar collapse to icon-only mode (#162) #176
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?
Relates to #162
Severity: Medium
Problem
The left sidebar is always fully expanded at ~120px wide. On smaller desktop/laptop screens this takes meaningful space.
Recommendation
Allow sidebar collapse to icon-only mode via the existing hamburger menu icon.
Acceptance Criteria
Implementation Plan (from #162 -- Milestone 19)
Phase: 8 (Header and minor polish) | Priority: Medium | Depends on: None | Blocks: None
Context
The desktop sidebar currently has two states: fully expanded (256px) or fully hidden (slides off-screen). There is no intermediate icon-only mode for users who want to reclaim screen space while keeping navigation accessible.
Design Decision
Two-state toggle: expanded (256px) <-> collapsed (64px). No hidden state. Rationale:
Implementation
1. Add state to
frontend/src/core/store/appStore.ts:sidebarCollapsed: boolean(default:false)toggleSidebarCollapse()sidebarOpen=true, sidebarCollapsed=false-> Expanded (256px, icons + labels)sidebarOpen=true, sidebarCollapsed=true-> Collapsed (64px, icons only)sidebarOpen=false-> Hidden (0px, off-screen)2. Persist collapse state:
localStorage.getItem/setItemviauseEffect(not Zustand persist)3. Update
frontend/src/components/Layout.tsx:width 200ms ease-in-out<Tooltip title="Page Name" placement="right">. Active indicator remains.margin-left:sidebarCollapsed ? '64px' : '256px'(whensidebarOpen)margin-lefttransition on content areaFiles
frontend/src/core/store/appStore.ts(add state + action)frontend/src/components/Layout.tsx(sidebar rendering + toggle logic)Commit Convention
Test Criteria
Risk Notes
Branch
Work on branch
issue-162-ux-design-audit-cleanup(shared with all #162 sub-issues)Milestone: Implementation Complete
Phase: Execution | Agent: Developer | Status: PASS
Changes
frontend/src/core/store/app.ts:sidebarCollapsed: booleanstate (default from localStorage)toggleSidebarCollapse()action with localStorage persistencefrontend/src/components/Layout.tsx:margin-lefttransitions smoothly with sidebar widthVerification
bc72f09Verdict: PASS | Next: Move to status/done