From 22d9955ca53c630f0f8d99e248213d9abc408deb Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 27 Aug 2026 10:37:51 +0000 Subject: [PATCH 1/4] Add a topic-grouped mockup index to mockups/README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Catalogues all 84 mockup routes by topic with a status (prototype app, chosen design, active study, redirect, or superseded draft), so the accumulated design-scratch pages under src/app/mockups/ can be scanned at a glance instead of opened one by one. Identifies six early favourites-page studies as safe-to-remove (already recorded elsewhere in this file as superseded, confirmed here to have no other route depending on them) — pending separate approval before deletion. --- mockups/README.md | 148 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/mockups/README.md b/mockups/README.md index 7ef0d3a981..9156259b25 100644 --- a/mockups/README.md +++ b/mockups/README.md @@ -11,6 +11,154 @@ npm run sitemap:update npm run sitemap:check ``` +## Mockup index, by topic + +A quick-scan catalogue of every route under `src/app/mockups/` and what state it's in, so +nobody has to open 84 folders to find out what's still useful. `docs/site-map.md` remains +the authoritative list of exact live paths (regenerate it after any change here); this +table exists to group those paths by topic and record a status for each one. + +**Status key** — _Prototype app_: a full working tool, not a design sketch, out of scope +for cleanup. _Chosen design_: the direction that was picked; still runnable for reference. +_Active study_: still-relevant design work with no single "winner" yet, or reference +material behind a chosen design. _Redirect_: a legacy URL kept for compatibility. +_Superseded — recommend removing_: explicitly and in writing replaced by a later version, +with no other mockup depending on it. _Parallel draft, no recorded winner_: one of several +competing drafts on the same brief where nothing in the repo says which one (if any) was +picked — kept as-is rather than guessed at. + +### Full prototype apps (out of scope for cleanup) + +| Route | What it is | +| --- | --- | +| `development/**` | Developer hub — reads repo status (docs index, ingestion status, task ledger, review records, route map). Linked from Settings for signed-in admins. | +| `care-plan/**` | Fully synthetic care-planning prototype (management/patient/safety plans, presentations, review), richly cross-linked. | +| `caring-contacts/**` | Fully synthetic Caring Contacts coordination prototype. | +| `ward-flow/**` | Synthetic ward patient-flow prototype (capacity, discharge board, escalation, handover, live vehicle tracker, etc.), cross-linked via its own sidebar nav. | + +### Redirects + +| Route | Forwards to | +| --- | --- | +| `favourites-hub` | `/favourites` | +| `medication-prescribing` | `/medications/acamprosate` | + +### Favourites page + +| Route | Status | +| --- | --- | +| `favourites-phone-perfected` | Chosen design (2026-08-27) — see the write-up above. | +| `favourites-command-console` | **Superseded — recommend removing.** One of six earlier studies this README already records as replaced by `favourites-phone-perfected`. | +| `favourites-command-desk` | **Superseded — recommend removing.** Same as above. | +| `favourites-library-view` | **Superseded — recommend removing.** Same as above. | +| `favourites-review-console` | **Superseded — recommend removing.** Same as above. | +| `favourites-set-board` | **Superseded — recommend removing.** Same as above. | +| `favourites-set-navigator` | **Superseded — recommend removing.** Same as above. | + +These six only ever link to each other (three of them share one comparison-tab component, +`favourites-page-mockups/favourites-library-redesign-page.tsx`; the other three share +`favourites-page-mockups/favourites-page-mockup-page.tsx`) — nothing else in the app imports +either file, so removing all six routes together removes that whole folder cleanly. + +### Services filter surface — three sequential rounds, keep together + +| Route | Status | +| --- | --- | +| `services-filter-refined` | Round 1. Round 2 imports its facet engine, chips and sheet shell — do not remove independently. | +| `services-filter-options` | Round 2, builds on round 1's code. | +| `filter-sheet-restyle` | Round 3, a craft pass on the same decision. | + +### Tools page + +| Route | Status | +| --- | --- | +| `tools-search-mode` | Chosen design — "Perfected Tools search mode" per this README. | +| `tools-search-directions` | Active reference — grounds tracked issue `#162`. | +| `tools-action-workbench`, `tools-clinical-lanes`, `tools-command-center`, `tools-split-clinical-brief`, `tools-split-compact-sheet`, `tools-split-pane`, `tools-split-safety-deck`, `tools-task-directory`, `tools-workflow-board` | Parallel drafts, no recorded winner — nine different Tools-page layout directions. | + +### Privacy page + +| Route | Status | +| --- | --- | +| `privacy-live-signal-perfected` | Chosen design. | +| `privacy-page-directions` | Active reference — the full study behind the chosen design. | + +### Document navigation pane — five rounds, no recorded winner + +`document-navigation-contract`, `document-navigation-final`, `document-navigation-final-review`, +`document-navigation-pane`, `document-navigation-perfected` — parallel drafts on the same +brief. Nothing in the repo states which (if any) is final, so all five are kept pending a +design decision rather than guessed at from the names. + +### Document phone chrome — four rounds, no recorded winner + +`document-phone-fused-directions`, `document-phone-title`, `document-phone-title-refined`, +`document-phone-zero-chrome` — same situation as above. + +### Document search & viewer + +| Route | Status | +| --- | --- | +| `document-search` (+ `search`, `source`, `source/evidence`, `source-overlays`) | Active reference — the master runnable document-search flow; `source-overlays` hands off into the real document viewer. | +| `document-search-evidence-lens` | Parallel draft, no recorded winner. | +| `document-search-triage-board` | Parallel draft, no recorded winner. | +| `document-top-navigation` | Active study — three nav concepts shown side by side, not competing routes. | +| `document-image-status` | Fixture backing a component test — keep. | +| `accessible-table-browser-fixture` | Fixture backing a component test — keep. | + +### Dictionary browse header — three rounds, no recorded winner + +`dictionary-browse-header`, `dictionary-browse-header-compact`, `dictionary-control-row` — +see the dated write-ups below; each attacks a different part of the same header and none is +recorded as the final pick. + +### Search chrome & composer + +`search-band-directions`, `search-heading`, `search-lens-menu`, `search-refine-adaptive`, +`mode-dropdown`, `phone-inpage-navigation`, `recent-searches-bottom`, `pinned-plus-menu`, +`universal-search-command`, `universal-search-redesign`, `sidebar-live` — parallel drafts, +no recorded winner for any of them. + +### Calculators + +`calculators-bedside-sheet`, `calculators-clinical-console`, `calculators-directory-grid`, +`calculators-guided-flow`, `calculators-popup-sheet`, `calculators-search`, +`calculators-search-page`, `calculators-show-all` — parallel drafts, no recorded winner. + +### Settings + +`settings-search-clinical`, `settings-search-general`, `settings-search-privacy` — parallel +drafts, no recorded winner. + +### Answer / chat + +`answer-chat-perfected`, `answer-chat-perfected-v2`, `answer-chat-redesign`, +`answer-home-proposal`, `answer-evidence-popups` — parallel drafts. `answer-chat-perfected-v2` +looks by name like it replaces `answer-chat-perfected`, but nothing in the repo says so in +writing, so both are kept — worth a quick human check rather than a removal in this pass. + +### Factsheets + +`factsheets-compact-view`, `factsheets-topics-phone` — parallel drafts, no recorded winner. + +### Therapy navigation + +`therapy-navigation-context`, `therapy-navigation-dock`, `therapy-navigation-rail` — three +named directions, cross-linked to each other for comparison, no recorded winner. + +### One-off studies + +| Route | Status | +| --- | --- | +| `also-matches-accents` | Chosen design — records the picked "also matches" accent treatment. | +| `verification-notice-subtle` | Active study, no recorded winner. | +| `warning-consolidation` | Active study — first pass on consolidating warning lines. | +| `warning-line` | Active study — second pass answering a narrower, different brief (words only, no icon/border/tint); not a replacement for the first pass. | +| `phone-mode-sheet-yes` | Active study — design review of the shipping phone mode sheet. | + +Static (non-route) design comps under `public/mockups/mode-page-redesign-2026-07/` are +already documented below and are not part of this route index. + ## Design tokens Mockups use the Clinical White / Sky Graphite role tokens (`--command`, `--clinical-accent`, `--success`) from [`docs/redesign/02-design-direction.md`](../docs/redesign/02-design-direction.md). Older design-exploration mockups were removed in July 2026 so stale palettes do not mislead future design review. From b639747325ae99f242bdc525fd220ebc812834d2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 27 Aug 2026 10:39:34 +0000 Subject: [PATCH 2/4] Format mockup index tables with Prettier --- mockups/README.md | 86 +++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/mockups/README.md b/mockups/README.md index 9156259b25..62233950c8 100644 --- a/mockups/README.md +++ b/mockups/README.md @@ -29,31 +29,31 @@ picked — kept as-is rather than guessed at. ### Full prototype apps (out of scope for cleanup) -| Route | What it is | -| --- | --- | -| `development/**` | Developer hub — reads repo status (docs index, ingestion status, task ledger, review records, route map). Linked from Settings for signed-in admins. | -| `care-plan/**` | Fully synthetic care-planning prototype (management/patient/safety plans, presentations, review), richly cross-linked. | -| `caring-contacts/**` | Fully synthetic Caring Contacts coordination prototype. | -| `ward-flow/**` | Synthetic ward patient-flow prototype (capacity, discharge board, escalation, handover, live vehicle tracker, etc.), cross-linked via its own sidebar nav. | +| Route | What it is | +| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `development/**` | Developer hub — reads repo status (docs index, ingestion status, task ledger, review records, route map). Linked from Settings for signed-in admins. | +| `care-plan/**` | Fully synthetic care-planning prototype (management/patient/safety plans, presentations, review), richly cross-linked. | +| `caring-contacts/**` | Fully synthetic Caring Contacts coordination prototype. | +| `ward-flow/**` | Synthetic ward patient-flow prototype (capacity, discharge board, escalation, handover, live vehicle tracker, etc.), cross-linked via its own sidebar nav. | ### Redirects -| Route | Forwards to | -| --- | --- | -| `favourites-hub` | `/favourites` | +| Route | Forwards to | +| ------------------------ | -------------------------- | +| `favourites-hub` | `/favourites` | | `medication-prescribing` | `/medications/acamprosate` | ### Favourites page -| Route | Status | -| --- | --- | -| `favourites-phone-perfected` | Chosen design (2026-08-27) — see the write-up above. | +| Route | Status | +| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `favourites-phone-perfected` | Chosen design (2026-08-27) — see the write-up above. | | `favourites-command-console` | **Superseded — recommend removing.** One of six earlier studies this README already records as replaced by `favourites-phone-perfected`. | -| `favourites-command-desk` | **Superseded — recommend removing.** Same as above. | -| `favourites-library-view` | **Superseded — recommend removing.** Same as above. | -| `favourites-review-console` | **Superseded — recommend removing.** Same as above. | -| `favourites-set-board` | **Superseded — recommend removing.** Same as above. | -| `favourites-set-navigator` | **Superseded — recommend removing.** Same as above. | +| `favourites-command-desk` | **Superseded — recommend removing.** Same as above. | +| `favourites-library-view` | **Superseded — recommend removing.** Same as above. | +| `favourites-review-console` | **Superseded — recommend removing.** Same as above. | +| `favourites-set-board` | **Superseded — recommend removing.** Same as above. | +| `favourites-set-navigator` | **Superseded — recommend removing.** Same as above. | These six only ever link to each other (three of them share one comparison-tab component, `favourites-page-mockups/favourites-library-redesign-page.tsx`; the other three share @@ -62,26 +62,26 @@ either file, so removing all six routes together removes that whole folder clean ### Services filter surface — three sequential rounds, keep together -| Route | Status | -| --- | --- | +| Route | Status | +| ------------------------- | ----------------------------------------------------------------------------------------------- | | `services-filter-refined` | Round 1. Round 2 imports its facet engine, chips and sheet shell — do not remove independently. | -| `services-filter-options` | Round 2, builds on round 1's code. | -| `filter-sheet-restyle` | Round 3, a craft pass on the same decision. | +| `services-filter-options` | Round 2, builds on round 1's code. | +| `filter-sheet-restyle` | Round 3, a craft pass on the same decision. | ### Tools page -| Route | Status | -| --- | --- | -| `tools-search-mode` | Chosen design — "Perfected Tools search mode" per this README. | -| `tools-search-directions` | Active reference — grounds tracked issue `#162`. | +| Route | Status | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `tools-search-mode` | Chosen design — "Perfected Tools search mode" per this README. | +| `tools-search-directions` | Active reference — grounds tracked issue `#162`. | | `tools-action-workbench`, `tools-clinical-lanes`, `tools-command-center`, `tools-split-clinical-brief`, `tools-split-compact-sheet`, `tools-split-pane`, `tools-split-safety-deck`, `tools-task-directory`, `tools-workflow-board` | Parallel drafts, no recorded winner — nine different Tools-page layout directions. | ### Privacy page -| Route | Status | -| --- | --- | -| `privacy-live-signal-perfected` | Chosen design. | -| `privacy-page-directions` | Active reference — the full study behind the chosen design. | +| Route | Status | +| ------------------------------- | ----------------------------------------------------------- | +| `privacy-live-signal-perfected` | Chosen design. | +| `privacy-page-directions` | Active reference — the full study behind the chosen design. | ### Document navigation pane — five rounds, no recorded winner @@ -97,14 +97,14 @@ design decision rather than guessed at from the names. ### Document search & viewer -| Route | Status | -| --- | --- | +| Route | Status | +| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | `document-search` (+ `search`, `source`, `source/evidence`, `source-overlays`) | Active reference — the master runnable document-search flow; `source-overlays` hands off into the real document viewer. | -| `document-search-evidence-lens` | Parallel draft, no recorded winner. | -| `document-search-triage-board` | Parallel draft, no recorded winner. | -| `document-top-navigation` | Active study — three nav concepts shown side by side, not competing routes. | -| `document-image-status` | Fixture backing a component test — keep. | -| `accessible-table-browser-fixture` | Fixture backing a component test — keep. | +| `document-search-evidence-lens` | Parallel draft, no recorded winner. | +| `document-search-triage-board` | Parallel draft, no recorded winner. | +| `document-top-navigation` | Active study — three nav concepts shown side by side, not competing routes. | +| `document-image-status` | Fixture backing a component test — keep. | +| `accessible-table-browser-fixture` | Fixture backing a component test — keep. | ### Dictionary browse header — three rounds, no recorded winner @@ -148,13 +148,13 @@ named directions, cross-linked to each other for comparison, no recorded winner. ### One-off studies -| Route | Status | -| --- | --- | -| `also-matches-accents` | Chosen design — records the picked "also matches" accent treatment. | -| `verification-notice-subtle` | Active study, no recorded winner. | -| `warning-consolidation` | Active study — first pass on consolidating warning lines. | -| `warning-line` | Active study — second pass answering a narrower, different brief (words only, no icon/border/tint); not a replacement for the first pass. | -| `phone-mode-sheet-yes` | Active study — design review of the shipping phone mode sheet. | +| Route | Status | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `also-matches-accents` | Chosen design — records the picked "also matches" accent treatment. | +| `verification-notice-subtle` | Active study, no recorded winner. | +| `warning-consolidation` | Active study — first pass on consolidating warning lines. | +| `warning-line` | Active study — second pass answering a narrower, different brief (words only, no icon/border/tint); not a replacement for the first pass. | +| `phone-mode-sheet-yes` | Active study — design review of the shipping phone mode sheet. | Static (non-route) design comps under `public/mockups/mode-page-redesign-2026-07/` are already documented below and are not part of this route index. From 3b2465fd94fbeb320b372a5b632dd847db60ad49 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 27 Aug 2026 11:37:08 +0000 Subject: [PATCH 3/4] Remove six superseded favourites-page mockup drafts favourites-command-console, favourites-command-desk, favourites-library-view, favourites-review-console, favourites-set-board, and favourites-set-navigator were already documented in mockups/README.md as replaced by favourites-phone-perfected. Confirmed by import search that no other route or test depends on them or their shared component folder (favourites-page-mockups/), and re-confirmed the same result with check:dead-code-candidate after deepening the shallow clone -- the handful of flagged symbol names (ReviewState, IconTile, PageHeader, variants, favouriteItems) all resolve to unrelated, differently-shaped symbols elsewhere in the codebase, not real dependents. Updates mockups/README.md's mockup index and regenerates docs/site-map.md accordingly. --- docs/site-map.md | 6 - mockups/README.md | 24 +- .../favourites-command-console/page.tsx | 12 - .../mockups/favourites-command-desk/page.tsx | 12 - .../mockups/favourites-library-view/page.tsx | 12 - .../favourites-review-console/page.tsx | 12 - src/app/mockups/favourites-set-board/page.tsx | 12 - .../mockups/favourites-set-navigator/page.tsx | 12 - .../favourites-library-redesign-page.tsx | 894 ------------------ .../favourites-page-mockup-page.tsx | 894 ------------------ .../favourites-page-mockups/index.ts | 1 - 11 files changed, 10 insertions(+), 1881 deletions(-) delete mode 100644 src/app/mockups/favourites-command-console/page.tsx delete mode 100644 src/app/mockups/favourites-command-desk/page.tsx delete mode 100644 src/app/mockups/favourites-library-view/page.tsx delete mode 100644 src/app/mockups/favourites-review-console/page.tsx delete mode 100644 src/app/mockups/favourites-set-board/page.tsx delete mode 100644 src/app/mockups/favourites-set-navigator/page.tsx delete mode 100644 src/components/favourites-page-mockups/favourites-library-redesign-page.tsx delete mode 100644 src/components/favourites-page-mockups/favourites-page-mockup-page.tsx delete mode 100644 src/components/favourites-page-mockups/index.ts diff --git a/docs/site-map.md b/docs/site-map.md index a3fc10eadf..4c76e8273a 100644 --- a/docs/site-map.md +++ b/docs/site-map.md @@ -1212,14 +1212,8 @@ This file is generated by `npm run docs:update` (or `npm run sitemap:update` dir - `/mockups/document-top-navigation` - Route discovered from app directory Source: `src/app/mockups/document-top-navigation/page.tsx`. - `/mockups/factsheets-compact-view` - Route discovered from app directory Source: `src/app/mockups/factsheets-compact-view/page.tsx`. - `/mockups/factsheets-topics-phone` - Route discovered from app directory Source: `src/app/mockups/factsheets-topics-phone/page.tsx`. -- `/mockups/favourites-command-console` - Route discovered from app directory Source: `src/app/mockups/favourites-command-console/page.tsx`. -- `/mockups/favourites-command-desk` - Route discovered from app directory Source: `src/app/mockups/favourites-command-desk/page.tsx`. - `/mockups/favourites-hub` - Route discovered from app directory Source: `src/app/mockups/favourites-hub/page.tsx`. -- `/mockups/favourites-library-view` - Route discovered from app directory Source: `src/app/mockups/favourites-library-view/page.tsx`. - `/mockups/favourites-phone-perfected` - Route discovered from app directory Source: `src/app/mockups/favourites-phone-perfected/page.tsx`. -- `/mockups/favourites-review-console` - Route discovered from app directory Source: `src/app/mockups/favourites-review-console/page.tsx`. -- `/mockups/favourites-set-board` - Route discovered from app directory Source: `src/app/mockups/favourites-set-board/page.tsx`. -- `/mockups/favourites-set-navigator` - Route discovered from app directory Source: `src/app/mockups/favourites-set-navigator/page.tsx`. - `/mockups/filter-sheet-restyle` - Route discovered from app directory Source: `src/app/mockups/filter-sheet-restyle/page.tsx`. - `/mockups/medication-prescribing` - Route discovered from app directory Source: `src/app/mockups/medication-prescribing/page.tsx`. - `/mockups/mode-dropdown` - Route discovered from app directory Source: `src/app/mockups/mode-dropdown/page.tsx`. diff --git a/mockups/README.md b/mockups/README.md index 62233950c8..de61edc03e 100644 --- a/mockups/README.md +++ b/mockups/README.md @@ -45,20 +45,16 @@ picked — kept as-is rather than guessed at. ### Favourites page -| Route | Status | -| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `favourites-phone-perfected` | Chosen design (2026-08-27) — see the write-up above. | -| `favourites-command-console` | **Superseded — recommend removing.** One of six earlier studies this README already records as replaced by `favourites-phone-perfected`. | -| `favourites-command-desk` | **Superseded — recommend removing.** Same as above. | -| `favourites-library-view` | **Superseded — recommend removing.** Same as above. | -| `favourites-review-console` | **Superseded — recommend removing.** Same as above. | -| `favourites-set-board` | **Superseded — recommend removing.** Same as above. | -| `favourites-set-navigator` | **Superseded — recommend removing.** Same as above. | - -These six only ever link to each other (three of them share one comparison-tab component, -`favourites-page-mockups/favourites-library-redesign-page.tsx`; the other three share -`favourites-page-mockups/favourites-page-mockup-page.tsx`) — nothing else in the app imports -either file, so removing all six routes together removes that whole folder cleanly. +| Route | Status | +| ---------------------------- | ---------------------------------------------------- | +| `favourites-phone-perfected` | Chosen design (2026-08-27) — see the write-up above. | + +Six earlier studies (`favourites-command-console`, `favourites-command-desk`, +`favourites-library-view`, `favourites-review-console`, `favourites-set-board`, +`favourites-set-navigator`) were removed on 2026-08-27, along with their shared +component folder `favourites-page-mockups/` — confirmed superseded by +`favourites-phone-perfected` and confirmed (by import search) to have no other +route depending on them before removal. ### Services filter surface — three sequential rounds, keep together diff --git a/src/app/mockups/favourites-command-console/page.tsx b/src/app/mockups/favourites-command-console/page.tsx deleted file mode 100644 index bd324500d9..0000000000 --- a/src/app/mockups/favourites-command-console/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { Metadata } from "next"; - -import { FavouritesLibraryRedesignPage } from "@/components/favourites-page-mockups/favourites-library-redesign-page"; - -export const metadata: Metadata = { - title: "Favourites Command Console Mockup - Clinical KB", - description: "Library-first favourites mockup with resume-next command workflow.", -}; - -export default function FavouritesCommandConsoleMockupRoute() { - return ; -} diff --git a/src/app/mockups/favourites-command-desk/page.tsx b/src/app/mockups/favourites-command-desk/page.tsx deleted file mode 100644 index e156c4a993..0000000000 --- a/src/app/mockups/favourites-command-desk/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { Metadata } from "next"; - -import { FavouritesPageMockupPage } from "@/components/favourites-page-mockups"; - -export const metadata: Metadata = { - title: "Favourites Command Desk Mockup - Clinical KB", - description: "Resume-first favourites page mockup for Clinical KB.", -}; - -export default function FavouritesCommandDeskMockupRoute() { - return ; -} diff --git a/src/app/mockups/favourites-library-view/page.tsx b/src/app/mockups/favourites-library-view/page.tsx deleted file mode 100644 index b91f524e89..0000000000 --- a/src/app/mockups/favourites-library-view/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { Metadata } from "next"; - -import { FavouritesPageMockupPage } from "@/components/favourites-page-mockups"; - -export const metadata: Metadata = { - title: "Favourites Library View Mockup - Clinical KB", - description: "Dense searchable favourites library mockup for Clinical KB.", -}; - -export default function FavouritesLibraryViewMockupRoute() { - return ; -} diff --git a/src/app/mockups/favourites-review-console/page.tsx b/src/app/mockups/favourites-review-console/page.tsx deleted file mode 100644 index a0aa0b166c..0000000000 --- a/src/app/mockups/favourites-review-console/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { Metadata } from "next"; - -import { FavouritesLibraryRedesignPage } from "@/components/favourites-page-mockups/favourites-library-redesign-page"; - -export const metadata: Metadata = { - title: "Favourites Review Console Mockup - Clinical KB", - description: "Library-first favourites mockup with stronger review and provenance workflow.", -}; - -export default function FavouritesReviewConsoleMockupRoute() { - return ; -} diff --git a/src/app/mockups/favourites-set-board/page.tsx b/src/app/mockups/favourites-set-board/page.tsx deleted file mode 100644 index aed02e2f24..0000000000 --- a/src/app/mockups/favourites-set-board/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { Metadata } from "next"; - -import { FavouritesPageMockupPage } from "@/components/favourites-page-mockups"; - -export const metadata: Metadata = { - title: "Favourites Set Board Mockup - Clinical KB", - description: "Workflow-set favourites page mockup for Clinical KB.", -}; - -export default function FavouritesSetBoardMockupRoute() { - return ; -} diff --git a/src/app/mockups/favourites-set-navigator/page.tsx b/src/app/mockups/favourites-set-navigator/page.tsx deleted file mode 100644 index b6da91806d..0000000000 --- a/src/app/mockups/favourites-set-navigator/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { Metadata } from "next"; - -import { FavouritesLibraryRedesignPage } from "@/components/favourites-page-mockups/favourites-library-redesign-page"; - -export const metadata: Metadata = { - title: "Favourites Set Navigator Mockup - Clinical KB", - description: "Library-first favourites mockup with workflow-set navigation.", -}; - -export default function FavouritesSetNavigatorMockupRoute() { - return ; -} diff --git a/src/components/favourites-page-mockups/favourites-library-redesign-page.tsx b/src/components/favourites-page-mockups/favourites-library-redesign-page.tsx deleted file mode 100644 index fb38ccee27..0000000000 --- a/src/components/favourites-page-mockups/favourites-library-redesign-page.tsx +++ /dev/null @@ -1,894 +0,0 @@ -import Link from "next/link"; -import { - ArrowRight, - BookOpen, - CheckCircle2, - ChevronDown, - Clock3, - Copy, - ExternalLink, - FileText, - Filter, - Folder, - Heart, - History, - LayoutList, - Library, - MessageSquare, - MoreHorizontal, - Pill, - Pin, - Plus, - Quote, - Search, - ShieldCheck, - Sparkles, - Stethoscope, - type LucideIcon, -} from "lucide-react"; - -import { cn } from "@/components/ui-primitives"; - -export type FavouritesLibraryRedesignVariant = "command-console" | "review-console" | "set-navigator"; - -type FavouriteKind = "Medication" | "Document" | "Source" | "Saved search"; -type ReviewState = "current" | "review-due" | "recent"; - -type FavouriteRecord = { - id: string; - title: string; - kind: FavouriteKind; - set: string; - summary: string; - provenance: string; - lastUsed: string; - action: string; - href: string; - reviewState: ReviewState; - reviewLabel: string; - icon: LucideIcon; -}; - -type FavouriteSet = { - title: string; - count: number; - summary: string; - lastUsed: string; - reviewDue: number; - icon: LucideIcon; -}; - -const focusRing = - "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#0e7490]"; - -const favouriteRecords: FavouriteRecord[] = [ - { - id: "acamprosate-renal-screen", - title: "Acamprosate renal screen", - kind: "Medication", - set: "Ward round", - summary: "Medication page / renal cautions / dose notes", - provenance: "3 sources", - lastUsed: "Today 08:44", - action: "Open", - href: "/?mode=prescribing&q=acamprosate+renal+dose", - reviewState: "current", - reviewLabel: "Source-backed", - icon: Pill, - }, - { - id: "lithium-monitoring-guideline", - title: "Lithium monitoring guideline", - kind: "Document", - set: "Prescribing safety", - summary: "PDF pages 4-9 / monitoring table", - provenance: "Verified PDF", - lastUsed: "Today 08:20", - action: "Ask", - href: "/?mode=documents&q=lithium+monitoring", - reviewState: "review-due", - reviewLabel: "Review due", - icon: FileText, - }, - { - id: "clozapine-monitoring-table", - title: "Clozapine monitoring table", - kind: "Source", - set: "Clozapine clinic", - summary: "Saved table / ANC monitoring", - provenance: "Table source", - lastUsed: "Yesterday", - action: "Source", - href: "/?mode=documents&q=clozapine+monitoring+table", - reviewState: "current", - reviewLabel: "Source-backed", - icon: Quote, - }, - { - id: "renal-dose-search", - title: "renal dose saved search", - kind: "Saved search", - set: "Ward round", - summary: "Medicines plus documents / eGFR cautions", - provenance: "Query", - lastUsed: "Today 07:55", - action: "Run", - href: "/?mode=answer&q=renal+dose&run=1", - reviewState: "recent", - reviewLabel: "Recently run", - icon: Search, - }, - { - id: "qt-prolongation-quote", - title: "QT prolongation quote", - kind: "Source", - set: "Prescribing safety", - summary: "Source card / prescribing safety", - provenance: "Quote", - lastUsed: "Mon", - action: "Copy", - href: "/?mode=documents&q=QT+prolongation", - reviewState: "current", - reviewLabel: "Source-backed", - icon: Quote, - }, -]; - -const favouriteSets: FavouriteSet[] = [ - { - title: "Ward round", - count: 2, - summary: "Renal checks, recurring review prompts, and medication pages.", - lastUsed: "Today 08:44", - reviewDue: 0, - icon: Stethoscope, - }, - { - title: "Prescribing safety", - count: 2, - summary: "Dose limits, QT risk, monitoring, and source quotes.", - lastUsed: "Today 08:20", - reviewDue: 1, - icon: ShieldCheck, - }, - { - title: "Clozapine clinic", - count: 1, - summary: "ANC monitoring table, clinic source cards, counselling.", - lastUsed: "Yesterday", - reviewDue: 0, - icon: BookOpen, - }, -]; - -const variants: Record< - FavouritesLibraryRedesignVariant, - { - label: string; - eyebrow: string; - title: string; - description: string; - selectedId: string; - accent: string; - pageClassName: string; - commandClassName: string; - resumeTitle: string; - resumeBody: string; - primaryFilter: string; - } -> = { - "command-console": { - label: "Command console", - eyebrow: "Mockup 1", - title: "Favourites command library", - description: "A scalable library console with the action-first confidence of the command desk.", - selectedId: "acamprosate-renal-screen", - accent: "#007c89", - pageClassName: "bg-[color:var(--surface-lux)] text-[color:var(--text-heading)]", - commandClassName: - "bg-[color:var(--clinical-accent)] text-white shadow-[0_14px_34px_rgba(0,124,137,0.24)] hover:bg-[color:var(--clinical-accent-hover)]", - resumeTitle: "Resume Acamprosate renal screen", - resumeBody: "Open the ward-round renal caution page with source count, set context, and next action visible.", - primaryFilter: "Recent", - }, - "review-console": { - label: "Review console", - eyebrow: "Mockup 2", - title: "Favourites review console", - description: "A governance-heavy version for source state, review due work, and selected-item inspection.", - selectedId: "lithium-monitoring-guideline", - accent: "#1d4ed8", - pageClassName: "bg-[color:var(--surface-raised)] text-[color:var(--text-heading)]", - commandClassName: - "bg-[color:var(--primary)] text-white shadow-[0_14px_34px_rgba(29,78,216,0.22)] hover:bg-[color:var(--primary-strong)]", - resumeTitle: "Review lithium monitoring guideline", - resumeBody: "Check pages 4-9, mark the PDF as reviewed, then ask against the document if needed.", - primaryFilter: "Review due", - }, - "set-navigator": { - label: "Set navigator", - eyebrow: "Mockup 3", - title: "Favourites set navigator", - description: "A library-first page that makes workflow sets the fastest way into saved material.", - selectedId: "renal-dose-search", - accent: "#047857", - pageClassName: "bg-[color:var(--surface-lux)] text-[color:var(--text-heading)]", - // The success triad is text/bg/border only — there is no darker success step - // to hover to, so shift brightness instead of inventing a mockup-only token. - commandClassName: - "bg-[color:var(--success)] text-white shadow-[0_14px_34px_rgba(4,120,87,0.24)] hover:brightness-110", - resumeTitle: "Run renal dose saved search", - resumeBody: "Restart the ward-round saved query across medicines and documents before opening individual items.", - primaryFilter: "Ward round", - }, -}; - -const variantRoutes: Array<{ id: FavouritesLibraryRedesignVariant; href: string }> = [ - { id: "command-console", href: "/mockups/favourites-command-console" }, - { id: "review-console", href: "/mockups/favourites-review-console" }, - { id: "set-navigator", href: "/mockups/favourites-set-navigator" }, -]; - -function statusClassName(state: ReviewState) { - if (state === "review-due") - return "border-[color:var(--warning-border)] bg-[color:var(--warning-soft)] text-[color:var(--warning)]"; - if (state === "recent") - return "border-[color:var(--type-document-border)] bg-[color:var(--type-document-soft)] text-[color:var(--type-document)]"; - return "border-[color:var(--success-border)] bg-[color:var(--success-soft)] text-[color:var(--success)]"; -} - -function kindClassName(kind: FavouriteKind) { - if (kind === "Medication") - return "border-[color:var(--success-border)] bg-[color:var(--success-soft)] text-[color:var(--success)]"; - if (kind === "Document") - return "border-[color:var(--type-document-border)] bg-[color:var(--type-document-soft)] text-[color:var(--type-document)]"; - if (kind === "Source") - return "border-[color:var(--type-source-border)] bg-[color:var(--type-source-soft)] text-[color:var(--type-source)]"; - return "border-[color:var(--border)] bg-[color:var(--surface-subtle)] text-[color:var(--text-muted)]"; -} - -function ShellPill({ - children, - active = false, - icon: Icon, -}: { - children: React.ReactNode; - active?: boolean; - icon?: LucideIcon; -}) { - return ( - - {Icon ? : null} - {children} - - ); -} - -function IconTile({ icon: Icon, active = false }: { icon: LucideIcon; active?: boolean }) { - return ( - - - - ); -} - -function CommandButton({ children, href, className }: { children: React.ReactNode; href: string; className: string }) { - return ( - - {children} - - - ); -} - -function VariantSwitch({ active }: { active: FavouritesLibraryRedesignVariant }) { - return ( - - ); -} - -function PageHeader({ variant, selected }: { variant: FavouritesLibraryRedesignVariant; selected: FavouriteRecord }) { - const config = variants[variant]; - return ( -
-
- -
- - - -
-

- {config.eyebrow} -

-

- {config.title} -

-

- {config.description} -

-
-
-
- -
-
- - - Search favourites, sets, source notes or saved searches... - - - Ctrl K - - -
- - {selected.action} selected - - -
-
-
- ); -} - -function ResumeBand({ variant, selected }: { variant: FavouritesLibraryRedesignVariant; selected: FavouriteRecord }) { - const config = variants[variant]; - const stats = [ - { label: "Source-backed", value: "5", icon: CheckCircle2 }, - { label: "Review due", value: "1", icon: Clock3 }, - { label: "Pinned sets", value: "3", icon: Pin }, - { label: "Total items", value: "5", icon: Library }, - ]; - - return ( -
-
-
- -
-
- - Resume next - - - {selected.reviewLabel} - -
-

- {config.resumeTitle} -

-

- {config.resumeBody} -

-

- {selected.set} / {selected.provenance} / {selected.lastUsed} -

-
- - {selected.action} - -
-
- {stats.map((stat) => { - const Icon = stat.icon; - return ( -
- - - - - - {stat.value} - - - {stat.label} - - -
- ); - })} -
-
- - -
- ); -} - -function ReviewQueue({ variant }: { variant: FavouritesLibraryRedesignVariant }) { - const dueItem = favouriteRecords.find((item) => item.reviewState === "review-due") ?? favouriteRecords[1]; - return ( - - ); -} - -function FilterRail({ variant }: { variant: FavouritesLibraryRedesignVariant }) { - const config = variants[variant]; - const filters = [ - { label: "All favourites", value: "5", icon: Heart }, - { label: "Medications", value: "1", icon: Pill }, - { label: "Documents", value: "1", icon: FileText }, - { label: "Sources", value: "2", icon: Quote }, - { label: "Saved searches", value: "1", icon: Search }, - ]; - - return ( - - ); -} - -function SetNavigatorStrip({ variant }: { variant: FavouritesLibraryRedesignVariant }) { - if (variant !== "set-navigator") return null; - - return ( -
- {favouriteSets.map((set) => { - const Icon = set.icon; - const active = set.title === "Ward round"; - return ( -
-
- - - - - {set.count} items - -
-

{set.title}

-

- {set.summary} -

-
- Last used {set.lastUsed} - - {set.reviewDue ? `${set.reviewDue} review due` : "No review due"} - -
-
- ); - })} -
- ); -} - -function LibraryTable({ variant, selected }: { variant: FavouritesLibraryRedesignVariant; selected: FavouriteRecord }) { - const config = variants[variant]; - - return ( -
-
-
-
-

All favourites

- - 5 items - -
-

- Primary action, source state, set context, and review state stay visible. -

-
-
- - {config.primaryFilter} - - Type - Table -
-
- -
-
-
- - Name - Type - Set - Source - Action -
- {favouriteRecords.map((record) => { - const isSelected = record.id === selected.id; - const Icon = record.icon; - return ( - - - - {isSelected ? : null} - - - - - - {record.title} - - - {record.summary} - - - - {record.reviewLabel} - - - {record.lastUsed} - - - - - {record.kind} - - {record.set} - {record.provenance} - - - {record.action} - - - - - - - ); - })} -
-
-
- ); -} - -function Inspector({ selected, variant }: { selected: FavouriteRecord; variant: FavouritesLibraryRedesignVariant }) { - const config = variants[variant]; - const related = favouriteRecords.filter((item) => item.id !== selected.id).slice(0, 3); - - return ( - - ); -} - -export function FavouritesLibraryRedesignPage({ variant }: { variant: FavouritesLibraryRedesignVariant }) { - const config = variants[variant]; - const selected = favouriteRecords.find((item) => item.id === config.selectedId) ?? favouriteRecords[0]; - - return ( -
-
- - - - -
- - - -
-
-
- ); -} diff --git a/src/components/favourites-page-mockups/favourites-page-mockup-page.tsx b/src/components/favourites-page-mockups/favourites-page-mockup-page.tsx deleted file mode 100644 index 65569cf48e..0000000000 --- a/src/components/favourites-page-mockups/favourites-page-mockup-page.tsx +++ /dev/null @@ -1,894 +0,0 @@ -import Link from "next/link"; -import { - ArrowRight, - BookOpen, - Brain, - CheckCircle2, - ChevronRight, - ClipboardList, - Clock3, - FileText, - Filter, - Folder, - FolderKanban, - Grid2X2, - Heart, - History, - LayoutList, - Library, - Pill, - Pin, - Plus, - Quote, - Search, - ShieldCheck, - Sparkles, - Star, - Stethoscope, - type LucideIcon, -} from "lucide-react"; -import type { ReactNode } from "react"; - -import { cn } from "@/components/ui-primitives"; - -export type FavouritesPageMockupVariant = "command-desk" | "set-board" | "library-view"; - -type FavouriteStatus = "ready" | "recent" | "review"; -type FavouriteKind = "Medication" | "Document" | "Source" | "Saved search"; - -type FavouriteFixture = { - id: string; - title: string; - kind: FavouriteKind; - set: string; - description: string; - sourceMeta: string; - lastUsed: string; - action: string; - status: FavouriteStatus; - icon: LucideIcon; - href: string; -}; - -type SetFixture = { - id: string; - title: string; - count: number; - nextAction: string; - lastUsed: string; - description: string; - icon: LucideIcon; -}; - -const focusRing = - "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--focus)]"; - -const variantCopy: Record< - FavouritesPageMockupVariant, - { - eyebrow: string; - title: string; - body: string; - recommendation: string; - } -> = { - "command-desk": { - eyebrow: "Concept 1", - title: "Favourites command desk", - body: "Resume the safest next clinical action before browsing the whole saved library.", - recommendation: "Best default direction", - }, - "set-board": { - eyebrow: "Concept 2", - title: "Saved sets board", - body: "Group saved work by real clinical workflow so ward round, safety, and clinic material stay together.", - recommendation: "Best for repeated workflows", - }, - "library-view": { - eyebrow: "Concept 3", - title: "Favourites library", - body: "A dense searchable register for teams whose saved clinical material will keep growing.", - recommendation: "Best for scale", - }, -}; - -const favouriteItems: FavouriteFixture[] = [ - { - id: "acamprosate-renal-screen", - title: "Acamprosate renal screen", - kind: "Medication", - set: "Ward round", - description: "Medication page with renal cautions and dose notes", - sourceMeta: "3 sources checked", - lastUsed: "Today 8:44", - action: "Open", - status: "ready", - icon: Pill, - href: "/?mode=prescribing&q=acamprosate+renal+dose", - }, - { - id: "lithium-monitoring-guideline", - title: "Lithium monitoring guideline", - kind: "Document", - set: "Prescribing safety", - description: "PDF pages 4-9 with shared-care monitoring table", - sourceMeta: "PDF / p.4-9", - lastUsed: "Today 8:20", - action: "Ask", - status: "review", - icon: FileText, - href: "/?mode=documents&q=lithium+monitoring", - }, - { - id: "clozapine-monitoring-table", - title: "Clozapine monitoring table", - kind: "Source", - set: "Clozapine clinic", - description: "Saved table for ANC monitoring and escalation", - sourceMeta: "Table source", - lastUsed: "Yesterday", - action: "Source", - status: "ready", - icon: Quote, - href: "/?mode=documents&q=clozapine+monitoring+table", - }, - { - id: "renal-dose-search", - title: "Renal dose saved search", - kind: "Saved search", - set: "Ward round", - description: "Runs medicines and documents for eGFR-linked dose cautions", - sourceMeta: "Saved query", - lastUsed: "Today 7:55", - action: "Run", - status: "recent", - icon: Search, - href: "/?mode=answer&q=renal+dose&run=1", - }, - { - id: "qt-prolongation-quote", - title: "QT prolongation quote", - kind: "Source", - set: "Prescribing safety", - description: "Source card for prescribing safety notes", - sourceMeta: "Quote", - lastUsed: "Mon", - action: "Copy", - status: "ready", - icon: Quote, - href: "/?mode=documents&q=QT+prolongation", - }, -]; - -const favouriteSets: SetFixture[] = [ - { - id: "ward-round", - title: "Ward round", - count: 2, - nextAction: "Run renal dose search", - lastUsed: "Today 8:44", - description: "Medication pages, renal checks, and recurring review prompts.", - icon: Stethoscope, - }, - { - id: "prescribing-safety", - title: "Prescribing safety", - count: 2, - nextAction: "Review lithium monitoring", - lastUsed: "Today 8:20", - description: "Dose limits, pregnancy cautions, QT risk, and monitoring.", - icon: ShieldCheck, - }, - { - id: "clozapine-clinic", - title: "Clozapine clinic", - count: 1, - nextAction: "Open ANC table", - lastUsed: "Yesterday", - description: "Monitoring, counselling, and clinic source cards.", - icon: Brain, - }, -]; - -const statusLabels: Record = { - ready: "Ready", - recent: "Recent", - review: "Review due", -}; - -const statusStyles: Record = { - ready: "border-[color:var(--success-border)] bg-[color:var(--success-soft)] text-[color:var(--success)]", - recent: "border-[color:var(--info-border)] bg-[color:var(--info-soft)] text-[color:var(--info)]", - review: "border-[color:var(--warning-border)] bg-[color:var(--warning-soft)] text-[color:var(--warning)]", -}; - -const kindStyles: Record = { - Document: "bg-[color:var(--info-soft)] text-[color:var(--info)] border-[color:var(--info-border)]", - Medication: - "bg-[color:var(--clinical-accent-soft)] text-[color:var(--clinical-accent)] border-[color:var(--clinical-accent-border)]", - "Saved search": "bg-[color:var(--surface-subtle)] text-[color:var(--text-muted)] border-[color:var(--border)]", - Source: "bg-[color:var(--warning-soft)] text-[color:var(--warning)] border-[color:var(--warning-border)]", -}; - -function StatusPill({ status }: { status: FavouriteStatus }) { - return ( - - {statusLabels[status]} - - ); -} - -function KindPill({ kind }: { kind: FavouriteKind }) { - return ( - - {kind} - - ); -} - -function IconTile({ icon: Icon, quiet = false }: { icon: LucideIcon; quiet?: boolean }) { - return ( - - - ); -} - -function ActionLink({ href, children }: { href: string; children: ReactNode }) { - return ( - - {children} -