Skip to content

Remove the Terminal Context autorun - #1540

Merged
nedtwigg merged 6 commits into
mainfrom
remove-terminal-autorun
Nov 3, 2026
Merged

nedtwigg merged 6 commits into
mainfrom
remove-terminal-autorun

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Removes the Terminal Context autorun. Typing git status is no burden, and the setting confused more than it helped. The helper terminal stays: it now starts its shell and runs nothing, which also retires the one accepted risk this carried, a saved command running without asking in the source's directory.

Gone: the Modify control and its dialog, the command on HelperIdentity (spawn, list, restore), the sidecar's preference file and validation, the shell readiness wait and injection, the helper status machine, and the refresh that replaced an untouched helper on reopening. settings becomes home on the context wire, the only thing it still answers.

What a helper does now: opening starts a shell and writes nothing. Reopening keeps it as you left it, untouched or not, with the mismatch warning if the source has moved on; only Reset replaces it, and Reset is always offered. The status row speaks only for an exit.

Maintainer's decision: an untouched helper no longer follows its source on reopen. The refresh's only other job was following the source, and without a command to re-run it would kill and respawn a shell the user may be looking at.

Stored values: autorun shipped in v1.3.0. Nothing reads ~/.dormouse/helper-terminal.json any more, so an installed setting is inert and the file stays where it is, with no migration. A sidecar keeps only parentId from helper metadata it is sent. A new webview on an old sidecar would have its helper refused, which the agent judged unreachable because they ship together; that wasn't run.

Security: the accepted risk leaves security.md. A helper's start directory keeps its rule, since a terminal's output should not choose where a shell opens. S167 keeps its git and launch-write duty and now says helper-terminal.ts writes nothing; S132 loses the watchHelper write. No rule ID is retired, and no canary changed.

Verified: targeted vitest in lib, standalone, vscode-ext, and website; sidecar tests; tsc in all three; the specs, md, public-docs, outbound, and loopback lints; test:audit; test:checks; the Chromium Argos config on the TerminalContext, HelperPlacement, TerminalPaneHeader, and Wall stories. 7 mutations went red. Not verified: the live app, WebKit, or Windows.

Argos: every TerminalContext story moves, since Reset replaces Modify and the prompt is bare. AutorunRunning, AutorunOff, and ModifyAutorun go, and HelperExited is new. HelperPlacement and any story opening a helper also move.

🤖 Generated with Claude Code

Ned's call: typing `git status` is no burden, and the setting confused more
than it helped. A helper now starts its shell and runs nothing, which also
retires the one accepted risk it carried: a saved command running without
asking in the source's directory.

Gone: the Modify control and its dialog, the command on HelperIdentity (spawn,
list, restore), the sidecar's preference file and validation, the shell
readiness wait and injection, the helper status machine, and the refresh that
replaced an untouched helper on reopening. The Reset slot is now always there,
since Modify shared it, and the status row speaks only for an exit.

What a helper does now: reopening keeps it as you left it, untouched or not,
with the mismatch warning if the source has moved on; only Reset replaces it.
The refresh's only other job was following the source, and without a command to
re-run it would kill and respawn a shell the user may be looking at.

Stored values: nothing reads ~/.dormouse/helper-terminal.json any more, so an
installed setting is inert and the file stays where it is rather than keep a
migration alive. Live helper metadata is the only other place the command
lived; a sidecar keeps only parentId from whatever it is sent. Webview and host
ship together, so no build pairs a new webview with an old sidecar.

`settings` becomes `home` on the context wire, the only thing it still answers.
A helper's start directory keeps its rule, since a terminal's output should not
choose where a shell opens. S167 keeps its git and launch-write duty and now
says helper-terminal.ts writes nothing; S132 loses the watchHelper write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 744aacd
Status: ✅  Deploy successful!
Preview URL: https://938bcb3f.mouseterm.pages.dev
Branch Preview URL: https://remove-terminal-autorun.mouseterm.pages.dev

View logs

@nedtwigg
nedtwigg marked this pull request as ready for review November 3, 2026 06:42

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No code findings. The removal is complete: nothing still references the settings op, HelperStatus, the autorun constants, or the sidecar's helper-terminal.json read/write. The home op is wired the same way in the fake adapter, the sidecar, and the VS Code router's ownership exemption. The spec, S132/S167, and the security.md known-gap edits match the code.

I'm not approving while the three Argos statuses (argos/storybook-chromium, argos/storybook-webkit, argos/summary) are red. Their builds show 39 changed, 1 added, and 3 removed stories waiting on a decision. That matches the story moves the description lists (AutorunRunning/AutorunOff/ModifyAutorun removed, HelperExited added), so accepting the builds in Argos is what clears them.

nedtwigg and others added 2 commits November 2, 2026 22:45
Autorun's status and prompt tracking was what needed a 100ms poll. All it did afterwards was notice an exit and throttle the 2 second work inspection, ten wakeups a second per visible helper. One interval now does both, running at once when a helper becomes visible so an exit or the first inspection isn't left waiting. The terminal already prints the exit as it happens; only the status row can trail it.

HelperTerminal.exited went with it: it mirrored the registry entry, and the row reads that directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take the larger budget per spec, then ratchet security-local.md, security-remote.md, and security.md to their merged sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
dormouse-bot previously approved these changes Nov 3, 2026

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Withdrawing my approval: the three Argos statuses are red again on this head, with the same counts as before (39 changed, 1 added, 3 removed, waiting for a decision). The 2-second watch commit and the main merge added no story changes. The code looks good to me, so accepting those builds in Argos is the only thing left before this can merge.

@dormouse-bot
dormouse-bot dismissed their stale review November 3, 2026 06:58

CI failed — Argos visual diffs await a decision.

nedtwigg and others added 3 commits November 3, 2026 00:45
Take the larger budget per spec, then ratchet security-local.md to its merged size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The view's status and command props overlapped: a command only mattered while
running, and running was a Tool's alone. It now takes runningCommand and exited,
each owned by one role, which drops the dead lastCommand fallback.

With Modify's input gone nothing in the view composes text, so its IME guard and
the test that faked composition on a button go too. Also removes a test of a host
answer openHelper no longer asks for, narrows another to what it still checks,
collapses openHelper's retained-helper path, inlines two one-use constants, and
renames what still spoke of the old dialog and statuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nedtwigg
nedtwigg merged commit 987ddbf into main Nov 3, 2026
18 of 19 checks passed
@nedtwigg
nedtwigg deleted the remove-terminal-autorun branch November 3, 2026 16:15
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.

2 participants