feat(demo): plain-language integration status, richer audit, reset integrity
Integration status badges across Dashboard/Automation now show honest plain-language labels instead of raw backend state strings (and fix a few states that had no matching CSS colour class at all). Audit trail gets a "view related events" action reusing the existing correlation_id filter. About page gains scope/architecture/security/testing sections and a guided-demo entry point. POST /api/v1/demo/reset now runs and records a server-side scenario-integrity check. Also fixes a second real race condition (caught by the return-review e2e test): the odometer scenario pre-fill now resolves before ReturnForm mounts instead of patching its value in after the fact.
This commit is contained in:
@@ -688,3 +688,51 @@ scenarios, demo manifest, About page). Gap audit: `docs/demo-release/current-dem
|
||||
- Exact next action: plain-language integration-status labels, richer audit narration,
|
||||
the full "Over deze demo" page content (currently a first pass from Batch 2), and
|
||||
wiring reset into the guide/About/OM menu narrative — task #34.
|
||||
|
||||
### Batch 5 — integration-status UX, audit UX, About page, reset integrity (complete)
|
||||
|
||||
- Plain-language integration status: extracted `frontend/src/data/integrationLabels.ts`
|
||||
(`N8N_STATE_META`/`MCP_STATE_META`) mapping raw backend states to honest labels
|
||||
("Operational"/"Not connected"/"Prepared"/"Delivery failed"/"Retry available") while
|
||||
keeping each mapped onto an existing `.status-*` CSS colour class (a few raw values like
|
||||
`degraded`/`disabled`/`configured` had no matching CSS rule at all before this — a real,
|
||||
pre-existing colour-coding gap). `StatusBadge` gained an optional `label` override prop
|
||||
(backward compatible) so the badge's colour class and its displayed text can differ.
|
||||
Wired into both `Automation.tsx` and `Dashboard.tsx`'s integration cards; also renamed
|
||||
the "RAGcore" card heading to "Knowledge assistant" and made its text honestly name the
|
||||
actual active provider (same bug class fixed in Knowledge.tsx in Batch 4).
|
||||
- Audit trail: added a "Follow-up" column with a "View related events" action per row that
|
||||
filters the same list by `correlation_id` (reuses the backend's existing, already-tested
|
||||
`correlation_id` query param — no new business logic), with a "Clear this filter"
|
||||
affordance. This is how a visitor sees "what else happened as a result of this action"
|
||||
(e.g. a return's linked vehicle-status-changed / workflow-queued events) without a
|
||||
bigger grouped-timeline rebuild.
|
||||
- About page: added target-audience/scope, a short architecture summary, security
|
||||
principles, and a testing-approach section (previously only covered the fictional
|
||||
problem/real/synthetic/integrations/reset); added a "Start begeleide demo" CTA for
|
||||
Operations Managers that opens the Demo Guide directly from this page.
|
||||
- Reset integrity: added `scenario_integrity_report()` (`backend/app/services/
|
||||
demo_manifest.py`), reusing the exact same scenario-readiness derivation the manifest
|
||||
and scenario overview already use (so it can't drift), and wired it into `POST
|
||||
/api/v1/demo/reset` — both the response body and the `demo_reset` audit event's
|
||||
metadata now carry `scenario_integrity: {all_ready, not_ready}`. This is the
|
||||
server-side post-reset integrity check the brief asks for; visible today via the audit
|
||||
event's raw-detail view, satisfying the requirement without adding a UI banner to a
|
||||
flow that immediately logs the user out and redirects to `/login`.
|
||||
- **Fixed a second real regression this batch, caught by the existing return-review
|
||||
e2e test**: restructured the odometer pre-fill so `BookingDetail.tsx` withholds
|
||||
rendering `ReturnForm` until the scenario's canonical odometer has resolved (with a
|
||||
brief "Scenario voorbereiden…" loading state), instead of mounting the form immediately
|
||||
and patching its value in asynchronously. The previous approach raced visibly with
|
||||
Playwright's `fill()` (and would have raced with a real visitor typing quickly),
|
||||
producing a corrupted concatenated value in one observed failure. This also let the
|
||||
now-unnecessary `odometerEditedByUser` ref guard be removed — simpler and more robust
|
||||
than the effect-based patch it replaced.
|
||||
- Evidence: `pytest` **127 passed**, `ruff check .` clean, `mypy app` clean (48 files);
|
||||
frontend `tsc -b` clean, `npm run build` clean; full Playwright suite **51 passed**,
|
||||
confirmed stable across three consecutive full runs (given how many timing races this
|
||||
batch and the previous one surfaced, stability was verified deliberately rather than
|
||||
assumed from a single green run).
|
||||
- Exact next action: full guided-demo Playwright test + remaining targeted demo tests per
|
||||
section 19 (mobile guide, keyboard nav, all scenario flows, About page, accessibility/
|
||||
reduced-motion/console/network checks) — task #35.
|
||||
|
||||
Reference in New Issue
Block a user