LibreChat/packages
Danny Avila b91691937e
🙋 fix: Free the Composer When a Question Pause Collapses (#15011)
* 🙋 fix: Free the Composer When a Question Pause Collapses

Collapsing a live `ask_user_question` left the user with nothing to do.
A batch of questions disables the composer, the send button, and the stop
button for as long as the pause is active — and `collapse` deliberately
keeps it active, while hiding the popover that carried the only dismiss.
After the chevron there was no way to type, send, or stop the run short
of reloading the page.

Split the composer's role out of `active`: `composerAnswers` (a single
question, answered IN the composer) and `composerLocked` (a batch,
answered in its own card — and only while the popover is up). Collapsing
a batch now hands the composer back to the thread; the stop button
follows `composerAnswers`, so a paused run stays stoppable.

Both collapsed cards also carry the popover's ×, so dismiss survives the
handover, and `submitText` declines a batch's composer text instead of
claiming it — the old `return true` reported success and dropped
whatever was staged when the pause began.

Contrast, per feedback that the questions were hard to read: the answer
options, the answer textarea, and the digit chips all drew their edge
from `border-light`, which measures 1.20:1 against the panel (WCAG
1.4.11 wants 3:1 for a UI component boundary) — a column of choices read
as flat text. Adds a `choice` Button variant carrying its own fill and a
`border-xheavy` edge (5.49:1 dark / 6.54:1 light), at `font-normal` so
the question above stays the heading, and replaces the single-question
popover's hardcoded `bg-white`/`dark:bg-gray-700` with the semantic
surface role it should have been using.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UPtmUb6VLBhhxXkS3PfV6r

* 🧹 refactor: Render Popover Answers Through the Choice Variant

The popover's option rows re-stated the shared `choice` variant's border,
fill, weight, and hover on a raw `<button>` — the same answer control as
the cards', so a later fix to the variant would have drifted the live
popover away from them.

Renders `Button variant="choice"` instead, keeping only what the popover
actually owns: the full-width row layout and the keyboard highlight.
Locked rows now take the primitive's `disabled:` styling rather than a
local `cursor-not-allowed opacity-60`, matching the cards.
-----
2026-08-19 14:21:20 -04:00
..
api 🪃 feat: Wake Parent Agents on Child Completion (#14975) 2026-08-19 12:18:31 -04:00
client 🙋 fix: Free the Composer When a Question Pause Collapses (#15011) 2026-08-19 14:21:20 -04:00
data-provider 📁 feat: Surface Stateful Workspace Downloads (#14984) 2026-08-18 22:05:13 -04:00
data-schemas 🪃 feat: Wake Parent Agents on Child Completion (#14975) 2026-08-19 12:18:31 -04:00