Problem
This repo's screen.js is a large, single-file IIFE with an extensively documented lifecycle: panel creation/teardown, per-panel render modes (normal/lyrics/jumping-tab/viz), the follower/pop-out BroadcastChannel protocol, sizeCanvases/resize handling, and per-panel viz controls. Despite that surface area and the detail invested in documenting it in CLAUDE.md, only one test file currently exists in the repo.
Given how many subtle invariants CLAUDE.md calls out explicitly (e.g. "hw.resize override must be set before hw.init()", the canvas context-type lock, the single-flight _handleFollowerSongChange guard, _pendingRedocks/_pendingRebuild deferral), this is exactly the kind of code where regressions are easy to introduce silently and hard to catch by manual testing alone.
Ask
Expand test coverage for the panel lifecycle and follower/pop-out protocol, prioritizing the invariants CLAUDE.md explicitly flags as fragile (re-entrancy guards, single-flight rebuilds, resize-order dependencies). This pairs with the companion CI issue for this repo — tests need a CI workflow to actually run them on every PR once they exist.
Migrated from Maestro-Ltd/slopsmith-plugin-splitscreen#18.
Problem
This repo's
screen.jsis a large, single-file IIFE with an extensively documented lifecycle: panel creation/teardown, per-panel render modes (normal/lyrics/jumping-tab/viz), the follower/pop-outBroadcastChannelprotocol, sizeCanvases/resize handling, and per-panel viz controls. Despite that surface area and the detail invested in documenting it in CLAUDE.md, only one test file currently exists in the repo.Given how many subtle invariants CLAUDE.md calls out explicitly (e.g. "
hw.resizeoverride must be set beforehw.init()", the canvas context-type lock, the single-flight_handleFollowerSongChangeguard,_pendingRedocks/_pendingRebuilddeferral), this is exactly the kind of code where regressions are easy to introduce silently and hard to catch by manual testing alone.Ask
Expand test coverage for the panel lifecycle and follower/pop-out protocol, prioritizing the invariants CLAUDE.md explicitly flags as fragile (re-entrancy guards, single-flight rebuilds, resize-order dependencies). This pairs with the companion CI issue for this repo — tests need a CI workflow to actually run them on every PR once they exist.
Migrated from Maestro-Ltd/slopsmith-plugin-splitscreen#18.