Skip to content

refactor: merge into single persistent binary using UNUserNotificationCenter#9

Merged
hiskudin merged 6 commits into
mainfrom
refactor/single-binary
Apr 30, 2026
Merged

refactor: merge into single persistent binary using UNUserNotificationCenter#9
hiskudin merged 6 commits into
mainfrom
refactor/single-binary

Conversation

@hiskudin

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the two-binary setup (stack-nudge.app + stack-nudge-panel.app) with a single persistent stack-nudge.app built from the panel sources
  • Migrates from the deprecated NSUserNotification API to UNUserNotificationCenter for proper permission dialogs, alert-style banners, and an Allow action button on permission events
  • Single launchd agent (com.stackonehq.stack-nudge) replaces the panel launcher script + panel agent
  • notify.sh simplified: fire_banner() and find_app_bundle() removed — all events route through the socket to the persistent app
  • App hides itself before calling AppActivator on banner click so focus reverts cleanly before window targeting
  • Stale delivered notifications are cleared on each new event to prevent pile-up
  • Esc closes the panel from any tab; active tab is preserved when reopening
  • panel/Info.plist bundle ID updated to com.stackonehq.stack-nudge

Test plan

  • ./install.sh — builds one app, registers one launchd agent, notification permission dialog appears
  • Trigger a stop hook → banner appears, clicking it focuses the correct editor window
  • Trigger a permission hook → banner with Allow button; clicking Allow approves in Claude Code
  • cmd+opt+n → floating panel opens; Esc closes it; reopening returns to same tab
  • ./uninstall.sh — removes single agent, single app bundle, cleans up completely
  • No stack-nudge-panel.app anywhere after install

🤖 Generated with Claude Code

hiskudin and others added 6 commits April 30, 2026 11:18
…nCenter

- Replace two-binary setup (stack-nudge.app + stack-nudge-panel.app) with
  a single persistent stack-nudge.app built from panel/ sources
- Switch from deprecated NSUserNotification to UNUserNotificationCenter for
  banner delivery — proper permission dialog, alert-style banners, Allow
  action button for permission events
- Remove fire_banner() and find_app_bundle() from notify.sh; all events now
  route through the socket to the persistent app
- App hides itself before calling AppActivator on banner click so focus
  reverts to the previous app before window targeting runs
- Remove stale delivered notifications on each new event to prevent pile-up
- Single launchd agent (com.stackonehq.stack-nudge) replaces the panel
  launcher script + panel agent
- Update Info.plist bundle ID to com.stackonehq.stack-nudge
- Add bannerEnabled to PanelConfig; add onAppend callback to EventStore

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Esc now hides the panel regardless of which tab is active (previously
  it redirected sessions/settings to events first)
- Remove nav.mode reset from hidePanel() so the active tab is preserved
  when the panel is reopened

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…EL migration

- Read STACKNUDGE_ACTIVATE_IMMEDIATELY in PanelConfig; when set, focus the
  source editor immediately on event receipt without showing a banner
- Update notify.conf.example to note that STACKNUDGE_PANEL is no longer
  required (panel is always available via hotkey)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Logic moved to Swift app; no longer needed in notify.sh.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- ci.yml: verify only stack-nudge.app (not the removed panel bundle);
  lint only panel/Info.plist (notifier/ no longer in build)
- Makefile: remove stack-nudge-panel references, update reload target

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@hiskudin hiskudin merged commit f368ffb into main Apr 30, 2026
4 checks passed
@hiskudin hiskudin deleted the refactor/single-binary branch April 30, 2026 09:57
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