Skip to content

fix(chat): open the phone's composer controls as a floating panel, one row each - #1421

Open
draxxris wants to merge 1 commit into
agegr:mainfrom
draxxris:pr/phone-controls-panel
Open

draxxris wants to merge 1 commit into
agegr:mainfrom
draxxris:pr/phone-controls-panel

Conversation

@draxxris

@draxxris draxxris commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
compare

Change tools fly-out from horizontal row to a vertical list.

On a phone the ⋯ toggle opened the composer's controls as one no-wrap
strip of 32px icon+label chips pinned to the row's bottom-right, over the
attach button and the model picker. `nowrap` meant a strip wider than the
space left of the toggle overflowed the screen instead of wrapping, and
the ✕ was one more chip at the end of the strip.

Make it a floating window over the composer instead:

- components/ChatInput.tsx: the composer's fieldset (.chat-input-shell)
  becomes position: relative and the phone branch's controls container
  position: absolute at right: 4, bottom: 4. The panel's bottom edge lands
  on the composer's, so it covers the draft and the attach/model row and
  grows up over the transcript. All of it is the isMobile branch: the
  desktop chips keep their 32px row unchanged.
- One 34px row per control, icon then label with the state at the right:
  Reasoning, Tools, Compact, Stop, Sound. The two rows that open a menu
  carry a small up-chevron, and their existing dropdowns are untouched and
  open above the panel, which is why the panel sets no overflow: an auto
  or hidden box would clip them.
- Those two menus are sized for the screen inside the panel: right: 0 and
  maxWidth: calc(100vw - 16px), where they used to grow right from the row
  at left: 0 and put the tools menu's 288px past the edge; and
  maxHeight: calc(100dvh - 230px) with overflow-y: auto, the room above the
  panel's first row being the viewport less its own ~190px and that row's
  34px, so a full reasoning list scrolls instead of running off the top of
  the screen.
- A header row replaces the trailing ✕ chip: chat.moreControls in small
  mono capitals with the collapse button at its right, the container named
  #chat-controls-panel and role="group", aria-controls on the ⋯ toggle.
  Outside-click closing is unchanged: the panel stays inside the
  controlsMenuRef subtree, and so does the keyboard-open rule that hides it
  with the row.
- No max height or scrolling on the panel itself: at most five rows are
  ever shown (idle has Reasoning, Tools, Compact, Sound; a run has Stop for
  the ones it drops), which is 184px measured.
- i18n: five row labels, chat.controlsReasoning/Tools/Sound/On/Off, in en,
  zh-CN and zh-TW.
- Docs: client-platform.md gains the phone controls panel note: the shell
  it anchors to, why it has no overflow, and how its two menus are kept on
  screen.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant