Skip to content

refactor: extract ShortcutLaunchExecutor#4

Merged
tonythethompson merged 6 commits into
masterfrom
pr/extract-shortcut-launch-executor
Jul 3, 2026
Merged

refactor: extract ShortcutLaunchExecutor#4
tonythethompson merged 6 commits into
masterfrom
pr/extract-shortcut-launch-executor

Conversation

@tonythethompson

Copy link
Copy Markdown
Owner

Summary

  • Add ShortcutLaunchExecutor and TerminalLauncherArgs in Core for shared launch orchestration.
  • Add WorkspaceDevServerActions hook used post-launch.
  • Add unit tests.

Merge note

Merge before other feature PRs — origin/master references TerminalLauncherArgs without the file.

Test plan

  • dotnet test QuickShell.Core.Tests

Move launch orchestration and terminal argument building into Core so
CmdPal commands and the Run plugin share one implementation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 2, 2026 17:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 292a2e0f28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/ShortcutLaunchExecutor.cs Outdated

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

This PR refactors workspace/shortcut launching by extracting shared launch orchestration into ShortcutLaunchExecutor and terminal command-line construction into TerminalLauncherArgs, and adds a small helper for opening a workspace dev-server link post-launch. It also introduces initial unit tests for the new helpers.

Changes:

  • Added ShortcutLaunchExecutor + ShortcutLaunchResult/Options to centralize workspace/launch-entry execution and post-launch behavior.
  • Added TerminalLauncherArgs to consolidate PowerShell/WSL/CMD argument construction and escaping helpers.
  • Added WorkspaceDevServerActions plus unit tests for TerminalLauncherArgs and ShortcutLaunchExecutor error paths.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
QuickShell.Core/Services/WorkspaceDevServerActions.cs Adds a small helper for deciding whether to open / attempting to open a workspace dev-server link.
QuickShell.Core/Services/TerminalLauncherArgs.cs Introduces shared escaping and argument builders for PowerShell/WSL/CMD/WT launch strings.
QuickShell.Core/Services/ShortcutLaunchExecutor.cs Adds the new central launch orchestrator and post-launch warning aggregation.
QuickShell.Core.Tests/TerminalLauncherArgsTests.cs Adds unit tests for argument escaping/building behavior.
QuickShell.Core.Tests/ShortcutLaunchExecutorTests.cs Adds unit tests for basic launch precondition failures (missing directory / no enabled entries).

Comment thread QuickShell.Core/Services/TerminalLauncherArgs.cs
Comment thread QuickShell.Core/Services/TerminalLauncherArgs.cs Outdated
Comment thread QuickShell.Core/Services/ShortcutLaunchExecutor.cs Outdated
Comment thread QuickShell.Core/Services/ShortcutLaunchExecutor.cs Outdated
Comment thread QuickShell.Core/Services/ShortcutLaunchExecutor.cs Outdated
Comment thread QuickShell.Core.Tests/TerminalLauncherArgsTests.cs
Honor RunAsAdmin/RunAsStandard in multi-launch workspaces, normalize
directories before existence checks, and fix cmd.exe nested quoting.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6f6c25a04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/TerminalLauncherArgs.cs Outdated
Comment thread QuickShell.Core/Services/WorkspaceDevServerActions.cs Outdated
Reuse TerminalLauncherArgs for cmd.exe and Windows Terminal cmd suffixes
so quoting stays consistent with the fixed cd /d path pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bedb3a2d96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/TerminalLauncherArgs.cs
tonythethompson and others added 2 commits July 2, 2026 20:45
Double trailing backslashes in WT quoted args, parse WSL distro from profile command line before display name, and gate dev-server auto-open behind OpenDevServerOnLaunch (defaults off).

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire the dev-server auto-open opt-in through the shortcut form, draft persistence, save path, and validation.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ae2caceb0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/ShortcutLaunchExecutor.cs
LaunchEntry now forces IncludeDevServerLink false so context-menu entry launches do not open the browser when OpenDevServerOnLaunch is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tonythethompson tonythethompson merged commit 72218d0 into master Jul 3, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2ed500f29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/WslPathResolver.cs
Comment thread QuickShell.Core.Tests/ShortcutLaunchExecutorTests.cs
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.

2 participants