Tracking upstream cmux manaflow-ai#6618 — verified FIX_NOW (exists in our fork, ship-ready).
Complexity: small
Evidence (our code): Sources/TerminalController.swift:15368-15380 — shouldPublishShellActivity is called and state recorded off-main before main.async; Sources/Workspace.swift:7648 — guard panels[panelId] != nil else { return } silently drops the update if panel not yet registered; Sources/Workspace.swift:6730-6741 — resolveCloseConfirmation returns fallbackNeedsConfirmClose (Ghostty confirm-close) when state is .unknown, producing spurious close-confirmation dialogs.
Proposed fix: In Sources/TerminalController.swift:15368-15380, move the socketFastPathState.shouldPublishShellActivity(...) call and dict update inside the DispatchQueue.main.async block, after confirming the panel is registered. Only record the state in the dedup dict when updateSurfaceShellActivity actually applies the update (panel found). If the panel is absent the first time, the next identical report must not be suppressed. Alternative: make updateSurfaceShellActivity/updatePanelShellActivityState return Bool and call shouldPublishShellActivity only on true.
Upstream: manaflow-ai#6618
Tracking upstream cmux manaflow-ai#6618 — verified FIX_NOW (exists in our fork, ship-ready).
Complexity: small
Evidence (our code): Sources/TerminalController.swift:15368-15380 —
shouldPublishShellActivityis called and state recorded off-main beforemain.async; Sources/Workspace.swift:7648 —guard panels[panelId] != nil else { return }silently drops the update if panel not yet registered; Sources/Workspace.swift:6730-6741 —resolveCloseConfirmationreturnsfallbackNeedsConfirmClose(Ghostty confirm-close) when state is.unknown, producing spurious close-confirmation dialogs.Proposed fix: In Sources/TerminalController.swift:15368-15380, move the
socketFastPathState.shouldPublishShellActivity(...)call and dict update inside theDispatchQueue.main.asyncblock, after confirming the panel is registered. Only record the state in the dedup dict whenupdateSurfaceShellActivityactually applies the update (panel found). If the panel is absent the first time, the next identical report must not be suppressed. Alternative: makeupdateSurfaceShellActivity/updatePanelShellActivityStatereturn Bool and callshouldPublishShellActivityonly on true.Upstream: manaflow-ai#6618