feat(tui): matrix-rain horizontal words link to their session (#140)#143
Merged
Conversation
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.
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.
Closes #140.
Matrix-rain horizontal reveal words are now mouse-interactive:
<title> · <harness>, or<harness>when there's no title, or<word> · session endedif it's gone).How
RevealWordgains asession_id, threaded through every queue path —observe_pty_activity(PTY harness words),observe_event(structured tool/status words), andobserve_tool_decision.render_matrix_rainrecords every horizontal word's screen span as aMatrixRevealHit { 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.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.handle_left_clickresolves 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.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