Skip to content

fix(composer): preserve draft when picking provider commands - #14236

Closed
kvnloo wants to merge 4 commits into
pingdotgg:t3code/pi-provider-v1from
kvnloo:fix/provider-command-preserve-draft-20260929
Closed

kvnloo wants to merge 4 commits into
pingdotgg:t3code/pi-provider-v1from
kvnloo:fix/provider-command-preserve-draft-20260929

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 29, 2026

Copy link
Copy Markdown

Stacked on #13777. Fixes the unresolved web/mobile composer review finding where selecting a no-argument provider command could delete surrounding draft text.

Behavior

A no-argument provider command auto-runs only when the selected slash-command trigger is the entire non-whitespace draft.

Examples:

  • /copy → auto-run
  • /copy → auto-run
  • /copy keep this draft → stays editable; surrounding text is preserved
  • keep /copy → stays editable

Web and mobile use the same pure trigger-only predicate.

Tests

Adds focused shared coverage for standalone vs mixed-content trigger selection.

No provider/session/runtime behavior changes.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 29, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at f733096

Macroscope's review found this PR approvable — This is a small composer bug fix that prevents no-argument provider commands from auto-running when surrounding draft text exists, while preserving the existing standalone-command behavior. The shared predicate is focused and tested, and the runtime impact is limited to web and mobile composer selection.

You can add or adjust custom eligibility rules. Learn more.

Copy link
Copy Markdown
Member

Note

This comment is posted by Julius' dot

This changes when web and mobile composer selections execute a command, but the PR only describes added assertions and supplies no observed test result or UI evidence. Please report the focused test command and result, and add before/after screenshots plus a short recording showing standalone commands still run while mixed drafts stay editable on both clients. The verification rule requires evidence for the changed interaction. Closing pending that evidence; add it and request reconsideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants