feat(dispatch): label agent rows by git branch, not the worktree-hash cwd#106
Merged
Conversation
… 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>
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.
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-titlerecord (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 purerosterLabel(s): preferactivity.gitBranch(strip the ubiquitousclaude/prefix), fall back toproject. 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 theMAIN_HTML parsesguard).So
2cffa8→fix-sentry-build-upload(fromclaude/fix-sentry-build-upload); sessions with no branch keep the project name.Verification
rosterLabel(branch-strip + fallbacks) + injection-safety;MAIN_HTML/ISLAND_HTMLparse; snapshot updatednpm run typecheck+npm run buildclean; shippeddistisland verified (rosterLabel injected, regex intact, no__name)🤖 Generated with Claude Code