Files
loki/scripts
g-butandClaude Opus 4.7 8d43bb042b feat(beacon): honor sleep-mode sentinel in handle_stop
Close the loop on Sleep Mode v1. The web-app side (Moon toggle in /control)
already writes /tmp/cockpit-sleep-mode via POST /api/control/sleep-mode and
short-circuits the ReadyBanner countdown to 0 in the browser. The local
stop hook was still launching the popup regardless — so a user who flipped
sleep mode and closed the lid would come back to a stale popup.

Adds a single check between the popup-mode and min-idle gates: if the
sentinel exists, log + exit 0 (matching the existing 'disabled' semantic).
The browser-side ReadyBanner continues to auto-inject as long as Cockpit
is open in any tab — no other change needed for the loop to close.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 20:40:56 +02:00
..