fix(sidebar): suppress collapse->expand transition flash on fresh load#5306
Conversation
The pre-paint script sets the correct --sidebar-width, but store rehydration re-applies it during hydration and the always-on width/slide transitions animate that re-apply, reading as a collapse->expand flash. Suppress sidebar transitions during the boot window via a new html.sidebar-booting class (mirroring html.sidebar-resizing), lifted after the first paint via double-rAF so user toggles and the fullscreen slide still animate.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Adds an Reviewed by Cursor Bugbot for commit 54bdb1d. Configure here. |
Greptile SummaryThis PR suppresses the fresh-load sidebar transition flash. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "chore(sidebar): convert boot-guard comme..." | Re-trigger Greptile |
Summary
--sidebar-width, but store rehydration re-applies it a tick later during hydration, and the always-on width/slide transitions animate that re-apply — reading as a collapse → expand flashhtml.sidebar-bootingclass (mirrors the existinghtml.sidebar-resizingpattern), lifted after the first paint via double-requestAnimationFrameType of Change
Testing
Tested manually — fresh load no longer flashes the rail; collapse toggle and fullscreen slide still animate.
Checklist