Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… native IOKit/IOPM Adds the LiveMonitor port (bounded latest.json, debounced compact writes), native LED/battery/lid/power modules (no ioreg/caffeinate/touch children), and the AppKit status item, menu, LED worker and event socket server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…evert) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er on newer toolchains) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… timers - Lid: IOPMrootDomain general-interest notification (kIOPMMessageClamshellStateChange = 0xE0034100) instead of a 1 s poll; 5 s fallback poll only if registration fails on a machine with a lid. - Battery: IOPSNotificationCreateRunLoopSource refreshes on power-source changes instead of the 15 s refresh. - Volumes: NSWorkspace mount/unmount/rename observers trigger a rescan (plus one 2 s follow-up) instead of a 2 s poll; SIDEPULSE_VOLUMES keeps a 5 s rescan since fake mounts post no notifications. - Time-based transitions: one one-shot NSTimer armed for the next deadline (LiveMonitor::next_transition_at, KeepAwake::grace_deadline), with a 300 s safety refresh (60 s tolerance). - latest.json: debounced one-shot flush 2 s after the first dirty event, plus on shutdown. - SIGTERM/SIGINT: dispatch signal sources on the main queue instead of a 1 s flag check. - LED worker sleeps exactly until the next keepalive (KeepaliveToucher:: next_due) or charging-pulse rewrite instead of a fixed 20 s tick. - Menu is a single NSMenu refilled in place; menuNeedsUpdate: refreshes it so session ages stay current without a timer. - SIDEPULSE_DRY_RUN=1 logs LED writes and keepalive touches instead of doing them. Idle interrupt wakeups: 1.08/s -> 0.27/s (SIDEPULSE_VOLUMES) and 0.13/s (real /Volumes, dry run); CPU 21 -> 2.5-5.7 ms/min; footprint unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dline timers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hd EIO race) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
sidepulse-core(shared logic),sidepulse-hook, newsidepulse-bar(AppKit menu-bar app).monitor.rs: port ofLiveAgentMonitorwith bounded state (6 h / 256 statuses) and debounced compactlatest.jsonwrites.devices/battery/lid/power: native IOKit/IOPM; noioreg,caffeinateortouchchild processes.sidepulse-bar: status item, Agents/Devices/Keep-awake menu, LED worker thread, event socket, sharedsettings.json.scripts/install-bar.shswaps the LaunchAgent from the Python app (with--revert).Why
Python app measured at 509 MB footprint, 3–21% CPU and ~22k idle wakeups per sample; Rust app: 29 MB, ~0% CPU.
Validation
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(85 tests)latest.json(6.9 KB), menu structure verified through Accessibility, clean SIGTERM shutdownsetsockopton a peer-closed socket, which would have dropped every hook eventscripts/install-bar.sh)Risks or follow-up
Not ported: Setup/Settings windows, Screen Bar, composited session icons, brightness slider (25/50/75/100% submenu instead). Next: replace the remaining polling timers with notifications.
🤖 Generated with Claude Code