Skip to content

[Bug]: Collapsing the question card still leaves the composer at full height, and scrolling never rests it #14231

Description

@Vantrongs

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. With Collapse composer on scroll on, get a question from the agent in a thread long enough to scroll.
  2. Collapse the question card with the chevron in its header, to read the thread before answering.
  3. Without typing anything into the answer field, scroll the thread up with the mouse wheel.

Expected behavior

The card collapses "so a tall prompt stops covering the thread the user is trying to read" (comment in ComposerPendingUserInputPanel.tsx). Scrolling should then rest the composer as it does without a question, leaving the card's header row.

Actual behavior

The card shrinks to its header, but the answer field and the footer stay at full height, and scrolling never rests the composer while the question is pending, even when the answer field is empty and I haven't typed anything.

Likely cause

A pending question counts as expanded chrome: showComposerTopDrawer includes pendingUserInputs.length > 0 (ChatComposer.tsx), which sets composerHasExpandedChrome, and canScrollCollapseComposer requires that to be false. Whether the card is collapsed lives in ComposerPendingUserInputPanel (collapsedQuestionId), so ChatComposer never sees it.

Suggested fix

Let a scroll rest the composer when the question card is collapsed, showing the card's header row. To keep a half-written answer safe, decide by focus at the time of the scroll:

  • focus outside the composer (I clicked on the thread) → the scroll rests it;
  • caret in the composer → scrolling the thread, e.g. back through the agent's messages, doesn't rest it;
  • clicking back into the composer expands it with the answer and the selected options intact.

The same rule would also let a multiline draft rest, which #10444 currently prevents; that part is discussed in #6849.

Related

The card's collapse toggle came in #6773; the wider idea of getting the composer out of the way while a question is pending is #6849.

Impact

Minor bug or occasional failure

Version or commit

0.0.43-nightly.20260928.2375; code references are to main @ d2c9281

Environment

Desktop app on Linux (NixOS, Wayland, niri)

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

None short of answering or dismissing the question.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions