feat(ui-core): journey checklist on the project Overview (#289) - #295
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Checklistpattern (frontend/ui-core/src/patterns/Checklist.tsx, exported fromindex.ts, specimen in the styleguide). Deliberately not an extraction ofIngestScreen'sStep: that component mounts only its active step's children andingest.test.tsxpins 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).OverviewPanelintegration, driven byuseProjectReadiness(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.ProjectScreenthreads 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.journeySteps("done")returnsnulland the strip disappears."done"is not derivable from live data yet (readiness v1), so the rule is an exported pure function — theimbalanceNoteprecedent — 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.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.