diff --git a/ui/next.config.ts b/ui/next.config.ts index ca6606c..1ba6d0d 100644 --- a/ui/next.config.ts +++ b/ui/next.config.ts @@ -4,6 +4,8 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { reactStrictMode: true, + // A containerized browser loads the dev server as host.docker.internal. + allowedDevOrigins: ["host.docker.internal"], turbopack: { root: path.dirname(fileURLToPath(import.meta.url)), }, diff --git a/workplans/CONTENT-WP-0002-ui-extraction.md b/workplans/CONTENT-WP-0002-ui-extraction.md index f3131a5..6c47b70 100644 --- a/workplans/CONTENT-WP-0002-ui-extraction.md +++ b/workplans/CONTENT-WP-0002-ui-extraction.md @@ -4,7 +4,7 @@ type: workplan title: "UI extraction and experience skeleton" domain: infotech repo: content-explorer -status: active +status: finished flavor: implementation depends_on: - CONTENT-WP-0000 @@ -16,7 +16,7 @@ state_hub_workstream_id: "55c1d92f-fe1a-552a-998d-2d6905fb6b99" # UI extraction and experience skeleton -Deliver the strongest OnCo-style interaction patterns on generic data. CONTENT-WP-0000 and CONTENT-WP-0001 are finished, so this plan is eligible. T01 through T08 have landed under `ui/`. T08 requires each adapted file to name the OnCo pin, the copyright, and `ui/NOTICE`. T09 is next. See `workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md`. +Deliver the strongest OnCo-style interaction patterns on generic data. CONTENT-WP-0000 and CONTENT-WP-0001 are finished, so this plan is eligible. T01 through T09 have landed under `ui/`. T09 passed a keyboard walk at 1280×800 and 390×844. See `workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md` and `workplans/evidence/CONTENT-WP-0002-Review.md`. ## Work packages @@ -98,7 +98,7 @@ state_hub_task_id: "16172ffd-23e0-5c4f-8cac-2991e589fcdb" ```task id: CONTENT-WP-0002-T09 -status: todo +status: done priority: high state_hub_task_id: "5694c902-f76a-5df2-a309-c0c6333f83cc" ``` diff --git a/workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md b/workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md index 3e44ae5..d4c6ad6 100644 --- a/workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md +++ b/workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md @@ -133,3 +133,24 @@ Checks on 2026-10-13, after T08: - `python3 scripts/check_ui_provenance.py`, `python3 scripts/check_ui_boundary.py`, and `python3 scripts/validate_fixtures.py` passed. Not done: the keyboard and small-screen smoke. A facet key other than `tags` still has no values in these fixtures. + +## T09 — keyboard and small-screen smoke + +The smoke is `workplans/evidence/CONTENT-WP-0002-T09-smoke.json`. It opens the production home page in Chromium at 1280×800 and 390×844. Tab focuses the skip link. Enter lands on `/#main`. The search field receives "Feedback" and Enter. The URL becomes `/?q=Feedback` and the Feedback link is the matching record. Escape clears the query and returns the URL to `/`. + +The browser job protocol accepts Tab, Enter, and Escape. It rejects `/`, so the slash shortcut stays covered by `ui/components/RecordBrowser.states.test.tsx`. + +`next dev` did not hydrate when the browser service closed its websocket, because the dev client waits on the HMR socket. The smoke therefore used `npx next build` and `npx next start --hostname 0.0.0.0 --port 3400` from `ui/`. `allowedDevOrigins` includes `host.docker.internal` so a container can load the dev server. The passing run did not use the dev server. + +The browser was a separate container of image `sha256:8d6fd5a8172cf906bb503642ed620761945c5138b86f6396c36f65cbe6def441` on `127.0.0.1:18084`, with only `http://host.docker.internal:3400` allowed. The fixture container on port 18083 was left running. + +Passed run `99f366b8-2af2-46a6-bedf-a6342e2cb923` at 2026-10-13T21:47:49Z. Playwright 1.64.0, Chromium 156.0.8078.4. All 34 steps passed. At 390px the header wraps onto a second line, the search form stacks, and the kind links scroll sideways. Screenshot hashes: + +- `desktop-3-baseline.png` `1e995d262ca6217e04bf6c17d0e1f089102db3ef3f6a4028aec34074191c0522` +- `desktop-16-keyboard.png` `825187674d958ad08295dff3a28da893a5d2acd86e7e3c19ba9e58f1dc4f128e` +- `narrow-3-baseline.png` `01844c2596ec22815f50a26331778326d4c1b5a4e6846a31c44295e5147fbbd5` +- `narrow-16-keyboard.png` `88986ac815ecda0e75536e04ce85a0ec10eefa7c5ca73274d999fa2c4fe62562` + +The PNGs stayed in `/tmp/content-explorer-t09-smoke-05`. The dev server and the smoke container were stopped after the run. + +A facet key other than `tags` still has no values in these fixtures. diff --git a/workplans/evidence/CONTENT-WP-0002-Review.md b/workplans/evidence/CONTENT-WP-0002-Review.md new file mode 100644 index 0000000..5c103f8 --- /dev/null +++ b/workplans/evidence/CONTENT-WP-0002-Review.md @@ -0,0 +1,9 @@ +# CONTENT-WP-0002 review + +Date: 2026-10-13 + +The plan is complete. Browse, search, filter, sort, and detail work for both example dataspaces. Generic UI imports do not name oncology, cancer, drug, or target. Adapted files name the OnCo pin and point at `ui/NOTICE`. + +R4 was exercised. EntityDetail, the command palette, garden art, and the oncology widgets were not copied. The deviations are in `CONTENT-WP-0002-ImplementationNotes.md`. + +T09 passed as run `99f366b8-2af2-46a6-bedf-a6342e2cb923` against `npx next start --hostname 0.0.0.0 --port 3400`. The spec is `CONTENT-WP-0002-T09-smoke.json`. Both viewports completed the skip-link, search, and Escape sequence. The `/` shortcut is covered by the UI test because the browser protocol does not accept that key. diff --git a/workplans/evidence/CONTENT-WP-0002-T09-smoke.json b/workplans/evidence/CONTENT-WP-0002-T09-smoke.json new file mode 100644 index 0000000..783aa4e --- /dev/null +++ b/workplans/evidence/CONTENT-WP-0002-T09-smoke.json @@ -0,0 +1,29 @@ +{ + "api_version": "1", + "target": "http://host.docker.internal:3400/", + "label": "content-explorer-keyboard-narrow", + "timeout_ms": 120000, + "viewports": [ + { "name": "desktop", "width": 1280, "height": 800 }, + { "name": "narrow", "width": 390, "height": 844 } + ], + "steps": [ + { "action": "visible", "selector": "h1" }, + { "action": "text", "selector": "h1", "value": "Explore a field of knowledge." }, + { "action": "visible", "selector": "input[aria-label='Search records']" }, + { "action": "screenshot", "name": "baseline" }, + { "action": "press", "key": "Tab" }, + { "action": "focused", "selector": "a.skip-link" }, + { "action": "press", "key": "Enter" }, + { "action": "url", "value": "http://host.docker.internal:3400/#main" }, + { "action": "focus", "selector": "input[aria-label='Search records']" }, + { "action": "focused", "selector": "input[aria-label='Search records']" }, + { "action": "fill", "selector": "input[aria-label='Search records']", "value": "Feedback" }, + { "action": "press", "key": "Enter" }, + { "action": "url", "value": "http://host.docker.internal:3400/?q=Feedback" }, + { "action": "text", "selector": "a[href='/systems-thinking/concept/feedback/']", "value": "Feedback" }, + { "action": "press", "key": "Escape" }, + { "action": "url", "value": "http://host.docker.internal:3400/" }, + { "action": "screenshot", "name": "keyboard" } + ] +}