Skip to content

Keep the scroll-to-bottom button above the composer in every chat - #1471

Merged
dylanplayer merged 1 commit into
mainfrom
codevisor/stock
Nov 24, 2026
Merged

dylanplayer merged 1 commit into
mainfrom
codevisor/stock

Conversation

@dylanplayer

Copy link
Copy Markdown
Member

In some chats the scroll-to-bottom button sat on the composer's top edge instead of above it.

Why

Since the chat page is reused across chats (#1426), switching chats keeps the same composer on screen. But each chat kept its own copy of the composer height (#1406), starting at a 96pt placeholder, and that copy was only written when the composer changed size. A chat you only switched into kept 96pt: the button landed ~30pt low, and the transcript's bottom gap was ~30pt short.

Fix

  • The Mac chat page owns the composer height. It is measured once on the page; the scroll controls, bottom fade, picture-in-picture and transcript all read it. TranscriptComposerMetrics is gone.
  • The bottom gap is no longer part of a chat's projected rows. TranscriptProjectionOptions.bottomSpacerHeight is removed. The page passes bottomContentClearance to the transcript view, and TranscriptRowSet appends the spacer when it resolves rows, on Mac and iOS. A chat's saved rows no longer depend on the composer, and an iOS keyboard change resizes the spacer instead of reprojecting the transcript.

Tested

  • Mac dev app, two long chats on the reused chat page: after switching back and forth, the button sat 10pt above the composer in both. With a 5-line draft, the button moved up with the taller composer. Scroll to bottom worked, and a 64pt taller composer moved the last row up exactly 64pt.
  • iOS simulator: the last row cleared the composer, and with the keyboard up it moved up to sit just above the composer.
  • TranscriptKit and CodevisorUI tests (1,002) and Mac transcript tests (84, including the new TranscriptBottomClearanceTests) pass; SwiftLint and swift-format are clean.

🤖 Generated with Claude Code

With one chat page reused across chats, each chat kept its own copy of
the composer height, starting at a 96pt placeholder. The page's composer
never changed size on a chat switch, so the copy was never measured, and
in those chats the button sat on the composer's top edge and the
transcript's bottom gap was about 30pt short.

- The Mac chat page now measures the composer once and owns its height,
  so the scroll controls, bottom fade, picture-in-picture and transcript
  all read the same value.
- The gap below the last row is no longer part of a chat's projected
  rows. The page passes it to the transcript view as bottomContentClearance,
  and the row set appends the spacer itself, on Mac and iOS. A chat's
  saved rows no longer depend on the composer, and an iOS keyboard change
  resizes the spacer instead of reprojecting the transcript.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dylanplayer
dylanplayer merged commit bb2d114 into main Nov 24, 2026
@dylanplayer
dylanplayer deleted the codevisor/stock branch November 24, 2026 19:19
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