fix(desktop): render full sidebar content in hover-reveal overlay

The hover-reveal overlay showed only the nav rail — session rows, search,
pinned/recents were gated behind `sidebarOpen` (false while collapsed), so
they never mounted in the floated panel.

Add a $sidebarRevealed store the PaneShell overlay drives via a new
onHoverRevealChange callback, and gate ChatSidebar's content on
`sidebarOpen || sidebarRevealed` (contentVisible) instead of raw open
state. The overlay now shows the complete sidebar.
This commit is contained in:
Brooklyn Nicholson
2026-06-07 20:31:21 -05:00
parent aa89205627
commit 3e455726eb
4 changed files with 35 additions and 8 deletions
@@ -39,6 +39,8 @@ export interface PaneProps {
* track stays at 0px.
*/
hoverReveal?: boolean
/** Called with the reveal state whenever a collapsed hoverReveal pane floats in/out. */
onHoverRevealChange?: (revealed: boolean) => void
id: string
maxWidth?: WidthValue
minWidth?: WidthValue
@@ -205,6 +207,7 @@ export function Pane({
id,
maxWidth,
minWidth,
onHoverRevealChange,
resizable = false,
width
}: PaneProps) {
@@ -248,6 +251,12 @@ export function Pane({
}
}, [overlayActive, hoverRevealed])
// Surface the effective reveal state to consumers (e.g. so the sidebar can
// render its full content while floated, not just while the track is open).
useEffect(() => {
onHoverRevealChange?.(overlayActive && hoverRevealed)
}, [onHoverRevealChange, overlayActive, hoverRevealed])
const startResize = useCallback(
(event: ReactPointerEvent<HTMLDivElement>) => {
const paneWidth = paneRef.current?.getBoundingClientRect().width ?? 0