spec: editable prompt suggestions (#9842)#10232
spec: editable prompt suggestions (#9842)#10232lonexreb wants to merge 5 commits intowarpdotdev:masterfrom
Conversation
There was a problem hiding this comment.
Overview
This spec adds an insert-as-draft path for prompt suggestions while preserving the existing send-on-click behavior.
Concerns
- The affordance contract does not unambiguously require both the edit icon and modifier-click path, even though the PR body describes both.
- Existing draft handling is left for a future TECH decision, so implementation and acceptance tests can pick different behaviors.
- The telemetry category mapping needs a named source in the existing model to keep event payloads consistent and private.
Verdict
Found: 0 critical, 2 important, 1 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| - **New: insert-as-draft.** Discoverable via either: | ||
| - A small "edit" icon next to the suggestion (preferred, low | ||
| friction). | ||
| - Modifier-click on the suggestion (Cmd-click / Ctrl-click). |
There was a problem hiding this comment.
| - B2. Insert-as-draft replaces the current agent-input contents | ||
| with the suggestion text. If the input already has user text, | ||
| show a one-time confirmation tooltip ("Replace existing | ||
| draft?") OR insert at the current caret position — TECH spec | ||
| picks one. |
There was a problem hiding this comment.
| - B6. Telemetry: emit a single `prompt_suggestion_inserted_as_draft` | ||
| event when the user takes the new affordance. No payload beyond | ||
| the suggestion category (e.g., "zero_state", "follow_up") — | ||
| never the suggestion text or the user's edited result. |
There was a problem hiding this comment.
💡 [SUGGESTION] Define how suggestion category maps to existing PromptSuggestion fields so implementers do not invent inconsistent categories or use text-derived values.
Co-Authored-By: Warp <agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this spec-only pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This spec defines an insert-as-draft affordance for prompt suggestions, with behavior, telemetry, acceptance criteria, implementation pointers, and tests.
Concerns
- The spec conflicts on whether sequential suggestion composition is supported or out of scope, and does not say whether the suggestion banner is dismissed after insert-as-draft.
- A couple of UI details should be clarified so implementers preserve behavior rather than impossible pixel parity and expose the icon affordance accessibly.
Verdict
Found: 0 critical, 1 important, 2 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
|
||
| ## Out of scope | ||
|
|
||
| - Multi-suggestion compose (insert two suggestions in sequence |
There was a problem hiding this comment.
|
|
||
| - B1. Each prompt-suggestion entry exposes two affordances: | ||
| - **Primary click (existing):** sends the suggestion as-is. | ||
| Pixel-equivalent to today. |
There was a problem hiding this comment.
💡 [SUGGESTION] Pixel-equivalent conflicts with adding an adjacent edit icon; scope this to send-on-click behavior instead.
| Pixel-equivalent to today. | |
| Behavior-equivalent to today. |
| Pixel-equivalent to today. | ||
| - **New: insert-as-draft.** Both entry points are required and | ||
| dispatch the same action: | ||
| - A small edit icon next to the suggestion. |
There was a problem hiding this comment.
💡 [SUGGESTION] Specify the edit icon's accessible label, tooltip, and focus/click target so the non-send path is discoverable beyond modifier-click users.
Round-1 fixes for oz-for-oss bot review: - Affordance contract now explicitly requires BOTH edit icon AND Alt/Ctrl-click insert path with separate AC items - Define V1 existing-draft behavior as replace-with-confirm; choice is not persisted across inserts - Telemetry uses existing prompt_suggestion.action event with new action_type=insert_as_draft alongside send; no new fields, reuses existing category and source - Sequential composition is SUPPORTED in V1 with banner persistence until send/close/context-loss - Add UI/accessibility details: 16x16 pencil glyph, tabindex roving focus, aria-label, modifier-click tooltip; no pixel-parity claim
|
Round-1 fixes for oz-for-oss review: (1) affordance contract now explicitly requires BOTH edit icon AND Alt/Ctrl-click insert path with separate AC items; (2) defined V1 existing-draft behavior as replace-with-confirm (no persistence of choice); (3) telemetry uses existing |
|
/oz-review |
|
I'm re-reviewing this spec-only pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This spec defines an insert-as-draft path for prompt suggestions while preserving existing send-on-click behavior.
Concerns
- The telemetry contract references an existing
prompt_suggestion.actionevent withcategory,source, andaction_type, but the current client code appears to expose separate accepted events without that payload shape. - The implementation pointer says to target an insert-at-caret path, which conflicts with the V1 replace-with-confirm behavior for existing drafts.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| - B5. The existing inline-banner prompt-suggestion model | ||
| (`app/src/terminal/view/inline_banner/prompt_suggestions.rs`) | ||
| is the data source; no schema change. | ||
| - B6. Telemetry. Insert-as-draft reuses the existing |
There was a problem hiding this comment.
PromptSuggestionAccepted / StaticPromptSuggestionAccepted with id, view, and interaction_source, not an existing prompt_suggestion.action event with category, source, and action_type; clarify whether implementation should add a new unified event or extend the existing events so the telemetry contract is implementable.
| - `TerminalAction::ResolvePromptSuggestion(...)` (search: | ||
| `app/src/terminal/view/init.rs`) is today's "send-it-now" path. | ||
| Add a sibling `InsertPromptSuggestionAsDraft(PromptSuggestion)` | ||
| action that targets the agent input editor's insert-at-caret |
There was a problem hiding this comment.
insert-at-caret conflicts with B2/A5, which require replacing the whole existing draft after confirmation; update the implementation pointer to target a replace-input-and-place-caret-at-end path so implementers do not ship caret insertion for V1.
|
Round-2 fixes: (1) telemetry — verified actual event names in codebase ( |
|
/oz-review |
|
I'm re-reviewing this spec-only pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This spec defines an insert-as-draft path for prompt suggestions, including edit-icon and modifier-click affordances, replace-confirm behavior for existing drafts, telemetry, and test coverage.
Concerns
- The accessibility contract uses DOM-specific
tabindex/aria-labelrequirements for a native Warp UI surface; it needs to name the equivalent focus/accessibility behavior and validation target before implementation.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| - Keyboard-focusable; participates in the suggestion list's | ||
| existing roving-focus / `tabindex` model. | ||
| - `aria-label="Edit suggestion before sending"`. |
There was a problem hiding this comment.
tabindex and aria-label are DOM-specific, but this prompt-suggestion surface is implemented in native Warp UI; specify the equivalent native focus/accessibility API and test assertion instead of requiring nonexistent attributes.
|
Round-3 review fixes (commit 9a2a04b):
|
|
/oz-review |
Spec for #9842. New insert-as-draft affordance (edit icon + modifier-click) on each prompt suggestion. Inserts the text into the agent input without sending; user edits and submits manually. Existing send-on-click behavior preserved.
Closes (spec-only) #9842.