fix(annotate): show a Done screen, not Feedback Sent, when Done sends nothing - #1730
Merged
Merged
Conversation
… nothing An annotate Done with nothing to send posts the nothing-to-send body, which every host treats as a no-op (Pi logs "Annotation closed (no feedback).", OpenCode starts no turn, the Claude Code mod logs it), yet the completion screen said "Feedback Sent" / "<Agent> will address your feedback". handleAnnotateFeedback now sets a distinct 'done' completion state when the posted body is nothing-to-send, using the same isNothingToSendFeedbackBody predicate the servers use. The overlay shows "Done" / "Nothing was sent to <Agent>." with a neutral icon and without the "response has been sent" line. Close, real feedback and gated Approve keep their screens. WebMCP reports the decision as 'done' instead of 'feedback-sent'.
…ck screen
The completion overlay's footer said "Your response has been sent." after
Close ('exited'), which sends nothing. Suppress it for 'exited' as for 'done'.
Tests: the completion-screen block now uses an immediate auto-close with a
host close (the phase that renders that footer), so the footer assertions are
not vacuous; adds Close, and a folder session whose comment lives on a
document that is not open (still Feedback Sent). HANDOFF notes the widened
'submitted' type.
Owner
Author
|
Follow-up commit 040ca10, from review:
|
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.
Problem
In an annotate session with nothing to send, the header Done posts the nothing-to-send body (
nothingToSend: true, #1701). Every host treats that as a no-op: Pi logs "Annotation closed (no feedback).", OpenCode starts no turn, and the Claude Code mod logs it. The completion screen still said Feedback Sent / " will address your feedback on the file".Cause:
handleAnnotateFeedbackinpackages/editor/App.tsxset the same'denied'("feedback sent") state for every annotate submission, and the overlay had no state for nothing-to-send.Fix
handleAnnotateFeedbackbuilds the body once and sets a new'done'completion state whenisNothingToSendFeedbackBody(body)is true. That is the same predicate the annotate servers use (packages/shared/annotate-decision.ts), so the screen matches what the host did.CompletionOverlayaccepts'done'; additive, noted inpackages/ui/HANDOFF.md).read_documentreportsdecision: 'done'instead of'feedback-sent'for this case.Paths checked: single file, annotate-last (both no-feedback sentences are covered by the sentinel), folder and bundle (same handler and sentinel), raw HTML and live app (same handler), the non-gated discard confirm (posts the zero body, so it also lands on Done), "Send a note…" (it sends a GLOBAL_COMMENT, so it stays "Feedback Sent"), and gated Approve (it posts
/api/approve, so it stays "Approved").Tests
New
annotate completion screenblock inpackages/editor/App.decisionControl.test.tsx, which is already listed in the workflow's DOM_TESTS step. It covers Done at zero, a sent note, discard-all, gated Approve, annotate-last, and raw HTML. Four of the six tests fail without the fix.DOM_TESTS=1 bun test --isolate packages/editor: 311 passDOM_TESTS=1 bun test --isolate packages/ui/components: passbun run typecheck: passbun run --cwd apps/review build && bun run build:hook: passbun run --cwd apps/guides-show build:viewer && check:manifest: in sync