fix: scope lifecycle notifications to active session, remove mock mode
- Only show hookHistory/lifecycleEvent when viewing the agent's current live session, preventing notification leaking to historical sessions - Reset notifications on SessionStart (like hookHistory already does) - Remove mock/demo animation mode from SessionLifecycleStatus - Delete dead useHooksApproval composable (never imported)
This commit is contained in:
@@ -322,8 +322,12 @@ class SessionStateManager {
|
||||
|
||||
// Build notification
|
||||
const notification = buildNotification(payload)
|
||||
const updatedNotifications = [...state.notifications, notification].slice(-MAX_NOTIFICATIONS)
|
||||
patch.notifications = updatedNotifications
|
||||
if (payload.hook_event_name === 'SessionStart') {
|
||||
// Reset notifications on new session, only keep the SessionStart notification
|
||||
patch.notifications = [notification]
|
||||
} else {
|
||||
patch.notifications = [...state.notifications, notification].slice(-MAX_NOTIFICATIONS)
|
||||
}
|
||||
|
||||
// Build hook history entry
|
||||
const historyEntry: HookHistoryEntry = {
|
||||
|
||||
Reference in New Issue
Block a user