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

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Sep 29, 2026
  2. juliusmarminge commented on Sep 29, 2026

    @juliusmarminge
    Member

    Triage

    Confirmed on current main (d2c9281, the commit this report cites). No later commit changes this path.

    The chevron only hides the question body. collapsedQuestionId stays inside ComposerPendingUserInputPanel and toggles that card’s Collapsible. The custom-answer editor and the footer are rendered next to it by ChatComposer, so they stay at full height. That leftover editor is intentional in #6773: a collapsed prompt is still supposed to be answerable.

    Scroll-rest cannot finish the job. showComposerTopDrawer is true for any pendingUserInputs.length > 0, and that sets composerHasExpandedChrome. canScrollCollapseComposer requires expanded chrome to be false, and the effect beside it clears isComposerScrollCollapsed whenever the gate is closed. shouldUseRestingComposerLayout also refuses to rest while hasExpandedChrome is true. The collapsed flag never reaches either check, so with Collapse composer on scroll on, an empty collapsed question still cannot rest. Wheel and keyboard timeline scroll share composerScrollCollapseEligibleRef. This is the desktop path; mobile does not scroll-rest.

    Not a duplicate:

    The focus rule in the report is not how scroll-rest works today. The wheel handler does not look at editor focus. #10437 removed collapse-on-blur; focus still expands a composer that is already resting. Once the chrome gate allows it, a short custom answer would rest on scroll whether or not the caret is in the field. Keeping an in-progress answer open is worth doing in the fix. It should not also start resting multiline drafts.

  3. added
    via-triageFiled through npx t3 triage
    and removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Sep 29, 2026
  4. added a commit that references this issue on Oct 2, 2026
    c0d1ea4
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