Skip to content

feat: suppress Stop event cards; bump to 1.4.0#15

Merged
tarkatronic merged 4 commits into
mainfrom
feat/stop-card-removal
Jun 10, 2026
Merged

feat: suppress Stop event cards; bump to 1.4.0#15
tarkatronic merged 4 commits into
mainfrom
feat/stop-card-removal

Conversation

@Clast

@Clast Clast commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Suppress "Finished Responding" stop cards (1682da2)

The "Finished Responding" card predated the live session status system. Now that the session header shows Idle/Working with a timestamp, the card is redundant noise. Stop events still update session state and dismiss stale permission cards — they just no longer insert a visible card.

Version bump to 1.4.0 (eb79e48)

Covers the features shipped in #14: info event API, context window alerts, context size bar, settings overhaul, and sticky-card/resolve fixes.

Fix PR #14 review issues (f3e640a)

  • evict(sessionID:) now clears contextAlertLevels and contextAlertEventIDs, dismissing any outstanding alert cards. Previously both dicts grew unboundedly over a long Navi session.
  • Liveness prune now removes orphaned info events for pruned sessions and calls evict/evictUnused, matching the cleanup already done by dismissSession.
  • Restore UserPromptSubmit hook — its real value was fast-dismissal of stale pending permission cards when a new user turn starts, which the ~/.claude/sessions/ polling path does not cover.
  • Fix contextBar color description: comment and settings subtitle both said "teal → yellow → orange → red" but the actual logic is teal → orange → red. Also document the 200K fallback cap when both thresholds are disabled.

Test plan

  • Finish a Claude Code turn — confirm no "Finished Responding" card; session header shows Idle
  • Permission cards still dismiss correctly on Stop
  • Start a new turn while a stale permission card is showing — confirm it dismisses immediately (UserPromptSubmit fast-path)
  • Dismiss a session with active context alerts — confirm alert cards disappear and no memory leak in evict
  • Let a session go dead via liveness prune — confirm its info cards are cleaned up
  • swift test passes

🤖 Generated with Claude Code

Clast and others added 3 commits June 10, 2026 14:58
The "Finished Responding" card was the only signal a session had finished
before the live status system existed. Now that the session header shows
Idle/Working, the card is redundant noise. Stop events still update session
state and dismiss stale permission cards — they just no longer insert a
visible card into the event list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o events, restore UserPromptSubmit hook, fix color descriptions

- evict(sessionID:) now clears contextAlertLevels and contextAlertEventIDs,
  dismissing any outstanding alert cards. Previously these grew unboundedly
  over a long Navi session.
- Liveness prune now removes orphaned info events for pruned sessions and
  calls evict/evictUnused, matching the cleanup done by dismissSession().
- Restore UserPromptSubmit hook — the hook provided fast dismissal of stale
  pending permission cards when a new user turn started, which the
  ~/.claude/sessions/ polling path does not cover.
- Fix contextBar color description: comment and settings subtitle both said
  "teal → yellow → orange → red" but the actual logic is teal → orange → red.
  Also document the 200K fallback cap when both thresholds are disabled.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Clast Clast requested a review from tarkatronic June 10, 2026 20:54
@tarkatronic

Copy link
Copy Markdown
Member

Code review

Found 2 issues:

  1. Stop sound still fires even though no card is shown. newEventTypes.insert(event.type) is outside the DispatchQueue.main.async block where guard event.type != \"stop\" else { return } lives, so stop events are always added to newEventTypes and will play the stop sound (if the user has it enabled in Settings → Sounds). The sound is now decoupled from any visible card, playing silently for no UI event. The settings label for this sound is "Finished", which implies a card appeared.

if event.type != "info" {
self.events.removeAll { $0.sessionID == event.sessionID && !$0.isPending && $0.type != "info" }
}
// Stop events update session state and clear stale cards (above) but don't
// add a card themselves — the session header's Idle status covers it.
guard event.type != "stop" else { return }
self.events.insert(event, at: 0)
}
newEventTypes.insert(event.type)
try? fm.removeItem(atPath: path)
}
// Play sounds for new events (check each type independently)

  1. Liveness prune only removes info events for pruned sessions — all other non-pending event types (notification, postToolUse, etc.) that belong to a pruned session are left in self.events and never cleaned up. The existing dismissSession() path uses self.events.removeAll { $0.sessionID == sessionID && !$0.isPending }, which removes all non-pending events. The new prune path is narrower and leaves non-info cards orphaned with no session to group under.

if let liveSessionIDs {
let before = Set(self.sessions.keys)
self.sessions = self.sessions.filter { $0.value.isAlive(among: liveSessionIDs) }
let pruned = before.subtracting(self.sessions.keys)
if !pruned.isEmpty {
self.events.removeAll { $0.type == "info" && pruned.contains($0.sessionID) }
if let svc = self.enrichmentService {
pruned.forEach { svc.evict(sessionID: $0) }
svc.evictUnused(activeCwds: Set(self.sessions.values.map(\.cwd)))
}
}

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

- Stop sound fired silently because newEventTypes.insert was outside the
  DispatchQueue block containing the guard. Gate it on event.type != "stop".
- Liveness prune was only removing info events for pruned sessions; change
  to !isPending to match dismissSession and clean up all orphaned cards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tarkatronic tarkatronic merged commit 04c35f6 into main Jun 10, 2026
2 checks passed
@tarkatronic tarkatronic deleted the feat/stop-card-removal branch June 10, 2026 22:22
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.

2 participants