Repository navigation
Closed
Description
Add a side panel resized from its edge, with a header, actions and panes that keep their state while hidden.
Part of #94.
Why
Threads, files and other side content open in a panel beside the chat. People resize it, switch between panes and expect to come back to the scroll position and the text they left. The existing PagePanel and SidebarPanel stay as they are; the old ChatPanel is deleted at the cutover (#110).
What
src/ui/panel.tsx:Panel(width,onWidthChange),PanelHandle,PanelHeader,PanelActions,PanelClose,PanelContent(keepMounted),PanelPane.src/hooks/use-resizable.ts: width clamping, keyboard steps, reset, and the main area's minimum width.stories/chat/panel.stories.tsx: wide, narrow-screen overlay, several panes.e2e/fixtures.tsx: apanelscenario with a text field in each pane, withe2e/panel.spec.ts.- Unit tests for the hook; exports in
src/index.ts.
Requirements
- R39: resizes from
PanelHandleby pointer (no React render while dragging) and by arrow keys; resets on double-click or Enter; the main area keeps a minimum width; narrow screens get an overlay;PanelContentwithkeepMountedkeeps a hidden pane's scroll position and typed text. - R5–R12: the shared component rules (width is controllable).
Constraints
- The handle is a focusable separator with
aria-valuenow,aria-valueminandaria-valuemax. - The shared rules in Replace the chat components with a stateless Conversation family #94 apply: no new dependency or peer, no optional-peer import, token-only styling, no change to existing modules, additions only to
src/index.tsande2e/fixtures.tsx.
Done when
- Unit tests cover
useResizable: clamps to min and max; keeps the main area's minimum; arrow keys step; reset returns to the default. - Browser spec covers:
- Dragging resizes without React renders during the drag.
- Double-click resets.
- Text typed in a hidden pane survives showing it again.
- No serious or critical axe violation in the new stories, in light or dark.
bun run check,bun run build,bun run test:e2eandbun run dep-guardpass.
Metadata
Metadata
Assignees
Labels
No labels
Activity