Skip to content

fix(sidebar): fade scroll peek chips in and out - #27222

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/scroll-peek-fade-20108
Nov 2, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/scroll-peek-fade-20108

Conversation

@buluoray

@buluoray buluoray commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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: ScrollPeekLayer draws each chip with no opacity change and returns null on 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

  • No change to when the peek starts or ends, or to which rows get a chip.
  • No change to chip placement, type or color.
  • No new setting for the fade.

What changed (motivation → approach → change)

  • Symptom: the chips pop on and off.
  • Cause: the layer mounted chips at full opacity and unmounted the whole layer on the render the peek ended, so no frame existed in which a chip could fade.
  • Change in website/src/pages/chat-sidebar/ScrollPeekLayer.tsx:
    • Each chip mounts with 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.
    • When titles empties, the layer keeps the last titles in state, renders them under opacity-0 with a 120 ms transition-opacity, and drops them after PEEK_FADE_MS. A new non-empty titles during the fade takes the layer straight back to opacity-100.
    • Under prefers-reduced-motion: reduce the layer is gone on the render the peek ends, as before. The global reduced-motion rule in index.css already zeroes the entry animation.
    • The layer stays pointer-events-none and aria-hidden while it fades, so a press that ends the peek is never blocked by it.
  • website/scripts/capture-sidebar-scroll-peek.mjs gains 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.md and docs/system-specs/modules/history.md describe 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 ends test 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 fails fades each chip in...; dropping the reduced-motion skip fails removes 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 -b and eslint on the changed files: clean.

Manual verification

Ran node scripts/capture-sidebar-scroll-peek.mjs <dir> against a built website/dist at 1280 by 800, dark theme, before and after the fix. Layer opacity per animation frame:

before  fade in : [null,1,1,1,...]                      FAIL
before  fade out: [null,null,null,...]                   FAIL
after   fade in : [null,0,0.39,0.62,0.77,0.88,0.94,0.98,1,...]   ok
after   fade out: [1,0.61,0.38,0.23,0.12,0.05,0.02,null,...]     ok

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.

Before: no chips on the first frame after the peek ends

After: the chips are part way through their fade.

After: chips at partial opacity on the first frame after the peek ends

The fade in motion: scroll, pause, scroll back, leave the sidebar.

after-demo.webm
Peek at rest while scrolling, after the fix

After: full titles over the rows while scrolling

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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 1, 2026 17:51
@buluoray
buluoray requested a review from dodgeblaster November 1, 2026 17:51
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 18765241deec434ba42bd6aec002a180a6119f7d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The old test that pinned the instant removal became the reduced-motion case. That fits: the follow-up review on feat(sidebar): show full session titles while the list is scrolled #15224 asked for the fade, so the old pin was a gap, not a decision.
  • The fade length lives in two places, PEEK_FADE_MS and the duration-[120ms] class strings. A comment ties them together, but nothing checks it. A test that reads the class against the constant would catch the two drifting apart.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 18765241deec434ba42bd6aec002a180a6119f7d — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ships

Inventory (6 items) — 6 justified

Intent: make the sidebar's scroll-peek title chips fade in and out instead of appearing and vanishing in one frame. FIX.

  1. Each peek chip now fades in over 120 ms as it appears — justified
  2. When the peek ends, the layer fades out over 120 ms and then unmounts, instead of disappearing at once — justified
  3. A peek that starts again during the fade brings the layer straight back to full opacity — justified
  4. Under reduced motion, the layer still disappears on the render the peek ends — justified
  5. The capture script gains a per-frame opacity check, and its fixture rows now date from "now" — justified
  6. The feature map and history.md describe the fade — justified

[FIRST-PRINCIPLES-REVIEWED] 1876524

Description read

[DESCRIPTION-READ] 329f1c4ebc56cf81c42ecad5000b3c4287b8f54f45714d12c1568100d2344de7

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 18765241deec434ba42bd6aec002a180a6119f7d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The blind reader said chips spilling past the sidebar edge look "broken, like a display glitch". That comes from the existing peek placement, which this PR's "Not a goal" excludes. It is follow-up territory.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 18765241deec434ba42bd6aec002a180a6119f7d and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1876524

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 18765241deec434ba42bd6aec002a180a6119f7d false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 18765241deec434ba42bd6aec002a180a6119f7d — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 1876524

Verdict parsed from the review's SHA-scoped output markers for commit 18765241deec434ba42bd6aec002a180a6119f7d.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 18765241deec434ba42bd6aec002a180a6119f7d false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 1, 2026
@buluoray
buluoray enabled auto-merge (squash) November 1, 2026 18:46
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 1, 2026
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
@buluoray
buluoray force-pushed the fix/scroll-peek-fade-20108 branch from 0df9e9c to 1876524 Compare November 2, 2026 02:41
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 2, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on behalf of the watch holder (bolichen). Lanes pass on 1876524, no conflict, no open change request.

@KiroCrewCaptain
KiroCrewCaptain merged commit 947c624 into main Nov 2, 2026
95 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/scroll-peek-fade-20108 branch November 2, 2026 16:00
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 2, 2026
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.

Sidebar scroll peek covers the hovered row and the composer

2 participants