Skip to content

Sidebar and window title show the harness's live status mark, frame by frame - #34

Merged
ghosthack merged 1 commit into
mainfrom
claude/live-title-marks
Nov 26, 2026
Merged

ghosthack merged 1 commit into
mainfrom
claude/live-title-marks

Conversation

@ghosthack

Copy link
Copy Markdown
Owner

What

Harnesses animate a status mark in their terminal title (Claude Code's ✳/·✢✶✻✽, braille spinners, ◐◓◑◒). The sidebar now shows that mark exactly as the harness writes it, frame by frame, instead of sampling the title every 4 s and stripping a fixed glyph list (which let ◑ leak into names).

How

  • Live titles: the daemon already pushes a title event on each change. SessionHost.watchTitles (implemented by SessionServerHost over the watch stream) feeds LiveTitles, which keeps the stream open with backoff and coalesces bursts to the newest frame per session before handing them to the EDT. Frames may be skipped, never invented.
  • Mark vs name: SidebarEntry.TitleParts splits a leading run of non-ASCII symbols (So/Sm, plus · •) followed by a space from the name. No glyph list. The name alone drives sorting, renames and change detection, so a new frame repaints one row and never re-sorts.
  • Precedence: once a live frame has arrived, the poll only refreshes the name. A persisted rename still shows the live mark. Codex keeps its saved chat name while its mark moves.
  • Where it shows: sidebar row and tooltip (every frame), window title (throttled to 4/s). The MCP read header already showed the raw title. The phone page doesn't use harness titles.

Tests

  • Real in-process daemon: two OSC title frames written by a shell arrive in order through watchTitles.
  • LiveTitlesTest: burst coalescing, reopening after a failed or ended stream, host with no stream.
  • SidebarViewTest: mark/name split (including ◐◓◑◒, emoji, ASCII non-marks), live vs polled precedence, rename, Codex.
  • Full suite: 1396 tests, 0 failures, 18 skipped.

Not yet checked by eye in the running app.

🤖 Generated with Claude Code

…y frame

A harness animates a spinner in its OSC title (Claude Code's ✳/·✢✶✻✽, braille,
◐◓◑◒). The sidebar only saw that title through the 4 s status poll, and it
stripped a fixed list of glyphs that missed some (◑ leaked into the name).

The daemon already pushes a title event on every change; the window now
streams them (SessionHost.watchTitles, kept open by LiveTitles, newest frame
per session coalesced for the EDT). Titles split into a leading mark (any run
of non-ASCII symbols before a space, no glyph list) and the name: the mark is
shown exactly as written before the name in the row, tooltip and window title
(throttled to 4/s); sorting and rename logic see only the name. The poll keeps
the name fresh and is the mark's fallback when no stream is available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ghosthack
ghosthack merged commit 11aa8f2 into main Nov 26, 2026
3 checks passed
@ghosthack
ghosthack deleted the claude/live-title-marks branch November 26, 2026 11:46
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