Skip to content

test: the page counts the keys it is given, and a timing key waits for the player - #309

Merged
xAlcahest merged 2 commits into
mainfrom
the-page-counts-the-keys
Sep 12, 2026
Merged

xAlcahest merged 2 commits into
mainfrom
the-page-counts-the-keys

Conversation

@xAlcahest

Copy link
Copy Markdown
Collaborator

Summary

layer-owns-the-keyboard.spec.js has been failing on the runner and here, always the same way: T is pressed, the app writes no playback: line at all, and the check waits out its whole timeout. It read as one of the silences under N101, and it is not one. Both beats were regular through it, the page had the keyboard, and a click guard proved no gesture was landing on the X root.

What settled it is a counter. App.tsx now records every keydown the page is given, straight onto the root element, and the check reads it: on the failing run the page had been given the key and the command still did not run. That leaves one thing, and it has a precedent written in this repository: the press lands on a command that is still greyed. timing-play-keys.spec.js paid for this and says so in its own before hook; this file waited only for the transport to be drawn, which is not the player being ready.

Closes N173.

Changes

  • src/App.tsx: the keyboard dispatcher counts every keydown it is given, before any road out of it, on document.documentElement.dataset.keysSeen.
  • e2e/specs/layer-owns-the-keyboard.spec.js: each press now confirms the page was given the key before waiting for what the key does, and the before hook waits for the media's length and for the transport button to come alive, which is what wakes the timing keys.

How to verify by using the app

Nothing changes on screen. The counter is a data attribute the harness reads; it costs no render and no IPC.

Verified on Linux. The spec passes, and the battery it kept failing in passed with it. Proved by a mutation in the build: with the counter not written, the string is gone from the bundle and both checks in that file fail with the page never saw a keydown, which is the message that made the diagnosis in the first place.

One thing stated rather than buried: the battery in that gate run went red on transport-after-open.spec.js, on a five second wait. That file is not touched here, it passes alone, and batteries on this machine started dropping one spec per run at about nine this morning with no behavioural change of mine in between, which reads as the machine rather than the tree.

@xAlcahest
xAlcahest merged commit afaf801 into main Sep 12, 2026
10 of 11 checks passed
@xAlcahest
xAlcahest deleted the the-page-counts-the-keys branch September 12, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant