Repository navigation
feat: add widget packages that contain no commands - #34
Merged
Merged
Conversation
This was referenced Oct 16, 2026
This was referenced Oct 16, 2026
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #32. A widget package that only shows native data still needed a command review, because nothing stopped a package from running commands, and every click was a shell command, even the calendar's Join.
Changes
"kind": "widgets"inpackage.json. Its configuration may contain onlytokens,defaults,bar,groups,profiles,widgets,templates,popupsandproviders, and no key that runs a command (command,onClick,onClickField, mouse and scroll actions,onChange) or setsenvironment, at any depth. StableBar checks this at review, install and load, as it does for themes. Such a package is enabled throughpackages. Built-in widgets keep their behaviour: aworkspaceswidget still talks to AeroSpace or yabai with StableBar's own arguments.--inspect-packagesay the package contains no commands instead of listing them.openon widgets, andopen/openFieldon popup and layout blocks: anhttp,https,mailtoorx-apple.systempreferencesURL, or an app's bundle identifier, opened through NSWorkspace without a shell. A configured value outside these is a configuration error; a field value outside them does nothing when clicked. A widget can't combineonClickwithopen, and a block can't combine either command key with either open key. A popup or menu keeps precedence. Anopenin a popup closes it whendismissOnActionis true.openField: "link"), the schema, andexamples/packages/system-monitor.Testing
swift test: all tests pass, including new cases for rejected keys at every depth, install, loading throughpackages, refusal throughtheme,openerrors and uppercase URL schemes.--inspect-package,--install-packageand--validatewith scratch configurations for the example and the README's clock and calendar examples.opentargets hasn't been tried by hand yet.Merging
A merge commit, so each commit stays in the changelog. #35 and #36 are stacked on this branch.
Claude Opus 5.5 via Claude Code, reviewed by GPT-6.1-Sol via Codex.