Skip to content

feat(macos): add tray lifecycle primitives - #2

Open
birdmanmandbir wants to merge 4 commits into
mainfrom
feat/macos-tray-lifecycle
Open

feat(macos): add tray lifecycle primitives#2
birdmanmandbir wants to merge 4 commits into
mainfrom
feat/macos-tray-lifecycle

Conversation

@birdmanmandbir

@birdmanmandbir birdmanmandbir commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • add a native NSStatusItem/NSMenu binding with stable item IDs and explicit callback teardown
  • add opt-in close-to-hide windows, terminal programmatic close, and first-eligible Dock reopen
  • keep the runtime alive when its last window is close-to-hide; preserve normal last-window termination otherwise
  • publish a synchronous pre-Bare-teardown notification for native callback owners
  • preserve exact UTF-8 lengths at the Objective-C bridge and reject NUL-bearing menu strings before mutation
  • add AppKit CTests and a test-only addon that proves exactly-once deletion of real JS references
  • keep native C fixture assertions active in Release builds

Verification

  • npm test: 5 tests, 16 assertions
  • npm run test:native-lifecycle
  • clean Darwin arm64 all-target build
  • explicit bare_runtime target build
  • CTest: window_lifecycle and status_item_lifecycle, with Release assertions enabled
  • source-scoped Prettier and lunte
  • production addon contains no testing hooks

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.

1 participant