From 4a0a4d1cb43de529925a0f56ae3e2ce9c0ccd6e3 Mon Sep 17 00:00:00 2001 From: NuklearRabbit <145918611+NuklearRabbit@users.noreply.github.com> Date: Sun, 2 Aug 2026 06:42:54 +0200 Subject: [PATCH] docs(state): record Batch 4 completion --- PROJECT_STATE.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/PROJECT_STATE.md b/PROJECT_STATE.md index 8b3d92d..83f1eca 100644 --- a/PROJECT_STATE.md +++ b/PROJECT_STATE.md @@ -426,3 +426,37 @@ any change at `docs/functional-completion/server-baseline.md`. - Deployed to Unraid and re-verified against the live server; demo data reset afterward. - Exact next action: Batch 4 — global search backend + UI, demo reset UI trigger, truthful aggregate integration status (n8n/RAGcore/MCP). + +### Batch 4 — complete (commits `4437b87`, `1867828`) + +- Added `GET /api/v1/search` — bounded typed results (vehicle/booking/data-quality-issue/ + section), role-filtered server-side (data-quality and manager-only sections excluded + for Rental Employee), customers never returned (no customer detail route exists). + Replaced `Layout.tsx`'s blind client-side regex/term guesser with a debounced + (250 ms) call to this endpoint, a real `role="listbox"` results panel, arrow-key + navigation, Enter/Escape, outside-click close, and a no-results state. +- Added `GET /api/v1/integrations/status`, aggregating outbox delivery counts into one + truthful n8n state (`disabled`/`unavailable`/`degraded`/`operational`/`no_evidence`) + instead of the dashboard/automation cards showing whichever status the single most + recent event happened to be in. Wired into both `Automation.tsx` and `Dashboard.tsx`. + MCP Hub card now reflects the real `registration_enabled` setting. +- Found and fixed a real config gap this surfaced: `MCP_HUB_REGISTRATION_ENABLED` was + documented in `.env.example` but had no `Settings` field, so it was silently dropped + by `extra="ignore"` and never read anywhere in the codebase. +- Added a "Reset demo data" action to the sidebar (Operations Manager only, confirm, + progress, error handling) — the endpoint already existed and was already gated, just + had no UI trigger. Reset invalidates the acting session server-side, so the flow signs + the user out and returns to login. +- New regression coverage: backend — search role-filtering/customer-exclusion/no-match, + integration-status role-gate and state-derivation (including a test that resolves all + seeded failures and asserts the state flips to `operational`). Frontend — vehicle/ + booking/data-quality-issue search navigation, keyboard nav, no-results + Escape, demo + reset happy path, rental employee cannot see the reset button, automation page shows + aggregate counts. +- Local evidence: `pytest` 109 passed, `ruff check .` clean, `mypy app` 0 issues/46 files, + `npx tsc -b` clean, `npm run build` clean, `npx playwright test` **37 passed**, stable + across two repeated full-suite runs. +- Deployed to Unraid and re-verified against the live server; demo data reset afterward. +- Exact next action: Batch 5 — bounded outbox delivery-lease recovery for stale + `delivering` events, a second (scheduled quality-scan) n8n workflow, final + documentation/contract updates and acceptance evidence.