Skip to content

fix: dispatch plan chips on double-click and send now - #7110

Merged
iamwhatever merged 2 commits into
mainfrom
cursor/plan-chip-send-now-4da0
Sep 1, 2026
Merged

fix: dispatch plan chips on double-click and send now#7110
iamwhatever merged 2 commits into
mainfrom
cursor/plan-chip-send-now-4da0

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Why no screenshot: Dispatch-only change — plan chips look the same; double-click and Send now now hit the plan endpoint instead of chatting the label.

Problem / Motivation

On an orchestrator plan footer, a double-click or a click on the visible Send now arrow sent the chip label (Go, Go All, Cancel) as ordinary chat instead of POSTing /api/chat/slots/{slot}/plan-action.

Cancel is the sharp edge: a typed Cancel is not special-cased server-side, so the user pressed the stop control and the plan kept running.

Why it matters

Single-click already dispatched correctly (#6040 / #5893). The two remaining send gestures skipped that gate, so the discoverable Send-now control and a habitual double-click both bypassed the plan endpoint and its per-slot single-flight latches.

What changed (motivation → approach → change)

FollowUpBar's double-click and Send-now segment call onSend, not onSelect. Hosts wired onSend straight to send() / doSend().

onSend now carries the same click-time row identity onSelect already receives, so a footer that replaces the reused chip between the two clicks of a double-click is refused instead of approving the next stage. ChatPage and ChatPane each have one dispatchPlanFollowUp helper used by every gesture. SideChat and ChatEmbed still drop followUpIsPlan on purpose (#6057 / #6754).

The autopilot spec names all three gestures and the first-click row snapshot.

Tests

  • FollowUpBar: double-click after a mid-gesture footer replacement hands onSend the first-click key; Send-now hands the current key.
  • ChatPane: double-click on Go and Send now on Cancel dispatch planAction; a straddled double-click after a replacement footer does not dispatch; Send now on a non-plan chip still sends the label.
  • ChatPage: double-click on Go and Send now on Go All dispatch planAction.

npx vitest run src/test/FollowUpBar.test.tsx src/test/ChatPane.followUpOptions.test.tsx src/test/ChatPage.followUpToggle.test.tsx — 90 passed.

Manual verification

N/A — unit coverage drives the real ChatPage/ChatPane handlers through the real FollowUpBar gestures, including the replaced-footer race. No visual change.

Related Issues

Fixes #6240

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (autopilot frontend-rendering section)
  • No secrets, credentials, or internal references in the diff

Double-click and the Send-now segment called onSend with the chip
label, so Go/Cancel reached the agent as chat instead of POSTing
plan-action. Route those gestures through the same plan gate as
single-click.

Fixes #6240
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Aug 30, 2026
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of 4856936b45c3c525048e5cacf3acb0209ecc8be6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

The diff is behavior-only: it routes double-click and Send-now on plan chips (Go/Go All/Cancel) through the same plan-action dispatch single-click already uses, with a first-click row snapshot to refuse straddled gestures. No new user-facing strings, no visual change, no screenshots. The one UX gap on the refusal path — a refused/latched chip renders no feedback — is pre-existing, explicitly documented in usePlanActionMutation.ts as tracked (#6056), and deliberately deferred to the shared FollowUpBar; the alternative this PR prevents (silently approving a stage the user never saw, or a "Cancel" typed as chat while the plan keeps running) is strictly worse.

UX-Verdict: PASS

The visible Send-now arrow and double-click now do what the chip label promises — notably, Cancel actually stops the plan instead of chatting "Cancel".

[UX-REVIEWED] 4856936

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 4856936b45c3c525048e5cacf3acb0209ecc8be6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Root-cause fix at the right layer: all three chip gestures now converge on one per-host dispatch gate, with the straddled-footer race covered and spec updated in-commit.

[DESIGN-REVIEWED] 4856936

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 4856936b45c3c525048e5cacf3acb0209ecc8be6 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4856936

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 4856936b45c3c525048e5cacf3acb0209ecc8be6: <one-sentence reason>

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 4856936b45c3c525048e5cacf3acb0209ecc8be6 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All evidence gathered. The supplied patch is stale-base drift plus the real change; the branch's own diff (verified via git merge-base = 0552cf61d, two commits da7ec055d + 4856936b4) is exactly the 8-file plan-chip fix the description declares. Sibling check: onFollowUpSend has exactly 2 hosts (ChatPage.tsx:7981, ChatPane.tsx:843), both fixed; SideChat/ChatEmbed drop plan chips by documented design (#6057/#6754, pinned by SideChat.planExclusion.test.tsx / ChatEmbed.test.tsx), so zero unfixed siblings.

First-Principles-Verdict: PASS

All three send gestures now route through the one plan gate single-click already used — cause-level, no riders, and the diff deletes more inline duplication than it adds.

What this change ships

Intent: make double-click and the Send-now arrow on a plan chip actually drive the plan (so Cancel stops it) instead of chatting the label — a FIX.

  1. Double-click on a plan chip dispatches the plan action, not chat text — justified (reported defect Plan chips: double-click and the Send-now segment bypass plan dispatch and send the label as chat #6240; typed Cancel never stops a plan)
  2. Send-now arrow on a plan chip dispatches the plan action — justified (same defect, the discoverable gesture)
  3. A double-click straddling a replaced footer is refused — justified (extends the exact race guard onSelect already carries)
  4. onSend/onFollowUpSend gain a click-time row key — declared; 2 counted consumers (ChatPage.tsx:7981, ChatPane.tsx:843)
  5. Per-host inline plan gates collapsed into one dispatchPlanFollowUp each — justified subtraction (replaces two duplicated inline blocks per host)
  6. autopilot.md updated in the same commit — derived (AGENTS.md spec-management rule)

Watch

[FIRST-PRINCIPLES-REVIEWED] 4856936

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Aug 30, 2026
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 4856936b45c3c525048e5cacf3acb0209ecc8be6 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 4856936

Verdict parsed from the review's SHA-scoped output markers for commit 4856936b45c3c525048e5cacf3acb0209ecc8be6.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 4856936b45c3c525048e5cacf3acb0209ecc8be6: <one-sentence reason>

Double-click and Send-now now pass the click-time source key through
onSend, so a footer that replaces the reused chip mid-gesture is
refused instead of approving the next stage. Both hosts share one
dispatch helper for every plan-chip gesture.
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Aug 30, 2026
@kyleseaman
kyleseaman marked this pull request as ready for review August 30, 2026 22:20
@kyleseaman
kyleseaman requested a review from a team August 30, 2026 22:20
@kyleseaman
kyleseaman requested a review from a team as a code owner August 30, 2026 22:20
@kyleseaman
kyleseaman requested a review from CrysisDeu August 30, 2026 22:20
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Aug 30, 2026
@iamwhatever
iamwhatever merged commit 7ae0fe7 into main Sep 1, 2026
111 of 112 checks passed
@iamwhatever
iamwhatever deleted the cursor/plan-chip-send-now-4da0 branch September 1, 2026 00:46
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan chips: double-click and the Send-now segment bypass plan dispatch and send the label as chat

2 participants