Session Info: section headers draw no background, and a row's hover ends when it leaves

Merged
TE
3d ago
+50-2

Leo, on his current nightly (2026-11-02): "wth? dude it's been literal fing days and we still HAVE AN ASININE FING BACKGROUND" and earlier (2026-11-01): "why is the background STILL not removed". His screenshot shows the Changes and Sources section headers each sitting on a tinted rounded pill at rest.

What was wrong

The NEXT nightly draws Session Info natively (AgentPaneSessionInfoContent.swift), not in the webview. Two things put a pill behind a header:

  1. Every line with an action, section headers included, painted the hover fill.
  2. That fill stuck. A page refresh (a fold, a count change) takes every line out of the list and puts it back, and update(line:) recreated the line's tracking area. AppKit sends no Entered for a pointer already inside a new area, and so no Exited when it leaves, so the header you just clicked kept hovered == true and its pill after the pointer left. Click Changes, then Sources, and both sit on pills at rest.

Regressed by #31930 (8b6c6b37455, "draw Session Info with native AppKit glass"), which introduced both the header hover fill and the rebuild path (git log -S'func update(line: SessionInfoLine').

Fix

  • A section header never paints a fill, hovered or not. Rows keep their own hover highlight.
  • A line syncs hovered to the real pointer whenever its tracking area is rebuilt (with .assumeInside when the pointer is inside, so Exited does arrive), and is never lit while out of the window.

The panel's own glass stays: design/session-info.md settles it as the composer's glass, and it floats over the chat where the gutter can't hold it.

Spec: leo-workspace design/session-info.md (adds "no background behind section headers or the panel's rows").

Test

AgentPaneNativeSessionInfoTests.headersNeverDrawAFillAndARowsHoverEndsWithTheRow: hovered Changes and Sources headers have no layer fill; a lit row taken out and put back is unlit. Committed before the fix (1b9778013ab).

Observed / Not run

  • Ran: prepush gate (no new violations). Fleet run of the suite: see the comment below.
  • Not run: a capture. No capture: Leo tries the build himself.

Changelog

Fixed: Session Info section headers no longer sit on a tinted background.

risk: low, one file of view code.

🤖 Generated with Claude Code

Agent session: agent session


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Removes the tinted background from Session Info section headers and makes a row's hover highlight end when the pointer leaves, even after a refresh rebuilds the tracking area.

  • Section headers are plain text on the panel's glass and never draw a fill, hovered or not; rows keep their own hover highlight.
  • A rebuilt line syncs its hovered state to the pointer position only on a change, so a row the pointer has left is never lit at rest and a reveal keeps its highlight while its scroll lands.
  • Adds a test covering both behaviors.