Resizable assistant drawer, and the same drawer on share links
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s

- The assistant drawer can be resized by dragging its left edge (or with the
  arrow keys), from 340 to 760 px, always leaving the page 420 px; double-click
  resets it. The width is remembered in the browser.
- Share-link visitors get the same side-drawer assistant as the owner instead
  of the small popup, with a New chat button; a full-screen sheet on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-16 12:22:04 -07:00
parent 517278be71
commit e0bc7b580e
6 changed files with 263 additions and 71 deletions

View file

@ -12,6 +12,7 @@ import { cx, useDebounced, useHotkeys, useIsDesktop, useTheme, type ThemeChoice
import { Brand } from '@/pages/Auth';
import { Button, ClassDot, Dialog, Field, IconButton, Input, Menu, MenuItem, MenuLabel, MenuSeparator, Spinner, Textarea, Tooltip, Select } from '@/ui';
import { SidebarDrafts, useDraftNotifications } from '@/features/DraftsTray';
import { SideDrawer } from '@/ui/SideDrawer';
const AssistantPanel = lazy(() => import('@/features/AssistantPanel'));
@ -589,7 +590,7 @@ export function Shell() {
</main>
</div>
{showDrawer && (
<aside aria-label="Assistant" className="fixed top-0 right-0 z-40 hidden h-dvh w-[420px] shrink-0 animate-drawer flex-col border-l border-line bg-surface shadow-3 lg:flex min-[1360px]:sticky min-[1360px]:z-20 min-[1360px]:w-[440px] min-[1360px]:shadow-none">
<SideDrawer label="Assistant">
<Suspense fallback={<div className="grid flex-1 place-items-center"><Spinner /></div>}>
<AssistantPanel
variant="drawer"
@ -600,7 +601,7 @@ export function Shell() {
}
/>
</Suspense>
</aside>
</SideDrawer>
)}
{!showDrawer && !onAssistantPage && !immersive && isDesktop && (
<Tooltip label="Assistant" side="left">