Per-option notes in the ask dialog #236
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!236
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-234-per-option-notes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes: #234
Every option row in the deck's ask dialog — including the "Other" row — now carries its own note control (a pencil revealed on hover/focus), and the note is attached to exactly one row with the omp CLI's lifecycle rules.
apps/web/src/lib/ask-note.ts(new, unit-tested) holds the row/lifecycle rules:noteRowForOption,clearNoteIfRow,clearNoteUnlessRow,CLEAR_NOTEandresolveNote, mirroringpi-tui'snoteRowKey/clearNoteIfRow/clearNoteUnlessRow/noteForSubmittedAnswer.AskDialog.tsxgains anOptionRowwrapper (the note button is a sibling of the<label>, since a nested button would toggle the row's input) and the question-level+ Add noteexpander is gone.NoteFieldis now just the textarea; expansion state lives inanswer.noteRowKey.othernote (the text is live here, unlike the CLI's one-shot prompt); submit still drops anothernote whose custom text ended up empty. Documented onSelectInput.ExtUiDialogResponse.noteOption; the server bridge carries it intoDeckSelectAnswer(a blank note drops the label too) and the agent-facing text readsnote on <option>: …, unnamed for the custom answer.QuestionResult/AskToolDetailsalready declarednoteOption, so no SDK type divergence.apps/web/src/components/tools/Ask.tsx(transcript card) is unchanged, as planned.Verification
bun test apps/web/src/lib/ask-note.test.ts apps/server/src/bridge/deck-tools.test.ts apps/server/src/bridge/ext-ui-bridge.test.ts— 28 pass.bun test— 1569 pass, 0 fail.bun run typecheck— clean across@omp-deck/*.The manual end-to-end pass from the plan (hover/pencil behaviour, agent-visible
note on <label>:line, clearing on deselect) was not run: this session has no browser againstbun run dev. The behaviour it checks is covered by the pureresolveNote/ clear-rule tests and the bridge tests, except the hover/focus affordance itself.