Repository navigation
fix(sidebar): harden the scroll peek - #20109
Conversation
06dced8 to
e77da1a
Compare
|
chore (non-blocking): rebased on main as e77da1a, no behaviour change. main 70d2fa6 conflicted in one line of website/src/pages/ChatPage.tsx, the composer dock div: #19864 added the selection-inert attribute and this PR adds data-scroll-peek-stop there. The resolution keeps both attributes. tsc and the 2 scroll peek test files (27 tests) pass locally. The body also gains the Goal line that Fork PR Description asked for. |
UX Review (Opus 5.5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Peek chips render in regular weight while the row titles are semibold, so every title visibly thins when scrolling starts. Without a border, the chips also merge into the chat behind them. Watch
[UX-REVIEWED] 667047f Description read[DESCRIPTION-READ] e6e354294ddaa0ce99b24d332907aa256bf588d5903aaf313160cbb1877f1346 That sha256 names everything this verdict read: the PR description, plus the 7 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 |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 667047f Description read[DESCRIPTION-READ] 6b879d6588107cefe2361a82988459f8b68b5a4e8d336e3cf0a089ab2035bb78 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, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check that What this change shipsInventory (7 items) — 7 justifiedIntent: when the sidebar scroll peek shows full titles, it should not cover the hovered row's actions or the composer, and it should stay up while the pointer is on the sidebar. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 667047f Description read[DESCRIPTION-READ] c20f16e46afcb37d2d8ea379fe2dcb5076ccb3ea989e26dba2594600b364d450 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING: a wheel latched to the sidebar can mark the pointer as inside after it has left, so the full-title chips stay over the chat. FINDING — website/src/pages/chat-sidebar/scrollPeek.ts:261 — [OPUS-REVIEWED] 667047f |
e77da1a to
f781bf9
Compare
|
issue (blocking): Frontend Tests (2) failed on e77da1a in src/test/ChatPage.overlaySelection.test.tsx, added on main by #19864. The test reads ChatPage.tsx as text and expects the selection-inert spread right after data-testid="composer-dock-root"; the rebase had put data-scroll-peek-stop between them. f781bf9 moves data-scroll-peek-stop after the spread, so the rendered attributes are the same. That test, the scroll peek tests and the other ChatPage suites (93 files, 1072 tests) pass locally. This push also re-runs the four lanes that hit the installation API rate limit between 04:49Z and 04:55Z: Publish readiness signal, Fork PR Description, Sensitive Change Review and Dependency License Gate. |
f781bf9 to
7c44fb2
Compare
|
chore (non-blocking): pushed 7c44fb2 to re-run CI, no code change. Its tree is identical to f781bf9; only the commit date moved. On f781bf9, E2E (stub ACP backend, offline) ran all 323 Playwright tests with 0 unexpected and 0 flaky, then stopped at the 1020 s suite bound after 16.9 minutes. Every other check on that head passed. |
|
note (non-blocking): Frontend Tests (2) failed on 7c44fb2 with 5 failures in src/test/ChatEmbed.optimisticSend.test.tsx, which this PR does not touch. The same 5 tests fail locally on plain main 30bb0b3, so they come from main after f0016d7 (#19881), not from this branch. Frontend Coverage Merge failed because that shard did. The same shard passed on f781bf9, which has an identical tree, before main moved. I will re-run once main is green. |
7c44fb2 to
dfa8720
Compare
|
chore (non-blocking): rebased on main 641b42a as dfa8720, no behaviour change. The rebase was clean and picks up #20212, which fixes the 5 ChatEmbed.optimisticSend failures that turned Frontend Tests (2) red on 7c44fb2. That file, ChatPage.overlaySelection and the 2 scroll peek files (43 tests) pass locally, and tsc passes. E2E (stub ACP backend, offline) has stopped at the 1020 s bound on both earlier heads with every test passing; this push runs it again. |
dfa8720 to
a138682
Compare
|
issue (blocking): the 120 ms fade rode along, so I removed it in a138682. First Principles Review was right that none of the six deferred findings or the Goal asks for a fade. ScrollPeekLayer is now a plain portaled div: the framer-motion import, FADE_S, AnimatePresence and the separate reduced-motion render path are gone. The reduced-motion test is replaced by one that checks the layer is removed on the render the peek ends. The PR body no longer mentions the fade. scrollPeek and ChatPage.overlaySelection (3 files, 31 tests), tsc and eslint pass locally. |
|
note (non-blocking): answers to the 2 First Principles CONCERNS items on a138682. These are advisory, so I am not pushing for them. Item 4, chip weight. The deferred #15224 UX finding "Every row becomes a floating card" is the source, and its disposition says the follow-up drops the border, shadow and semibold weight: #15224 (comment). The lighter weight is deliberate. A bold chip over a bold title reads as a second card, which was the finding. The code comment's phrase "the row's own type" means ROW_TITLE_CLS, the size and line height, not the weight. A maintainer can restore font-semibold in one class if they prefer it. Item 5, setting description. There is no linked report of anyone misreading the two-clause wording. I shortened it because the peek no longer hides shortly after scrolling stops, so that clause was no longer true once item 3 ships. The new sentence describes only what the setting does. If a maintainer wants the old wording, it is a revert of 13 locale strings. |
|
|
|
mbriones98
left a comment
There was a problem hiding this comment.
Checks green and PR Readiness passed at 60b671c; non-feature change.
iamwhatever
left a comment
There was a problem hiding this comment.
Requesting changes at 60b671c for tracking only; the code looks sound.
Blockers:
- Two UX findings are marked accept-and-defer with no linked issue: the description rewording (span=0ac617ef3b8e, #20109 (comment), which promises a follow-up PR) and the hairline edge for chips over chat text (span=1bebb6919fd6, #20109 (comment)). Please either fix them here or open one issue per item and link both in the PR description.
- The Design Review PASS punchline on this head asks to confirm the composer dock is the only right-hand surface the chips can reach (#20109 (comment)). It has no target=design disposition yet; a one-line answer is enough.
Why the code is otherwise safe: the !fillsHost gate matches the old scrollPeek opt-in at both production call sites (
KiroCrew/website/src/pages/chat/page/SessionsSidebarChrome.tsx
Lines 262 to 277 in 60b671c
— crew-pr-reviewer (r111)
|
|
@iamwhatever note (non-blocking): both blockers from the r111 review are answered, with no code change. The two deferred UX items now each have an issue linked in the PR description under Related Issues. Pearcekieser#42 covers the setting-description rewording (span 0ac617ef3b8e) and Pearcekieser#43 covers the edge for chips over chat text (span 1bebb6919fd6). They are on the fork because the upstream issue hook only accepts an issue opened together with its PR; the rewording PR will open its upstream issue when it is published after this merges. The Design PASS punchline has a target=design disposition at #20109 (comment). The composer dock is the only data-scroll-peek-stop surface, and the other cases are covered by the covered-start check, the end-on-press rule and the 4 s PEEK_IDLE_MAX_MS ceiling. |
…he composer, plainer chips - Remove the scrollPeek prop; the peek is off when the sidebar fills its host. - Count a wheel or pointermove over the sidebar as pointer presence. - Skip the row whose hover toolbar shows. - Cap chips at the left edge of any data-scroll-peek-stop surface (the composer dock). - Drop chip border, shadow and bold weight; fade the layer 120 ms, none under reduced motion. - Shorten the setting description to one sentence in every locale. - Add a capture script for the stills and drop the committed evidence files; they live on the PR.
|
chore (non-blocking): rebased 667047f onto main de80cdc, no behaviour change. The conflict came from #20330, which moved ScrollPeekLayer.tsx from createPortal(document.body) to the shared OverlayPortal. I kept main's OverlayPortal wrapper and this PR's plain chips with no border, shadow or semibold weight. tsc, eslint on the file and 223 vitest tests across 6 files covering the sidebar, scroll peek and overlay selection pass locally. |
60b671c to
667047f
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
APPROVE at 667047f. This replaces our r111 change request.
Both r111 blockers are answered. The two deferred UX items each have a linked issue whose body covers them (Pearcekieser#42 and #43), and the Design check has a target=design disposition. The current UX round repeats the chip-weight and chip-edge classes that are already dispositioned. The rebase onto #20330 changes no behavior.
The peek is now gated by !fillsHost. Both production mounts set it for the sessions embed and for phones (ChatSidebar.tsx L564-L576), so phone widths stay off as before. CI is green and no sensitive files are touched.
The two follow-up issues live on your fork. Please open matching issues here once the hook allows it, so maintainers can track them.
— crew-pr-reviewer (r115)
The description now reads 'While you scroll the session list, cut-off titles show in full'. The UX review on kirodotdev#20109 found 'titles the sidebar cuts off show in full' hard to parse on a first read. The translated strings already say the same thing in their own word order, so only the English source, the pseudo-locale and the generated settings registry change.
…22547) The description now reads 'While you scroll the session list, cut-off titles show in full'. The UX review on #20109 found 'titles the sidebar cuts off show in full' hard to parse on a first read. The translated strings already say the same thing in their own word order, so only the English source, the pseudo-locale and the generated settings registry change.
Problem / Motivation
Goal: The sidebar scroll peek shows full titles without covering the hovered row's actions or the composer, and lasts as long as the pointer stays on the sidebar.
Follow-up to #15224, which added full session titles over the sidebar while the list scrolls. Its review deferred six findings to this PR. The hovered row got a chip over its hover toolbar, chips ran over the composer, the chips carried a border, shadow and bold weight, the setting description was two clauses, a
scrollPeekprop duplicated an existing check, and a pointer already resting on the sidebar did not count as present.Why it matters
A chip over the hover toolbar hides the row's actions while the pointer is on them. A chip over the composer covers text the user is typing. Without the presence fix, a user who scrolls without first moving the pointer sees the peek vanish 0.7 s after the wheel.
Not a goal
Changing when the peek starts or the 0.7 s and idle-ceiling timings. Mobile, where the peek stays off.
What changed (motivation → approach → change)
scrollPeek.ts.measureClippedTitlesskips any row that matches:hover, so the row whose toolbar shows gets no chip even when a wheel scroll moved it under the pointer without apointerover. It reads every[data-scroll-peek-stop]rect, and a stop to the right of a row that overlaps it vertically caps that chip's width at the stop's left edge. A chip left less thanPEEK_MIN_OVERFLOWwider than the row's title is dropped. A newmarkPointerhelper sets the pointer position and presence on every wheel and pointermove over the sidebar.ChatPage.tsx. The composer dock root carriesdata-scroll-peek-stop. ThescrollPeek={!isMobile}prop is gone.ChatSidebar.tsx. ThescrollPeekprop is removed. The peek is enabled whenfullTitlesOnScroll && !fillsHost && !boardLaneActive.ScrollPeekLayer.tsx. Chips use the row title class onbg-bg-elevatedwith no border, shadow, semibold weight or 1 px offsets.full_titles_on_scroll_descriptionstring is one sentence in all 12 hand-written locales, and the pseudolocale and settings registry are regenerated.temp-screenshots/sidebar-scroll-peek/is deleted from the tree.website/scripts/capture-sidebar-scroll-peek.mjsrecreates every still.Backwards compatibility
The
scrollPeekprop had two callers, both updated here. The setting key and default are unchanged.Tests
scrollPeek.test.tsxadds four cases. A wheel with no priorpointerenterkeeps the peek up past the collapse delay and ends on leave. A row matching:hovergets no chip. A stop element caps a chip at its left edge and drops a chip it would leave too narrow. The layer is removed on the render the peek ends. The layer test also checks the chip has no border, shadow or semibold class.ChatSidebar.scrollPeek.test.tsxrenders without the removed prop and adds a case wherefillsHostkeeps the layer from appearing.npx tsc -p tsconfig.app.jsonpasses.I18N_BASE_REF=origin/main npm run i18n:checkpasses.npm run gen:uipasses afternpm run gen:settings. Vitest oversrc/pages/chat-sidebar,src/pages/settings, the two scroll peek files andChatSidebar.ownerCompositionran 712 tests, all passing.Manual verification
Ran
node scripts/capture-sidebar-scroll-peek.mjs --videoagainst a builtwebsite/distat 1280 by 800, dark theme, 14 sessions with long titles. The script asserts the hovered row has no chip, chips beside the composer end at or before its left edge, and the layer is gone after the pointer leaves.Screenshots / video
Every evidence file for this PR is listed here and none is committed.
https://github.com/user-attachments/assets/dc1319a8-3299-4ff3-ab4a-5f2db561f7e0
Related Issues
Follow-up to #15224.
Deferred UX review items, one issue each:
Pattern harvest
Not generalizable: the chip-over-composer defect came from a floating layer that measured only the sidebar, and the
data-scroll-peek-stopattribute now names the surfaces it must not cover. No other layer draws across the sidebar edge.Checklist
Contribution License Agreement
Contributed under the project's Apache-2.0 license.