Claude Code on the notch: fix interrupted sessions, add Vibe Island-style features

Aperta
#36 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
electron, swift

Direzione di ricerca

Start with main/ipc/claude.ts, the related renderer/ session views, and main/ipc/claude.test.ts; read the hook protocol notes in CLAUDE.md before changing hook entries. Work through the interrupted-session fix and seven listed features in the suggested order, checking the existing session and transcript handling as you go. Done means the requested behaviors work in the Electron app and tests use a temporary CLAUDE_CONFIG_DIR; the native rewrite carryover is specified separately.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement needs-triage

Compared against Vibe Island's feature list. Everything below is worth taking; everything else on their list is out of scope (see bottom).

Implement against the Electron app (main/ipc/claude.ts, renderer/) first. The native rewrite reuses the same hook protocol, so the native Claude spec (next number after 0032) should carry these over.

Fix

  • Interrupted session stays "working" for up to 10 minutes. Pressing Esc in Claude Code sends no Stop hook. seen() sets working on any event and only Stop clears it, so the only recovery is the WORKING_STALE_MS timeout (10 min, main/ipc/claude.ts:31,281). Use the transcript: if it has not changed for a few seconds and no permission request is pending, or the last entry is an interrupt marker, flip to idle. Vibe Island watches the transcript JSONL for the same reason.

Add (most value first)

  • 1. Claude activity on the closed notch. Expand the notch sideways with a spinner while any session is working, like music and the timer already do. State is already known.
  • 2. Sound when Claude is ready or needs you. Play a system sound on Stop and on a new permission request or question. Settings: on/off plus a sound picker (None default off or Pop, to decide).
  • 3. "Allow always" on permission popups. A third button next to Allow and Deny. The PermissionRequest hook reply can carry updatedPermissions. Touches main/ipc/claude.ts:353 and the request strip.
  • 4. Jump to the session's window. Cheap version only: activate the app that owns the session (VS Code, or the terminal) from a button on the session row, using the existing source (cli/vscode). No tmux, yabai or Accessibility permission for now.
  • 5. Last "You:" message and "Needs your input" label on each session row. The transcript is already read for chat, and waiting already exists.
  • 6. Archive/dismiss a session row. Hide it from the list until it has new activity.
  • 7. PreCompact / PostCompact as a "compacting" state. Two more hook entries (hook entries must stay in sync with the live port, see CLAUDE.md "Easy to miss") and a fourth state shown on the row.

Not doing

Subagent tracking, per-tool chat renderers (diff, Grep, MCP, etc.), yabai, the long terminal list (Zed, Tabby, Rio, foot, st, urxvt and similar), Mixpanel analytics, a formal validated state machine, and the newer hook events (PostToolUseFailure, StopFailure, PermissionDenied). Markdown rendering in chat is a maybe, separate issue if wanted.

Notes

  • Never touch the real ~/.claude in tests; point CLAUDE_CONFIG_DIR at a temp folder (main/ipc/claude.test.ts).
  • Suggested order: the fix, then 1, 2, 3, then 5, 6, 4, 7.
Lingua principale
Swift
Stelle
1
Fork
1
Merge medio
14m
PR unite (30g)
15

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di thecharydev/catnotch

Tutte le issue di thecharydev/catnotch

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.