utils/gatelock/gatelock
Krzysztof kuhy Rudnicki e651b1af17 gatelock: split _scrollable.py 495 -> 243 lines across four modules
Cut along concerns rather than line counts, so each file answers one question:

  _scrollfit.py   (180) — does the content fit, and what layout follows?
  _scrollkeys.py  (176) — key/wheel bindings and the six scroll commands
  _userintent.py  (106) — was this focus move the user's doing, or the app's?
  _scrollable.py  (243) — the widget wiring and the public surface

_scrollfit takes an explicit FitTarget bundle rather than the surface, matching
the ArmingCollaborators pattern; UserIntentTracker owns the two fields that
answer "did the user just act?", which is the guard that keeps the viewport
from scrolling itself under someone who touched nothing.

The 45-line module docstring — the three Tk defaults this viewport exists to
prevent, and the failure behind each — moved to docs/scrollable-viewport.md
rather than being trimmed. It is load-bearing rationale, so it is referenced,
not deleted.

389 passed, 100% branch coverage — unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG
2026-08-22 14:28:21 +02:00
..
tests gatelock: split _scrollable.py 495 -> 243 lines across four modules 2026-08-22 14:28:21 +02:00
__init__.py gatelock: promote the priority queue from leetcode_guard 2026-08-21 12:33:43 +02:00
_arbiter.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_arming.py gatelock: split _window.py 571 -> 243 lines across four modules 2026-08-22 14:20:11 +02:00
_config.py gatelock: split _window.py 571 -> 243 lines across four modules 2026-08-22 14:20:11 +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: make fit/scroll geometry tests immune to a real WM 2026-08-21 13:00:20 +02:00
_guards.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_hooks.py gatelock: split _window.py 571 -> 243 lines across four modules 2026-08-22 14:20:11 +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
_preempt.py gatelock: split _window.py 571 -> 243 lines across four modules 2026-08-22 14:20:11 +02:00
_queue.py gatelock: promote the priority queue from leetcode_guard 2026-08-21 12:33:43 +02:00
_recovery.py gatelock 0.4.1: re-focus a surface that comes back after a blip 2026-08-12 22:13:46 +02:00
_root.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
_scrollable.py gatelock: split _scrollable.py 495 -> 243 lines across four modules 2026-08-22 14:28:21 +02:00
_scrollfit.py gatelock: split _scrollable.py 495 -> 243 lines across four modules 2026-08-22 14:28:21 +02:00
_scrollkeys.py gatelock: split _scrollable.py 495 -> 243 lines across four modules 2026-08-22 14:28:21 +02:00
_surfaces.py gatelock v0.2.0: per-output locking, monotonic recovery, N-app arbitration 2026-07-25 14:30:03 +02:00
_userintent.py gatelock: split _scrollable.py 495 -> 243 lines across four modules 2026-08-22 14:28:21 +02:00
_vt.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
_window.py gatelock: split _window.py 571 -> 243 lines across four modules 2026-08-22 14:20:11 +02:00
log_integrity.py Initial gatelock: shared lock-window + HMAC log-integrity backend 2026-06-19 17:39:44 +02:00
widget_group.py gatelock: add shared button, heading/row and WidgetGroup 2026-08-14 23:54:52 +02:00
widgets.py gatelock: add shared button, heading/row and WidgetGroup 2026-08-14 23:54:52 +02:00