Skip to content

feat(frontend): condense the prompt composer into one session config surface - #494

Merged
chriswritescode-dev merged 6 commits into
mainfrom
om-226-pwa-minimal-prompt-composer-with-a
Nov 28, 2026
Merged

chriswritescode-dev merged 6 commits into
mainfrom
om-226-pwa-minimal-prompt-composer-with-a

Conversation

@chriswritescode-dev

@chriswritescode-dev chriswritescode-dev commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

User description

Summary

The composer row now carries only what is needed to send a message: the input, the send/mic/stop button, and one session config control.

  • Agent, model, variant, context/compact, permissions, sandbox and attach move into a single config surface. Agent and model open as in-panel views instead of separate floating pickers.
  • The model picker is embedded in that surface, removing its duplicate context strip and variant dropdown. Adds @​radix-ui/react-popover for the search field.
  • On wide desktop windows the control becomes a compact card in the left gutter, at the input's height, showing agent, model, variant and context usage. Narrower layouts and mobile keep the icon button; mobile uses a bottom sheet with the same views.
  • Every view keeps a fixed size, so switching between them does not shift the layout.

Tests

Composer, model and session detail command tests are updated; frontend tests, typecheck and lint pass.


PR Type

Enhancement, Tests


Description

  • Single config surface replaces the composer row controls

    • Agent and model open as in-panel views
    • Embedded ModelPicker drops context strip and variant dropdown
  • Input row keeps only config, textarea and Send/Stop/mic

    • Mobile key bar now renders in its own row
    • Floating mobile Stop button removed
  • Wide layouts show a gutter config card with usage

  • Tests rewritten for config menu, model picker and stop


Diagram Walkthrough

flowchart TD
  A["Composer input row"] -- "single trigger" --> B["SessionConfigMenu"]
  B -- "desktop panel" --> C["Popover surface"]
  B -- "mobile panel" --> D["Bottom sheet"]
  C -- "views" --> E["Main, agent and model views"]
  D -- "views" --> E
  E -- "embeds" --> F["ModelPicker"]
  E -- "toggles" --> G["Permission, sandbox and goal"]
  H["Inline row controls"] -- "replaced by" --> B
  I["Floating mobile Stop"] -- "absorbed into" --> A
Loading

File Walkthrough

Relevant files
Enhancement
5 files
SessionConfigMenu.tsx
New unified session config menu surface                                   
+691/-0 
PromptInput.tsx
Collapse composer controls into single input row                 
+46/-90 
ModelPicker.tsx
Convert model quick select into embedded picker                   
+121/-334
popover.tsx
Add Radix popover UI primitive                                                     
+28/-0   
SessionDetail.tsx
Remove floating stop and add composer container                   
+1/-13   
Miscellaneous
4 files
icon-toggle-button.tsx
Remove IconToggleButton and keep class helper                       
+0/-26   
AgentQuickSelect.tsx
Delete agent quick select dropdown                                             
+0/-95   
PermissionModeToggle.tsx
Delete standalone permission toggle component                       
+0/-18   
SessionSandboxMenu.tsx
Delete sandbox dropdown menu component                                     
+0/-52   
Dependencies
1 files
package.json
Add Radix popover dependency                                                         
+1/-0     
Tests
9 files
promptInput.tsx
Add permission and sandbox response overrides                       
+9/-3     
PromptInput.config.test.tsx
Add config surface interaction test suite                               
+550/-0 
PromptInput.composer.test.tsx
Update composer layout assertions for config row                 
+90/-50 
ModelPicker.test.tsx
Rewrite tests for embedded model picker                                   
+69/-198
PromptInput.goal.test.tsx
Move goal assertions into config menu                                       
+45/-26 
PromptInput.command.test.tsx
Update model command test to config view                                 
+4/-3     
PromptInput.stt.test.tsx
Assert a single Stop button now exists                                     
+1/-1     
SessionDetail.commands.test.tsx
Expect config model view from models command                         
+3/-2     
SessionDetail.scroll-floating.test.tsx
Test single stop button across viewports                                 
+18/-11 
Additional files
7 files
ComposerModelPill.tsx +0/-97   
ComposerToolsMenu.test.tsx +0/-324 
ComposerToolsMenu.tsx +0/-97   
SandboxMenuItems.tsx +0/-38   
ToolMenuItemContent.tsx +0/-19   
PermissionModeToggle.test.tsx +0/-102 
SessionSandboxMenu.test.tsx +0/-135 

Comment on lines +1333 to +1341
{showStopButton && (
<button
onClick={handleStop}
className="min-h-11 min-w-11 md:min-h-0 md:min-w-0 flex flex-shrink-0 items-center justify-center p-1.5 px-5 md:p-2 md:px-6 rounded-lg transition-all duration-200 active:scale-95 hover:scale-105 bg-destructive hover:bg-destructive/90 text-destructive-foreground border border-destructive/60 hover:border-destructive shadow-md shadow-destructive/30 hover:shadow-destructive/40 ring-1 ring-destructive/20 hover:ring-destructive/30"
title="Stop"
>
<SquareFill className="w-4 h-4 md:w-5 md:h-5" />
</button>
)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mobile Stop

This PR removes the mobile-only floating Stop from SessionDetail. That button was shown whenever isSessionActive was true. The replacement Stop is rendered only inside the !isVoiceActive part of PromptInput. So on mobile, while a voice conversation is open during an active turn, the composer has no Stop button. Before, mobile always had one. Check that VoiceConversation offers its own way to interrupt the turn, or render Stop outside the voice check.

@lil-worker-cstech

lil-worker-cstech Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit bc36df4)

