Skip to content

Guard all five caption-flag fix routes in caption quality review [#583 / #584] #1308

Description

@enjoyandlove

Label: audio-captions

User-facing improvement

A creator flagging a low-confidence term, a cross-talk word, a layout collision, an
over-long line, or a wrong speaker label already gets a "Open …" link to the owning screen —
all five routes are implemented. But none of them are tested: any refactor of the checks
object could drop a route silently. This PR locks in all five routes with a single test file.

Workflow / taste rule it advances

Clean and balance episode audio … accurately captioned. Caption quality is the connective
tissue between audio cleanup, transcript correction, layout checks, and speaker attribution.
Guarding these five outbound routes ensures the episode flow stays coherent when any one of
those screens changes.

Advances #584 P1 (preview smoke tests) and protects #583 P1 (connected preview screens).

Problem

audio-caption-quality-review.html is in EPISODE_FLOW (loads episode-flow-nav.js, linked
from preview/index.html). Its checks object declares fixScreen/fixLabel for every
flag type that is owned by another screen (lines 321–325):

Flag key fixScreen fixLabel
low-confidence transcript-glossary.html "transcript glossary"
crosstalk pause-crosstalk-cleanup.html "pause & cross-talk cleanup"
collision layout-safe-areas.html "layout safe areas"
long-line layout-safe-areas.html "layout safe areas"
speaker-mismatch speaker-attribution-review.html "speaker attribution review"

Lines 395–397 pass routing onto the issue:

if (flag.fixScreen) {
  issue.fixScreen = flag.fixScreen;
  issue.fixLabel = flag.fixLabel;
}

Line 562: openLink.href = issue.fixScreen;

No fix-routing test exists for any of these five routes.

Required file changes

New file: prototype/audio-caption-quality-review-fix-routing.test.js

Four guards — no changes to the HTML file:

  1. Screen is in preview/index.html and episode-flow-nav.js contains "audio-caption-quality-review.html"
  2. All five fixScreen values declared in source (transcript-glossary.html, pause-crosstalk-cleanup.html, layout-safe-areas.html × 2, speaker-attribution-review.html)
  3. All four target files exist via fs.existsSync and are linked from the shell
  4. issue.fixScreen = flag.fixScreen and openLink.href = issue.fixScreen present in source

Verification

node prototype/audio-caption-quality-review-fix-routing.test.js
node preview/shell-coverage.test.js
npm test

No UI change. No preview notes needed.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions