Skip to content

Test coverage gap: only one test file for a ~5,550-line frontend module #18

Description

@carochacs

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions