feat(web): session-list scrollbar tick for open session position - #1733
Open
heavygee wants to merge 2 commits into
Open
feat(web): session-list scrollbar tick for open session position#1733heavygee wants to merge 2 commits into
heavygee wants to merge 2 commits into
Conversation
Add a small visual-only tick in the left scrollbar gutter so operators can see where the open session sits in a long list and click the native scrollbar nearby to jump. Hover title explains the mark; hide when the row is filtered out or collapsed away. Fixes tiann#1732 Co-authored-by: Cursor <cursoragent@cursor.com>
Add a small gutter tick aligned to the open session's place in the scroll extent so operators can click the native scrollbar nearby. Hide when the row is filtered out or collapsed; tooltip explains the mark. Fixes tiann#1732 Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
There was a problem hiding this comment.
Findings
- [Major] Recompute after the collapse animation finishes — the effect runs when
data-openchanges, but the list panels animategrid-template-rowsfor 250 ms (web/src/index.css:359). Observing only the scroll container does not report changes to itsscrollHeight, so the RAF atweb/src/components/SessionList.tsx:1893measures an intermediate layout. Collapsing or expanding any section above the selected row can therefore leave the marker at the wrong rail position until some unrelated mutation or window resize occurs.
Suggested fix:resizeObserver?.observe(container) const content = container.firstElementChild if (content instanceof HTMLElement) { resizeObserver?.observe(content) }
Summary
- Review mode: initial
- One Major correctness issue: animated list-height changes can leave the open-session marker stale.
Testing
- Not run (automation). Add browser/component coverage that collapses and re-expands a non-selected section above the selected row, waits for the transition, and verifies the marker settles at the recomputed ratio.
HAPI Bot
| const resizeObserver = typeof ResizeObserver !== 'undefined' | ||
| ? new ResizeObserver(updateTick) | ||
| : null | ||
| resizeObserver?.observe(container) |
There was a problem hiding this comment.
[MAJOR] Recompute after the collapse animation finishes
The panel state changes that retrigger this effect animate grid-template-rows for 250 ms (web/src/index.css:359). This observer watches only the scroll container's fixed border box, so it does not fire as the inner content changes scrollHeight; the initial RAF can capture an intermediate frame and leave the tick stale after collapsing/expanding a section above the selected row. Observe the inner content box (or handle transitionend) so the final geometry is measured.
Suggested fix:
resizeObserver?.observe(container)
const content = container.firstElementChild
if (content instanceof HTMLElement) {
resizeObserver?.observe(content)
}
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.

Summary
titleexplains the affordance.Test plan
cd web && bun run test src/components/SessionList.test.tsIssues
Fixes #1732