Background
Documented as a Phase 5 audit partial in specification/v2_ux_interfaces.md (PR #1236). InlineSamplingRequest currently exposes a flat responseText: string prop. The spec target is draftResult?: CreateMessageResult — the same wrapper that SamplingRequestPanel already accepts — so the inline card and the full panel can share the editor's draft state when the user expands an inline request into the panel.
The current scalar prop predates the panel-level draft-state work and was never reconciled.
Acceptance criteria
Test plan
Out of scope
- Inline editing of the draft inside the compact card (that lives in
SamplingRequestPanel).
- Adding a
draftResult editor that mutates state — the inline card is read-only.
- Changing how
SamplingRequestPanel consumes draftResult (already correct per audit).
Open design question
The audit deferred this with the note "the inline card's draft-editing UX is co-evolving with SamplingRequestPanel". Before implementing, confirm: should the inline preview reflect the live draft from the panel (shared state, two views), or remain a static "last received draft" snapshot? Default proposal: shared — implementer should pull from the same pending-request store the panel reads.
Related
Background
Documented as a Phase 5 audit partial in
specification/v2_ux_interfaces.md(PR #1236).InlineSamplingRequestcurrently exposes a flatresponseText: stringprop. The spec target isdraftResult?: CreateMessageResult— the same wrapper thatSamplingRequestPanelalready accepts — so the inline card and the full panel can share the editor's draft state when the user expands an inline request into the panel.The current scalar prop predates the panel-level draft-state work and was never reconciled.
Acceptance criteria
InlineSamplingRequest's prop interface dropsresponseText: stringand addsdraftResult?: CreateMessageResult(imported from@modelcontextprotocol/sdk/types.js).draftResultisundefined, the card renders the existing "no draft yet" affordance (auto-respond / edit-and-send / reject / view-details buttons unchanged).draftResultis defined, the card displays a 1-2 line preview ofdraftResult.content(text content only — image/audio fall back to a[Image content]/[Audio content]label per the existingContentViewerconvention).onAutoRespond,onEditAndSend,onReject,onViewDetails) keep current shapes.InlineSamplingRequest.stories.tsxcovers: (a) no draft (current default), (b) text draft, (c) draft with non-text content block.PendingClientRequestsand any other consumer threadingresponseTextthrough is updated (likely none — verify withgrep).Test plan
npm run format && npm run lint && npm run buildclean.responseTextin the web client (git grep responseTextshould only show unrelated matches).Out of scope
SamplingRequestPanel).draftResulteditor that mutates state — the inline card is read-only.SamplingRequestPanelconsumesdraftResult(already correct per audit).Open design question
The audit deferred this with the note "the inline card's draft-editing UX is co-evolving with
SamplingRequestPanel". Before implementing, confirm: should the inline preview reflect the live draft from the panel (shared state, two views), or remain a static "last received draft" snapshot? Default proposal: shared — implementer should pull from the same pending-request store the panel reads.Related
specification/v2_ux_interfaces.md§ InlineSamplingRequestspecification/v2_ux_interfaces.md§ SamplingRequestPanel