Files
ontime/apps
Claude 37fab6a12d refactor(teleprompter): remove duplicated knowledge the compiler cannot police
A maintenance pass over the view, aimed at the places where a later change
would go wrong quietly rather than fail.

Every option default existed three times: the declaration the params editor
renders, the fallback the parser applies, and a fallback in the stylesheet that
nothing could reach because the view always sets the variable. Editing one left
the editor showing a value the view was not using. Defaults and bounds now live
in one object which both the declaration and the parser read, and the dead
stylesheet copies are gone. A test asserts that parsing an empty query returns
exactly what the editor declares, so the two cannot drift apart again.

That test found the first case immediately: the script source declared a
default of none but parsed to null. It is now none in both, which also takes a
null out of the options type and a branch out of the view.

The speed step was a constant in the keymap and a literal in the overlay, so
the buttons would have kept stepping by two if the constant ever changed. Both
now read the same export.

The line height was measured by looking up an element by a data attribute set
in another file. Removing that attribute would not have failed, it would have
fallen back to a guess which happens to be correct at the default line height
and wrong at any other. The measurement now reads the element the hook already
holds, which is where the stylesheet sets the line height. Confirmed against
the browser: at double the line height the script travels 1.98 times as far.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb8RVPNQ2ETPJxdy4b8CHf
2026-08-15 09:46:07 +00:00
..
2026-08-09 10:44:13 +02:00
2026-08-09 10:44:13 +02:00
2026-03-08 16:22:12 +01:00