Since the last review — 4 findings were open on the previous HEAD

  • ✅ 3 addressed by the pushes since then: frontend/src/components/model/ModelPicker.tsx:275-282, frontend/src/components/message/SessionConfigMenu.tsx:625-631, frontend/src/components/message/SessionConfigMenu.tsx:633-635
  • ⏳ 1 still open

Here are some key observations to aid the review process:

⚠️ Risk checks: 41 finding(s) detected
Sensitive paths (2): frontend/package.json, pnpm-lock.yaml
Risky shapes (29): Removed JS/TS function in frontend/src/components/agent/AgentQuickSelect.tsx, Table truncation in frontend/src/components/message/ComposerModelPill.tsx, Table truncation in frontend/src/components/message/ComposerModelPill.tsx, Removed JS/TS function in frontend/src/components/message/ComposerToolsMenu.test.tsx, Removed JS/TS function in frontend/src/components/message/ComposerToolsMenu.test.tsx, Removed JS/TS function in frontend/src/components/message/ComposerToolsMenu.test.tsx, Removed JS/TS function in frontend/src/components/message/ComposerToolsMenu.tsx, Removed JS/TS function in frontend/src/components/message/SandboxMenuItems.tsx, Table truncation in frontend/src/components/message/SessionConfigMenu.tsx, Table truncation in frontend/src/components/message/SessionConfigMenu.tsx (+19 more)
Deleted files (10): frontend/src/components/agent/AgentQuickSelect.tsx, frontend/src/components/message/ComposerModelPill.tsx, frontend/src/components/message/ComposerToolsMenu.test.tsx, frontend/src/components/message/ComposerToolsMenu.tsx, frontend/src/components/message/SandboxMenuItems.tsx, frontend/src/components/message/ToolMenuItemContent.tsx, frontend/src/components/session/PermissionModeToggle.test.tsx, frontend/src/components/session/PermissionModeToggle.tsx, frontend/src/components/session/SessionSandboxMenu.test.tsx, frontend/src/components/session/SessionSandboxMenu.tsx
⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
⚠️ Risk level: Medium
✅ Merge recommendation: Needs review
Merge recommendation checks
✅ CI on reviewed head: passed
✅ Head is current with its base: up to date
✅ Human authors: all authors are human
⚠️ No sensitive paths or risky changes: 41 finding(s)
⚠️ Changed lines within cap: 3479 changed lines exceeds cap 100
🔎 Failure modes

What: On mobile, the composer shows no Stop control while a voice conversation is open during an active turn. The floating Stop in `SessionDetail` covered this case and has been removed.
Where: frontend/src/components/message/PromptInput.tsx:PromptInput
Trigger: A user on a mobile viewport starts a voice conversation while the session is still busy.
Detected by: nothing
Covered in this PR: No

What: The config surface reopens in the model view even though nobody asked for it. This happens because `modelPickerOpen` is still true when `SessionConfigMenu` remounts.
Where: frontend/src/components/message/SessionConfigMenu.tsx:SessionConfigMenu
Trigger: The user runs `/models` and then the input row unmounts, for example because voice becomes active, without `onModelPickerOpenChange(false)` being called. When the row comes back, the effect fires again.
Detected by: nothing
Covered in this PR: No

What: On wide desktop windows, the gutter card is positioned absolutely, and its width formula assumes the composer is 56rem wide. A composer with a different width could make the card overlap the input or get clipped.
Where: frontend/src/components/message/SessionConfigMenu.tsx:SessionConfigMenu
Trigger: A composer container at least 86rem wide whose prompt column is not 56rem wide.
Detected by: Visual check only. The tests only assert that the class names are present.
Covered in this PR: No

🧪 PR contains tests
🔒 No security concerns identified
✅ Resolved findings

frontend/src/components/message/SessionConfigMenu.tsx:633-635

ARIA semantics

The main and agent views are marked role="menu", and every row is a native <button> with a menuitem* role. A real menu is expected to let users move between items with the arrow keys (one tab stop, roving focus), but these buttons only support Tab. The role="presentation" section labels inside the menu also hide the group names from assistive tech. Either add menu keyboard handling, or use plain buttons, role="switch"/aria-pressed for the toggles, and labelled groups.

frontend/src/components/message/SessionConfigMenu.tsx:625-631

Popover overflow

avoidCollisions={false} turns off both flipping and shifting in Radix, so collisionPadding={8} does nothing. The content has a fixed h-[min(70vh,560px)] and opens side="top". When there is less room above the trigger than that height (short windows, or the input row pushed up by attachments or the form layout), the panel runs past the top of the window and the header/back button can't be reached. Keep collision avoidance on, or size the panel from --radix-popover-content-available-height.

frontend/src/components/model/ModelPicker.tsx:275-282

Dead branch

The desktop sidebar and its "all models" list were removed, and navigableItems now returns EMPTY_MODELS when no provider is selected. That means browseModels is only read when selectedProviderId is set, so the browseData?.allModels fallback can never be reached. The AGENTS.md rules "Never leave dead code" and YAGNI ("use the new code or keep the old, but don't keep both") cover this case.

@lil-worker-cstech

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit bc36df4

@chriswritescode-dev
chriswritescode-dev merged commit 5f4cf63 into main Nov 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant