Add runnable CommandPaletteKitDemo executable - #141
Conversation
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Demo app never becomes active
High Severity
The SPM executable never sets NSApp's activation policy to .regular or activates the app. Launched via swift run, the process stays a command-line app: the window can stay behind the terminal, never appear in the Dock, and fail to take keyboard focus—so ⌘K and palette navigation go to the terminal instead of the demo.
Reviewed by Cursor Bugbot for commit dfd36be. Configure here.
|
|
||
| var body: some Scene { | ||
| WindowGroup { | ||
| DemoContentView(showingPalette: $showingPalette) |
There was a problem hiding this comment.
Palette state shared across windows
Medium Severity
showingPalette lives on the App and is bound into every WindowGroup window. Opening or dismissing the palette (via the menu command or the in-window button) therefore drives the sheet in all open windows at once, which is incorrect for a multi-window macOS WindowGroup.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit dfd36be. Configure here.
dfd36be to
80d73af
Compare
80d73af to
5f575e0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5f575e0. Configure here.
| products: [ | ||
| .library(name: "CommandPaletteKit", targets: ["CommandPaletteKit"]) | ||
| .library(name: "CommandPaletteKit", targets: ["CommandPaletteKit"]), | ||
| .executable(name: "CommandPaletteKitDemo", targets: ["CommandPaletteKitDemo"]) |
There was a problem hiding this comment.
Demo executable not macOS-scoped
Medium Severity
The new CommandPaletteKitDemo executable product and target are declared without any macOS-only scoping, while the package still advertises iOS and tvOS. Executable/tool products cannot be built for those SDKs (com.apple.product-type.tool), so full-package or SPI-style builds for iOS/tvOS can fail even though the PR is a macOS demo. .spi.yml was also left without a library-only scheme, which increases that risk.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 5f575e0. Configure here.


Adds a macOS demo app target showcasing sheet presentation and sample commands. Closes #42
Note
Low Risk
Demo-only SwiftUI target and Package.swift product wiring; no library API or security-sensitive changes.
Overview
Adds a runnable CommandPaletteKitDemo SwiftPM executable so the palette can be tried without a separate host app.
The demo is a small SwiftUI window that opens
CommandPaletteViewin a sheet (⌘K or a button) with two samplePaletteResultentries.Package.swiftnow exposes theCommandPaletteKitDemoproduct pointing atDemoApp.Reviewed by Cursor Bugbot for commit 5f575e0. Bugbot is set up for automated code reviews on this repo. Configure here.