Repository navigation
feat: the pill names a session that speaks out of sight - #419
Conversation
When a Claude Code or Codex session speaks and its window is not in front, the pill shows its name and "Go to session ›". The name is the project folder and two or three words about the task, like "parrotflow · fixing the glow". - The task words come from the answer's rewrite call: its JSON gains a `task` field. A missing, long or odd label is no label. Before the first answer, the name uses the first content words of the request. - The pill shows only while the session speaks, its window is not in front, and it has an app to go to. It goes 1.8 s after the voice stops, or on a click. It is checked each second, so it moves with the speaker and goes when the window comes to the front. - A dictation always takes the pill. The session state is shown only on a free pill, and its nil hides only that state. It comes back after the dictation while the session still speaks. - The click raises the pinned window with AX and activates its app. - `claude.pill` turns it off. `--panel-sheet` draws it, `--panels session` shows it. Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
@coderabbitai review |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Action not completed
|
The `claude:` section is renamed to `voice:` in the next PR, so this one adds no `claude.*` key. The session pill is always on for now. Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y
When a Claude Code or Codex session speaks and its window is not in front, the pill now names it, with a "Go to session ›" action. The name is the project folder and two or three words about the task, like
parrotflow · fixing the glow. A click raises the session's window and brings its app to the front. It is always on: there is no config key, because theclaude:section becomesvoice:in the next PR. Check first how the pill gives way to a dictation:PillHUD.session(_:)and theonPillclosure inAppDelegate.PR A6 of the Codex + mini-swe-agent voice train. Checks:
scripts/check-claude-voice.sh263/263 (220 before),scripts/check-schema.sh89/89.How it behaves: shown only on a free pill, while the session speaks out of sight
task. There is no extra model call.ClaudeSpeakable.taskLabelkeeps it only when it is 2 or 3 plain words. It is lowercased, and a trailing period is dropped. A missing, long, one-word or path-like label is no label, andsayis never touched. Each session keeps its latest label. Before the first answer,taskWordstakes the first 3 content words of the last request. It skips stop words, the project name, paths and tokens.sessionName(project:task:)givesfolder · words. A folder over 24 characters keeps 23 and ends in….ClaudeVoice.pillForruns whenspeakingSessionchanges. While a session speaks,checkPillruns each second. It shows the name when the session has a host app, andwatching(id)is false. It hides the name when the window comes to the front. The name stays 1.8 s after the voice stops, then goes. When the speaker changes, the name moves to the new session.AppDelegatepasses a name on only when nothing is recording, no run is in flight and no offer is up.PillHUD.session(name)sets the state only on a pill that is not on screen, or one that already shows a session.session(nil)fades only the session state. So a dictation state is never covered or delayed. The next check brings the name back while the session still speaks.goToPillSessionraises the pinned window withkAXRaiseAction, then callsactivate()on the host app. For a pane, the window comes from the pane'sAXWindow. That is the only new AX call:SpeakingFrame.window(of:). Tabs in one window cannot be told apart, so the window comes up, as for the glow. After a click, that session is not named again until it stops speaking.waveformsymbol, the name, and the action drawn as a lit chip infeedback.primary_color. It is the one non-offer state besides the alert that takes the mouse. Hovering it does nothing.What is not checked here: the prompt change and the activation
taskfield inrewritePromptis not measured. A model that leaves it out falls back to the request words.activate()from a non-activating panel click is subject to macOS cooperative activation. A refusal is logged asclaude voice: went to <project> in <app>, but the app did not come to the front.checkPillrunswatching(id)each second while a session speaks. That is up to two AX reads with the 0.5 s timeout fromSpeakingFrame, the same readsprefix(for:)makes per line.Manual test list
<folder> · <task words>and "Go to session ›". The log saysclaude voice: pill names ….claude voice: went to ….For A4 (Codex glow)
host(of:)gives the app to activate. This is inferred, not tested.inFront(project:)is the fallback when there is no host, andclaudeHostshas no ChatGPT.app bundle id. The pill needs a host anyway.Session.hostPidandSession.window. Then the pill shows and its click raises that window with no change here.Review notes
claude.pill: falseworking for existing configs. Not applied: the key never shipped, so no config has it. Remote CodeRabbit was rate-limited.--panel-sheetdraws two session pills, a short name and a long folder, beside the notices.--panels sessionputs one on screen.set()change merges the alert branch into theelsebranch. The only difference between them wasignoresMouseEvents.docs/configuration.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y