Skip to content

Sidebar: show a session hover card beside each chat row - #903

Merged
wingleeio merged 9 commits into
zeronsh:mainfrom
jsgrrchg:zeron/chat-hover-card-design
Oct 17, 2026
Merged

wingleeio merged 9 commits into
zeronsh:mainfrom
jsgrrchg:zeron/chat-hover-card-design

Conversation

@jsgrrchg

@jsgrrchg jsgrrchg commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Dwelling on a sidebar session row now shows a hover card with everything the row has to truncate or leave out.

Compact rows drop the project, device, branch and pull request, and even regular rows truncate the title and never show the PR's title. The card carries the whole title and its age, the project, the device, the branch, and the pull request.

  • Dwell and warm-up. The card waits out a 550 ms dwell, so sweeping down the list stays quiet. Once one has shown, it is warm and follows the pointer to the next row at once, until the pointer rests off the list for 400 ms.
  • Dismissal. A press, scroll, context menu, drag, archive click, sidebar collapse or navigating to Settings puts the card away. gpui sends no hover-out to a row that moves or unmounts under a still pointer, so the pending and shown card re-check their row's hitbox at paint, and the sidebar reconciles the target when rows go away.
  • Beside its row. The card floats from the row's right edge, above the sidebar's clip.
  • Layout. Title and age on top, project and branch below, the pull request as one more row (glyph and number in the state's color, title truncated to one line), and the device as a corner glyph: laptop for this device, the remote server for another, and the warning wifi-off while it is out of reach.
  • No second popup. The sidebar's PR badge drops its own tooltip, since the card already spells out the number, state and title. The badge still opens the PR on click. The composer's badge and the palette's rows have no card beside them and keep their tooltip.
  • Not shown for the palette's copy of a row (it already spells the row out), for a row being renamed, or while searching.
image

Notes

  • The change is UI only: no wire or persisted data changes.
  • cargo fmt --check reports diffs only in files this PR doesn't touch (examples/browser-fixture/storage.rs).

Testing

  • cargo test --locked -p zeron-ui --lib session_hover_card -- --test-threads=1: 10 tests pass. They cover the dwell, the warm follow in either event order, cooling after a rest or a dismissal, removing a pending row, archive press in both layouts, Settings navigation, and the PR badge keeping or dropping its tooltip per surface.

Compact rows drop the project, device, branch and pull request, and even
regular rows truncate the title and never show the PR's title. Dwelling
on a sidebar row now floats a frosted card out of its right edge with
the whole title, status and age, project and device, branch, worktree
folder (when the checkout lives outside the project folder) and the
pull request tinted in its state's color.

The card waits out a 550ms dwell so sweeping down the list stays quiet;
once one has shown it is warm and follows the pointer to the next row
at once, until the pointer rests off the list for 400ms. A press,
scroll, context menu, drag or sidebar collapse dismisses it. Since gpui
sends no hover-out to a row that moves or unmounts under a still
pointer, the shown card re-checks its row's hitbox at paint.

Sidebar rows only: the palette's copy and a row being renamed never
show it.
The session hover card already spells out the pull request's number,
state and title, so the sidebar badge's own tooltip only stacked a
second popup over it. The badge still opens the PR on click and keeps
its hover tint; the composer's badge, with no card beside it, keeps
its tooltip.
The PR block spent a header line on "zeronsh#475 · Open" above the title. The
state already reads from the block's tint and the glyph's color (the
sidebar badge's), so the block is now a single row: glyph, title (up to
two lines) and the number trailing in the state's color.
The worktree folder's generated name added noise next to the branch,
which already says where the session works, and the status word
repeated what the row itself shows. The card keeps the title and its
age, project and device, branch, and the pull request.
The device's name sat beside the project as a second label. It is now
only its glyph, in the card's top-right corner beside the title: a
laptop for this device, the remote server for another, and the warning
wifi-off while it is out of reach.
The tinted PR block set the pull request apart from the rest of the
card. It is now one more row under the project and branch, its glyph
and trailing number still in the state's color (the badge's), the
title truncated to one line like its neighbors.
@jsgrrchg
jsgrrchg force-pushed the zeron/chat-hover-card-design branch 2 times, most recently from c511861 to 2db8a14 Compare October 14, 2026 22:50
jsgrrchg added a commit to jsgrrchg/comet that referenced this pull request Oct 15, 2026
The shell's render re-derived the sidebar's visible order (cloning and
sorting every chat) to check the card's row, then the sidebar's render did
it again. The sidebar pane re-renders on every shell notify, so the shell
now only dismisses the card while the sidebar is hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@wingleeio wingleeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Security audit: clean — no slicing/unwraps on synced titles/branches/PR data, no new URL opening, process spawning or network calls; timers are owned Tasks that cancel on drop.

Pushed one change (a39d1ee): the shell's render re-derived the sidebar's whole visible order to reconcile the card, and the sidebar's render did it again every frame while hovering. The sidebar pane re-renders on every shell notify, so it now reconciles once there; the shell only dismisses the card while the sidebar is hidden. Also trimmed the description to match the code (the row fill/funnel and sidebar-fixture capture aren't in this branch). Thanks!

@wingleeio
wingleeio merged commit 840fda7 into zeronsh:main Oct 17, 2026
20 checks passed
jsgrrchg added a commit to jsgrrchg/comet that referenced this pull request Oct 17, 2026
Upstream squash-merged zeronsh#895, zeronsh#903 and zeronsh#909, already merged here from
their branches. Conflict resolution:
- Take upstream's final versions of those PRs (session hover card
  reconcile, side chat rename leaving takeover, section reorder tests).
- Keep this branch's cross-PR changes: right_layout/right_panes modules
  (zeronsh#939), chat-unread capability (zeronsh#515), native_fork_point (zeronsh#622), and
  the observe_sidebar_row -> observe_row rename (zeronsh#515), also applied to
  upstream's new sidebar section code.
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.

2 participants