phase: 01_keyboard_kiosk_control
**Phase 01 final verification pass — complete, 100% green** - Verified all 4 tasks done (files in `complete/`); implementation review: key router in `watch.js`, share-page router, CSS focus/selection affordances, `?` overlay, pointer-free E2E suite — all sound. - Gates: `ruff check` + `ruff format --check` ✅ · `pyright` 0 errors ✅ · `uv run pytest` → 223 passed, 2 skipped (realdisplay), 1 pre-existing FastAPI deprecation warning · `MIRROR_REALDISPLAY=1 pytest -m realdisplay` → 2 passed ✅ · `pytest -m e2e` → 51 passed (incl. `test_keyboard_wall.py`, which a meta-test keeps pointer-free) · `node --check` on all static JS ✅. - Completion criteria: all 6 ✅ (j/k+Enter, f/g/n/p/1–9/m/?/Esc keyboard-only E2E; no hover-only controls via CSS guard + focus-ring E2E; `#name` text-safe; e2e/realdisplay green; key map documented in README "Kiosk client" and `docs/kiosk-silverblue.md`). - README fixed: added missing env vars `MIRROR_MAX_BITRATE`, `MIRROR_PING_INTERVAL`, `DEBUGPY_WAIT` to the config table; added the one-time `rpm-ostree` layering note before the kiosk install snippet. - AGENTS.md fixed: removed stale "roadmap is intentionally empty" parenthetical (3 phases pending); coverage ~94% → ~95%. No content added. - **Unresolved, needs your call:** README/SECURITY.md say `mirror.reeseapps.com`; `docs/kiosk-silverblue.md` (reference-client naming table with real IPs) says `mirror.reeselink.com`. I couldn't verify which is the live deployment domain, so I changed neither — say the word and I'll unify. - Next pending phase: `02_sharp_capture`.
This commit is contained in:
@@ -179,6 +179,38 @@ class TestStylesheet:
|
||||
]
|
||||
assert offenders == []
|
||||
|
||||
def test_a_hidden_control_is_not_revealed_only_by_hover(self):
|
||||
"""Kiosk rule: a control hidden by default must be reachable without a pointer.
|
||||
|
||||
The tile's controls (`.actions`) start at `opacity: 0`. If the only rule
|
||||
that raises them to full opacity were a `:hover` rule, a mouseless kiosk
|
||||
would have no mute/expand controls at all. So while any `.actions` rule
|
||||
hides them, the stylesheet must also contain a `.actions` reveal rule
|
||||
with a non-hover trigger — keyboard focus or the selection state.
|
||||
"""
|
||||
css = re.sub(r"/\*.*?\*/", "", (STATIC / "app.css").read_text(), flags=re.S)
|
||||
actions_rules = [
|
||||
(selector.strip(), body)
|
||||
for selector, body in re.findall(r"([^{}]+)\{([^{}]*)\}", css)
|
||||
if ".actions" in selector
|
||||
]
|
||||
hiding = [
|
||||
selector
|
||||
for selector, body in actions_rules
|
||||
if re.search(r"opacity\s*:\s*0(?![0-9])", body)
|
||||
]
|
||||
non_hover_reveals = [
|
||||
selector
|
||||
for selector, body in actions_rules
|
||||
if re.search(r"opacity\s*:\s*1(?![0-9])", body)
|
||||
and re.search(r":focus-visible|:focus-within|data-selected", selector)
|
||||
]
|
||||
if hiding:
|
||||
assert non_hover_reveals, (
|
||||
f".actions starts hidden ({sorted(hiding)}) but no rule reveals it "
|
||||
"without a pointer — a mouseless kiosk would have no tile controls"
|
||||
)
|
||||
|
||||
|
||||
class TestAddressGate:
|
||||
"""mirror has no accounts; the address is the access control."""
|
||||
|
||||
Reference in New Issue
Block a user