mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
Task 1 of the collapsible sidebar plan (PAP-10638, plan §3/§4/§6).
Extend SidebarContext with two orthogonal axes beyond the existing
mobile drawer:
- Pinned desktop mode (expanded|collapsed): collapsed/setCollapsed/
toggleCollapsed, persisted to localStorage key
`paperclip.sidebar.collapsed` ("1"/"0"), read synchronously in the
state initializer to avoid a first-paint flash. Precedence: explicit
user pin > routeRequestsCollapsed > default expanded.
- Ephemeral peek: peeking/setPeeking, gated to desktop + collapsed +
(hover:hover) and (pointer:fine); never persisted.
- routeRequestsCollapsed + setter for Layout/routes (wiring is Task 5).
Collapsed/peek are desktop-only; sidebarOpen/toggleSidebar retained for
mobile + back-compat. Re-point Cmd/Ctrl+B: desktop -> toggleCollapsed,
mobile -> toggle drawer.
Tests cover precedence, persistence round-trip, mobile gating, peek
pointer gating, and the Cmd/Ctrl+B shortcut.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@paperclipai/ui
Published static assets for the Paperclip board UI.
What gets published
The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.
Storybook
Storybook config, stories, and fixtures live under ui/storybook/.
pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook
Typical use
Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.