Skip to content

feat(sidebar): tooltip with the full title on ellipsised session rows - #176

Draft
ghackett wants to merge 1 commit into
mainfrom
sidebar-title-tooltip
Draft

feat(sidebar): tooltip with the full title on ellipsised session rows#176
ghackett wants to merge 1 commit into
mainfrom
sidebar-title-tooltip

Conversation

@ghackett

@ghackett ghackett commented Aug 3, 2026

Copy link
Copy Markdown
Member

What

Hovering a session row in the sidebar whose title is ellipsised now shows the complete title as a tooltip.

How

SessionRow sets has-tooltip and answers query-tooltip itself: the handler checks the name label's Pango layout and only supplies the tooltip while the layout is actually ellipsized, so rows whose titles fit stay tooltip-free. The tooltip lives on the row rather than the label, making the whole row width a hover target — while the per-button tooltips (archive, stop, PRs, …) still take precedence when the pointer is over a button.

Screenshots

sidebar detail: hovered ellipsised row showing the full-title tooltip

full window with the tooltip over the hovered session row

The tooltip bubble is composited into the shot (a headless in-process window render can't capture the native tooltip popup), but its content and trigger logic were verified live in the running app: the ellipsised row's query-tooltip handler returned the full title, and a short-titled row declined the tooltip.

🤖 Generated with Claude Code

https://claude.ai/code/session_013k2cKyGZJCk3o9iWoYeou7

Hovering a session row whose title is truncated now shows the complete
title as a tooltip. The row answers query-tooltip only while the name
label's layout is actually ellipsized, so fully visible titles stay
tooltip-free; the action buttons' own tooltips still win over the row's
while the pointer is on them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013k2cKyGZJCk3o9iWoYeou7
@ghackett

ghackett commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

@claude review

@claude

claude Bot commented Aug 3, 2026

Copy link
Copy Markdown

Claude finished @ghackett's task in 1m 16s —— View job


Review complete ✅

  • Gather context (PR diff, CLAUDE.md)
  • Review collins/sidebar.py changes
  • Post review feedback

Summary

Small, well-scoped change. SessionRow now answers query-tooltip itself and only supplies a tooltip when the name label's Pango layout is actually ellipsized (collins/sidebar.py:630-636). Putting the tooltip on the row rather than the label is the right call — it makes the whole row a hover target, and GTK's own per-widget tooltip resolution means the action buttons (archive_btn, stop_btn, etc., each with their own set_tooltip_text) still take precedence when the pointer is over them, exactly as described in the PR body.

Things I checked and didn't find issues with:

  • self._name_label = name_label is stashed before the display-name property binding is set up (sidebar.py:381 vs 535), so the handler always reads the live label.
  • get_label() returns the plain bound text (not markup), matching tooltip.set_text — no markup/escaping mismatch.
  • The _keyboard param is intentionally unused; the same "still ellipsized?" check is correct for both pointer- and keyboard-triggered tooltip queries.
  • GPL modification notice at the top of the file is already updated with today's date, per repo convention.
  • CI is green on this PR.

Minor, non-blocking observations

  1. path_label also ellipsizes (_ELLIPSIZE_START, sidebar.py:518) but gets no tooltip. If long project paths get truncated in practice, the same pattern could apply there — but that's an easy follow-up, not something this PR needs to cover.
  2. No automated test covers the new _on_query_tooltip logic, but there don't appear to be any existing GTK widget-level unit tests for SessionRow in this repo either, so that's consistent with current conventions rather than a gap introduced here.

Nothing here blocks merging — the change is small, correct, and matches the stated intent.

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.

1 participant