Uh oh!
There was an error while loading. Please reload this page.
fix(inspector): don't auto-launch the Run Inspector (default autoOpen → false) - #116
Merged
Conversation
The Run Inspector auto-launches on every solve today because the contributed setting default is `true`, while the code (autoOpenEnabled(), run_inspector.ts) and its comments assume `false`. VS Code returns the contributed package.json default, not the code fallback, so the panel steals focus whenever a solve starts. Flip the contributed default to false so the inspector no longer auto-launches; it stays reachable on demand via the status-bar item and the "Amicode: Open Run Inspector" command (and, once the opencode-side button lands, the in-chat "Inspect Run" button). No src changes — every auto-reveal path is already gated on autoOpenEnabled(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kateebonner
commented
Jul 9, 2026
ContributorAuthor
✅ Verification gates now run green (toolchain bootstrapped locally):
Confirms the default flip doesn't affect any code path — every auto-reveal path was already gated on |
…button press The autoOpen default flip stops the extension from auto-revealing on solve start, but VS Code independently restores webview panels that were open in a prior session — so the Run Inspector still reappeared on window load, regardless of the setting. Gate the `amicode.runInspector` view behind a `when: amicode.inspectorRevealed` context key. That key starts false on every window load and is never persisted, so VS Code has no visible view to restore — the panel can't come back on its own. Route every reveal path (open command, run picker, demo replay, and the opted-in autoOpen auto-reveal) through a single revealInspector() that flips the key on, then focuses. The inspector now materializes only on a deliberate open and never via VS Code's view-state restoration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Flip the contributed default of
amicode.inspector.autoOpenfromtruetofalseso the Run Inspector panel no longer auto-launches when a solve starts. It stays fully reachable on demand.Why
The inspector auto-reveals on every solve today. Every auto-reveal path is already gated behind
autoOpenEnabled()(run_inspector.ts), whose code fallback isfalse, and the surrounding comments state the intent is "off by default so a starting solve never steals focus." Butpackage.jsoncontributed the setting with"default": true— and VS Code returns the contributed default, not the code fallback, whenever the user hasn't set the key. So the setting was effectively on in every install, contradicting the code's stated intent.This is a one-line behavioral fix (default + description). No
srcchanges: the four gated reveal paths (sse_client.tsamico-tool completion,runs_manager.tsrun selection + new-live-run auto-follow,run_inspector.tswarming-up focus) all become no-ops by default, matching the existing comments.On-demand entry points (unchanged)
The inspector still opens via:
amicode.openInspector, unconditional — bypasses the gate).A follow-up will add an in-chat "Inspect Run" button (opencode side) that routes through the same
amicode.openInspectorcommand, which is already allowlisted in the chat bridge.Users who opted in
Anyone who explicitly set
amicode.inspector.autoOpen: truekeeps auto-launch — only the untouched default changes.Verification
pnpm --filter amicode-v2 typecheckpnpm --filter amicode-v2 test🤖 Generated with Claude Code