feat(vscode): add terminal in editor profile - #2079
Merged
Merged
Conversation
CoverageTotal: 97.81% ⚪ 0 pp vs Comparing No per-file coverage changes vs 🔇 233 ignored region(s), 0 tolerated region(s)
Patch coverageNo new executable lines added by this diff. |
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 1, 2026
newhoggy
force-pushed
the
issue-1683-terminal-in-editor-profile
branch
from
October 1, 2026 13:00
ce5823e to
dc912fa
Compare
Contribute a shell profile to the terminal creation menu and register its provider before daemon reporting. Each request supplies fresh editor terminal options while leaving shell and cwd resolution to VS Code. Cover profile wiring, cancellation, fresh options, and disposal; document the menu entry in the extension README and changelog. Fixes #1683
The native contributed-profile flow refocuses the terminal panel even when the profile requests an editor tab. Track our exact creation options and reveal the matching terminal after its shell starts, leaving other profiles alone. Dispose both registrations and tolerate terminals closed during startup. Cover delayed focus, unrelated terminals, disposal, and startup failures. Verify repeated panel-menu selections and the default plus action in VS Code 1.139.1 on macOS.
Extension-owned terminals ignore terminal.integrated.cwd, and the native contributed-profile flow can lose the configured shell profile defaults. Carry the configured cwd, arguments, and environment into the options and use VS Code's resolved default shell for configured profiles. Leave unconfigured profiles to native resolution and cover both cases. Verify custom cwd, environment, login arguments, and focus on VS Code 1.75 with the daemon unavailable.
newhoggy
force-pushed
the
issue-1683-terminal-in-editor-profile
branch
from
October 1, 2026 14:02
dc912fa to
8f05c83
Compare
newhoggy
enabled auto-merge
October 1, 2026 14:07
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.
Description
Add Terminal in Editor to the terminal panel's existing + ▾ profile menu. Each selection creates a new focused shell terminal as an editor tab, using VS Code's normal shell and cwd configuration.
Actual-menu review exposed a native focus issue: returning
location: Editoropens the tab but refocuses the panel terminal. The fix matches this profile's exact creation options and callsshow(false)after its shell starts. Unrelated terminals are ignored; shutdown and terminals closed during startup are handled. A second minimum-version check found that extension-owned terminals ignore the configured cwd and can lose default-profile settings, so the provider carries configured cwd/args/env explicitly and uses VS Code's resolved default shell for configured profiles.Type of Change
Related Issue
Fixes #1683
Changes Made
Testing
npm cinpm run typechecknpm test: 254 tests pass (socket tests require access outside the sandbox).npm run buildandnpm run packageNine provider regression tests: contribution/activation wiring, fresh profiles, cancellation, delayed focus, unrelated terminals, disposal, startup-close/failure handling, configured shell/cwd preservation, and blank/disabled profile defaults.
Provider module coverage: 100% lines/functions and 95.45% branches using Node's test coverage. This is module coverage, not whole-extension coverage.
Compile the provider in isolation against official VS Code 1.75.0 API declarations.
Actual panel + ▾ menu on VS Code 1.139.1 (macOS arm64): entry alongside bash/zsh/debug profiles, repeated selections create distinct focused editor terminals, immediate input lands in the editor terminal,
/bin/zshand workspace cwd are preserved, plain + still creates a panel terminal, and the entry remains after reload.Actual panel menu on VS Code 1.75.0 (macOS arm64): entry present, repeated selections create distinct focused editor tabs, shell/cwd output confirmed, and plain + retains panel behavior. After reload with an unavailable daemon socket and a custom default profile, the editor terminal preserves
/private/tmp/1683-custom-cwd, the configured environment marker, and the-llogin argument.Screenshots/Recordings
The UI automation tool reported screenshots unavailable for VS Code. Menu placement, editor tabs, focus, and command output were verified through the native accessibility tree.
Review Focus Areas
The focus handler is necessary because the native contributed-profile creation flow refocuses the panel. It matches creation-options identity rather than names or a global default-profile change, and reveals each matched terminal once after shell startup.
Checklist
Compatibility and remaining verification
The minimum engine remains
^1.75.0. Native location resolution was checked in 1.75 source, and the provider compiles against its API. Windows/Linux, remote workspaces, multi-root workspaces, and thedefaultLocation: editormatrix have not been exercised locally. No Rust code changed.