Skip to content

feat(ui-core): journey checklist on the project Overview (#289) - #295

Merged
JArmandoAnaya merged 2 commits into
mainfrom
journey/pr2-checklist
Aug 4, 2026
Merged

feat(ui-core): journey checklist on the project Overview (#289)#295
JArmandoAnaya merged 2 commits into
mainfrom
journey/pr2-checklist

Conversation

@JArmandoAnaya

Copy link
Copy Markdown
Contributor

Closes #289. Stacked on #294 (journey/pr1-readiness) — merge that first; this PR's base is that branch so the diff stays its own.

What

The journey Labels → Images → Annotate → Export, as a visible strip on the project Overview.

  • New Checklist pattern (frontend/ui-core/src/patterns/Checklist.tsx, exported from index.ts, specimen in the styleguide). Deliberately not an extraction of IngestScreen's Step: that component mounts only its active step's children and ingest.test.tsx pins the choreography, while a checklist renders every item always. Shared visual language only — numbered markers, data-state="upcoming|active|complete", aria-current="step". One deliberate rule of its own: an upcoming step is plain text even when a callback exists — pointing somebody three steps ahead is how they land on a screen that refuses everything; active and completed steps link (going back is legal).
  • OverviewPanel integration, driven by useProjectReadiness (Add useProjectReadiness hook and normalize the has-schema question #288, PR feat(ui-core): useProjectReadiness — one answer to the journey's where-am-I (#288) #294): rendered above the stat tiles, and above the empty state — a project with nothing ingested is exactly the reader the journey exists for. Steps link via host callbacks: labels → schema tab, images → onIngest, annotate → batches tab, export → onBrowseDataset. While readiness has no answer, nothing renders.
  • ProjectScreen threads the two tab-switch callbacks (onOpenSchema/onOpenBatches) only when the host controls the tabs — an uncontrolled Radix root cannot be moved from outside, and a link that silently does nothing is worse than plain text.
  • Retirement: journeySteps("done") returns null and the strip disappears. "done" is not derivable from live data yet (readiness v1), so the rule is an exported pure function — the imbalanceNote precedent — and the retirement test exercises it directly.

Tests

  • overview.test.tsx +8: one per step state (labels-over-empty-state, images, annotate, export), retirement (journeySteps("done") === null), link wiring incl. the upcoming-is-not-a-link rule, and no-checklist-while-readiness-is-null.
  • Existing suites untouched: screens rendered without schema/batch stubs get a null readiness and no strip.
  • One divergence found by e2e: the styleguide specimen initially sat between the Fields and Tabs sections, and its focusable links broke styleguide.spec.ts's one-Tab-press-to-the-tab-bar test. The specimen now sits below the tabs section, with a comment saying why.

bash scripts/check.sh frontend: All checks passed (ui-core 389 tests / 26 files).
Playwright styleguide.spec.ts navigation.spec.ts shell.spec.ts: 30 passed.

useProjectReadiness composes the three queries the project header already
runs — active schema, project stats, batches — so it costs zero requests
on the project screen, and it is the single spelling of "has a schema"
from here on: the schema-less 404 is an answer, any other failure means
the hook answers null rather than guessing. currentStep walks
labels -> images -> annotate -> export; "done" is declared and waits on
hasReleases and an ingest-in-flight signal, both recorded as out of v1.
A Checklist pattern — every step rendered, one active, finished ones
checked — driven on the project Overview by useProjectReadiness, so the
strip costs no request the header was not already paying for. It renders
above the stat tiles and above the empty state alike, because a project
with nothing ingested is exactly the reader the journey exists for, and
it retires itself at "done". Deliberately not an extraction of the
ingest stepper: that one mounts only its active step and its tests pin
the choreography. An upcoming step is plain text even when a callback
exists — pointing three steps ahead lands somebody on a screen that
refuses everything.
@JArmandoAnaya
JArmandoAnaya changed the base branch from journey/pr1-readiness to main August 4, 2026 04:19
@JArmandoAnaya
JArmandoAnaya merged commit 7fe51bf into main Aug 4, 2026
14 checks passed
@JArmandoAnaya
JArmandoAnaya deleted the journey/pr2-checklist branch August 4, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First-run journey checklist on Overview

1 participant