feat(feedback): retry-with-correction — the consequence behind a thumbs down - #1145
Merged
Merged
Conversation
…bs down response-feedback spec §11 PR-1's other half: a down-thumb's reason row offers "Retry with that in mind", which prefills the composer with a correction template for the reason code (new ComposerDraftService; the composer consumes drafts for its session and never submits). When the user sends it, ChatRequestService hands the added user message to MessageFeedbackService.consumePendingRetry, which PUTs retryMessageId — the message's index, never its text — onto the F# row. The write is now an update_item upsert so a later re-thumb keeps the link. Open question 1 settled as a new turn rather than /steer (which targets a running turn). The admin profile reports feedback.retried and reworkUsd (spec §7 "rework cost": the thumbed call rows plus the retry turn's consecutive assistant rows). Spec §13 updated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
philmerrell
changed the base branch from
feature/message-feedback-pr7
to
develop
September 17, 2026 00:47
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.
Stacked on #1142 (thumbs capture + read model). Re-target to
developafter #1142 merges — an inner stacked PR gets no CI until then, and do not merge #1142 with--delete-branchor this PR closes with it. This PR's diff is the one commit on top.Completes
docs/specs/response-feedback.md§11 PR-1: the spec is emphatic that the thumb decays to nothing without a visible consequence, and #1142 shipped the thumb alone.Why
A down-thumb that only files a row is a suggestion box. The spec's §7 "retry loop" turns it into a steering act — the user gets a better answer in seconds, and the platform gets a labeled pair. Without it the response rate goes to zero and the whole signal is dead within weeks.
Why a new turn, not
/steerSpec open question 1.
/steertargets a running turn through the lease row; a finished turn is corrected by an ordinary next message. So the retry is a prefilled draft the user edits and sends — it goes where messages go (AgentCore Memory), never near the metadata table — and the only thing recorded on the feedback row is which message was the retry.What
ComposerDraftService(session/services/session/composer-draft.service.ts): the one way a feature hands text to the composer without threading a view-child through the severalapp-chat-inputplacements. The composer consumes a draft for its own session (sets the textarea, resizes, focuses, clears the request) and never submits on the user's behalf.message-actions.component.ts): asksMessageFeedbackService.requestRetry, which drafts a correction template for the thumb's reason code (six templates, each ending where the user's own words belong) and remembers the pending retry per session.ChatRequestServicehands the just-added user message toconsumePendingRetry(both send paths). If it is the retry the thumb asked for, the row is PUT again withretryMessageId= that message's index. Never the text.retryMessageId(optional,ge=0) on the request and the row; the write is now anupdate_itemupsert so a later re-thumb on the same message keeps the link (spec open question 2 answered as record the pair without its content, so Phase 6 can find it once the consent decision is made).FEEDBACK_ROW_PROJECTIONgains the field.feedback.retriedandfeedback.reworkUsd— spec §7 "rework cost": the thumbed message's call rows plus the retry turn's assistant rows, found as the consecutive indexes after the retry (a gap is the next user message).nullwhen nothing is priced. The Feedback tile showsN retried · $x.xx rework.What this does not change
RESPONSE_FEEDBACK_ENABLEDkill switch; a hidden pair has no retry button.Tests
update_itemrewrite.retryMessageIdforwarded and echoed;-1is 422.null.composer-draft.servicespec (2);message-feedback.servicespec (+4: template drafted for the reason, link PUT with the index only and consumed once, other-session sends leave it pending, every reason has a template);message-actionsspec (+1 retry button, hidden on up);chat-inputspec (+2: takes its own session's draft into the textarea without submitting, ignores another session's);chat-requestspec (+1: offers the added message to the feedback service);session-profile.utilspec (+1). Affected files: 164 passed.ng build(AOT) clean.🤖 Generated with Claude Code