Skip to content

Add runnable CommandPaletteKitDemo executable - #141

Merged
adamtheturtle merged 1 commit into
mainfrom
fix/issue-42
Aug 23, 2026
Merged

Add runnable CommandPaletteKitDemo executable#141
adamtheturtle merged 1 commit into
mainfrom
fix/issue-42

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Aug 23, 2026

Copy link
Copy Markdown
Owner

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 CommandPaletteView in a sheet (⌘K or a button) with two sample PaletteResult entries. Package.swift now exposes the CommandPaletteKitDemo product pointing at DemoApp.

Reviewed by Cursor Bugbot for commit 5f575e0. Bugbot is set up for automated code reviews on this repo. Configure here.

}
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dfd36be. Configure here.


var body: some Scene {
WindowGroup {
DemoContentView(showingPalette: $showingPalette)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dfd36be. Configure here.

@adamtheturtle
adamtheturtle merged commit d921203 into main Aug 23, 2026
7 of 8 checks passed
@adamtheturtle
adamtheturtle deleted the fix/issue-42 branch August 23, 2026 16:49

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ 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.

Comment thread Package.swift
products: [
.library(name: "CommandPaletteKit", targets: ["CommandPaletteKit"])
.library(name: "CommandPaletteKit", targets: ["CommandPaletteKit"]),
.executable(name: "CommandPaletteKitDemo", targets: ["CommandPaletteKitDemo"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5f575e0. Configure here.

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 runnable demo app target

1 participant