mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
c58dbaff22
* fix(slack): terminalize a progress card detached by a concurrent mention Rapid mentions in one Slack conversation fire the draft-message boundary notifier, which calls forceNewMessage and clears the draft stream's message identity so later output lands below the human message. The already-posted Working card survives in Slack but becomes unreachable: finalize(), clear(), and the drop-on-failed-finalize fallback all key on the stream's current identity, so the card stays at Working forever. Retain messages the draft stream abandons while un-finalized, expose dropDetachedMessages(), and drain it from the card's finalize path so final delivery, error closeout, and turn rotation all terminalize. Also implement onQueuedFollowupSettled so a queued turn draining after its dispatch already returned cannot leave a card in Working state. Both cleanups are gated on the session-card mode: partial/append previews hold streamed assistant text the human already replied to and must stay visible. * fix(slack): drain detached cards appended during an in-flight delete The detached-card drain snapshotted its queue, so a human message routed synchronously through the conversation boundary during an awaited delete appended a card the same drain would never remove. The silent-turn closeout also dropped before its clear(), leaving that window unowned. Drain until the queue is stable and make the drain the last act on the silent exit path, so a card detached mid-cleanup still reaches removal.