Package Raycast command suggestions - #139
Conversation
There was a problem hiding this comment.
Sorry @tonythethompson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
📝 WalkthroughWalkthroughRaycast now builds and publishes ChangesRaycast Suggest integration
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b05d749364
ℹ️ 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".
Qodo FixerNo findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR. |
Code Review by Qodo
Context used✅ Compliance rules (platform):
44 rules🔴 Action Required 1.
|
Generate Suggest.exe on Windows prebuild/prepublish so Store packages include it, hide the empty disabled dropdown, and leave local-heuristic leftovers selectable. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Code review by qodo was updated up to the latest commit d6545c7 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@QuickShell.Raycast/package.json`:
- Line 161: Update QuickShell.Raycast/package.json so ensure-suggest-asset.js
runs in the actual npm publish flow, using the publish or prepare script rather
than relying only on prepublishOnly. Update QuickShell.Raycast/README.md’s
publish instructions or claim to match the resulting lifecycle behavior.
In `@QuickShell.Raycast/src/lib/suggest-commands.ts`:
- Around line 196-200: Validate the parsed payload in the CLI response handling
before returning it from the function containing the generation-mismatch check.
Ensure the result is a valid SuggestionResponse with a usable pills collection;
otherwise return null so resolveWorkspaceSetupSuggestions falls back locally,
while preserving the existing generation validation and successful return path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0c41e090-ca73-4300-9854-839b375a6a6f
📒 Files selected for processing (13)
.gitignoreQuickShell.Raycast/README.mdQuickShell.Raycast/package.jsonQuickShell.Raycast/scripts/ensure-suggest-asset.jsQuickShell.Raycast/src/__tests__/suggest-commands.test.tsQuickShell.Raycast/src/components/discover-git-repos-view.tsxQuickShell.Raycast/src/components/workspace-form.tsxQuickShell.Raycast/src/lib/suggest-commands.tsdocs/architecture/forms.mddocs/architecture/intelligence.mdscripts/RaycastLifecycle.ps1scripts/build-raycast-extension.ps1scripts/build-raycast-suggest.ps1
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
Trackdubllc/Trackdub(manual)tonythethompson/QuickShell(manual)tonythethompson/numan(manual)tonythethompson/dependency-chain-substrate(manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: Analyze C# with CodeQL
🧰 Additional context used
📓 Path-based instructions (4)
scripts/*.ps1
📄 CodeRabbit inference engine (AGENTS.md)
Use the required x64 or ARM64 platform when invoking .NET build and test commands; deploy the MSIX rather than merely building it when validating CmdPal changes.
Files:
scripts/build-raycast-extension.ps1scripts/RaycastLifecycle.ps1scripts/build-raycast-suggest.ps1
.gitignore
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
If using git, do not ignore
**/Properties/launchSettings.jsonor*.pubxml, because these files are required for deployment.
Files:
.gitignore
QuickShell.Raycast/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Require Node.js
>=22.14.0as declared by the project and keep the extension out of the .NET solution.
Files:
QuickShell.Raycast/package.json
QuickShell.Raycast/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Maintain Raycast behavior in parity with Core launch behavior and use the project's Vitest test conventions.
Files:
QuickShell.Raycast/src/__tests__/suggest-commands.test.tsQuickShell.Raycast/src/components/workspace-form.tsxQuickShell.Raycast/src/components/discover-git-repos-view.tsxQuickShell.Raycast/src/lib/suggest-commands.ts
🪛 ast-grep (0.45.0)
QuickShell.Raycast/scripts/ensure-suggest-asset.js
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: require("node:child_process")
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process)
QuickShell.Raycast/src/lib/suggest-commands.ts
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🔍 Remote MCP GitHub Copilot
Additional review context
-
QuickShell.Raycast/src/lib/suggest-commands.tsnow resolvesQuickShell.Suggest.exefrom Raycastassets/(orQUICKSHELL_SUGGEST_EXE), skips CLI lookup on non-Windows unless the env override is set, logs missing-exe / generation-mismatch cases, and lowers the local fallback seed cap toLOCAL_SETUP_SEED_TASKS = 2. -
workspace-form.tsxno longer clears manual-add suggestions; it now resolves them withenvironment.assetsPathand merges seeded tasks + leftover pills viacombineSuggestionTasksAndPills.discover-git-repos-view.tsxpasses the sameenvironment.assetsPathinto the resolver. -
scripts/build-raycast-suggest.ps1publishesQuickShell.Suggest\QuickShell.Suggest.csprojas a single-filewin-x64app intoQuickShell.Raycast/bin/SuggestPublish, then copies it toQuickShell.Raycast/assets/QuickShell.Suggest.exe. That script is now invoked from bothscripts/build-raycast-extension.ps1andscripts/RaycastLifecycle.ps1on Windows. -
QuickShell.Raycast/package.jsonaddsprepublishOnly: node scripts/ensure-suggest-asset.js;predevuses--if-missing, whileprebuildalways regenerates the asset. -
Repo search shows the
resolveWorkspaceSetupSuggestionscallers are localized toworkspace-form.tsxanddiscover-git-repos-view.tsx, andresolveSuggestExecutableis only defined/used insuggest-commands.ts. -
.gitignorenow ignores onlyQuickShell.Raycast/assets/QuickShell.Suggest.exe, and theQuickShell.Raycast/assetsfolder already contains the extension’s existing image assets. -
The README now documents that development requires Node.js 22.14+ and the .NET 10 SDK, and says Windows build/publish flows place
QuickShell.Suggest.exeintoassets/while macOS continues to use local heuristics.
🔇 Additional comments (19)
scripts/build-raycast-suggest.ps1 (1)
1-64: LGTM!scripts/RaycastLifecycle.ps1 (1)
158-167: LGTM!scripts/build-raycast-extension.ps1 (1)
25-31: LGTM!QuickShell.Raycast/src/components/discover-git-repos-view.tsx (1)
1-1: LGTM!Also applies to: 31-31
QuickShell.Raycast/src/components/workspace-form.tsx (1)
4-4: LGTM!Also applies to: 36-40, 180-185, 298-312, 331-331
docs/architecture/forms.md (1)
32-32: LGTM!docs/architecture/intelligence.md (1)
78-78: LGTM!QuickShell.Raycast/scripts/ensure-suggest-asset.js (1)
1-50: LGTM!QuickShell.Raycast/package.json (1)
157-160: LGTM!.gitignore (1)
92-92: LGTM!QuickShell.Raycast/README.md (1)
18-18: LGTM!QuickShell.Raycast/src/lib/suggest-commands.ts (7)
5-15: LGTM!
38-44: LGTM!
81-100: LGTM!
171-186: LGTM!
201-203: LGTM!
213-220: LGTM!
238-238: LGTM!QuickShell.Raycast/src/__tests__/suggest-commands.test.ts (1)
1-8: LGTM!Also applies to: 23-28, 81-92, 115-126
Ensure Store publish builds Suggest.exe, validate CLI payloads before use, and avoid logging local paths on Suggest failures. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Code review by qodo was updated up to the latest commit 44b71a6 |
Parse --generation as long so Date.now() values echo correctly, pass the form request counter into Suggest, and add ensure-raycast-suggest.ps1 for Suggest publish plus Raycast deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Code review by qodo was updated up to the latest commit 2a3c5c4 |
Validate each suggestion pill shape before use, and make the ensure helper safer for smoke-test JSON and SkipDeploy/stop paths. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Code review by qodo was updated up to the latest commit 92bfb64 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@QuickShell.Raycast/src/lib/suggest-commands.ts`:
- Around line 261-269: Update resolveWorkspaceSetupSuggestions and its callers
in workspace-form.tsx so unexpected suggestion-execution errors are caught
rather than rethrown from fire-and-forget flows. Preserve the existing
expected-failure handling, and ensure the mount effect, manual-add branch, and
full-mode branch fall back to local heuristics without producing unhandled
promise rejections.
In `@scripts/ensure-raycast-suggest.ps1`:
- Around line 97-118: Update the Raycast lifecycle flow around
Stop-RaycastProcesses and Start-RaycastApp so both stopping and restarting occur
only when -not $BuildOnly. Keep deployment and build behavior unchanged, and
ensure -BuildOnly neither stops nor launches Raycast regardless of whether a
process was found.
- Around line 83-85: Update the response validation around ConvertFrom-Json in
the smoke-test flow: require $parsed to be an object, generation to equal 1, and
pills to be an array before writing the “Smoke test OK” message. Reject null or
responses missing either property, and preserve the existing success output only
for valid responses.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a6788747-edc6-4e41-aee9-30e17262f884
📒 Files selected for processing (7)
QuickShell.Core.Tests/SuggestCommandLineArgsTests.csQuickShell.Core/Services/SuggestCommandLineArgs.csQuickShell.Raycast/README.mdQuickShell.Raycast/package.jsonQuickShell.Raycast/src/components/workspace-form.tsxQuickShell.Raycast/src/lib/suggest-commands.tsscripts/ensure-raycast-suggest.ps1
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
Trackdubllc/Trackdub(manual)tonythethompson/QuickShell(manual)tonythethompson/numan(manual)tonythethompson/dependency-chain-substrate(manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
- GitHub Check: Analyze Raycast TypeScript with CodeQL
- GitHub Check: Analyze C# with CodeQL
- GitHub Check: Performance harness (artifacts)
- GitHub Check: Raycast lint, test, and build
- GitHub Check: .NET build and test
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{cs,py}
📄 CodeRabbit inference engine (Custom checks)
Keep
SessionWorkflowStagemembers in strictly ascending order:Foundation < MediaLoaded < Transcribed < Diarized < Translated < TtsGenerated. Comparisons must use enum member names rather than raw integer literals. When adding or renumbering members, provide a legacy-compatible JSON converter for old numeric values; when reordering, verify all inequalities across the solution retain their original semantic meaning.
Files:
QuickShell.Core/Services/SuggestCommandLineArgs.csQuickShell.Core.Tests/SuggestCommandLineArgsTests.cs
QuickShell.Core/**/*.cs
📄 CodeRabbit inference engine (AGENTS.md)
Keep
QuickShell.Corefree of CmdPal SDK dependencies; expose domain behavior through host-independent services and interfaces.
Files:
QuickShell.Core/Services/SuggestCommandLineArgs.cs
**/*.cs
📄 CodeRabbit inference engine (AGENTS.md)
**/*.cs: Use namespaces that mirror folders and preserve the repository'sQuickShell.*namespace hierarchy.
Keep one type per file; make most typesinternal, useinternal static classfor stateless helpers, andinternal sealed classfor stateful singletons.
Prefer pure logic ininternal statichelpers and swappable dependencies as interfaces registered through dependency injection.
Use explicit DI factory lambdas where appropriate for AOT and trimming friendliness; avoid reflection-based registration.
Preserve existing#region agent loginstrumentation blocks andAgentDebugLogcalls.
Files:
QuickShell.Core/Services/SuggestCommandLineArgs.csQuickShell.Core.Tests/SuggestCommandLineArgsTests.cs
scripts/*.ps1
📄 CodeRabbit inference engine (AGENTS.md)
Use the required x64 or ARM64 platform when invoking .NET build and test commands; deploy the MSIX rather than merely building it when validating CmdPal changes.
Files:
scripts/ensure-raycast-suggest.ps1
QuickShell.Core.Tests/**/*.cs
📄 CodeRabbit inference engine (AGENTS.md)
QuickShell.Core.Tests/**/*.cs: Use xUnit tests with underscore-separated method names; do not introduce Moq or FluentAssertions.
Prefer real services and the established seams (LaunchExecutorTestEnvironment,FakeShortcutRepository, andAgentCliCatalog.AgentCli...Override) instead of mocks; group tests using shared process-wide seams with[Collection].
Files:
QuickShell.Core.Tests/SuggestCommandLineArgsTests.cs
QuickShell.Raycast/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Require Node.js
>=22.14.0as declared by the project and keep the extension out of the .NET solution.
Files:
QuickShell.Raycast/package.json
QuickShell.Raycast/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Maintain Raycast behavior in parity with Core launch behavior and use the project's Vitest test conventions.
Files:
QuickShell.Raycast/src/components/workspace-form.tsxQuickShell.Raycast/src/lib/suggest-commands.ts
🪛 ast-grep (0.45.0)
QuickShell.Raycast/src/lib/suggest-commands.ts
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🔍 Remote MCP GitHub Copilot
Additional review context
QuickShell.Suggesttargetsnet10.0-windows7.0and the packaging script publishes with--self-contained false, confirming the documented requirement for the .NET 10 Desktop Runtime.- The CLI serializes
generationdirectly in its JSON payload, while PR#139changes parsing tolong; this matches Raycast’s millisecondDate.now()generation values. - The PR’s actual
package.jsonuses an explicit"publish"script invokingensure-suggest-asset.js; repository search found noprepublishOnlyhook. Any documentation or review assumption that publishing is lifecycle-hook based should be corrected. - The platform helper treats only
win32as Windows and onlydarwinas macOS; packaged Suggest execution is therefore intentionally skipped on Linux and macOS unlessQUICKSHELL_SUGGEST_EXEis set.
🔇 Additional comments (8)
QuickShell.Core/Services/SuggestCommandLineArgs.cs (1)
9-9: LGTM!Also applies to: 37-38
QuickShell.Core.Tests/SuggestCommandLineArgsTests.cs (1)
24-36: LGTM!QuickShell.Raycast/package.json (1)
166-166: LGTM!QuickShell.Raycast/README.md (1)
18-18: LGTM!Also applies to: 65-65
scripts/ensure-raycast-suggest.ps1 (1)
1-82: LGTM!Also applies to: 88-96, 121-127
QuickShell.Raycast/src/lib/suggest-commands.ts (2)
5-15: LGTM!Also applies to: 38-46, 175-260, 277-304
82-99: 🩺 Stability & AvailabilityNo issue: malformed pills are filtered before combining
parseSuggestionResponse()already drops pills without a stringcommand, socombineSuggestionTasksAndPills()only receives valid pills on this path.> Likely an incorrect or invalid review comment.QuickShell.Raycast/src/components/workspace-form.tsx (1)
4-4: LGTM! Call sites correctly threadgenerationandenvironment.assetsPaththrough the updatedresolveWorkspaceSetupSuggestions/combineSuggestionTasksAndPillssignatures, and the manual-add branch now surfaces suggestions instead of clearing them, matching the PR's stated behavior. Note: none of these call sites catch a potential rethrow fromresolveWorkspaceSetupSuggestions— see the root-cause comment onQuickShell.Raycast/src/lib/suggest-commands.ts(fetchSuggestionPills) for that concern.Also applies to: 36-40, 178-211, 298-314, 331-331
| $parsed = $stdout | ConvertFrom-Json | ||
| $pillCount = @($parsed.pills).Count | ||
| Write-Host "Smoke test OK: generation=$($parsed.generation), pills=$pillCount" -ForegroundColor Green |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Validate the Suggest response contract before reporting success.
Any parseable JSON—including null or an object without generation/pills—logs “Smoke test OK.” Require an object, generation == 1, and an array-valued pills property before declaring readiness.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/ensure-raycast-suggest.ps1` around lines 83 - 85, Update the response
validation around ConvertFrom-Json in the smoke-test flow: require $parsed to be
an object, generation to equal 1, and pills to be an array before writing the
“Smoke test OK” message. Reject null or responses missing either property, and
preserve the existing success output only for valid responses.
| Write-Host '2/3 Stopping Raycast (so the extension can reload)...' -ForegroundColor Cyan | ||
| $stoppedRaycast = $false | ||
| try { | ||
| Stop-RaycastProcesses | ||
| $stoppedRaycast = $true | ||
| } | ||
| catch { | ||
| Write-Warning "Could not stop Raycast: $($_.Exception.Message)" | ||
| } | ||
|
|
||
| Write-Host '3/3 Building and deploying QuickShell.Raycast...' -ForegroundColor Cyan | ||
| Deploy-RaycastExtension ` | ||
| -ProjectRoot $ProjectRoot ` | ||
| -SkipTests:$SkipTests ` | ||
| -BuildOnly:$BuildOnly ` | ||
| -StartDevServer:(-not $BuildOnly) | ||
|
|
||
| if (-not $NoRestart -and $stoppedRaycast) { | ||
| Write-Host 'Restarting Raycast...' -ForegroundColor Cyan | ||
| if (-not (Start-RaycastApp)) { | ||
| Write-Warning 'Raycast deploy finished but Raycast could not be restarted.' | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Keep -BuildOnly free of Raycast lifecycle side effects.
-BuildOnly still stops Raycast, and $stoppedRaycast becomes true whenever Stop-RaycastProcesses returns—even when no process existed—so lines 114-119 can launch Raycast. Guard both stop and restart blocks with -not $BuildOnly.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/ensure-raycast-suggest.ps1` around lines 97 - 118, Update the Raycast
lifecycle flow around Stop-RaycastProcesses and Start-RaycastApp so both
stopping and restarting occur only when -not $BuildOnly. Keep deployment and
build behavior unchanged, and ensure -BuildOnly neither stops nor launches
Raycast regardless of whether a process was found.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/ensure-raycast-suggest.ps1 (1)
99-110: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winKeep Raycast restarted if deploy fails.
Deploy-RaycastExtensioncan throw afterStop-RaycastProcesses, which skips the restart block and leaves Raycast down. Move the restart intofinallyso it still runs on failure, while preserving-NoRestartand-BuildOnly.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/ensure-raycast-suggest.ps1` around lines 99 - 110, Wrap the deployment flow after Stop-RaycastProcesses in a try/finally block, placing the Raycast restart logic in finally so it executes when Deploy-RaycastExtension throws. Preserve the existing -NoRestart and -BuildOnly conditions and keep the normal deployment behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/ensure-raycast-suggest.ps1`:
- Around line 93-96: Update the SkipDeploy output in the script to print the
resolved Raycast project path derived from the custom ProjectRoot before the npm
command, and reorder the commands so QUICKSHELL_SUGGEST_EXE is set before npm
run dev. Preserve the existing assetPath value and runnable PowerShell
formatting.
---
Outside diff comments:
In `@scripts/ensure-raycast-suggest.ps1`:
- Around line 99-110: Wrap the deployment flow after Stop-RaycastProcesses in a
try/finally block, placing the Raycast restart logic in finally so it executes
when Deploy-RaycastExtension throws. Preserve the existing -NoRestart and
-BuildOnly conditions and keep the normal deployment behavior unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cf69637d-3add-4839-88e9-9aeb1d9afff0
📒 Files selected for processing (3)
QuickShell.Raycast/src/__tests__/suggest-commands.test.tsQuickShell.Raycast/src/lib/suggest-commands.tsscripts/ensure-raycast-suggest.ps1
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
Trackdubllc/Trackdub(manual)tonythethompson/QuickShell(manual)tonythethompson/numan(manual)tonythethompson/dependency-chain-substrate(manual)
📜 Review details
⚠️ CI failures not shown inline (2)
GitHub Actions: CodeQL / Analyze C# with CodeQL: Package Raycast command suggestions
Conclusion: failure
##[group]Run dotnet build QuickShell.sln -c Release -p:Platform=x64 --no-restore --verbosity minimal
�[36;1mdotnet build QuickShell.sln -c Release -p:Platform=x64 --no-restore --verbosity minimal�[0m
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_XMLDOC_MODE: skip
DOTNET_ROOT: C:\Program Files\dotnet
CODEQL_ACTION_FEATURE_MULTI_LANGUAGE: false
CODEQL_ACTION_FEATURE_SANDWICH: false
CODEQL_ACTION_FEATURE_SARIF_COMBINE: true
CODEQL_ACTION_FEATURE_WILL_UPLOAD: true
CODEQL_ACTION_VERSION: 4.37.3
JOB_RUN_UUID: 3d966b07-2632-474a-baa2-7622c8beb577
CODEQL_ACTION_INIT_HAS_RUN: true
CODEQL_ACTION_ANALYSIS_KEY: .github/workflows/codeql.yml:analyze-csharp
CODEQL_WORKFLOW_STARTED_AT:
CODEQL_ACTION_CLI_VERSION_INFO: {"cmd":"C:\\hostedtoolcache\\windows\\CodeQL\\2.26.1\\x64\\codeql\\codeql.exe","version":{"productName":"CodeQL","vendor":"GitHub","version":"2.26.1","sha":"1ffdebae722922fb50a64b14a97789ed6161f4a7","branches":["codeql-cli-2.26.1"],"copyright":"Copyright (C) 2019-2026 GitHub, Inc.","unpackedLocation":"C:\\hostedtoolcache\\windows\\CodeQL\\2.26.1\\x64\\codeql","configFileLocation":"C:\\Users\\runneradmin\\.config\\codeql\\config","configFileFound":false,"overlayVersion":4,"features":{"analysisSummaryV2Default":true,"buildModeOption":true,"bundleSupportsIncludeDiagnostics":true,"bundleSupportsIncludeLogs":true,"bundleSupportsOverlay":true,"databaseInterpretResultsSupportsSarifRunProperty":true,"featuresInVersionResult":true,"indirectTracingSupportsStaticBinaries":false,"informsAboutUnsupportedPathFilters":true,"supportsPython312":true,"mrvaPackCreate":true,"threatModelOption":true,"traceCommandUseBuildMode":true,"v2ramSizing":true,"mrvaPackCreateMultipleQueries":true,"setsCodeqlRunnerEnvVar":true,"sarifMergeRunsFromEqualCategory":true,"forceOverwrite":true,"generateSummarySymbolMap":true,"pythonDefaultIsToNotExtractStdlib":true,"queryServerR...
GitHub Actions: CodeQL / 0_Analyze C# with CodeQL.txt: Package Raycast command suggestions
Conclusion: failure
##[group]Run dotnet build QuickShell.sln -c Release -p:Platform=x64 --no-restore --verbosity minimal
�[36;1mdotnet build QuickShell.sln -c Release -p:Platform=x64 --no-restore --verbosity minimal�[0m
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_XMLDOC_MODE: skip
DOTNET_ROOT: C:\Program Files\dotnet
CODEQL_ACTION_FEATURE_MULTI_LANGUAGE: false
CODEQL_ACTION_FEATURE_SANDWICH: false
CODEQL_ACTION_FEATURE_SARIF_COMBINE: true
CODEQL_ACTION_FEATURE_WILL_UPLOAD: true
CODEQL_ACTION_VERSION: 4.37.3
JOB_RUN_UUID: 3d966b07-2632-474a-baa2-7622c8beb577
CODEQL_ACTION_INIT_HAS_RUN: true
CODEQL_ACTION_ANALYSIS_KEY: .github/workflows/codeql.yml:analyze-csharp
CODEQL_WORKFLOW_STARTED_AT:
CODEQL_ACTION_CLI_VERSION_INFO: {"cmd":"C:\\hostedtoolcache\\windows\\CodeQL\\2.26.1\\x64\\codeql\\codeql.exe","version":{"productName":"CodeQL","vendor":"GitHub","version":"2.26.1","sha":"1ffdebae722922fb50a64b14a97789ed6161f4a7","branches":["codeql-cli-2.26.1"],"copyright":"Copyright (C) 2019-2026 GitHub, Inc.","unpackedLocation":"C:\\hostedtoolcache\\windows\\CodeQL\\2.26.1\\x64\\codeql","configFileLocation":"C:\\Users\\runneradmin\\.config\\codeql\\config","configFileFound":false,"overlayVersion":4,"features":{"analysisSummaryV2Default":true,"buildModeOption":true,"bundleSupportsIncludeDiagnostics":true,"bundleSupportsIncludeLogs":true,"bundleSupportsOverlay":true,"databaseInterpretResultsSupportsSarifRunProperty":true,"featuresInVersionResult":true,"indirectTracingSupportsStaticBinaries":false,"informsAboutUnsupportedPathFilters":true,"supportsPython312":true,"mrvaPackCreate":true,"threatModelOption":true,"traceCommandUseBuildMode":true,"v2ramSizing":true,"mrvaPackCreateMultipleQueries":true,"setsCodeqlRunnerEnvVar":true,"sarifMergeRunsFromEqualCategory":true,"forceOverwrite":true,"generateSummarySymbolMap":true,"pythonDefaultIsToNotExtractStdlib":true,"queryServerR...
🧰 Additional context used
📓 Path-based instructions (2)
QuickShell.Raycast/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Maintain Raycast behavior in parity with Core launch behavior and use the project's Vitest test conventions.
Files:
QuickShell.Raycast/src/__tests__/suggest-commands.test.tsQuickShell.Raycast/src/lib/suggest-commands.ts
scripts/*.ps1
📄 CodeRabbit inference engine (AGENTS.md)
Use the required x64 or ARM64 platform when invoking .NET build and test commands; deploy the MSIX rather than merely building it when validating CmdPal changes.
Files:
scripts/ensure-raycast-suggest.ps1
🪛 ast-grep (0.45.0)
QuickShell.Raycast/src/lib/suggest-commands.ts
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🔍 Remote MCP DeepWiki, GitHub Copilot
Additional review context
- PR
#139changesSuggestCommandLineArgs.TryParsegeneration frominttolong, matching Raycast’s millisecond-scaleDate.now()values; a regression test covers1785335300454. - The packaged executable is published with
dotnet publish --self-contained false -r win-x64 -p:PublishSingleFile=true, so the .NET 10 Desktop Runtime is required at runtime. ensure-suggest-asset.jsis an explicitpublishscript prerequisite; no lifecycleprepublishOnlyhook is shown. It skips non-Windows platforms and validates both the PowerShell exit code and resulting asset.- Runtime lookup precedence is:
QUICKSHELL_SUGGEST_EXE, thenenvironment.assetsPath/QuickShell.Suggest.exe; packaged execution is skipped on non-Windows unless the override is set. parseSuggestionResponserequires numeric finitegeneration, an array of pills, and rejects non-empty payloads containing no valid pills. Generation mismatches and expected process failures fall back to local heuristics.- Related PR
#112adds the searchable command-suggestion dropdown inworkspace-form.tsx; PR#137changes discovered repositories to use full workspace seeding. These overlap directly with PR#139’s suggestion plumbing and discovered-repository call path. - DeepWiki could not provide repository context because
tonythethompson/QuickShellwas not indexed.
🔇 Additional comments (4)
QuickShell.Raycast/src/lib/suggest-commands.ts (1)
38-45: LGTM!Also applies to: 82-98, 167-200, 241-287, 300-330
QuickShell.Raycast/src/__tests__/suggest-commands.test.ts (1)
7-7: LGTM!Also applies to: 24-27, 82-93, 116-126, 141-181
scripts/ensure-raycast-suggest.ps1 (2)
83-85: The response-contract validation issue remains unresolved.Any parseable JSON, including
nullor an object missinggeneration/array-valuedpills, is still reported as a successful smoke test. Validate the expected object shape before logging “Smoke test OK.”
100-102: Keep-BuildOnlyfree of Raycast lifecycle side effects.This is still unresolved from the previous review: guard both stopping and restarting with
-not $BuildOnly, and do not set$stoppedRaycast = $trueunconditionally.Also applies to: 111-115
| Write-Host ' cd QuickShell.Raycast' | ||
| Write-Host ' npm run dev' | ||
| Write-Host (" `$env:QUICKSHELL_SUGGEST_EXE = '{0}'" -f $assetPath) -ForegroundColor DarkGray | ||
| return |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== ensure-raycast-suggest.ps1 around reported lines =="
nl -ba scripts/ensure-raycast-suggest.ps1 | sed -n '1,180p'
echo
echo "== search for ProjectRoot and QUICKSHELL_SUGGEST_EXE usage =="
rg -n "ProjectRoot|QUICKSHELL_SUGGEST_EXE|ensure-raycast-suggest|QuickShell.Raycast" scripts . -g '!**/node_modules/**'Repository: tonythethompson/QuickShell
Length of output: 259
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== top of scripts/ensure-raycast-suggest.ps1 =="
nl -ba scripts/ensure-raycast-suggest.ps1 | sed -n '1,120p'
echo
echo "== exact instruction lines and nearby logic =="
nl -ba scripts/ensure-raycast-suggest.ps1 | sed -n '80,110p'Repository: tonythethompson/QuickShell
Length of output: 252
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
p = Path('scripts/ensure-raycast-suggest.ps1')
text = p.read_text(encoding='utf-8')
for i, line in enumerate(text.splitlines(), 1):
if 1 <= i <= 180:
print(f"{i:4d}: {line}")
PYRepository: tonythethompson/QuickShell
Length of output: 5361
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
p = Path('scripts/ensure-raycast-suggest.ps1')
for i, line in enumerate(p.read_text(encoding='utf-8').splitlines(), 1):
if 1 <= i <= 180:
print(f"{i:4d}: {line}")
PYRepository: tonythethompson/QuickShell
Length of output: 5361
Print the SkipDeploy commands in runnable order
Set QUICKSHELL_SUGGEST_EXE before npm run dev, and print the resolved Raycast path instead of cd QuickShell.Raycast so a custom -ProjectRoot still works.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/ensure-raycast-suggest.ps1` around lines 93 - 96, Update the
SkipDeploy output in the script to print the resolved Raycast project path
derived from the custom ProjectRoot before the npm command, and reorder the
commands so QUICKSHELL_SUGGEST_EXE is set before npm run dev. Preserve the
existing assetPath value and runnable PowerShell formatting.
Summary
Validation
Summary by cubic
Packages the Suggest CLI into the Raycast Windows extension and resolves it from Raycast assets for reliable command suggestions across flows. Adds a manual-create suggestions dropdown, hides it when empty, and hardens payload parsing and failure handling with safe fallbacks.
New Features
QuickShell.Suggest.exeintoQuickShell.Raycast/assetson Windows viapredev/prebuild/publishand deploy/build scripts (scripts/build-raycast-suggest.ps1,QuickShell.Raycast/scripts/ensure-suggest-asset.js,scripts/ensure-raycast-suggest.ps1); the ensure script smoke-tests the CLI and can skip deploy.environment.assetsPath; still supportsQUICKSHELL_SUGGEST_EXEand macOS heuristic fallback (Windows-only packaged CLI).generationand assets path through forms and Discover to avoid mismatches. README notes .NET 10 SDK and the .NET 10 Desktop Runtime.Bug Fixes
QuickShell.Suggest.exeintoassets/; validate Suggest JSON, generation, and pill shape (drop malformed pills, reject corrupt payloads), and handle failures without logging local paths (fallback to heuristics; non-Windows skips the CLI unless overridden).--generationaslongto matchDate.now()and pass the form request counter through Suggest to prevent mismatched responses.Written for commit 92bfb64. Summary will update on new commits.