Skip to content

terminal: clarify Copilot CLI installation completion - #342224

Merged
Don Jayamanne (DonJayamanne) merged 1 commit into
mainfrom
don/agents/cli-command-setting-check
Oct 17, 2026
Merged

Don Jayamanne (DonJayamanne) merged 1 commit into
mainfrom
don/agents/cli-command-setting-check

Conversation

@DonJayamanne

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #341982.

  • Report GitHub Copilot CLI installed successfully. after installation and rediscovery, or GitHub Copilot CLI is already installed. when discovery finds an existing installation. Both messages include Location: <full path>, preserving the discovered path.
  • Show localized Press any key to close this terminal. after the dedicated macOS installation terminal exits, including failure or handled cancellation. Reuse the existing terminal lifecycle and product-message formatting; the Rust shim does not wait for input.
  • Preserve command visibility, setting/policy checks, the Yes/No quick pick, normal CLI launch behavior, installer behavior, and Windows/Linux behavior.
  • Add regression coverage, update the existing shim documentation, and bump the shim package version to 0.1.1 as required by its replacement contract.

Validation

Validated on macOS arm64 with Rust 1.88.0. Successful validation was reused for the unchanged, independently reviewed diff.

Command Result
cargo +1.88 test --locked --manifest-path copilot_shim/Cargo.toml -- --test-threads=1 Passed: 76 tests (66 unit, 5 binary, 5 PTY); no skipped tests or changed deadlines
cargo +1.88 fmt --manifest-path copilot_shim/Cargo.toml --check Passed
cargo +1.88 clippy --manifest-path copilot_shim/Cargo.toml --all-targets --locked -- -D warnings Passed
npm run build-fast -- --client-only Passed
npm run build-fast Passed, including extension/Copilot output for UI verification
./scripts/test.sh --reporter dot --run src/vs/workbench/contrib/terminal/test/electron-browser/terminalInstallActions.test.ts Passed: 15 tests
npm run eslint -- src/vs/workbench/contrib/terminal/electron-browser/terminalInstallActions.ts src/vs/workbench/contrib/terminal/test/electron-browser/terminalInstallActions.test.ts Passed
git diff --check Passed

An isolated Code OSS Dev 1.143.0 scenario passed all 11 UI steps: new-install and already-installed output, full paths, failure and Ctrl+C handling, one close hint only after exit, terminal accessible-view content, and printable-key/Enter closure that leaves an independent terminal open. The scenario used fake installers and a sentinel CLI, not real downloads or installations. All temporary fixtures and profiles were removed.

Known Validation Caveat

cargo +1.88 test --locked --manifest-path copilot_shim/Cargo.toml was not consistently green under default parallel execution: one run timed out in macos_pty_install_only_ctrl_c_stops_without_fallback after CURL_READY. The isolated cancellation test and complete serial suite passed. An unchanged-HEAD export passed 24 parallel PTY-suite runs, so the timeout is not proven pre-existing or resolved.

The maintainer explicitly accepted this caveat for the message-only change and requested a separate follow-up. No cancellation/supervision logic, test skips, timeouts, or thresholds were changed. Independent review found no introduced code defect but withheld an unconditional gated pass because of this validation uncertainty.

How to Test

  1. On macOS, enable chat.copilotCliCommand.enabled and run the Shell Command PATH installation action.
  2. Choose Yes for the optional Copilot CLI installation. After a new installation, verify the success message, full executable location, and terminal-close hint.
  3. Repeat with an existing CLI and verify the already-installed message without reinstalling or launching it.
  4. Exercise installer failure and Ctrl+C: retain the real error/exit status, show no success message, and display the close hint after termination.
  5. Press a printable key or Enter and verify only the completed installation terminal closes.

Native Windows/Linux, actual Copilot downloads/installations, and VoiceOver speech output were not exercised. The terminal accessible-view text was checked. The UI evidence retains screenshots, a trace, and raw video; captions were unavailable because the local ffmpeg lacks drawtext.

Distinguish newly installed and existing Copilot CLI installations, retain the discovered executable location, and show the terminal's localized close-on-keypress hint after completion. Preserve the existing install picker and setting checks.

Follow-up to #341982.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 01:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The disclosed parallel PTY cancellation timeout remains unresolved and warrants final human sign-off despite no identified introduced defect.

No open issues 🎉

What changed in this PR

Clarifies completion of the optional macOS Copilot CLI installation flow without changing normal CLI launch behavior.

Changes:

  • Distinguishes new and existing installations and reports the discovered executable path.
  • Adds a localized terminal-close hint after installation exits.
  • Updates regression coverage, documentation, and shim version to 0.1.1.

No actionable code findings remain.

File Description
src/​vs/​workbench/​contrib/​terminal/​test/​electron-browser/​terminalInstallActions.test.ts Updates close-hint expectations.
src/​vs/​workbench/​contrib/​terminal/​electron-browser/​terminalInstallActions.ts Adds localized exit hint.
copilot_shim/​tests/​pty.rs Checks installation completion output.
copilot_shim/​tests/​app.rs Checks existing-installation output.
copilot_shim/​src/​app.rs Distinguishes discovery outcomes and adds regression assertions.
copilot_shim/​SHIM_POST_INSTALL.md Documents completion messages and terminal behavior.
copilot_shim/​REQUIREMENTS.md Updates installation reporting contract.
copilot_shim/​Cargo.toml Bumps shim version to 0.1.1.
copilot_shim/​Cargo.lock Synchronizes shim package version.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: e97039dd Current: 256b95fa

