Repository navigation
fix(sidebar): fade scroll peek chips in and out - #27222
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a small, reversible fix to one component. It keeps the old instant behaviour under reduced motion and has rendered evidence for this revision. Notes
[DESIGN-REVIEWED] 1876524 Description read[DESCRIPTION-READ] e11b6b1b6b4e492d529596b685d7a6f0ce44a18e4382fc7ff8cbcf1a5c1b44eb That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fade carries the request from #15224's review (#20108). The deleted pop-test is named in the description and replaced by the reduced-motion case. The fixture-date rider fixes a capture script that was failing on main. What this change shipsInventory (6 items) — 6 justifiedIntent: make the sidebar's scroll-peek title chips fade in and out instead of appearing and vanishing in one frame. FIX.
[FIRST-PRINCIPLES-REVIEWED] 1876524 Description read[DESCRIPTION-READ] 329f1c4ebc56cf81c42ecad5000b3c4287b8f54f45714d12c1568100d2344de7 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The change adds no control and only fades a transient overlay in and out. Before/after stills and a recording are supplied, and the blind reader saw shots 2 and 3 as one fade effect. Notes
[UX-REVIEWED] 1876524 Description read[DESCRIPTION-READ] f9e64a0a9322cd2223360fb92affe15bab0716770625fa57d751564faf0626e3 That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Chips fade in over 120 ms as they mount. When the peek ends the last chips stay mounted at opacity 0 for one fade, then the layer unmounts; a peek that starts during the fade takes the layer back. Reduced motion keeps the instant show and hide. The capture script gains a motion-on fade check and dates its fixture rows relative to now, so they no longer age into the collapsed sleeping-sessions group. Closes #20108
0df9e9c to
1876524
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved on behalf of the watch holder (bolichen). Lanes pass on 1876524, no conflict, no open change request.
Problem / Motivation
Goal: Sidebar scroll peek chips fade in and out instead of popping on and off.
#15224's follow-up review asked for six changes to the scroll peek. Five are on main (#20109). The last one is not:
ScrollPeekLayerdraws each chip with no opacity change and returnsnullon the render the title list empties, so the chips appear and vanish in a single frame.Why it matters
Everyone who turns on Show Full Titles While Scrolling sees a block of text flash over the sidebar and the chat pane each time they scroll and stop. A short fade makes the chips read as the row titles continuing, which was the intent of #15224.
Not a goal
What changed (motivation → approach → change)
website/src/pages/chat-sidebar/ScrollPeekLayer.tsx:animate-in fade-in-0 duration-[120ms](tw-animate-css, already used by the menus). The 120 ms matches what the capture script's header already promised.titlesempties, the layer keeps the last titles in state, renders them underopacity-0with a 120 mstransition-opacity, and drops them afterPEEK_FADE_MS. A new non-emptytitlesduring the fade takes the layer straight back toopacity-100.prefers-reduced-motion: reducethe layer is gone on the render the peek ends, as before. The global reduced-motion rule inindex.cssalready zeroes the entry animation.pointer-events-noneandaria-hiddenwhile it fades, so a press that ends the peek is never blocked by it.website/scripts/capture-sidebar-scroll-peek.mjsgains a motion-on fade check that samples the layer's opacity on every animation frame. Its fixture rows now date from "now", because the fixed 2026-10-13 dates had aged every row but one into the collapsed sleeping-sessions group, which left nothing to scroll and made the script fail on main.docs/feature-map/README.mdanddocs/system-specs/modules/history.mddescribe the fade.Backwards compatibility
Compatible: the setting, its default and every peek trigger are unchanged; only the chips' opacity over 120 ms differs.
Removes nothing: the layer still unmounts when the peek ends, 120 ms later with motion on and at once with reduced motion.
Tests
website/src/pages/chat-sidebar/scrollPeek.test.tsx,ScrollPeekLayer > fade:fades each chip in and the layer out with opacity transitions: chips carry the entry animation, the layer the opacity transition.keeps the last chips at opacity 0 for one fade after the peek ends, then removes the layer: fake timers; the layer is still there at 119 ms and gone at 120 ms.takes the layer back at once when a peek starts during the fade.removes the layer on the render the peek ends under reduced motion.The old
removes the layer on the render the peek endstest asserted the pop this PR removes; it became the reduced-motion case.Mutations, each run on this head: dropping the hold-on-empty fails
keeps the last chips at opacity 0...; dropping the transition classes failsfades each chip in...; dropping the reduced-motion skip failsremoves the layer ... under reduced motion.Proof: not provable -- frontend test (prove.py runs Python only)
npx vitest run src/pages/chat-sidebar/scrollPeek.test.tsx src/test/ChatSidebar.scrollPeek.test.tsx: 30 passed.npx tsc -bandeslinton the changed files: clean.Manual verification
Ran
node scripts/capture-sidebar-scroll-peek.mjs <dir>against a builtwebsite/distat 1280 by 800, dark theme, before and after the fix. Layer opacity per animation frame:The existing still checks (hovered row has no chip, chips stop at the composer, layer gone after the pointer leaves) pass in both runs. Chromium only; Safari and Windows are unverified.
Screenshots / video
The frame right after the peek ends. Before: the chips are already gone.
After: the chips are part way through their fade.
The fade in motion: scroll, pause, scroll back, leave the sidebar.
after-demo.webm
Peek at rest while scrolling, after the fix
Related Issues
Closes #20108
Sibling sweep
Swept:
git grep -n "OverlayPortal" -- website/src/pages/chat-sidebar/Siblings: none -- the scroll peek is the only sidebar layer that mounts and unmounts per scroll; the menus that use the same tw-animate-css entry already fade.
Pattern harvest
Not generalizable: the defect is a missing exit fade on one transient overlay, and most overlays here are Radix components that handle exit themselves.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.