Skip to content

fix(web/chat): keep composer inside the chat column as it grows - #14784

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/chat-composer-height
Nov 13, 2026
Merged

dylanjeffers merged 1 commit into
mainfrom
fix/chat-composer-height

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Cause

On desktop web Messages, the message list scrolls behind the frosted composer using --chat-composer-height, hardcoded to 88px on .chatArea. The list never shrinks, so once the composer grows past 88px (more than ~2 lines of text, or a track/collection link preview) it overflows below the chat column and behind the play bar. On prod with 5 lines the composer bottom was at 953px while the column ended at 858px.

Fix

  • ChatPage measures the composer with a ResizeObserver and sets --chat-composer-height on the chat area, so the list's negative margin and padding follow the real height. The 88px CSS value stays as the fallback and is restored when the composer unmounts.
  • If the list was at the bottom before the resize, it stays pinned to the newest message. If the user had scrolled up, the scroll position is left alone.
  • ChatComposer and Frosted now forward refs (Frosted diff is mostly re-indentation).
  • Mobile web returns MobileChatPage early, so it is untouched.

Verified

  • tsc --noEmit -p packages/web: no errors in web (3 errors in packages/sdk came from a stale local spl dist, unrelated).
  • eslint on the changed files: clean.
  • Static repro page with the same CSS, before vs after, chat column bottom at 771px:
    • 1 line: before composer bottom 752, after 771
    • 5 lines: before 832, after 771
    • 10 lines: before 932, after 771
    • Newest message stays above the composer after growth; a list scrolled up keeps its scrollTop.

Not verified

  • Not run in the real app (no local web build or sign-in), so the narrow layout, link-preview composer, and group/blast chats were not checked live.

🤖 Generated with Claude Code

The message list sizes itself against a hardcoded 88px
--chat-composer-height, so a multi-line message or a link preview made
the composer overflow below the column and behind the play bar. Measure
the composer with a ResizeObserver and set the variable on the chat
area, keeping the list pinned to the newest message if it was there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 70044ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers
dylanjeffers merged commit c727de5 into main Nov 13, 2026
18 checks passed
@dylanjeffers
dylanjeffers deleted the fix/chat-composer-height branch November 13, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant