Repository navigation
fix(web,mobile): remove the Purpose control from the composer - #540
Conversation
|
What: No blocking defects found; PASS for exact head Reviewed against base
Validation: source review plus Verdict: PASS. No blocking findings. Reviewer: GPT-6.1-sol, Codex harness, medium review scope. |
|
What: Round 2 PASS with no findings at exact head Reviewed
Validation: exact-SHA source inspection, full delta and commit-parent inspection, and Requirements and who asked: User requested a read-only Round 2 review of the two-line documentation correction and an exact-head verdict. Reviewer: GPT-6.1-sol through the Codex harness in T3 Code; requested effort low. |
Thread transfer impact
This comment will update automatically after the next completed run. |
Purpose stays recorded per run; agents set it through their launch, delegate, send and watch calls, and composer sends record the thread's stored selection (new threads default to unscoped). The web composer, mobile thread and mobile new-task screens no longer show a purpose control or the "Running: ... Send queues the selected purpose" line. Scheduled task forms keep their purpose field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4c16c6f to
3512537
Compare
|
What: Changes requested for one P2 acceptance failure at exact head P2: Automatic purpose does not reach ordinary web/desktop composer sends. The changed fallback in apps/web/src/components/ChatView.tsx:1241 belongs to the local Trigger: send an ordinary follow-up to an idle thread whose stored purpose selection is an Issue or PR. packages/client-runtime/src/operations/commands.ts:764 preserves the omission, and ExecutionPurpose.ts:73 resolves it to This omission is also present in base Other requested checks:
What I tried and sources checked: read the complete Verdict: changes requested. Reviewed by gpt-6.1-sol through the Codex harness in T3 Code. |
The composer, multiple-model, plan follow-up and implement-plan sends called startTurn directly and omitted purposeIntent, so the server recorded legacy unscoped instead of the thread's stored selection. They now all start turns through useStartTurnWithPurpose, the same rule ChatView's app-message sends already used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
What: Round 2 requests changes for two P2 purpose-attribution defects. Reviewed head:
Location: useStartTurnWithPurpose.ts:36-40. Trigger: start an ordinary send with a pending attachment upload in idle server thread A, then navigate to server thread B with a different stored purpose before the upload finishes.
The shared callback now sees B. Because A's request does not match B's ID, line 40 emits a reference/unscoped intent from B's selection. This both misattributes A's new run and overwrites A's stored selection: Keep purpose resolution bound to the intended thread/send across asynchronous preparation. A controlled delayed-send regression test is meaningful here: start in A, commit navigation to B, release the pending operation, and verify A retains its purpose. This exercises state lifetime and attribution, beyond callback wiring.
Location: useThreadLifecycle.tsx:511-520. The remaining raw binding at line 171 serves Trigger: on an idle scoped Codex thread with a paused goal, click the goal row's Resume action. The request reaches ordinary dispatch with no inheritance source or active target, so This bypass also exists in the stated base. It remains an acceptance gap in automatic attribution across entry points, rather than a regression caused by removing the UI. Route these actions through purpose-aware dispatch while preserving their existing command behavior. Checklist and cleared concerns:
What was tried and sources checked: complete cumulative Proof limits: static review only. No tests, cache-writing checks, dev servers, browser/device sessions, repository writes or live userdata access. The worktree remained clean. This comment and the associated review status are the only review publication writes. Requirements and who asked: The user requested removal of manual composer Purpose UI while retaining automatic purpose attribution and per-run storage. Verdict: CHANGES REQUESTED. Reviewed by gpt-6.1-sol through the Codex harness in T3 Code. |
A delayed send finished after navigating away read the viewed thread's purpose and could overwrite the destination's selection. Purpose now comes from the request's own thread: its stored selection, unscoped for new threads, and nothing for a thread the client has not loaded. Every web send hook binds this command itself, and goal Resume/Clear use it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
What: Independent read-only review round 3 approves exact head Reviewed against base Findings: none. Optional nits: none. Cleared prior findings:
Checks and sources inspected:
Verdict: approve. Review performed through Codex with gpt-6.1-sol; delegated reviewer also used Codex with gpt-6.1-sol at high effort. |
What: The Purpose control ("Purpose: Unscoped" and the "Running: … Send queues the selected purpose" line) is gone from the web/desktop composer and the mobile thread and new-task screens.
Why: The user will never pick a purpose by hand; purpose is set automatically and stored per run, so the control was noise on every thread.
So what: The developer approved merging; it merges once required CI is green and the independent review passes.
Rebased onto current
main(no merge commits). Run purpose is still admitted on the server and stored per run exactly as before: web sends record the thread's stored selection (default unscoped) orinherit/targetfor continuations and Steer/Restart; mobile new-task sends record unscoped; agents still passpurposeIntentthrough launch, delegate, send and watch tools. Scheduled task forms keep their purpose field (#377).Changes:
apps/web/src/components/chat/useStartTurnWithPurpose.ts(new fork module, with test): one purpose-awarestartTurn. It resolves purpose from the request's destination thread, never the viewed one: its stored selection, unscoped for new threads, inherit/target for continuations and Steer/Restart, and legacy for a thread the client has not loaded so a stored selection is never overwritten. ChatView, composer, multiple-model, plan follow-up, implement-plan and goal Resume/Clear sends bind it (review rounds 1 and 2: these paths recorded legacy unscoped, and a delayed send could take the viewed thread's purpose).apps/web/src/components/ChatView.tsx: dropsExecutionPurposeControl, its draft state and change handler; its inline purpose wrapper is replaced by the hook above.apps/mobile/.../ThreadDetailScreen.tsx: dropsThreadExecutionPurposeControl(file deleted).apps/mobile/.../NewTaskDraftScreen.tsx: dropsExecutionPurposePickerand its state; sends record unscoped. The picker stays for scheduled tasks.docs/user/thread-sidebar.md,docs/fork-features.mdupdated.Proof:
tsc --noEmitpasses forapps/webandapps/mobile;vp lintandvp fmtclean on changed files;bash scripts/fork-check.sh --upstream upstreamOK.vp test run apps/web/src/components/chat/useStartTurnWithPurpose.test.tspasses (3 tests: destination selection, unloaded thread, new/continuation/Steer). No browser or device pass and no before/after screenshots: dev servers and devices were not authorized in this session.Requirements and who asked: The user asked to remove the composer Purpose control everywhere and keep purpose automatic and stored per run.
Deleted: The web composer control, mobile thread control, mobile new-task picker, their draft state and change handlers, and ChatView's viewed-thread purpose wrapper.
Bottleneck: This PR sat unreviewed and went stale against
main; review and merge approval are the bottleneck.Checked myself: Searched web and mobile for
ExecutionPurposeControl,ThreadExecutionPurposeControl,ExecutionPurposePicker, "Send queues the selected purpose" and "legacy caller"; only scheduled-task uses remain. Ran the typechecks, lint and fork check above.Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code