Skip to content

feat(dispatch): label agent rows by git branch, not the worktree-hash cwd#106

Merged
oratis merged 1 commit into
mainfrom
feat/roster-branch-label
Jun 18, 2026
Merged

feat(dispatch): label agent rows by git branch, not the worktree-hash cwd#106
oratis merged 1 commit into
mainfrom
feat/roster-branch-label

Conversation

@oratis

@oratis oratis commented Jun 18, 2026

Copy link
Copy Markdown
Owner

What

The island / GUI Claude monitor showed cwd basenames like 2cffa8 / wf_17f778a2-74c — worktree hashes, not meaningful labels.

Finding: Claude Code's human-readable session title isn't in the transcript JSONL the observer reads — verified 0 of 368 local sessions carry a summary / ai-title / custom-title record (those titles live in the Claude Code app's own index, not a source LISA taps). So the best title-like label we actually have is the git branch the observer already captures. This is option B (vs. reading prompt text — no new content surfaced, no privacy change).

How

  • agent-roster.ts — new pure rosterLabel(s): prefer activity.gitBranch (strip the ubiquitous claude/ prefix), fall back to project. Self-contained + source-injected into the island; covered by the injection-safety test + unit tests.
  • island.ts — inject ${rosterLabel}, use it for the row label; the project/cwd stays visible in the row tooltip so no info is lost.
  • lisa-client.ts (GUI sidebar) — same branch-preferring label + project in the tooltip. Uses string ops (indexOf/slice), not a regex — a /\// here gets mangled by the outer template literal wrapping the client script (caught by the MAIN_HTML parses guard).
  • snapshot constants updated for the intentional GUI change.

So 2cffa8fix-sentry-build-upload (from claude/fix-sentry-build-upload); sessions with no branch keep the project name.

Verification

  • 695 tests pass (+3): rosterLabel (branch-strip + fallbacks) + injection-safety; MAIN_HTML/ISLAND_HTML parse; snapshot updated
  • npm run typecheck + npm run build clean; shipped dist island verified (rosterLabel injected, regex intact, no __name)

🤖 Generated with Claude Code

… cwd

The island/GUI Claude monitor showed cwd basenames like "2cffa8" /
"wf_17f778a2-74c" — worktree hashes, not meaningful. Claude Code's human
session TITLE isn't in the transcript JSONL the observer reads (verified: 0 of
368 local sessions carry a summary/ai-title/custom-title record — those live in
the app's own index, not a source LISA taps). So the best title-like label we
actually have is the git branch the observer already captures.

- agent-roster.ts: new pure rosterLabel(s) — prefer activity.gitBranch (strip
  the ubiquitous "claude/" prefix), fall back to project. Self-contained +
  source-injected into the island; covered by the injection-safety test + unit
  tests.
- island.ts: inject ${rosterLabel}, use it for the row label; the project/cwd
  stays visible in the row tooltip so no info is lost.
- lisa-client.ts (GUI sidebar): same branch-preferring label + project in the
  tooltip. Uses string ops (indexOf/slice), NOT a regex — a /\// here gets
  mangled by the outer template literal wrapping the client script (the bug the
  MAIN_HTML-parses guard caught).
- snapshot constants updated for the intentional GUI change.

Privacy: unchanged — the branch is already captured (no new content surfaced);
this is option B (vs. reading prompt text). 695 tests pass; typecheck + build
clean; shipped dist verified (rosterLabel injected, regex intact, no __name).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit ee4c155 into main Jun 18, 2026
@oratis oratis deleted the feat/roster-branch-label branch June 18, 2026 08:38
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