fix(notification): suppress ready alerts during background tasks
Gate idle ready notifications on the existing background-task continuation marker so cmux does not receive premature ready alerts while delegated work is still active. Constraint: Reuse marker state from background task lifecycle without adding new notification config Rejected: Patch cmux directly | notification readiness belongs upstream in OMO Confidence: high Scope-risk: narrow
This commit is contained in:
@@ -4,7 +4,7 @@ import { buildReadyNotificationContent } from "./session-notification-content"
|
||||
import { type Platform } from "./session-notification-sender"
|
||||
import * as sessionNotificationSender from "./session-notification-sender"
|
||||
import { getEventToolName, getQuestionText, getSessionID } from "./session-notification-event-properties"
|
||||
import { hasIncompleteTodos } from "./session-todo-status"
|
||||
import { hasPendingSessionWork } from "./session-todo-status"
|
||||
import { createIdleNotificationScheduler } from "./session-notification-scheduler"
|
||||
import { createSessionNotificationInit } from "./session-notification-init"
|
||||
import { resolveSessionEventID } from "../shared/event-session-id"
|
||||
@@ -49,7 +49,7 @@ export function createSessionNotification(ctx: PluginInput, config: SessionNotif
|
||||
const scheduler = createIdleNotificationScheduler({
|
||||
ctx,
|
||||
config: mergedConfig,
|
||||
hasIncompleteTodos,
|
||||
hasIncompleteTodos: hasPendingSessionWork,
|
||||
send: async (hookCtx, sessionID) => {
|
||||
const platform = ensureNotificationPlatform()
|
||||
if (typeof hookCtx.client.session.get !== "function" && typeof hookCtx.client.session.messages !== "function") {
|
||||
|
||||
Reference in New Issue
Block a user