* Fix stale Claude status in sidebar by adding missing hooks and OSC suppression
The Claude Code integration only used 3 hooks (SessionStart, Stop, Notification),
leaving gaps that caused stale sidebar status. Now uses 6 hooks:
- SessionEnd: clears status when Claude exits (covers Ctrl+C where Stop doesn't fire)
- UserPromptSubmit: clears "Needs input" and sets "Running" on new prompt
- PreToolUse (async): clears "Needs input" when Claude resumes after permission grant
Also:
- Suppress OSC 9/99 desktop notifications for workspaces with active Claude hook
sessions to prevent duplicates from the raw OSC path
- Store Claude process PID in status entries for stale-session detection
- Add 30-second sweep timer that checks agent PIDs and clears stale entries
(safety net for SIGKILL/crash where no hook fires)
- Update wrapper test expectations for the new hook set
Fixes https://github.com/manaflow-ai/cmux/issues/1301
* Don't show "Running" status on Claude launch, only when actually working
SessionStart now registers the PID for tracking and OSC suppression via
set_agent_pid without setting a visible status entry. "Running" only
appears when the user submits a prompt (UserPromptSubmit) or Claude
starts using tools (PreToolUse).
Added set_agent_pid / clear_agent_pid socket commands to decouple PID
tracking from visible status entries. OSC suppression checks agentPIDs
instead of statusEntries so it works during the initial idle period.
* Don't restore status entries across app restarts
Status entries are ephemeral runtime state tied to running processes
(e.g. claude_code "Running"). Restoring them after restart shows stale
status for processes that no longer exist.
* Address PR review comments and remove debug logging
- session-end: only clear status/PID/notifications when Stop didn't fire first
- PID sweep: check errno == ESRCH instead of treating all kill(pid,0) failures as dead
- Validate CMUX_CLAUDE_PID > 0
- Propagate tracked PID in pre-tool-use setClaudeStatus
- OSC suppression: use tabManagerFor(tabId:) for multi-window support
- clearAgentPID: resolve tab UUID before async dispatch
- restoreSessionSnapshot: also clear agentPIDs alongside statusEntries
- Fix AskUserQuestion surfaceId overwrite (wrong workspace notification)
- Fix notification text matching for "Claude Code needs your attention"
- AskUserQuestion: render option labels as bracketed inline text
- Remove artificial text truncation limits
- Remove temporary JSONL debug logging from all handlers
* Use resolveTabIdForSidebarMutation in clearAgentPID
* Add typing hot path timing diagnostics
* Add stress workspace debug menu item
* Restore stress workspace preload debug path
* Reduce typing lag from sidebar re-evaluation and hitTest overhead
hitTest: gate divider/sidebar/drag routing to pointer events only,
avoiding two full view-tree walks per non-pointer event.
forceRefresh: replace per-keystroke ISO8601DateFormatter + FileHandle
I/O with dlog() in DEBUG builds.
TabItemView: replace @EnvironmentObject subscriptions with plain refs
and precomputed parameters, add Equatable conformance to skip body
re-evaluation when parent rebuilds with unchanged values. @self changed
re-evaluations dropped from 668 to 1 during rapid typing.
* Add typing-latency guardrail comments and CLAUDE.md pitfalls
Strategic comments on hitTest, TabItemView, and forceRefresh to prevent
future regressions. Adds typing-latency-sensitive paths to CLAUDE.md
pitfalls section so agents know the constraints before editing.
* Add workspace palette actions and fix release autosave typing guard
Add Move Up/Down/Top, Close Other/Above/Below, Mark Read/Unread to
Cmd+Shift+P command palette and a Workspace submenu in the menu bar.
Fix recordTypingActivity() being gated behind #if DEBUG, which prevented
release builds from honoring the typing quiet period in autosave.
* Add regression test for terminal notification click dismissal
* Dismiss terminal notifications on direct clicks
* Add regression for focused terminal notification ring
* Keep focused terminal notifications unread until click
* Verify direct notification dismiss triggers flash
* Use focus-flash path for direct notification dismiss
* Align notification dismiss flash with ring geometry
The fallback issue is caused by CTFontCollection scoring prioritizing
monospace fonts, not just CTFontCreateForString. The selected decorative
font varies by environment (e.g. AB_appare from Adobe CC, or LingWai).
Reorder the trimming so that the optional include marker '?' is removed
before surrounding quotes are stripped. This prevents quoted paths like
"foo"? from being misparsed as foo".
Include ~/Library/Application Support/<bundle-id>/config(.ghostty)
paths in the codepoint-map detection scan. This ensures that
font-codepoint-map entries in the release app-support config (loaded
by loadReleaseAppSupportGhosttyConfigIfNeeded for debug builds) are
detected before injecting CJK font fallback defaults.
- Add cycle detection via visited path set to prevent infinite recursion
on cyclic config-file includes.
- Resolve relative include paths against the parent directory of the
including config file.
- Strip trailing '?' from optional include paths (Ghostty convention).
- Use UUID-based path for missing file test.
- Add tests for relative includes, optional includes, and cyclic includes.