native macOS codings agent orchestrator prowl.onev.cat

Fix stuck notification indicator by pruning a closed surface's notifications master

Notifications are keyed by their originating surface and only cleared when that surface is focused or typed into. When a surface was torn down (closed tab/split, exited process) its notifications were left behind, so hasUnseenNotification stayed true forever — the bell and Dock badge stayed lit until the user hit Dismiss All. Consolidate the per-surface teardown bookkeeping into forgetSurface(_:) and drop that surface's notifications there, emitting the indicator change. Add a pure prunedNotifications(from:removingSurfaceID:) helper with unit coverage.


+80 -24
2 changed files