From 570e528ba16773c09bcc939a00d2dd563a47457e Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Wed, 21 Oct 2026 13:08:43 -0400 Subject: [PATCH] feat(frontend): dock the mobile composer as a solid full-width strip and enlarge the mic and tools buttons --- .../message/ComposerActivityBar.test.tsx | 4 ++-- .../message/ComposerActivityBar.tsx | 7 +++--- .../message/ComposerToolsMenu.test.tsx | 4 ++-- .../components/message/ComposerToolsMenu.tsx | 2 +- .../message/PromptInput.composer.test.tsx | 8 +++---- .../src/components/message/PromptInput.tsx | 6 ++--- frontend/src/pages/SessionDetail.tsx | 24 ++++++++++--------- 7 files changed, 29 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/message/ComposerActivityBar.test.tsx b/frontend/src/components/message/ComposerActivityBar.test.tsx index 4c7600a1..ad820eec 100644 --- a/frontend/src/components/message/ComposerActivityBar.test.tsx +++ b/frontend/src/components/message/ComposerActivityBar.test.tsx @@ -41,14 +41,14 @@ describe('ComposerActivityBar', () => { expect(container).toBeEmptyDOMElement() }) - it('anchors a pointer-transparent progressbar in the gap below the composer', () => { + it('sits inside the docked composer on mobile and below the composer on desktop', () => { useSessionStatus.getState().setStatus('session-a', { type: 'busy' }) render() const bar = screen.getByRole('progressbar', { name: 'Session working' }) expect(bar).toHaveClass('pointer-events-none', 'flex') - expect(bar).toHaveClass('absolute', 'inset-x-3', '-bottom-[10px]', 'md:-bottom-[11px]') + expect(bar).toHaveClass('absolute', 'inset-x-3', 'bottom-1', 'md:-bottom-[11px]') expect(bar).not.toHaveClass('fixed') }) diff --git a/frontend/src/components/message/ComposerActivityBar.tsx b/frontend/src/components/message/ComposerActivityBar.tsx index 6f6e3b51..94106093 100644 --- a/frontend/src/components/message/ComposerActivityBar.tsx +++ b/frontend/src/components/message/ComposerActivityBar.tsx @@ -25,8 +25,9 @@ const ACTIVITY_PRESENTATION = { } as const satisfies Record /** - * Session activity scanner anchored in the gap below the composer frame. A fading lit window of - * 4x8px segments sweeps across the strip. Renders nothing while the session is idle and has no + * Session activity scanner shown by the composer. On mobile it sits inside the bottom edge of the + * docked composer; from `md` it is anchored in the gap below the composer frame. A fading lit window + * of 4x8px segments sweeps across the strip. Renders nothing while the session is idle and has no * background activity; otherwise announces the current activity through an indeterminate * progressbar. */ @@ -51,7 +52,7 @@ export function ComposerActivityBar({ sessionID }: ComposerActivityBarProps) { aria-label={label} aria-valuemin={0} aria-valuemax={100} - className="pointer-events-none absolute inset-x-3 -bottom-[10px] flex md:-bottom-[11px]" + className="pointer-events-none absolute inset-x-3 bottom-1 flex md:-bottom-[11px]" > diff --git a/frontend/src/components/message/ComposerToolsMenu.test.tsx b/frontend/src/components/message/ComposerToolsMenu.test.tsx index af613dc0..c9cfc6de 100644 --- a/frontend/src/components/message/ComposerToolsMenu.test.tsx +++ b/frontend/src/components/message/ComposerToolsMenu.test.tsx @@ -249,12 +249,12 @@ describe('ComposerToolsMenu', () => { expect(props.onAttachFile).toHaveBeenCalledTimes(1) }) - it('uses the 36px control size for the trigger', () => { + it('uses the 40px control size for the trigger', () => { mockPermissionMode() renderMenu() const trigger = screen.getByRole('button', { name: 'Composer options' }) - expect(trigger).toHaveClass('size-9', 'p-0') + expect(trigger).toHaveClass('size-10', 'p-0') expect(trigger).not.toHaveClass('p-2') }) }) diff --git a/frontend/src/components/message/ComposerToolsMenu.tsx b/frontend/src/components/message/ComposerToolsMenu.tsx index 13702fcc..a8609e23 100644 --- a/frontend/src/components/message/ComposerToolsMenu.tsx +++ b/frontend/src/components/message/ComposerToolsMenu.tsx @@ -56,7 +56,7 @@ export function ComposerToolsMenu({ type="button" aria-label="Composer options" title="Composer options" - className={cn(getIconToggleButtonClassName(permission.isAuto || sandbox.isSandboxed || goalArmed), 'flex items-center justify-center size-9 p-0')} + className={cn(getIconToggleButtonClassName(permission.isAuto || sandbox.isSandboxed || goalArmed), 'flex items-center justify-center size-10 p-0')} > diff --git a/frontend/src/components/message/PromptInput.composer.test.tsx b/frontend/src/components/message/PromptInput.composer.test.tsx index de81a0ae..0817021f 100644 --- a/frontend/src/components/message/PromptInput.composer.test.tsx +++ b/frontend/src/components/message/PromptInput.composer.test.tsx @@ -291,7 +291,7 @@ describe('PromptInput composer layout', () => { renderComponent({ showScrollButton: true, onScrollToBottom }) const arrow = screen.getByRole('button', { name: 'Scroll to bottom' }) - expect(arrow).toHaveClass('size-9', 'p-0') + expect(arrow).toHaveClass('size-10', 'p-0') fireEvent.click(arrow) @@ -359,18 +359,18 @@ describe('PromptInput composer layout', () => { }) describe('control sizing', () => { - it('keeps the mic at 36px before and after the prompt gains focus on mobile', () => { + it('keeps the mic at 40px before and after the prompt gains focus on mobile', () => { mocks.useMobile.mockReturnValue(true) renderComponent() const micBeforeFocus = mobileVoiceButton() as HTMLElement - expect(micBeforeFocus).toHaveClass('min-h-9', 'min-w-9') + expect(micBeforeFocus).toHaveClass('min-h-10', 'min-w-10') expect(micBeforeFocus).not.toHaveClass('min-h-[44px]') fireEvent.focus(promptInput()) const micAfterFocus = mobileVoiceButton() as HTMLElement - expect(micAfterFocus).toHaveClass('min-h-9', 'min-w-9') + expect(micAfterFocus).toHaveClass('min-h-10', 'min-w-10') expect(micAfterFocus).not.toHaveClass('min-h-[44px]') }) diff --git a/frontend/src/components/message/PromptInput.tsx b/frontend/src/components/message/PromptInput.tsx index 3938f06f..f16aa94b 100644 --- a/frontend/src/components/message/PromptInput.tsx +++ b/frontend/src/components/message/PromptInput.tsx @@ -1413,7 +1413,7 @@ if (isIOS && isSecureContext && navigator.clipboard && navigator.clipboard.read) ? 'bg-destructive hover:bg-destructive/90 text-destructive-foreground border-destructive/60 animate-pulse' : 'bg-muted hover:bg-muted-foreground/20 text-muted-foreground hover:text-foreground border-border' }` - : `min-h-9 min-w-9 px-0 rounded-lg transition-all duration-150 flex items-center justify-center border touch-none select-none ${ + : `min-h-10 min-w-10 px-0 rounded-lg transition-all duration-150 flex items-center justify-center border touch-none select-none ${ isBusy ? 'bg-success text-success-foreground border-success/70 shadow-lg shadow-success/40' : 'bg-muted hover:bg-muted-foreground/20 text-muted-foreground hover:text-foreground border-border active:bg-muted-foreground/30 active:scale-95' @@ -1520,7 +1520,7 @@ if (isIOS && isSecureContext && navigator.clipboard && navigator.clipboard.read) : '' return ( -
+
{sessionActivityAnnouncement}
@@ -1681,7 +1681,7 @@ return ( title="Scroll to bottom" onMouseDown={(e) => e.preventDefault()} onClick={onScrollToBottom} - className={cn(getIconToggleButtonClassName(false), 'flex items-center justify-center size-9 p-0')} + className={cn(getIconToggleButtonClassName(false), 'flex items-center justify-center size-10 p-0')} > diff --git a/frontend/src/pages/SessionDetail.tsx b/frontend/src/pages/SessionDetail.tsx index 3083d248..7cc5eb48 100644 --- a/frontend/src/pages/SessionDetail.tsx +++ b/frontend/src/pages/SessionDetail.tsx @@ -896,11 +896,11 @@ export function SessionDetail() { "relative pointer-events-auto", isFormSheetOpen ? "flex w-full flex-1 min-h-0 flex-col" - : cn("w-[94%] md:max-w-4xl", isFormOpen && "flex max-h-full min-h-0 flex-col"), + : cn("w-full md:w-[94%] md:max-w-4xl", isFormOpen && "flex max-h-full min-h-0 flex-col"), )} > {!isFormSheetOpen && ( -
+
{ttsEnabled && !hasPromptContent && !isSessionActive && latestPlayableAssistant && ( )}
- - - +
+ + + +