Sidebar peek - #4355
Conversation
|
|
/review |
|
|
/review |
|
Signed-off-by: Hubert Zub <hubert.zub@gmail.com>
The peek work made onOpen a required prop, but the Sidebar.*.test.tsx harnesses don't pass it, breaking the typecheck. Mirror the onOpenSearch convention: optional with a no-op default. Co-authored-by: Isaac Signed-off-by: Hubert Zub <hubert.zub@gmail.com>
a56ba88 to
f3aab6e
Compare
|
UI Preview is ready for this PR 🚀
Note This preview is only accessible to maintainers with workspace access. |
Related issue
Closes #
Summary
Adds a hover-to-peek affordance to the collapsed sidebar. With the sidebar
closed, dwelling for 1s on the header's panel-toggle button floats the sidebar
in as a rounded, ringed card overlaying the content (rather than pushing main
aside like a real open). Leaving the card dismisses it after a short grace
period; a toggle inside the peeking card pins it fully open, and clicking the
header button opens it directly.
opening the full-screen overlay, so a tap's synthetic
pointerenternevertriggers a peek.
(
ring-1 ring-border), shadowed, and animates in (fade + slide-from-left).Resize is disabled while peeking — the card is a fixed-width flyout, not a
resizable panel.
pending peek; re-entering the card during the close grace period cancels the
dismiss. Both timers clear on unmount.
Test Plan
npm run type-check— cleannpm run lint— cleannpx vitest run src/shell/Sidebar— 210/210 passnpx vitest run src/shell/ChatHeader— 12/12 passoff the edge, no resize handle; move away before 1s → nothing opens; leave the
card → dismisses after the grace period; jitter back onto it within that
window → stays; in-card toggle pins it fully open.
never peeks.
Demo
Screen.Recording.2026-08-07.at.16.42.34.mov
Type of change
Test coverage
Coverage notes
The peek behaviour is hover/timer-driven layout on the existing
SidebarandChatHeader; existing suites (210 Sidebar + 12 ChatHeader) cover the componentsand pass with the new optional props. The hover-dwell, grace-period dismiss, and
mobile gating were verified manually per the Test Plan; no new automated timer
tests were added.
Changelog
Hover the collapsed sidebar toggle to peek the conversation list without pinning it open.