utils/gatelock/gatelock
Krzysztof Rudnicki 28ced1d39a Cover the last branches of the viewport, the density scale and the keys
gatelock has never met its own 100% bar; _scrollable.py in particular shipped
with no tests at all, which is how a viewport that scrolled itself passed
every check for a week. The remaining gaps were the ones a reader would most
want proven:

* finalize() is documented idempotent -- a repaint calls it again, and an
  earlier version stacked a <FocusIn> handler per call.
* scroll_into_view holds still for a widget already fully on screen. Its
  margin logic has three outcomes and "hold" is the one a jittering viewport
  gets wrong.
* the type scale reads an existing Tk root rather than opening a second one
  next to a live lock window.
* bind_cancel rejects a non-callable at bind time, not on the keypress that
  finally needed Escape to work.

328 tests, coverage 99.44% -> 100.00%.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BsXnTHyuuCUZsqetTaajcF
2026-08-03 16:20:11 +02:00
..
tests Cover the last branches of the viewport, the density scale and the keys 2026-08-03 16:20:11 +02:00
__init__.py gatelock 0.4.0: the viewport moves for the user and nobody else 2026-08-03 15:50:51 +02:00
_arbiter.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_density.py gatelock 0.4.0: the viewport moves for the user and nobody else 2026-08-03 15:50:51 +02:00
_detect.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_escape.py gatelock: extract the shared escape-hatch core 2026-07-25 15:35:20 +02:00
_fitcheck.py gatelock 0.4.0: the viewport moves for the user and nobody else 2026-08-03 15:50:51 +02:00
_guards.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_keyboard.py Make lock surfaces keyboard-operable and safe on a 768px screen 2026-07-30 16:01:15 +02:00
_outputs.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_recovery.py Stop the recovery tick stealing our own grab, and fix pre-commit for the monorepo 2026-07-26 15:08:41 +02:00
_root.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
_scrollable.py gatelock 0.4.0: the viewport moves for the user and nobody else 2026-08-03 15:50:51 +02:00
_surfaces.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_vt.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
_window.py gatelock 0.4.0: the viewport moves for the user and nobody else 2026-08-03 15:50:51 +02:00
log_integrity.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00