Changed (1)

sessions/sessionActivityBar/sessionActivityBar/SubmenuOpen/Light
Before After
before after

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Anthony Kim (@anthonykim1)

Matched files:

  • src/vs/workbench/contrib/terminal/electron-browser/terminalInstallActions.ts
  • src/vs/workbench/contrib/terminal/test/electron-browser/terminalInstallActions.test.ts

@DonJayamanne
Don Jayamanne (DonJayamanne) merged commit 5ffbd1a into main Oct 17, 2026
50 checks passed
@DonJayamanne
Don Jayamanne (DonJayamanne) deleted the don/agents/cli-command-setting-check branch October 17, 2026 12:41
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 17, 2026
Karthik Nadig (karthiknadig) added a commit that referenced this pull request Oct 19, 2026
main's #342224 and this branch both changed the shim and bumped it from 0.1.0
to 0.1.1. Windows setup keeps a published shim whose file version matches, so
the merged shim needs its own version to replace main's 0.1.1.

Co-authored-by: Copilot <[email protected]>
Karthik Nadig (karthiknadig) added a commit that referenced this pull request Oct 19, 2026
… macOS shim (#342101)

* linux: expose the Copilot shim in DEB/RPM packages

Honor Linux installation policy and preserve the official installer PATH. Manage Stable and Insiders command ownership through guarded package lifecycle hooks.

Add native runtime regressions and a focused package lifecycle harness while leaving deferred packaging formats and non-Linux behavior unchanged.

Co-authored-by: Copilot <[email protected]>

* test: fix Copilot package launcher and rendering checks

Use a scenario-local profile for root launcher validation and ignore disabled shell comments when checking unresolved package placeholders. Preserve strict helper validation and add focused regressions.

Co-authored-by: Copilot <[email protected]>

* copilot: apply the CopilotCliCommand policy to Linux packages and the macOS shim

The Linux DEB/RPM scripts now ask the shim for the CopilotCliCommand policy
before managing /usr/bin/copilot, matching Windows setup: a disabled policy
removes a link to either edition's shim instead of creating one, and an
unreadable policy leaves the entry unchanged. DEB packages add a preseedable
<package>/add-copilot-command debconf question (medium priority, default true)
that lets an edition opt out; hand-over on removal respects the other
edition's answer and the policy.

The shim gains `--vscode-shim policy`, which exits 0 when the policy allows
the command and 10 when it turns it off, and reads the policy on macOS from
the configuration-profile domains of every quality (ported from #341916).

Co-authored-by: Don Jayamanne <[email protected]>
Co-authored-by: Copilot <[email protected]>

* test: drop rendering tests that only exercised the harness validator

Keep the checks of the real link helper source and the DEB/RPM templates;
the removed cases tested the package-lifecycle harness's own validator
rather than product code.

Co-authored-by: Copilot <[email protected]>

* copilot: bump the shim to 0.1.2

main's #342224 and this branch both changed the shim and bumped it from 0.1.0
to 0.1.1. Windows setup keeps a published shim whose file version matches, so
the merged shim needs its own version to replace main's 0.1.1.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Don Jayamanne <[email protected]>
Co-authored-by: Copilot <[email protected]>
Don Jayamanne (DonJayamanne) added a commit that referenced this pull request Oct 19, 2026
#342660)

copilot: apply the CopilotCliCommand policy to Linux packages and the macOS shim (#342101)

* linux: expose the Copilot shim in DEB/RPM packages

Honor Linux installation policy and preserve the official installer PATH. Manage Stable and Insiders command ownership through guarded package lifecycle hooks.

Add native runtime regressions and a focused package lifecycle harness while leaving deferred packaging formats and non-Linux behavior unchanged.



* test: fix Copilot package launcher and rendering checks

Use a scenario-local profile for root launcher validation and ignore disabled shell comments when checking unresolved package placeholders. Preserve strict helper validation and add focused regressions.



* copilot: apply the CopilotCliCommand policy to Linux packages and the macOS shim

The Linux DEB/RPM scripts now ask the shim for the CopilotCliCommand policy
before managing /usr/bin/copilot, matching Windows setup: a disabled policy
removes a link to either edition's shim instead of creating one, and an
unreadable policy leaves the entry unchanged. DEB packages add a preseedable
<package>/add-copilot-command debconf question (medium priority, default true)
that lets an edition opt out; hand-over on removal respects the other
edition's answer and the policy.

The shim gains `--vscode-shim policy`, which exits 0 when the policy allows
the command and 10 when it turns it off, and reads the policy on macOS from
the configuration-profile domains of every quality (ported from #341916).




* test: drop rendering tests that only exercised the harness validator

Keep the checks of the real link helper source and the DEB/RPM templates;
the removed cases tested the package-lifecycle harness's own validator
rather than product code.



* copilot: bump the shim to 0.1.2

main's #342224 and this branch both changed the shim and bumped it from 0.1.0
to 0.1.1. Windows setup keeps a published shim whose file version matches, so
the merged shim needs its own version to replace main's 0.1.1.



---------

Co-authored-by: Karthik Nadig <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.

3 participants