Overlay hints for keystrokes/annotations (cast recording + guided lessons) #22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
When recording the documentation/website demos as asciinema casts, keystrokes that cause a visible change but produce no glyph of their own — most notably Tab for completion — are invisible to the viewer. The command line simply jumps from
show data botoshow data bookswith no sign that a key was pressed. The same applies to other control keys (Enter, arrows) and to "here's what just happened" step explanations.asciinema-player has no inline keystroke overlay, and a website-only HTML overlay layered over the player would be fragile — the overlay timings would have to track every recording and break on each re-record. The robust place to solve this is in the app itself: if the app can render an overlay hint, the cast captures it natively and it re-records for free.
Proposal
Add an in-app overlay / annotation layer that can display:
⇥ Tab,↵ Enter, or↑/↓when those keys act; and/orDriven by a deliberately low-profile / "secret" trigger that a scripted cast (or a future guided lesson) can invoke, without it being a normal user-facing command — e.g. a hidden app command, an env var, or a
--flagthat opens an "annotation channel" plus a way to push a specific overlay. The exact trigger mechanism is open for design.Why now / broader value
CLAUDE.md/requirements.md). An overlay/annotation primitive is exactly what a guided lesson needs to point at things and narrate steps — so building it as a general capability rather than a cast-only hack pays off twice.Notes / scope
Implemented in ADR-0047 (Accepted 2026-06-10, implemented 2026-06-11), phased A→B→C plus a flat-rectangle restyle. Commits
f879d54→2d0f4b2onmain.Demonstration mode —
--demoflag /RDBMS_PLAYGROUND_DEMOenv, off by default, zero footprint when off:[TAB]/[ENTER]/[UP]/… over a fixed set of otherwise-invisible keys; re-records for free (the app already sees every key). Auto-expire on a ~1.5 s timer.Ctrl+](a single ASCII byteautocastcan send, unlike arrow keys /Ctrl+!): typed text accumulates invisibly, a secondCtrl+]commits it to a callout (empty commit dismisses). Caption stays until the next keystroke.The help text advertises only the visible badges; the
Ctrl+]caption trigger is kept low-profile per the "secret trigger" framing here. The overlay is a general primitive a future guided-lesson system can reuse.Tests: 2290 passing / 0 failing / 0 skipped; clippy clean. Two
/rundapasses (pre-build + whole-implementation, the latter PASS with no blockers).Follow-up (website branch, out of scope here): wire
casts.mjsto emit^]/text/^]and rely on the automatic badges.Closing as done.