Skip to content

fix(chat): keep the header mask opaque while a chat reveals - #295

Open
kfaracik wants to merge 1 commit into
mainfrom
fix/android-header-late-on-chat-open
Open

fix(chat): keep the header mask opaque while a chat reveals#295
kfaracik wants to merge 1 commit into
mainfrom
fix/android-header-late-on-chat-open

Conversation

@kfaracik

Copy link
Copy Markdown
Member

Problem

Opening a chat from the drawer search on Android flashed the message content through the transparent header: the header read correctly for a moment, then the content underneath bled over it, then it settled. Reported as "najpierw prawidłowo widać header, później znowu miga i finalnie widać go stabilnie".

Cause

The chat route uses headerTransparent: true, so messages scroll under the header and TopFade is the mask that hides them. Messages reveals itself with a 200 ms opacity 0 → 1 animation — and TopFade was rendered inside that fading container.

So the mask was not missing, it was translucent: for the first ~120 ms it sat at 18–88 % opacity while the content it must hide was already painted. Instrumented release build on a Galaxy S20 FE:

[FLK] render hasMessages=true   t=1786650902725   ← mask mounts, on time
[FLK] reveal start dur=200      t=1786650902878
[FLK] opacity=0.18              t=1786650902960
[FLK] opacity=0.51              t=1786650903002
[FLK] opacity=0.88              t=1786650903052

That also explains why the bug does not reproduce when picking a chat from the plain drawer list — that path does not restart the reveal animation.

Fix

Only the scroll view fades now. TopFade, the bottom fade, the scroll-to-bottom button and SourcesSheet moved into a plain View above it, so the mask is fully opaque from its first frame while the messages still fade in.

Verification

  • yarn test — 802/802
  • npx tsc --noEmit — no new errors (remaining ones are pre-existing, all in __tests__)
  • release build installed on a physical Galaxy S20 FE

🤖 Generated with Claude Code

Opening a chat from the drawer search flashed the message content
through the transparent header before the header settled.

The reveal animation fades the whole message container from opacity 0
to 1 over 200 ms. TopFade — the mask that hides content sliding under
the transparent header — lived inside that container, so for the first
~120 ms it was only 18-88% opaque while the content it must hide was
already painted. Device logs on a Galaxy S20 FE:

  t=902725  render hasMessages=true
  t=902878  reveal start dur=200
  t=902960  opacity=0.18
  t=903002  opacity=0.51
  t=903052  opacity=0.88

Only the scroll view fades now; the top fade, the bottom fade, the
scroll-to-bottom button and the sources sheet sit in a plain container
above it, so the mask is fully opaque from the first frame.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
private-mind Error Error Aug 13, 2026 8:09pm

Request Review

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