Detection: netstat lives at /usr/sbin/netstat, not /usr/bin — the hardcoded wrong path silently killed the ESTABLISHED-TCP activator (root cause of the failed live test). Fixed and live-verified. Added peered-UDP activator (5900-5902) for High-Performance sessions, per-signal transition logging, unconditional error logging for dead probe helpers, and probe v2 with full CGSession dictionary diffing. 7 new parser tests (32 total). Fixes from a full audit + adversarial review: idle source setting honored (default now Remote session activity), cover scope reduced to a coherent two-mode model with legacy migration (per-display toggle was inverted in onlyMarked and dead in all), curtain test no longer schedules a teardown over a live session, specific-display password box placement gets a real picker, refuse-to-arm enforced, activation notification posts a real banner, menu password gate bypassed when the event tap is dead, shared single-decoder aerial player with stale-task guard and async playability check, password buffer zeroed on successful unlock and Esc, XPC interruption/invalidation handlers, modern Accessibility settings URL, launchPath modernized, codesign failures now abort release.sh, monotonic CFBundleVersion, install.sh temp cleanup, dead armDisarmHotkey setting removed. Refactor: Curtain.swift and PreferencesWindow.swift split into focused files (largest now 479 lines). Wiki, README, and contributing docs updated to match. Build clean at 0 warnings, 32/32 tests pass.
1.7 KiB
Contributing to Curtain
Thanks for taking the time to help. Curtain is a small, focused macOS menu-bar app, and contributions that keep it that way are welcome.
Building
Curtain is a single Swift Package Manager package. You need a recent Xcode toolchain on macOS 13 or later.
swift build -c release
To build the app bundle, generate the icon, and set up the login item and the optional disconnect helper, run the release script:
Scripts/release.sh
The settings window has a "Test (10s)" button for a quick visual check. For a real test, connect to the machine over Screen Sharing and confirm that remote control works, desk input is dead, a desk keypress raises the password box, the password ends the session, and idle or disconnect locks the Mac and sleeps the displays.
Code style
- One responsibility per file. Match the existing module layout in
Sources/. - Keep the critical invariants intact. The detection path, the physical-vs-remote input split, and the cover window sharing types are load-bearing. Read the wiki before changing them.
- Comment the why, not the what.
Pull requests
- Branch from
mainand keep each PR scoped to one change. - Describe what you changed and why, and how you tested it.
- Make sure the project builds clean before you open the PR.
- Be patient and civil in review. Small, well-explained PRs get merged faster.
No AI attribution
Do not add AI co-author tags, "generated by" notes, or any reference to AI tooling in commits, code, comments, or docs. Commit history and source are attributed to human contributors only.
License
Curtain is MIT licensed. By contributing, you agree that your contributions are licensed under the same terms.