Skip to content

feat(web): Goal and Plan chips in the composer - #926

Merged
yaacovcorcos merged 1 commit into
mainfrom
claude/mode-chips-20261114
Nov 14, 2026
Merged

yaacovcorcos merged 1 commit into
mainfrom
claude/mode-chips-20261114

Conversation

@yaacovcorcos

@yaacovcorcos yaacovcorcos commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

#923, #924 and #925 are merged; this is rebased on main (one conflict in ChatView.tsx with alignment #921, resolved by keeping main's line and adding the chips' two lines).

Platforms: web UI and server code with no platform-specific parts; the same on macOS, Windows and Linux. Tested live on macOS only.

What

Picking /goal or /plan changed nothing on screen until the message was sent. Now:

  • Picking /goal or /plan from the / menu shows a small chip beside the attach button instead of typing the command. The placeholder says what to write ("Describe the goal…", "Describe what to plan…"). The next message is sent as /goal … or /plan …. The chip's × cancels it.
  • The chips show only while they mean something, so the footer stays clean:
    • a goal still being worked on keeps the Goal chip, with its state ("Goal set", "Goal · running", "Goal paused") and a menu: Resume, Set a new goal, Clear. It goes away when the goal is done.
    • while Scient Agent is planning, the Plan chip reads Planning and offers "Leave plan mode".
  • Sizing: as tall as the attach button beside it (28 px), with the small xs label and icon.
  • Plan state: Scient Agent now reports plan mode with plan_updated (feat(rpc): plan mode for RPC hosts scient-agent#60). Desktop keeps it on the provider thread as planMode (one optional contract field), the same path the goal row uses.
  • The chips work for every provider that lists /goal or /plan (Codex, Claude and Scient Agent for goals; Scient Agent for plans), using the existing commands.

Scient-owned: ComposerModeChips.tsx. T3 files change only inside SCIENT-FORK seams (ChatComposer.tsx, ChatView.tsx, NativeSessionAdapterV2.ts, OmpAdapterV2.ts, OmpSessionRuntime.ts, orchestrationV2.ts).

Older agents: today's agent (0.1.10) never sends plan_updated, so no Planning chip appears; /plan answers "Update Scient Agent to use /plan".

Tests

  • OmpPlan.test.ts: plan_updated decoding.
  • Locally: OmpPlan, OmpSessionRuntime, NativeSessionAdapterV2, OmpAdapterV2, ComposerCommandMenu tests (239 pass), root pnpm run typecheck, vp fmt --check, vp lint, seam check and provenance.
  • Live (dev app, macOS) with Fix voice composer transcript routing #60's agent: picking /goal showed the Goal chip with its placeholder, at the attach button's height; the Plan chip sent /plan <task> and the plan card and question appeared; choosing Refine surfaced the agent bug fixed in Fix voice composer transcript routing #60. Checked by the owner in the same dev app.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 14, 2026
@yaacovcorcos
yaacovcorcos force-pushed the claude/mode-chips-20261114 branch from 6fb8f9c to 72c04a2 Compare November 14, 2026 18:34
@yaacovcorcos
yaacovcorcos force-pushed the claude/plan-mode-20261113 branch from 5de821f to 47cb592 Compare November 14, 2026 18:34
@yaacovcorcos
yaacovcorcos changed the base branch from claude/plan-mode-20261113 to main November 14, 2026 18:34
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 22.3 KiB 22.3 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 22.7 KiB 22.7 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 12.0 KiB 12.0 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 45.1 KiB 45.1 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 45.1 KiB 45.1 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 12.2 KiB 12.2 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.1 KiB 384.1 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 45.6 KiB 45.6 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 45.6 KiB 45.6 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 92a8b80 · PR result: 8415f0e · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Bounded compact HTTP snapshot with live cursor.

  • Codex decoded thread snapshot: 88.2 KiB
  • Claude decoded thread snapshot: 88.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Picking /goal or /plan changed nothing on screen until the message was
sent. Picking either from the command menu now shows a small chip beside
the attach button, with its own placeholder; the next message is sent as
that command, and the chip's x cancels it.

The chips show only while they mean something. A goal still being worked
on keeps the Goal chip, with its state and Resume, a new goal and Clear.
While Scient Agent is planning, the Plan chip reads Planning and offers
to leave plan mode. Scient Agent reports plan mode with plan_updated, and
Desktop keeps it on the provider thread as planMode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yaacovcorcos
yaacovcorcos force-pushed the claude/mode-chips-20261114 branch from 72c04a2 to 8415f0e Compare November 14, 2026 20:04
@yaacovcorcos
yaacovcorcos added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit ab54752 Nov 14, 2026
60 checks passed
@yaacovcorcos
yaacovcorcos deleted the claude/mode-chips-20261114 branch November 14, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant