Skip to content

feat(tui): matrix-rain horizontal words link to their session (#140)#143

Merged
edwin-zvs merged 2 commits into
mainfrom
matrix-rain-clickable
May 22, 2026
Merged

feat(tui): matrix-rain horizontal words link to their session (#140)#143
edwin-zvs merged 2 commits into
mainfrom
matrix-rain-clickable

Conversation

@edwin-zvs

@edwin-zvs edwin-zvs commented May 22, 2026

Copy link
Copy Markdown
Contributor

Closes #140.

Matrix-rain horizontal reveal words are now mouse-interactive:

  • Hover → a one-line tooltip naming the session that produced the word (<title> · <harness>, or <harness> when there's no title, or <word> · session ended if it's gone).
  • Click → switches the selection to that session.

How

  • Tag words with their source session. RevealWord gains a session_id, threaded through every queue path — observe_pty_activity (PTY harness words), observe_event (structured tool/status words), and observe_tool_decision.
  • Record hit targets. Each frame, render_matrix_rain records every horizontal word's screen span as a MatrixRevealHit { col_start, col_end, row, text, session_id } on the App. The span covers the whole word, so it's hover/click-able even before all letters have pinned in (per the issue: "even if it is not yet completed"). Hits are cleared at the top of the render so a hidden / too-small panel can't leave stale targets clickable.
  • Hover tooltip. Mouse motion is already captured (EnableMouseCapture); when the cursor is over a hit, a tooltip is drawn on the row above the word (below it at the panel's top edge), clamped to the panel width, using the selection-highlight palette so it reads over the rain.
  • Click. handle_left_click resolves the hit and selects the source session (focusing the list, matching a list-row click). The matrix panel is its own region, so this is checked ahead of the pane hit-tests without shadowing real list/view clicks. A click on a word whose session has ended is a no-op with a status message.

Tests

  • pty_activity_tags_reveal_with_session / observe_event_tags_reveal_with_session — words carry their session id from both the PTY and structured-event paths.
  • matrix_reveal_click_switches_to_source_session — clicking a recorded hit switches the selection; clicking off the span, or on a word whose session has ended, leaves it unchanged.
  • Full suite green: 133 unit + 1 integration.

Note: the tooltip/click are hard to capture in a static screenshot (reveal words appear and fade with rain activity), so this relies on the unit coverage above; happy to record a demo if useful.

🤖 Generated with Claude Code

edwin-zvs added 2 commits May 22, 2026 13:21
Horizontal reveal words in the matrix-rain panel are now interactive:
hover shows a tooltip naming the session that produced the word, and a
click switches the selection to that session.

- Tag each `RevealWord` with the `session_id` it was harvested from,
  threaded through every queue path (`observe_pty_activity`,
  `observe_event`, `observe_tool_decision`).
- The renderer records each horizontal word's screen span (the whole
  word — interactive even before all letters have pinned in) as a
  `MatrixRevealHit` on the App each frame, cleared up front so a
  hidden/too-small panel can't leave stale targets.
- Hover (mouse motion is already captured) draws a one-line tooltip on
  the row above the word: "<title> · <harness> · <state>", or
  "<word> · session ended" if the session is gone.
- Click resolves the hit in `handle_left_click` and selects the source
  session (focusing the list, matching a list-row click); a click on a
  word whose session has ended is a no-op with a status message.

Tests: reveal words carry their session id (PTY + structured-event
paths); clicking a recorded hit switches selection, and a click for a
missing session leaves selection unchanged.
Tooltip now reads "<title> · <harness>" (or just "<harness>"); the
session state was noisy and the list row already shows it.
@edwin-zvs
edwin-zvs merged commit 50098cb into main May 22, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the matrix-rain-clickable branch May 22, 2026 20:33
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.

Matrix rainfall horizontal words, link to the session

1 participant