Skip to content

feat(web): session-list scrollbar tick for open session position - #1733

Open
heavygee wants to merge 2 commits into
tiann:mainfrom
heavygee:feat/session-list-open-tick
Open

feat(web): session-list scrollbar tick for open session position#1733
heavygee wants to merge 2 commits into
tiann:mainfrom
heavygee:feat/session-list-open-tick

Conversation

@heavygee

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a small visual-only tick on the session-list left scrollbar gutter showing where the currently open session sits in the scroll extent.
  • Operators click the native scrollbar near the mark (not the mark itself) to jump; hover title explains the affordance.
  • Hides when the open row is filtered out or lives in a collapsed group so the mark never lies.

Test plan

  • Open a session in a long sidebar list; confirm a small tick appears on the left scrollbar rail at roughly that session's position
  • Hover the tick; tooltip explains open-session position / click scrollbar nearby
  • Scroll the list away from the open session; click the scrollbar near the tick; open session comes into view
  • Collapse the open session's group (if possible without auto-expand fighting you) or filter it out; tick disappears
  • cd web && bun run test src/components/SessionList.test.ts

Issues

Fixes #1732

heavygee and others added 2 commits August 31, 2026 12:08
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>
@heavygee

Copy link
Copy Markdown
Collaborator Author

Proof (pr-attach-proof, release strategy — not user-attachments)

1732-session-list-open-tick.png

asset: heavygee/hapi@pr-attach-proof-1733/proof-2026-08-31T12-11-21-1732-session-list-open-tick.png · delete release after merge if desired

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Findings

  • [Major] Recompute after the collapse animation finishes — the effect runs when data-open changes, but the list panels animate grid-template-rows for 250 ms (web/src/index.css:359). Observing only the scroll container does not report changes to its scrollHeight, so the RAF at web/src/components/SessionList.tsx:1893 measures 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[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)
}

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.

feat(web): session-list scrollbar tick for open session position

1 participant