From 82b71b3f4a0b81bd78253be726e66d6fe98c829c Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Wed, 12 Aug 2026 20:05:36 +0800 Subject: [PATCH 01/10] fix: restore overwritten search features --- AGENTS.md | 4 +- docs/branch-review-ledger.md | 1 + .../global-search-shell.tsx | 1 + .../master-search-header.tsx | 4 + .../universal-search-command-surface.tsx | 92 ++++++++++++++++--- src/lib/catalog-search.ts | 70 +++++++++++++- .../audit-navigation-auth-regressions.test.ts | 11 +++ tests/catalog-search.test.ts | 19 +++- tests/ui-overlap.spec.ts | 7 +- 9 files changed, 194 insertions(+), 15 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 88ec727f80..483df4b4c6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,9 @@ # This is NOT the Next.js you know -This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices. +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. + +This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 7fd691776a..7f30439f72 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -900,3 +900,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-08-12 | PR #1815 / claude/spacing-icon-design-review-rxwh28 | 9f266210f02081be54d407c70a85f52fed436128 | babysit | no remaining actionable findings; one pre-existing thread resolved as no-change (Dockerfile.worker follow-up needed) | required checks: Gitleaks PR policy PR required (all pass); targeted vitest passed: tests/document-frame-contract.test.ts + tests/in-page-nav-header.dom.test.tsx | | 2026-08-12 | 1815 | 27ce96e1755055ceee2eeae02d6efdf11259fcde | babysit | fixed | Unit coverage: targeted vitest passed: tests/shared-home-empty-state.dom.test.tsx (17 passed). PR required still blocked on pre-existing check failure at old remote head before sync. | | 2026-08-12 | codex/pr-workflow-safety-230-296 | bc0a491fdf4146775629f9b2b03e2a2cc61bd7cb | pr-1830 unblock | unblocked: merged origin/main (outstanding-issues conflict), PR body RAG impact + governance, resolved Copilot thread; merge-tree clean; required CI in progress | check:outstanding-issues pass; evaluatePullRequestPolicy ok; merge-tree clean; PR policy/mergeability/Change scope in progress | +| 2026-08-12 | work | bc00419f83de1a59d9413b9ecf0827775c83e070 | recent important regression audit and prevention fixes | two confirmed regressions restored; no other high-confidence unresolved loss found | focused Vitest 27 passed; format changed passed; PR-local reached full unit suite then timed out | diff --git a/src/components/clinical-dashboard/global-search-shell.tsx b/src/components/clinical-dashboard/global-search-shell.tsx index 651a4cb0c3..84247b396a 100644 --- a/src/components/clinical-dashboard/global-search-shell.tsx +++ b/src/components/clinical-dashboard/global-search-shell.tsx @@ -877,6 +877,7 @@ function GlobalStandaloneSearchShellBody({ differentialsCompareAddonActive ? differentialsMobileCompareAddonSlotId : undefined } desktopSearchPlacement={desktopSearchPlacement === "hero" && isStandaloneModeHome ? "hero" : "default"} + showPhoneSuggestionTickerOnHome={isStandaloneModeHome || pathname === "/"} searchComposerVisible={shouldShowSearchComposer} desktopHomeComposerSlotId={isStandaloneModeHome ? modeHomeDesktopComposerSlotId : undefined} desktopPageComposerSlotId={ diff --git a/src/components/clinical-dashboard/master-search-header.tsx b/src/components/clinical-dashboard/master-search-header.tsx index 1cc6aa23e3..cf419dc0f8 100644 --- a/src/components/clinical-dashboard/master-search-header.tsx +++ b/src/components/clinical-dashboard/master-search-header.tsx @@ -195,6 +195,7 @@ export function MasterSearchHeader({ mobileBottomSearchVariant = "default", desktopSearchPlacement = "default", searchComposerVisible = true, + showPhoneSuggestionTickerOnHome = false, desktopHomeComposerSlotId, desktopPageComposerSlotId, heroComposerBreakpoint = "all", @@ -250,6 +251,8 @@ export function MasterSearchHeader({ * content keeps maximum screen space. Every phone dock uses it now; the * "default" value remains for hosts that need the taller legacy dock. */ mobileBottomSearchVariant?: "default" | "compact"; + /** Show the compact, tappable suggestion ticker only for standalone-mode homes. */ + showPhoneSuggestionTickerOnHome?: boolean; desktopSearchPlacement?: "default" | "hero"; searchComposerVisible?: boolean; /** Mode-home slot the composer portals into so the search pill sits in the @@ -1816,6 +1819,7 @@ export function MasterSearchHeader({ onListboxIdReady={setCommandListboxId} onActiveItemIdChange={setCommandActiveItemId} onFocusSearchInput={handleFocusSearchInput} + showPhoneSuggestionTicker={showPhoneSuggestionTickerOnHome} >