feat(ui): minimal Done/Failed push, skip for agent-continuation turns#272
Merged
Conversation
The completion notice was repeating everything that already sits in the card's grey footer: ✅ Done (52s · $340.41 · opus-4-7 · 377.3k/1000k (38%)) The whole point of the notice is the *mobile push*: card edits don't ring on Feishu mobile, but text messages do. Once the user opens the chat the card itself shows duration / cost / model / context usage in its footer — the push banner just needs to say "the thing you asked about finished". So the message body is now exactly: ✅ Done (or ❌ Failed) Also stop sending the notice for continuation turns (`handleContinuationTurn`). Those are between-turn agent activity the user didn't explicitly initiate — a background-task summary, a teammate's reply, a `/goal` evaluator emitting. Pushing "✅ Done" for those is meaningless: the user never asked for the work and there's no spinning task they're waiting on. The blue-→-green card itself remains as the visual signal in-chat; we just don't broadcast it. The 10-second threshold and the `skipCompletionNotice` opt-out for WeChat (which already routes the final response as its own message) still hold. Quick tasks (<10s) stay silent. Side cleanup: `startTime` in `handleContinuationTurn` was only used to compute `durationMs` for the notice — both go away. 291 / 291 vitest pass. Build + lint clean (2 pre-existing warnings). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SimonYeyi
pushed a commit
to SimonYeyi/metabot
that referenced
this pull request
May 26, 2026
…xvirobotics#272) The completion notice was repeating everything that already sits in the card's grey footer: ✅ Done (52s · $340.41 · opus-4-7 · 377.3k/1000k (38%)) The whole point of the notice is the *mobile push*: card edits don't ring on Feishu mobile, but text messages do. Once the user opens the chat the card itself shows duration / cost / model / context usage in its footer — the push banner just needs to say "the thing you asked about finished". So the message body is now exactly: ✅ Done (or ❌ Failed) Also stop sending the notice for continuation turns (`handleContinuationTurn`). Those are between-turn agent activity the user didn't explicitly initiate — a background-task summary, a teammate's reply, a `/goal` evaluator emitting. Pushing "✅ Done" for those is meaningless: the user never asked for the work and there's no spinning task they're waiting on. The blue-→-green card itself remains as the visual signal in-chat; we just don't broadcast it. The 10-second threshold and the `skipCompletionNotice` opt-out for WeChat (which already routes the final response as its own message) still hold. Quick tasks (<10s) stay silent. Side cleanup: `startTime` in `handleContinuationTurn` was only used to compute `durationMs` for the notice — both go away. 291 / 291 vitest pass. Build + lint clean (2 pre-existing warnings). Co-authored-by: Flood Sung <floodsung@xvirobotics.ai> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The post-task completion notice was repeating everything already in the card's grey footer:
But the whole point of the notice is the mobile push — card edits don't ring on Feishu mobile, text messages do. Once the user opens the chat, the card footer already shows duration / cost / model / context usage. The push banner just needs to say "the thing you asked about finished."
Changes
Tradeoff
A continuation turn that ends in error (e.g. background bash task crashed and the agent's summary turn surfaces the failure) no longer pushes. The user will see the red card next time they open Feishu. If this proves to be a real problem we can re-add a notice gated on `status === 'error'` for continuation turns specifically. Leaving it out for now — the user explicitly asked for the silence.
Test plan
🤖 Generated with Claude Code