fix(chat): keep the header mask opaque while a chat reveals - #295
Open
kfaracik wants to merge 1 commit into
Open
fix(chat): keep the header mask opaque while a chat reveals#295kfaracik wants to merge 1 commit into
kfaracik wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 andTopFadeis the mask that hides them.Messagesreveals itself with a 200 msopacity0 → 1 animation — andTopFadewas 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:
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 andSourcesSheetmoved into a plainViewabove it, so the mask is fully opaque from its first frame while the messages still fade in.Verification
yarn test— 802/802npx tsc --noEmit— no new errors (remaining ones are pre-existing, all in__tests__)🤖 Generated with Claude Code