Repository navigation
fix(web): project actions stay on the thread that started them - #36714
StiensWout wants to merge 5 commits into
Conversation
A project action or chat code block typed its command through a stable write that read the latest thread, so switching threads while the terminal was opening sent the command to the other thread's terminal. The launch now returns a write bound to the thread that opened it, which still checks terminal access when it runs. Co-authored-by: GPT 6.1 Sol <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: GPT 6.1 Sol <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
|
This PR changes the test suite by +2 test cases (browser +2, unit 0, server 0). New browser test files: Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Project-script terminal input now stays bound to the thread and environment that launched it, even if navigation occurs while the terminal opens. Existing permission checks remain in place, and the change does not broaden command execution capabilities. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The cross-environment case covers the regression; the same-thread case only mirrored the normal path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dismissing prior approval to re-evaluate 18f1986
EvidenceReal web app, Chromium, 1280×800, light theme, fresh synthetic state on each commit. Run the project action on saved thread A, hold its terminal-open response, navigate to B, release while on B, then return to A.
Scenario and seed · Plain-prompt shell helper scenarios:prove exited 0: failed on base and passed on head. Captures and recordings visually inspected. Not shown:
|




Switching threads while a project action opens its terminal can send the command to the newly selected thread. When that thread has no matching terminal, the write fails and the action stays idle.
Bind the write to the terminal launch result, preserving its initiating thread and environment. Recheck terminal permission for that environment immediately before writing. Script buttons, shortcuts, and chat shell commands share this path; other terminal launch callers are unchanged. Mobile uses a separate path.
Found by the bughunt and independently confirmed by Claude Opus 5.5 on main. The lead reproduced it again before implementing the fix. Wrong-shell execution was not observed: the real-app base rejected the wrong-target write.
Validation
pnpm exec vp run scenarios:prove scripts/scenarios/project-action-runs-on-its-thread.e2e.ts --base 8cb551a3cefails on base and passes on head. The scenario holds terminal open, navigates to B, asserts the write targets A, and waits for the marker while remaining on B.pnpm exec vp run check:changedpasses.Small fast-lane change: terminal ownership fix with no storage, new UI flow, or cross-package interface. Existing error and interrupted-open handling stays intact.
Captures
Base: the write is rejected and the initiating terminal stays idle. Head: the action runs in the initiating terminal. Machine prompts are redacted.
Council review
Sol's scenario timing finding is fixed: completion is now observed while still on B, and the outgoing target is asserted. Opus's optional control-test and comment nits were retained: the control guards normal launches and the comment states the ownership invariant. Mean 8.5; no second round required by the fix-thread brief.
Created with GPT 6.1 Sol in Codex and Claude Opus 5.5 in Claude, through T3 Code.
Closes #36713