Skip to content

explore: a reveal-labels module — replace the dead maskSetForReveal and four inline triads #174

Description

@chiptus

Problem

The Schedule reveal level seam sits at the wrong altitude. maskSetForReveal (src/lib/scheduleReveal.ts:34-46) — the function meant to own reveal transformation — has zero app callers (only its own test). Meanwhile every set card pulls the raw canShowDay/Stage/Time booleans and re-derives the identical display decision:

canShowTime ? formatTimeRange(...) : canShowDay && !canShowTime ? formatDayOnly(...) : null
  • src/pages/EditionView/tabs/ArtistsTab/SetCard/SetMetadata.tsx:23-30
  • src/pages/SetDetails/SetInfoCard.tsx:35-41
  • src/pages/SetDetails/MultiArtistSetInfoCard.tsx:42-46
  • src/pages/ExploreSetPage/SetExploreCard/SetCardHeader.tsx:36-37

The module hands out booleans; each caller re-cooks the same reveal→label mapping. The tested surface (maskSetForReveal) is the unused one; the used per-card gating has no tests.

Proposed deepening

A label-producing module — revealLabels(set, level){ dayLabel?, timeLabel?, stage? } — that owns the draft < days < stages < full display invariant. Cards render what they're handed and never see a canShow* boolean. Delete the dead maskSetForReveal.

Relations

Architecture note

Explore ticket from the 2026-07-13 architecture review (candidate 3). Design to be settled in a grilling session before implementation. Vocabulary per /codebase-design.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions