Repository navigation
feat(editor): question answers — history, progress chip, Questions panel, Send answers (PR 2) - #1638
Merged
Merged
Conversation
…anel, Send answers (PR 2) - Answers record in the annotation undo history; typing folds into one entry per burst (useUndoHistory.replaceLast), a double-click revert drops its entry. - ann-question-* rows never own a highlight; Edit Mode remaps answers by question key (a reworded prompt orphans the answer, still exported). - Header N/M answered chip jumps to the next open question. - AnnotationPanel Questions section (questionRows) above Comments; orphaned answers show Unanchored + Remove answer. - Plan review: Send answers when answers are the only feedback, deny with an answers framing paragraph (+ additive answersOnly flag); the Claude Code approve warning names answers. - Core: questionStatus; settled [x] + note counts as answered by the settled choice; multi-line notes keep line breaks. - Card: double-click a word never picks; pinpoint on option text pins without picking; typed fields are annotation-exclude. - guides.show manifest CSS pin regenerated.
…editor # Conflicts: # packages/core/guide-viewer-manifest.ts
… them correctly With no open question left, the chip always jumped to the first skipped question instead of stepping through them, and its title read 'All questions answered' while skipped questions remained.
This was referenced Sep 29, 2026
Merged
1 task
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.
PR 2 (editor) of the approved question/answer components feature (
.product/approved/qa-components/: SPEC §8 PR 2, owner decisions in approval.md). Builds on #1637. No publish, no release; ui 0.48.0 / core 0.25.8 are still unpublished, so the additive changes ride those versions.What this adds
kind: 'annotation'add/edit/delete). Typing in free text, "Other…" or a note folds into one entry per burst (1 s idle) through a newuseUndoHistory.replaceLast(expected, next). Picks, skips and Accept recommended are one entry each.packages/editor/hooks/useQuestionAnswers.ts.ann-question-*treated likeann-checkbox-*.annotationOwnsHighlightandrepaintHighlightsexclude answer rows (no highlight sync on undo, no false "no longer match the text" toast after Edit Mode).applyEditedDocumentre-points answers by question key, not by quote (questionAnswerRemapper); a reworded prompt givesblockId ''.QuestionProgressChip) beside the decision control, plan review and annotate. N counts answered + settled. A click scrolls to and focuses the next open question after the last one it jumped to, wrapping; with nothing open it steps through skipped ones.QuestionsPanelSection,AnnotationPanelquestionRows/onSelectQuestion), above a Comments heading, per the mock: progress bar, one row per question with its answer or "Not answered yet", Open / ✓ / Skipped. A row click scrolls to the card. Answer rows no longer list as Comment cards. A host that passes noquestionRowsgets the old panel./api/denywith a framing paragraph under the title ("The reviewer answered the questions in your plan and asked for no other changes. Update the plan so each answered question becomes a decision … Then resubmit.") plus an additiveanswersOnly: truebody flag that today's servers ignore. The feedback-loss copy names answers: "Your 3 answers will be lost." The annotate decision control needs no change (answers are annotations → Send Feedback); verified.[x]+ note only: counted as answered, exported asAnswer: REST (already settled in the document)+ the note.Note:blockquote; one-line notes are unchanged.usePinpoint).annotation-exclude, so text-search restore never lands in typed text.questionStatus, shared by card, rows and chip.Documents without questions:
questionRowsis not passed, the chip does not render, the feedback label and loss copy are unchanged (tested), and the export is untouched. Toolbar untouched.Evidence
questionStatus),questionDecision.test.ts(answers-only rule, framing placement, loss copy, Edit Mode remap),questionAnswers.test.ts(rows, progress, next-open), DOM:useQuestionAnswers.test.tsx(burst = 1 entry, pause = 2, picks separate, double-click leaves no pick and no entry),usePinpoint.question.test.tsx,AnnotationPanel.questions.test.tsx, highlighter restore vs typed text. Mutation-checked: the double-click, pinpoint and annotation-exclude tests fail with their fix removed. New DOM files added totest.yml.bun test: 0 fail (6820 tests). CI DOM list: 1349 pass.bun run typecheckpasses (incl. strict-consumer).bun run --cwd apps/review build && bun run build:hook.check:manifestpasses after regenerating the guides.show CSS pin (the stylesheet gained the chip/panel classes; deploy guides.show before a release).--use-mock-keychain --password-store=basic), real plan hook (claude-code origin) andannotate, dark and light, 26/26 checks:Send answers body the agent received (after the server's deny prompt):
Screenshots
Hosted on
assets/qa-components-pr2; delete that branch after review.Send answers header:
Claude Code approve warning:
After Edit Mode:
Deviations to review
plan.answeredprompt (both runtimes) is PR 3 per SPEC §8; theanswersOnlyflag is there for it.What PR 3 needs
plan.answeredprompt key (Bun + Pi, OpenCode), selected by theanswersOnlyflag; then drop or keep the client framing paragraph.QUESTION_AUTHORING_GUIDE+ freshness test, PFM paragraph, feedback-archivequestionAnswer, read-only WebMCPquestions.