diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 696635d672..11e96f9b1d 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -700,3 +700,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-08-07 | cursor/viewer-phase0-gesture-a11y-1db8 (PR #1660) | 097dfd245f798f8105eeb6c1cf4fc077f969496f | prlanded | MERGED; squash tip empty vs branch tip 810cfc9b4a1c476a0dcc995bffb00d7329a85686; Phase 0 gesture INP, preview a11y, image decode | content tree empty vs squash; no provider-backed checks run | | 2026-08-07 | claude/pr-handoff-loop-prevention-54y5zr (PR #1670) | dfe2946110e0ff93bd4acc571ae79c26b79a7a85 | PR #1670 heavy review-and-fix | synced origin/main (behind-but-clean DIRTY cleared); fixed CodeRabbit checks-cell to name exact #1649 gates + incomplete verify:pr-local/ui + no provider checks; Bugbot none; no P0/P1; #258/#ledger delta accurate; merge-tree clean; threads cleared | verify:cheap 519 files/5493 passed; verify:pr-local docs scope (format+docs+ledger+outstanding-issues); check:branch-review-ledger; check:outstanding-issues; no provider gates | | 2026-08-07 | claude/handover-review-nlhuln | 978623337c12dc1721fe5236eadbf9a5ad929f03 | mode nav remaining modes: factsheets adoption (PR #1674) | Adopted the shared ModeNav for factsheets (Topics + Search); replaced the action-only entry, added the activeId branch, q/category/run carry, BookOpenText icon; three pinned adopted-mode lists updated together; record-route protection pinned at render now the item-count protection has expired | lint clean; typecheck clean; test 518/519 files (pr-handoff-stop failure confirmed pre-existing via stashed re-run); focused 5 files 95 tests; ui-mode-nav-density 55 passed incl 7 new factsheets rows; two mutation checks confirmed red; format committed; verify:pr-local blocked at check:installed-lock-parity (playwright 1.62.0 vs 1.62.1) | +| 2026-08-07 | claude/handover-review-nlhuln | 4ff613c10fbf734b1e740a31611296c17c791ec7 | mode nav remaining modes: vestigial strip removal (PR #1679) | Removed the single-button action strip from answer/documents/services/forms/favourites/prescribing/tools; deleted the registry index-0 fallback (TS2493-forced) and the dead documents clause; stripped modeItems/onSearch/modeAriaLabel/stickyTop from PageSecondaryNavigation, keeping the empty-registry return below the information-section branch; kept the action kind with a no-live-consumer note. Completes the 13-mode navigation rollout. | lint exit 0; typecheck clean; focused 5 files 97 tests; test 518/519 files (pr-handoff-stop re-confirmed pre-existing on this base via stashed re-run); ui-mode-nav-density + ui-accessibility 71 passed (landmark scan green); branch-order guard mutation-checked (hoisting it fails 2 tests); format committed; verify:pr-local blocked at check:installed-lock-parity (playwright 1.62.0 vs 1.62.1) | diff --git a/src/components/clinical-dashboard/global-search-shell.tsx b/src/components/clinical-dashboard/global-search-shell.tsx index 1bc3bacf1a..186a0dac2c 100644 --- a/src/components/clinical-dashboard/global-search-shell.tsx +++ b/src/components/clinical-dashboard/global-search-shell.tsx @@ -1011,7 +1011,6 @@ function GlobalStandaloneSearchShellBody({ pathname={pathname} hasSubmittedSearch={hasSubmittedModeSearch} searchParamString={searchParamString} - onSearch={() => inputRef.current?.focus({ preventScroll: true })} sticky={false} /> ) : null} diff --git a/src/components/page-secondary-navigation.tsx b/src/components/page-secondary-navigation.tsx index 63275e4a18..41a3b6c251 100644 --- a/src/components/page-secondary-navigation.tsx +++ b/src/components/page-secondary-navigation.tsx @@ -1,21 +1,15 @@ "use client"; -import { useEffect, useMemo, useState } from "react"; +import { useEffect, useState } from "react"; import { isDocumentViewerOwnedRoute } from "@/components/clinical-dashboard/mobile-composer-reserve"; import { RegistryModeNav } from "@/components/mode-nav/registry-mode-nav"; -import { - SecondaryNavigation, - type SecondaryNavigationItem, - type SecondaryNavigationSectionItem, -} from "@/components/secondary-navigation"; -import { appModeDefinition, type AppModeId } from "@/lib/app-modes"; +import { SecondaryNavigation, type SecondaryNavigationSectionItem } from "@/components/secondary-navigation"; +import { type AppModeId } from "@/lib/app-modes"; import { isInformationPage } from "@/lib/information-pages"; import { activeModeSecondaryNavigationId, isModeSecondaryNavigationRoute, - modeSecondaryNavigationEntries, - modeSecondaryNavigationHref, modeUsesHeaderModeNav, } from "@/lib/mode-secondary-navigation"; @@ -250,7 +244,6 @@ export function PageSecondaryNavigation({ modeId, pathname, hasSubmittedSearch, - onSearch, /** * Bridged query string from GlobalStandaloneSearchShellBody. Must not call * useSearchParams here — that reintroduces a nested Suspense boundary under @@ -258,58 +251,35 @@ export function PageSecondaryNavigation({ */ searchParamString = "", sticky = true, - stickyTop, }: { modeId: AppModeId; pathname: string; hasSubmittedSearch: boolean; - onSearch: () => void; searchParamString?: string; sticky?: boolean; - stickyTop?: number | string; }) { const informationDefinitions = informationPageSectionDefinitions(pathname); const locallyOwnedInformationNavigation = hasLocalInformationPageNavigation(pathname); const activeId = activeModeSecondaryNavigationId(modeId, pathname); - const modeLabel = appModeDefinition(modeId).label; - const modeAriaLabel = modeLabel.toLowerCase().endsWith("mode") ? modeLabel : `${modeLabel} mode`; - const modeItems = useMemo( - () => - modeSecondaryNavigationEntries(modeId).map((entry) => - entry.href - ? { - kind: "route" as const, - id: entry.id, - label: entry.label, - shortLabel: entry.shortLabel, - href: modeSecondaryNavigationHref({ - modeId, - itemId: entry.id, - href: entry.href, - currentSearchParams: new URLSearchParams(searchParamString), - }), - current: entry.id === activeId, - } - : { - kind: "action" as const, - id: entry.id, - label: entry.label, - shortLabel: entry.shortLabel, - onSelect: onSearch, - current: entry.id === activeId, - }, - ), - [activeId, modeId, onSearch, searchParamString], - ); // Therapy Compass owns both its workflow bindings and its dynamic detail // sections inside TcProvider; rendering the shell registry as well would // duplicate the bar and discard its URL/state-aware action bindings. if (pathname === "/therapy-compass" || pathname.startsWith("/therapy-compass/")) return null; if (locallyOwnedInformationNavigation) return null; + // ORDER IS LOAD-BEARING: this must stay above the mode branch. `services`, + // `forms`, `documents` and `prescribing` register no destinations at all yet + // still own real "On this page" section navs. Hoisting the mode guard below + // up to here would silently delete navigation from every `/services/*`, + // `/forms/*`, `/medications/*` and `/documents/` record. if (informationDefinitions.length) { return ; } + // A mode with no registered destinations gets no bar and no landmark. The + // seven that used to register a lone `action` entry each rendered one + //