bambuddy/spoolbuddy/tests
maziggy 18238cfeb2 fix(spoolbuddy): apply screen-blank timeout changes live without kiosk restart
Picking a new "Screen Blank Timeout" in SpoolBuddy Settings → Display
  didn't change actual blanking behaviour: whatever value was active when
  the kiosk last booted continued to fire. A user who started with the
  10m preset and switched to 1m or "Off" still saw the screen blank at 10m.

  Cause: blanking is driven by swayidle, started once by spoolbuddy-idle.sh
  at labwc autostart with the timeout passed as a command-line argument.
  The script fetched blank_timeout from the backend exactly once at startup
  and swayidle has no runtime control surface for changing its timeout.
  The daemon's display.set_blank_timeout() updated an in-memory variable
  that was never reached by swayidle, so UI changes were silently discarded
  until the next kiosk restart.

  Fix: extend the wake FIFO protocol with a "reload-timeout N" message.
  The daemon writes it whenever set_blank_timeout() sees a value that
  differs from the current one (the very first call is suppressed because
  the watchdog already fetched the same value at its own startup —
  signalling there would just thrash swayidle on every cold boot). The
  script's FIFO loop is restructured around start_swayidle / stop_swayidle
  helpers and a case statement: wake → wlopm --on + arm a re-blank at the
  current timeout; reload-timeout N → kill running swayidle, set TIMEOUT=N,
  restart swayidle, wlopm --on so the user sees the change took effect
  even if the screen was already blanked. The script de-dupes too — a
  reload-timeout whose N matches the current value is a no-op. Going from
  any positive timeout to 0 ("Off") stops swayidle and doesn't restart
  it; going from 0 to a positive value starts a fresh swayidle. Both work
  without a kiosk restart.

  The script's main loop opens the FIFO read+write (exec 3<>"$WAKE_FIFO")
  so bash read never sees EOF when the daemon momentarily disconnects
  between writes. A cleanup trap on TERM/INT/HUP stops swayidle, removes
  the FIFO, and exits cleanly.
2026-05-05 13:50:08 +02:00
..
__init__.py Added Spoolbuddy frontend/backend tests 2026-03-22 12:55:35 +01:00
test_api_client.py Added Spoolbuddy frontend/backend tests 2026-03-22 12:55:35 +01:00
test_config.py Added Spoolbuddy frontend/backend tests 2026-03-22 12:55:35 +01:00
test_deploy_ssh_key.py fix(spoolbuddy): sync SSH key over heartbeat to survive Bambuddy keypair rotation 2026-05-01 10:44:01 +02:00
test_display_control.py fix(spoolbuddy): apply screen-blank timeout changes live without kiosk restart 2026-05-05 13:50:08 +02:00
test_main.py Draft commit message: 2026-05-03 09:22:35 +02:00
test_tag_parser.py Added Spoolbuddy frontend/backend tests 2026-03-22 12:55:35 +01:00