Skip to content

Add configurable Compose task terminal closing - #588

Open
Zhibo Lin (LE0-Lin) wants to merge 3 commits into
microsoft:mainfrom
LE0-Lin:fix/compose-task-terminal-presentation
Open

Add configurable Compose task terminal closing#588
Zhibo Lin (LE0-Lin) wants to merge 3 commits into
microsoft:mainfrom
LE0-Lin:fix/compose-task-terminal-presentation

Conversation

@LE0-Lin

Copy link
Copy Markdown

Summary

  • add an advanced containers.closeComposeTaskTerminal setting, disabled by default
  • apply the setting to Compose commands and Compose group lifecycle actions while leaving Compose logs open
  • map task focus and close presentation options directly so explicit false values are preserved

Context

This follows up on #363, which was closed due to inactivity, and incorporates the maintainer feedback from that review: make terminal closing opt-in, keep the default behavior unchanged, and avoid applying it to log streaming.

Closes #350

Testing

  • pnpm --filter vscode-containers lint
  • pnpm --filter vscode-containers build
  • pnpm --filter vscode-containers test (158 passing)

AI disclosure

Codex (GPT-5) assisted with implementation and validation. The contributor reviewed the changes and test results before submission.

@LE0-Lin

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@LE0-Lin
Zhibo Lin (LE0-Lin) marked this pull request as ready for review August 20, 2026 11:32
@LE0-Lin
Zhibo Lin (LE0-Lin) requested a review from a team as a code owner August 20, 2026 11:32
Copilot AI lite review requested due to automatic review settings August 20, 2026 11:32

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.

Pull request overview

Adds an opt-in advanced setting to allow VS Code task terminals spawned by Compose lifecycle commands to auto-close on completion, while keeping streaming logs behavior unchanged. This fits into the extension’s task-based command execution path by threading a new close presentation option through the existing TaskCommandRunnerFactory.

Changes:

  • Added containers.closeComposeTaskTerminal setting (advanced, default false) and localized description text.
  • Plumbed the setting into Compose commands (compose.ts) and Compose group lifecycle actions (composeGroup.ts), leaving logs actions unaffected.
  • Extended TaskCommandRunnerFactory to support presentationOptions.close and map focus/close options directly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
extensions/vscode-containers/src/runtimes/runners/TaskCommandRunnerFactory.ts Adds support for passing close (and adjusts how presentation options are applied to tasks).
extensions/vscode-containers/src/commands/containers/composeGroup.ts Applies the new setting to compose group lifecycle actions (start/stop/restart/down).
extensions/vscode-containers/src/commands/compose/compose.ts Applies the new setting to compose commands run via the compose command entry points.
extensions/vscode-containers/package.nls.json Adds localized string for the new setting description.
extensions/vscode-containers/package.json Contributes the new advanced configuration setting.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread extensions/vscode-containers/package.nls.json Outdated
Comment thread extensions/vscode-containers/src/commands/containers/composeGroup.ts Outdated
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.

Add presentation options to Docker extension's compose commands

3 participants