Skip to content

feat: add widget packages that contain no commands - #34

Merged
Seb-GRAF merged 4 commits into
mainfrom
feat/no-command-packages
Oct 16, 2026
Merged

Seb-GRAF merged 4 commits into
mainfrom
feat/no-command-packages

Conversation

@Seb-GRAF

@Seb-GRAF Seb-GRAF commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

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" in package.json. Its configuration may contain only tokens, defaults, bar, groups, profiles, widgets, templates, popups and providers, and no key that runs a command (command, onClick, onClickField, mouse and scroll actions, onChange) or sets environment, at any depth. StableBar checks this at review, install and load, as it does for themes. Such a package is enabled through packages. Built-in widgets keep their behaviour: a workspaces widget still talks to AeroSpace or yabai with StableBar's own arguments.
  • The Packages tab and --inspect-package say the package contains no commands instead of listing them.
  • open on widgets, and open/openField on popup and layout blocks: an http, https, mailto or x-apple.systempreferences URL, 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 combine onClick with open, and a block can't combine either command key with either open key. A popup or menu keeps precedence. An open in a popup closes it when dismissOnAction is true.
  • README (packages, mouse actions, popup blocks, and the Calendar example, which now joins with openField: "link"), the schema, and examples/packages/system-monitor.

Testing

  • swift test: all tests pass, including new cases for rejected keys at every depth, install, loading through packages, refusal through theme, open errors and uppercase URL schemes.
  • --inspect-package, --install-package and --validate with scratch configurations for the example and the README's clock and calendar examples.
  • Reviewed by a second model, GPT-6.1-Sol via Codex. Its findings on the wording and on uppercase URL schemes are fixed here.
  • In a scratch instance, the Packages tab shows an installed widgets package as containing no commands, and widgets packages from the store draw on the bar. Clicking open targets 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.

@Seb-GRAF
Seb-GRAF merged commit c0ec91e into main Oct 16, 2026
4 checks passed
@Seb-GRAF
Seb-GRAF deleted the feat/no-command-packages branch October 16, 2026 10:00
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a widget package kind that runs no commands

1 participant