Skip to content

Restructure the CV Passport demo around workflow stages - #15

Merged
VivienP merged 1 commit into
mainfrom
feat/frontend-redesign
Aug 15, 2026
Merged

Restructure the CV Passport demo around workflow stages#15
VivienP merged 1 commit into
mainfrom
feat/frontend-redesign

Conversation

@VivienP

@VivienP VivienP commented Aug 14, 2026

Copy link
Copy Markdown
Owner

What changed

The interactive CV Passport demo is rebuilt around an explicit workflow shell. No API, schema, provenance, or dependency change.

  • Application shell — compact product header carrying the backend-supplied run classification and the evidence-status boundary, a persistent workflow rail, and a focused workspace.
  • Six stages render from the start. Locked stages state what will happen there, so the path from retained bytes to released Package is visible before any action is taken.
  • Derived stage model (frontend/src/workflow/stages.ts) — status and the single next action are computed only from received API results.
  • Failures are attributed to the stage that issued the request. Experiment and validation errors previously surfaced inside the mapping step.
  • Evidence semantics are presented explicitlydata_origin, execution_mode, assertion origin, transformation, requirement class, and value state each render as distinct, labelled tokens; supplements_assertion_id is now shown, so a supplemented assertion is legible next to the assertion it supplements. Status is never carried by colour alone.
  • Design tokens for typography, spacing, surfaces, and state semantics, replacing ad-hoc values. Completion uses a neutral accent rather than a success colour, because completion here means structurally complete, not correct.
  • Reusable primitivesBadge, Callout, KeyValue, Panel, Stage.

Why

The demo is the first thing an unfamiliar reader opens. The previous layout gave no workflow position, mis-attributed failures, and left the distinctions the Passport depends on as unstyled text. Several CSS rules no longer matched the API enums they were written for (origin-source_supplied against source_file), and body { min-width: 760px } made the page unusable on a narrow viewport.

Backend authority preserved

The browser still parses no scientific value, infers no column semantics or metadata origin, evaluates no validation rule, and converts nothing. Plotted values are passed through unchanged; line.simplify: false is now set so Plotly stops dropping collinear points from an evidence view, and hover text repeats the backend's exact decimal strings rather than a float coercion. RHE remains an unvalidated user declaration, and the four evidence concepts stay distinct.

Defect fixed

Version-conflict reporting now precedes the experiment refresh. A slow or failed GET /experiments/{id} previously hid the actionable response and left the passport step stuck in its pending state. This also caused the browser acceptance test to fail intermittently: reproduced on unchanged main in a scratch worktree at 1 failure in 3 runs, and 4 consecutive passes after the change.

Validation

Gate Result
npm run api:check pass, no contract drift
npm run typecheck pass
npm test -- --run 32 passed / 9 files
npm run build pass
scripts/check_frontend_build.py two byte-identical builds, no remote runtime reference
pytest frontend adapter, build gate, demo runtime, evidence, OpenAPI contract 198 passed
docker compose --profile demo up -d --build --wait image rebuilt from source, stack healthy
npx playwright test pass, including CLI parity and independent labbridge package verify

Checked at 1440, 1100, 820 and 420 px. Reduced motion verified. Every interactive control has an accessible name, the document has one h1, and the skip link, rail aria-current, table caption and column scopes are in place.

Follow-up required, not in this branch

  • artifacts/cv-passport-demo/built-assets.json records digests of the previous bundles and no longer describes the shipped frontend; browser-trace.zip and final-package.png in the same artifact depict the old interface. Regenerating them is a separate change, as ROADMAP.md already notes for other stale artifacts.
  • The demo is single-shot against a given database: a second run of the committed fixture reaches POST /experiments and returns HTTP 422 experiment_request_invalid with a raw validation message. Reproduced on unchanged main. README.md and docs/GETTING_STARTED.md do not mention this.
  • The unfamiliar-viewer comprehension record in docs/PROJECT_STATUS.md should be re-taken against this interface.

Known limitations

The JS bundle remains ~1.32 MB, almost entirely Plotly. There is no dark mode. The five-column assertion table scrolls horizontally below roughly 900 px, with an edge-shadow affordance.

The demo is the first thing an unfamiliar reader opens, and its previous
layout did not explain the pipeline it demonstrates: there was no workflow
position, failures from the experiment and validation calls were reported
inside the mapping step, and the origin, transformation, and value-state
distinctions the Passport depends on were rendered as unstyled text.

All six stages now render from the start with a derived status, so the path
from retained bytes to released Package is visible before any action. Stage
status, the next action, and every displayed value come only from received
API results; the browser still parses nothing, infers nothing, and evaluates
no validation rule.

Version-conflict reporting now precedes the experiment refresh. A slow or
failed refresh previously hid the actionable response and left the passport
step stuck in its pending state, which also made the browser acceptance test
fail intermittently on unchanged code.

No API, schema, provenance, or dependency change.
@VivienP
VivienP merged commit 328c13b into main Aug 15, 2026
3 checks passed
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.

1 participant