From 0b67944b0d2973d612833422fb4074aeacdb6c8c Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 24 Jul 2026 19:02:12 +0800 Subject: [PATCH 1/7] feat(ui): add universal search query ribbon --- docs/branch-review-ledger.md | 1 + docs/site-map.md | 1 + src/app/mockups/mockups-layout-client.tsx | 3 +- src/app/mockups/search-heading/page.tsx | 5 + .../favourites-command-library-page.tsx | 4 +- .../medication-prescribing-workspace.tsx | 24 +- .../search-results-header-band.tsx | 210 +++++--- .../forms/forms-search-results-page.tsx | 18 +- src/components/search-heading-mockups.tsx | 485 ++++++++++++++++++ tests/search-results-header-band.dom.test.tsx | 90 ++++ tests/ui-tools.spec.ts | 39 +- 11 files changed, 761 insertions(+), 119 deletions(-) create mode 100644 src/app/mockups/search-heading/page.tsx create mode 100644 src/components/search-heading-mockups.tsx create mode 100644 tests/search-results-header-band.dom.test.tsx diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index c2bde1d636..b4442df49b 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -22,6 +22,7 @@ This file is append-only. Never rewrite or delete an existing review record; app | Date | Branch or ref | Reviewed HEAD | Scope | Outcome | Checks | | ---------- | -------------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 2026-07-24 | `codex/query-ribbon-search-headings` | `16ce57d9615708528e7924b41837210a24414722` + reviewed ledger diff | Universal Query Ribbon implementation and responsive search-heading review | APPROVE after two scoped polish fixes. The shared result header now presents query, progress/result state, scopes, and real sort/view/save controls consistently across Services, Forms, Favourites, Differentials, and Medication/Prescribing search surfaces; the mockup remains available at `/mockups/search-heading`. The review restored the compact `Sort` label at ordinary phone widths and prevents stale/unknown scope IDs from producing an empty utility strip. No P0-P2 finding remains. Retrieval, ranking, source selection, and clinical output behavior are unchanged. Highest residual risk is unexercised browser combinations outside the focused cross-route responsive matrix. | Focused header DOM 4/4; focused ESLint; `git diff --check`; live 1280px route QA with zero overflow and visible keyboard focus; production Playwright build compiled, TypeScript passed, 1,678 pages generated, and focused Chromium responsive/search/prescribing matrix passed 16/16. `verify:pr-local` passed runtime, Prettier, full ESLint, and TypeScript; its complete unit run stopped only when the unrelated load-sensitive `reconciliation-preflight` case exceeded 30 seconds, then that file passed 5/5 in isolation. No OpenAI, Supabase, Railway, deployment, production-data, or clinical provider workflow ran. | | 2026-07-24 | `cursor/docs-reliability-review-c38b` | `af5d44abf031581d256006b51a1be98563d441d5` | Documentation reliability review vs repo state (setup, env, ops runbooks, testing safety) | Fixed P1/P2 doc drift: worker region Sydney→Railway Singapore; DR golden gate 23/23→36/36; Railway health `/api/health/ready`; auth checklist aligned to magic-link+OAuth UI; staging identity vars in `.env.example`; provider-approval boundary on testing/readiness docs; mode count 11→13. No P0. Residual: historical `23/23` mentions in point-in-time/archive docs left alone. | `npm run docs:check-links`; `npm run docs:check-index`; `git diff --check`. No provider/OpenAI/Supabase/Railway mutation. | | 2026-07-24 | `main` / PR #1122 tip `037b4808100946f96aee28b8ff51939ae2986851` | `037b4808100946f96aee28b8ff51939ae2986851` | Code-quality review of tip commit (streamlined sidebar tool list) | No P0-P1. Two P2 maintainability findings: (1) dual catalogue — `sidebarToolItems` still defines specialist tools that `primarySidebarToolIds` always filters out, leaving unused Lucide imports and a footgun where new catalogue rows do not appear unless also added to the Set; (2) favourites-auth-gate asserts primary IDs by regex-parsing the Set initializer source, which couples the suite to TypeScript formatting. Highest residual risk is quiet nav drift if specialists are re-added only to `sidebarToolItems`. #066 in outstanding-issues still describes this sidebar land as open despite the tip merge. | Static diff inspection of `ClinicalSidebar.tsx`, `tests/favourites-auth-gate.test.ts`, `tests/ui-smoke.spec.ts`; no lint/test/provider runs (pure review). | | 2026-07-24 | `codex/review-search-bar-behavior-and-establish-rules` (PR #1137) | `b10514374ac7640e5d3395f707c6f958764ae131` + ledger bookkeeping | PR babysit: CI fix + Codex threads + drift | COMPLETED for current head. Restored Tools arm in `showDesktopHomeComposer` and moved `0rem` reserve comment to `mobileComposerReserve` (3d82ead2); replaced unresolvable ledger SHA `bcf4571…` with `6ee0484…`; formatted `docs/search-chrome-behaviour.md`; merged `origin/main` (`0cc0ee2d`). 3/3 Codex review threads resolved via GraphQL (inline replies 403 with this token). Prior CI failures (syntax from misplaced comment) cleared on 3d82ead2; Production UI job cancelled mid-aggregate before this merge — CI re-running after push. | Local: format:check on touched files; Vitest `ui-overlay-css-contract` + `mobile-composer-reserve` 15/15. Hosted: static/unit/build/advisory green on 3d82ead2. No provider-backed checks run. | diff --git a/docs/site-map.md b/docs/site-map.md index 21ca3e0ce0..a9926e3078 100644 --- a/docs/site-map.md +++ b/docs/site-map.md @@ -1004,6 +1004,7 @@ This file is generated by `npm run sitemap:update`. Run `npm run sitemap:check` - `/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`. - `/mockups/recent-searches-bottom` - Route discovered from app directory Source: `src/app/mockups/recent-searches-bottom/page.tsx`. +- `/mockups/search-heading` - Route discovered from app directory Source: `src/app/mockups/search-heading/page.tsx`. - `/mockups/settings-search-clinical` - Route discovered from app directory Source: `src/app/mockups/settings-search-clinical/page.tsx`. - `/mockups/settings-search-general` - Route discovered from app directory Source: `src/app/mockups/settings-search-general/page.tsx`. - `/mockups/settings-search-privacy` - Route discovered from app directory Source: `src/app/mockups/settings-search-privacy/page.tsx`. diff --git a/src/app/mockups/mockups-layout-client.tsx b/src/app/mockups/mockups-layout-client.tsx index ed508daadb..784bd0ad5a 100644 --- a/src/app/mockups/mockups-layout-client.tsx +++ b/src/app/mockups/mockups-layout-client.tsx @@ -13,6 +13,7 @@ export function MockupsLayoutClient({ children }: { children: ReactNode }) { const isSourceOverlayRedesignMockup = pathname === "/mockups/document-search/source-overlays"; const isStandaloneDocumentFlow = pathname === "/mockups/document-search"; const isUniversalSearchRedesignMockup = pathname === "/mockups/universal-search-redesign"; + const isSearchHeadingMockup = pathname === "/mockups/search-heading"; // The calculators search page owns its own search input (top on desktop, docked // at the bottom on phones), so the shared universal composer is suppressed here // to avoid a second, floating search bar. @@ -36,7 +37,7 @@ export function MockupsLayoutClient({ children }: { children: ReactNode }) { !isUniversalSearchRedesignMockup && !isCalculatorsSearchPageMockup } - chromeVisible={!isSourceOverlayRedesignMockup} + chromeVisible={!isSourceOverlayRedesignMockup && !isSearchHeadingMockup} > {children} diff --git a/src/app/mockups/search-heading/page.tsx b/src/app/mockups/search-heading/page.tsx new file mode 100644 index 0000000000..dfaf04b60d --- /dev/null +++ b/src/app/mockups/search-heading/page.tsx @@ -0,0 +1,5 @@ +import { SearchHeadingMockupsPage } from "@/components/search-heading-mockups"; + +export default function SearchHeadingMockupRoute() { + return ; +} diff --git a/src/components/clinical-dashboard/favourites-command-library-page.tsx b/src/components/clinical-dashboard/favourites-command-library-page.tsx index c9b8618a20..4e2baf8d02 100644 --- a/src/components/clinical-dashboard/favourites-command-library-page.tsx +++ b/src/components/clinical-dashboard/favourites-command-library-page.tsx @@ -1186,9 +1186,7 @@ export function FavouritesCommandLibraryPage({ query = "", demoMode }: { query?: className="mode-home-composer-slot hidden w-full max-w-3xl [&:not(:empty)]:block" /> -
- -
+ -