mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-07 03:01:55 +00:00
#5426 took the page pointer router from #5300 at11bc8c56, before #5300 added its guard. The guard on main checks seven named press handlers, eight hit tests called by path and one `router.press(` caller. Planted inside `#[cfg(any())]`, it caught one of five violations: a second `link_hit` in `page_tool_input`, a bare `hit(` in comments' `page_after_text`, `view.router.cancel()` and `press_cancelled = true` in redact_ui all passed. This brings in #5300's rules beside main's press-handler check, in one test, `page_modules_act_on_a_press_only_through_the_router` (fromaef301d82): - only `page_tool_input`, `draw_pages` and `cancel_pointer_gestures` press, settle or cancel the router; - only `cancel_on_escape` ignores a press until the button is up; - every `hit` and `…_hit` call, bare or by path, is in a function allowed to make one, with why; - a `Hit` is made only in a hit test; - an allowlist entry that is no longer used fails the test. It caught all five planted violations, and a stale ROUTER_WRITERS entry. CLAUDE.md's "Page presses" line names the test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>