Skip to content

feat: add NSStatusItem (menu bar) mode with popover WebView#5

Closed
vtemian wants to merge 1 commit intoHazAT:mainfrom
vtemian:feat/status-item
Closed

feat: add NSStatusItem (menu bar) mode with popover WebView#5
vtemian wants to merge 1 commit intoHazAT:mainfrom
vtemian:feat/status-item

Conversation

@vtemian
Copy link
Contributor

@vtemian vtemian commented Mar 17, 2026

Adds a menu bar mode to Glimpse. statusItem() creates an icon in the macOS status bar that opens a popover with a WKWebView on click. Same protocol, same bridge, just no window.

glimpse-status-item.mp4

The popover auto-closes when clicking outside (.transient behavior). setTitle() updates the menu bar text dynamically, resize() changes the popover dimensions, and a click event fires when the user clicks the icon.

Swift side: --status-item flag, NSStatusItem + NSPopover with a minimal NSViewController hosting the WebView. Runs as .accessory (no dock icon). Window-only features like follow-cursor are ignored.

Existing open() and prompt() unchanged. Integration test included.

New --status-item CLI flag creates a macOS menu bar status item with an
NSPopover containing a WKWebView, instead of an NSWindow. Adds title and
resize protocol commands, click event, and GlimpseStatusItem Node wrapper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HazAT added a commit that referenced this pull request Mar 17, 2026
feat: add NSStatusItem (menu bar) mode with popover WebView
@HazAT
Copy link
Owner

HazAT commented Mar 17, 2026

Merged manually via local rebase + merge commit to preserve author attribution after rebasing onto main (which had PR #6 merged). All tests pass. Thank you @vtemian! 🎉

@HazAT HazAT closed this Mar 17, 2026
HazAT added a commit that referenced this pull request Mar 17, 2026
Two community contributions ship in this release:

- Menu bar mode by @vtemian (#5): statusItem() API creates a menu bar
  icon with a popover WebView, including setTitle() and resize() methods.

- Open links externally by @joemccann (#6): openLinks/openLinksApp options
  let clicked links escape the WebView to the system browser or a specific
  app. Also adds GLIMPSE_BINARY_PATH env var override.

Folds the previous Unreleased section into the 0.4.0 changelog entry.
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.

2 participants