feature: unified-shell-resolution (4/4) - #38
Closed
myk1yt wants to merge 35 commits into
Closed
Conversation
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
2 times, most recently
from
August 2, 2026 10:04
c085865 to
13fdbae
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 10:14
cd98c53 to
efcfaec
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 2, 2026 14:14
13fdbae to
b5e9f20
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 14:15
efcfaec to
585ff2d
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 2, 2026 14:24
b5e9f20 to
7c726b2
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 14:25
585ff2d to
5fb6b61
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 2, 2026 18:25
7c726b2 to
151cb30
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 18:27
5fb6b61 to
9e4d06e
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 2, 2026 18:38
151cb30 to
a3c4f5b
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 18:40
9e4d06e to
0802041
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 2, 2026 18:50
a3c4f5b to
4534518
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 18:50
0802041 to
6107801
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 2, 2026 19:43
4534518 to
fe0ed18
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 19:43
6107801 to
cbaa522
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 2, 2026 20:13
fe0ed18 to
7bb69de
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 2, 2026 20:13
cbaa522 to
88499d2
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
2 times, most recently
from
August 4, 2026 06:13
10f81ce to
bffc5e5
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 4, 2026 11:40
1e0f087 to
4fe1300
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 4, 2026 11:40
bffc5e5 to
5f48727
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 4, 2026 20:28
4fe1300 to
81d56ef
Compare
added 7 commits
August 6, 2026 03:11
Merge feature/unified-shell-resolution into pr/b04-shell-contracts-v2. Combines B04's command_output ask delay with B05's shell resolution system (ShellResolver, ShellInvocationAdapter, TerminalProfileResolver, CommandEnvironmentService, CommandScheduler). Conflict resolution in ExecuteCommandTool.ts: - Kept B05 ShellFallbackMismatchError + enhanced getTerminalProviderForExecution - Kept B04 COMMAND_OUTPUT_ASK_DELAY_MS + command_output ask delay logic - Merged onShellExecutionStarted signature (process param from B04 + traceBuilder from B05) - Combined commandStartedAt fallback with ExecaTerminal shell invocation plan Conflict resolution in executeCommandTool.spec.ts: - Kept both B04 command_output ask policy tests and B05 cwd parameter validation tests Note: no-explicit-any lint errors are pre-existing in feature/unified-shell-resolution
…s for new test files, update counts for modified files
…onmentService - fixes e2e terminal-profile test where no VS Code terminal was created because provider was hardcoded to execa
added 11 commits
August 6, 2026 03:16
--noprofile also blocks VS Code's bash shell integration injection (just like --norc). Use --login instead, which is safe for shell integration while still proving custom profile args pass-through.
…add ignoreBinaries
…nterface - optional lifecycle broke TS18048 across TerminalRegistry, ExecuteCommandTool, and ExecaTerminalProcess
…nmentService The unified shell resolution system ignored the user's terminalShellIntegrationDisabled setting. - Add terminalShellIntegrationDisabled to CommandEnvironmentSettings - Use it in resolveEnvironment() to determine primaryProvider - Pass it from Task.resolveCommandEnvironment() and ClineProvider startup hydration
The shell dropdown's onShellSelectionChange only updated the pending selection state; the Save button stayed disabled unless the unrelated onTerminalProfilePickerOpened hook happened to fire. Wrap the handler so a shell selection change explicitly calls setChangeDetected(true), enabling Save on shell-only changes. Behavior is otherwise identical.
…ClineProvider.ts Remove stats/task-organization/tool-call-policy references pulled in by a bad merge from other feature branches (services/stats, ToolCallRetentionPolicy, resolveToolCallPolicy, TaskOrganizationStore, usageStatsChanged and taskOrganizationUpdated messages) which do not exist on this branch and broke compile, knip, and esbuild on PR 38. Keeps only the shell-related changes: passing terminalShellIntegrationDisabled into CommandEnvironmentService hydration and request-scoped environment resolution.
The Terminal settings Browse button posted requestCustomShellPath whose handler immediately persisted the picked path via handleSetTerminalShellSelection, so clicking Discard afterwards could not revert it. The handler now delegates to the new non-persisting ClineProvider.handleCustomShellPathPicked(), which validates the path via ShellResolver and returns it to the webview in a customShellPathSelected message (with a typed error on validation failure). The webview buffers the path as a pending selection and shows it in the dropdown; persistence happens only on Save through the existing setTerminalShellSelection path.
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 5, 2026 18:25
e87d7e4 to
38d0829
Compare
myk1yt
force-pushed
the
pr/b06-terminal-lifecycle-v2
branch
from
August 6, 2026 04:42
81d56ef to
bf2d780
Compare
- CommandTrace.spec.ts: 23 tests (builder, collector, finalize) - CommandEnvironmentService.spec.ts: 18 tests (caching, execa, fallback) - TerminalProfileResolver.spec.ts: 48 tests (PATH resolution, profiles, env) - terminal-shell-settings.spec.ts: +13 tests (commandExecutionStatusSchema)
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 6, 2026 07:37
7f5ecdc to
f368426
Compare
myk1yt
force-pushed
the
pr/b07-shell-integration-v2
branch
from
August 7, 2026 09:19
2b88304 to
e44f18d
Compare
added 2 commits
August 8, 2026 14:56
…-Org#1136) CI failure: E2E Tests (Mocked) run 31227034941 failed both Shell Integration tests with AssertionError because the system prompt rendered the legacy 'Default Shell: /bin/bash' fallback instead of the structured block (Command Execution Provider / Shell Resolution Source / Shell Constraints). Root cause: Task.getSystemPrompt omitted the final resolvedEnv argument, so getSystemInfoSection(cwd, resolvedEnv) always received undefined and fell back to getShell(). Passing this.resolvedCommandEnvironment threads the resolved shell environment into the prompt. Run: https://github.com/Zoo-Code-Org/Zoo-Code/actions/runs/31227034941
CommandEnvironmentService caches resolved shell by version counter. API.setConfiguration persisted terminalShellSelection without invalidating the cache, causing stale OS Default to appear in system prompt instead of User Override. Now invalidates when terminalShellSelection, execaShellPath, or terminalProfile is present.
Owner
Author
|
Closing to recreate with main as target base branch. This PR had stale base branch references after fork sync. |
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 free
to 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.
Stack Position
feature/unified-shell-resolutionDescription
Full Feature Description
feature/unified-shell-resolutionterminal.ts,global-settings.ts,vscode-extension-host.ts, the settings UITerminalSettings.tsxandSettingsView.tsx, the backend terminal layersrc/integrations/terminal, and the task/tool/API wiringTask.ts,ExecuteCommandTool.ts,api.ts.SettingsView.tsxbind tocachedState, not live extension state.terminal-profile.test.ts. Manually run the same command in default, PowerShell, Command Prompt, and where available WSL/POSIX profiles, comparing the selected executable, output, exit code, cancellation, and cleanup.Why Split Into 17 PRs
Instead of submitting this feature as a single unified PR, it was split into individual PRs because as code size grows, safely reviewing a PR becomes very difficult. The feature was broken into mutually exclusive individual PRs so that each can be reviewed independently.
What This PR Specifically Changes
Connects settings to command environment to lifecycle in
Task.ts,ExecuteCommandTool.ts,ClineProvider.ts, andapi.ts, and verifies E2E profile behavior. Does not add new primitives.Included Files
src/core/task/Task.tssrc/core/webview/ClineProvider.tssrc/core/tools/ExecuteCommandTool.tssrc/extension/api.tsapps/vscode-e2e/src/suite/tools/terminal-profile.test.tsExclusion Scope