Skip to content

[stable-24.0] fix(chat): keep sticky date header below pinned/overflow items and sync with visible messages#6292

Merged
mahibi merged 1 commit into
stable-24.0from
backport/6284/stable-24.0
Jun 3, 2026
Merged

[stable-24.0] fix(chat): keep sticky date header below pinned/overflow items and sync with visible messages#6292
mahibi merged 1 commit into
stable-24.0from
backport/6284/stable-24.0

Conversation

@backportbot
Copy link
Copy Markdown

@backportbot backportbot Bot commented Jun 3, 2026

Backport of PR #6284

… sync with visible messages

  When pinned messages, upcoming events, or the out-of-office banner were
  visible at the top of the chat, two problems occurred:

  1. The sticky date header was drawn behind the overlay instead of below it.
  2. The date shown was wrong: the LazyColumn (reverseLayout=true) counted
     items hidden behind the overlay as "visible", so lastOrNull() picked
     an older item that the user couldn't see.

  Track the overlay container height via ViewTreeObserver and pass it to
  ChatView as stickyHeaderTopOffset. Use it to (a) shift the header's
  visual position below the overlay, and (b) filter visibleItemsInfo to
  only items whose bottom edge clears the overlay before selecting the
  topmost one for the date text.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@backportbot backportbot Bot requested a review from mahibi June 3, 2026 13:10
@backportbot backportbot Bot added the 3. to review Waiting for reviews label Jun 3, 2026
@backportbot backportbot Bot added this to the 24.0.0 milestone Jun 3, 2026
@mahibi mahibi merged commit 485ab3f into stable-24.0 Jun 3, 2026
10 of 15 checks passed
@mahibi mahibi deleted the backport/6284/stable-24.0 branch June 3, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant