polish: rebrand to Fleet Ops, add trilingual i18n, adaptive demo guide, and UX overhaul

Rebrands the product from MobilityOps to Fleet Ops across the UI, backend defaults and
knowledge base, and makes nl-BE/en-GB/fr-BE full first-class languages: i18next with
eager-bundled per-namespace resources, a persisted accessible language switcher (topbar
and mobile drawer), locale-aware date/number formatting, and a coverage test that fails
the build on any missing or empty translation key.

Backend dynamic content (demo scenarios, blocked-reason text, integration status) moves
from fixed English/Dutch prose to stable message codes + params so the frontend can
localize it; the demo knowledge base gains a fully translated NL/EN/FR procedure corpus
(11 documents each) with per-language retrieval and localized evidence-state messages.

The Demo Guide becomes breakpoint-adaptive: a docked rail on extra-wide desktop, a
floating panel that auto-collapses to a persistent, closable progress chip on standard
desktop/tablet, and a collapsed/half/full bottom sheet on mobile -- with scroll+focus+
highlight on "go to this step", Escape handling, and reduced-motion support.

The Data Quality Workbench gets accessible choice-card decisions with a clear primary/
secondary/tertiary action hierarchy; the Automation ledger groups repeated successes and
uses meaningful short refs; the Audit trail groups events by correlation id with human
action labels and readable before/after diffs. Attention Queue, Today's movements,
Vehicles, Bookings and Data Quality rows are fully clickable (stretched-link pattern)
with independent secondary links, keyboard support and mobile touch targets.

Fixes a topbar overflow on mobile caused by the new language switcher (moved into the
mobile drawer at <=960px) and two dangling aria-labelledby references introduced this
session. Updates all affected Playwright specs for the new nl-BE default and the new
Audit/DemoGuide DOM structure, and adds new i18n-coverage, demo-guide-adaptive and
clickable-rows specs. 131 backend tests, Ruff and mypy, and 71 Playwright tests pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
NuklearRabbit
2026-08-03 18:33:22 +02:00
co-authored by Claude Sonnet 5
parent 257a4cf6c0
commit 337f8716bb
127 changed files with 5529 additions and 1287 deletions
+10 -6
View File
@@ -5,10 +5,14 @@ async function resetDemoData(request: APIRequestContext) {
await request.post("/api/v1/demo/reset");
}
// This file's assertions were authored against the English UI copy; nl-BE is now the
// app's default for a fresh session, so force English explicitly rather than rewriting
// every assertion (the equivalent Dutch/French coverage lives in the i18n-specific specs).
test.beforeEach(async ({ page, request }) => {
await resetDemoData(request);
await page.addInitScript(() => localStorage.setItem("fleetops.language", "en-GB"));
await page.goto("/login");
await page.getByRole("button", { name: "Verken als Operations Manager" }).click();
await page.getByRole("button", { name: "Explore as Operations Manager" }).click();
await expect(page).toHaveURL(/\/dashboard$/);
});
@@ -22,7 +26,7 @@ test("control-centre shell exposes landmarks, persisted readiness and active nav
test("global search supports its keyboard shortcut and finds a vehicle by reference", async ({ page }) => {
await page.keyboard.press("Control+k");
const search = page.getByRole("combobox", { name: "Search MobilityOps" });
const search = page.getByRole("combobox", { name: "Search Fleet Ops" });
await expect(search).toBeFocused();
await search.fill("MO-024");
const result = page.getByRole("option", { name: /MO-024/ });
@@ -33,7 +37,7 @@ test("global search supports its keyboard shortcut and finds a vehicle by refere
});
test("global search supports arrow-key navigation and Enter to select", async ({ page }) => {
const search = page.getByRole("combobox", { name: "Search MobilityOps" });
const search = page.getByRole("combobox", { name: "Search Fleet Ops" });
await search.fill("fleet");
await expect(page.getByRole("option", { name: /Fleet/ })).toBeVisible();
await search.press("ArrowDown");
@@ -42,7 +46,7 @@ test("global search supports arrow-key navigation and Enter to select", async ({
});
test("global search shows a no-results state and closes on Escape", async ({ page }) => {
const search = page.getByRole("combobox", { name: "Search MobilityOps" });
const search = page.getByRole("combobox", { name: "Search Fleet Ops" });
await search.fill("zzz-nothing-matches-zzz");
await expect(page.getByText(/No matches for/)).toBeVisible();
await search.press("Escape");
@@ -50,7 +54,7 @@ test("global search shows a no-results state and closes on Escape", async ({ pag
});
test("global search finds a booking and a data-quality issue by reference", async ({ page }) => {
const search = page.getByRole("combobox", { name: "Search MobilityOps" });
const search = page.getByRole("combobox", { name: "Search Fleet Ops" });
await search.fill("BK-DEMO-RETURN");
const bookingResult = page.getByRole("option", { name: /BK-DEMO-RETURN/ });
await expect(bookingResult).toBeVisible();
@@ -83,7 +87,7 @@ test("return review separates capture from irreversible commit", async ({ page }
// The review step is server-evaluated (not client-guessed), so exactly one non-mutating
// preview call is expected before any commit.
expect(previewRequests).toBe(1);
await expect(page.getByText("Queue n8n delivery after the local commit")).toBeVisible();
await expect(page.getByText("Queue automation after the local commit")).toBeVisible();
await page.getByRole("button", { name: "Edit details" }).click();
await expect(page.getByLabel("End odometer (km)")).toHaveValue("60000");