diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md
index 431b7321e..f0fda628c 100644
--- a/docs/branch-review-ledger.md
+++ b/docs/branch-review-ledger.md
@@ -26,8 +26,6 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-24 | PR #1134 / `cursor/search-performance-review-4ee9` | `2a8e045f4a7179ea6fc9b81b1b2173e4c932617e` | Babysit closeout / merge readiness | MERGE-READY for product scope once exact-head required checks finish after final main sync. Fixed: Bugbot pathname searchMode (Compiler-safe previous-state sync); docs index; PR_POLICY_BODY/governance; maintainability extract; prescribing Safety filters (no fields=index); Sheet teardown document guard. Unresolved threads: none. Residual: human approving review; title still stale (gh/ManagePullRequest cannot edit); main may move again. | Hosted on prior tip 973d5d88: PR policy/Static/Unit/Build/Production UI/PR required all SUCCESS. Final sync pushed; awaiting exact-head recheck. No OpenAI/live Supabase writes. |
| 2026-07-24 | `cursor/search-performance-review-4ee9` / PR #1134 | 76d47871c44c607f942a683351378230173dcbe3 | Search performance findings remediation (prescribing, differentials, typeahead docs timeout, shared shell, answer rate-limit fallback) | FIXED. P1 prescribing catalogue now debounces (250 ms), aborts in-flight fetches, and uses `fields=index`. Differentials catalogue + evidence search abort/debounce. Universal documents typeahead timeout 6 s→750 ms (RAG impact: no retrieval behaviour change — typeahead timeout only). Shared `(search-app)` layout keeps GlobalSearchShell mounted across mode homes. Answer rate-limit fails closed only in production; development uses in-memory fallback when durable RPC is unavailable. | Focused Vitest 362 via test:focused; api-rate-limit/search-shell/universal/route/site-map suites green; `npm run ensure` smoke 200 on mode homes; `/api/answer/stream` 200 after fallback. No OpenAI spend beyond local answer stream smoke; no live eval/soak. |
| 2026-07-24 | `main` | `6ceaaff50712e10e857bf9a5a7ec88b530bf7b35` | Search performance across modes (load + typeahead + submit; local ensure) | CHANGES REQUESTED / findings. No P0. P1: Prescribing `useMedicationCatalog(query)` refetches the full ~2.5–2.9 MB medication catalogue on every keystroke without debounce, abort, or `fields=index` (~25× larger than index). P2: differentials catalogue + evidence `/api/search` lack abort/debounce; universal typeahead `tookMs` dominated by empty live documents domain (~130–340 ms); cross-namespace mode switches remount the search shell; Answer submit returns 503 `rate_limit_unavailable` when durable limiter is down (fail-closed). Mode HTML load medians ~40–75 ms; typeahead wall ~160–180 ms (`ssri`) / ~350–400 ms (`agitation im lorazepam`) + 250 ms client debounce; catalogue submits (differentials) ~45 ms; document `/api/search` demo-degraded ~230–430 ms. Highest residual live risk: cold hybrid RPC tails (docs #25), not re-measured with soak/eval. | `npm run ensure` → http://localhost:4461; `/api/local-project-id` Clinical KB; paced universal typeahead across 13 modes × 2 queries (Server-Timing); `/api/search` + `/api/medications` (+`fields=index`) + differentials APIs + registry payload sizes; NDJSON vs JSON first-byte; browser walkthrough of 13 mode homes; static review of ClinicalDashboard / universal-search / medication+differential hooks. No OpenAI generation, no `eval:retrieval:latency`, no soak, no hosted CI. Environment had Supabase secrets so universal ran live (`publicAccess`); `/api/search` degraded to demo (`supabase_api_key_configuration_unavailable`). |
-
-
| 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 | `main` | `037b4808100946f96aee28b8ff51939ae2986851` | Comprehensive repository review (architecture, security/privacy, API/DB, RAG/clinical, UX/a11y, performance/CI/ops) | Changes requested. No P0. Two confirmed P1 clinical-grounding defects: (1) numeric verification skips truncated claims after the 24-claim cap when earlier claims contain numbers; (2) unsupported prescriptive treatment recommendations remain grounded as routine/partial. Multiple P2 privacy/ops findings: signed-URL cache survives sign-out; upload/enrichment/search telemetry can retain raw filenames; negated urgency still labelled Red flag; mixed `partial_invalid_model_citation_ids` evade the invalid-ID gate; readiness probe lacks an explicit dependency timeout; Railway watch patterns miss transitive build controllers. Known tracked residuals reconfirmed: #052 enrichment/reindex overlap, #059 credential containment (operator), #007 Tools route dual entry. Highest residual risk remains live answer-quality/clinical grounding plus operator credential/#053 legal gates. No source fixes applied. | Offline: runtime, migration-role, function-grants (30), owner-scope (40 routes), GitHub Actions pins, PR-policy self-test, gate/CI-scope/Codex autofix guards, lint, typecheck, sitemap, knip, knip architecture budgets, env-parity names-only, docs index/scripts, production-readiness:ci, offline RAG 36 fixtures + 21 suites/308 tests, focused clinical/RAG contract suite 122/122, Chromium accessibility 12/12 and `verify:ui` 267/267 after identity-confirmed `npm run ensure`. Targeted offline red proofs for both P1s and the citation/safety/signed-URL P2s. Provider-gated skipped: live drift, supabase-project (non-dry), migration-history, live RAG/OpenAI evals, hosted CI, Railway mutations. |
| 2026-07-24 | `remediate-audit-system-issues` | `ae54de2b10f1c586d90c62fc3e50654dd8e917a1` + fixes | Audit remediation verification and merge readiness review | READY. Fixed the P1 (Unsafe automation) by restoring the WMI process name filter while expanding it to include common node wrappers (`node|npm|npx|tsx|vitest|playwright|bun`). Fixed the P3 (maintainability friction) by adding `rimraf` to `devDependencies`, ensuring offline availability in CI. No high-confidence P0-P2 defects remain. | Static review of diff against origin/main. Fixed issues locally and re-verified. No OpenAI, Supabase, or live provider command ran. |
@@ -84,7 +82,6 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-17 | PR #739 / cursor/pwa-optimization-merge-02e7 | 0d4aa5c73a4ff30274bb6286be04465286c815d7 | open-PR review + privacy fix + merge babysit | P1 fixed: removed backdated RAG migrations/schema seed that would regress public-only title corrector privacy. Also fixed sitemap API/redirect classification, services RightRail remount, focus=1 mode-menu flake, and merge conflict markers. Supersedes #735/#721. Merged to main. | Hosted full CI green including Production UI/Migration replay after fixes; unresolved CodeRabbit threads resolved. No OpenAI/Supabase writes. |
| 2026-07-17 | PR batch #732-#739 (screenshot queue) | 1ab611915e0630a527a533ee7ff16b82fd3e8982 | multi-PR merge babysit summary | Merged in order: #738, #733, #737, #732, #736, #739. #735 left open (token cannot close; CONFLICTING/superseded by #739). #710/#721 closed as duplicates. Residual: close #735 manually. | Hosted CI babysit + merge-tree; #739 Production UI flake fixed and re-verified green before merge. |
| 2026-07-17 | codex/ci-answer-progress-regression | bfa0ed3dfc69d5b333ba43479023cb9a8e8925d3 | CI verification gap | Fixed: the production answer-progress Playwright journey was excluded by both top-level and Chromium project matchers, while its filename also skipped the CI UI trigger; its assertions could therefore change without the required UI job executing. | Local static inspection of `playwright.config.ts`, `scripts/ci-change-scope.mjs`, Vitest globs, and CI workflow; classifier self-test confirms the journey now sets `ui_changed=true`. Focused Playwright execution reached the isolated Next build but was blocked by unavailable Google font downloads; no hosted CI or provider-backed checks run. |
-
| 2026-07-17 | PR #635 / claude/github-actions-codex-issue-f4t4s5 | ab09a8d52cc0a8a7e71b37885aaa358aae2522c8 | post-merge merge-readiness review | Already squash-merged to main on 2026-07-14 by BigSimmo. No open review threads or inline comments. CI required checks all green (Change scope, Static PR checks, Safety and config checks, Unit coverage, PR required, Semgrep, Gitleaks, GitGuardian); UI/build/migration jobs correctly skipped. Landed diff is test/guard hardening only for missing `CODEX_TRIGGER_TOKEN` graceful skip. No high-confidence P0-P2 defect. Source branch already deleted. No further merge action needed. | Hosted CI status via `gh pr checks 635` (all required pass); local `node scripts/check-codex-autofix-workflow.mjs` pass; focused Vitest `tests/codex-autofix-workflow.test.ts` 41/41. No OpenAI/Supabase/provider writes. |
| 2026-07-17 | PR #718 / codex/performance-latency-remediation-20260717 | b5f509744d4f4bac74d414644cd1802f64b97fa9 | CodeRabbit performance and SQL correctness follow-up | Resolved nine confirmed findings and dispositioned one stale test comment: document downloads revalidate signed URLs on every action; committed-generation filtering precedes detail pagination; enrichment fallback errors preserve identity; caller cancellation leaves the shared classifier flight alive; registry seeding preserves its cache signal; aliases emit canonical corrections; rate-limit success metadata is coherent; ambiguous upserts use named constraints; and grantable default ACLs fail closed. The proxy mock duplicate was not present. No remaining high-confidence P0-P2 defect was found. | Integrated focused Vitest 122/122; post-format Vitest 71/71; `npm run verify:cheap` passed runtime/policy/static guards, ESLint, TypeScript, and 2,684/2,684 tests; focused Prettier and `git diff --check`; disposable Docker replay, regenerated drift manifest, and transactional local SQL probes. No OpenAI calls, live Supabase DDL/migration/data write, deployment, or production mutation ran. |
| 2026-07-17 | PR #718 / codex/performance-latency-remediation-20260717 | d47ef7a329256687a615c33dd311806c2c1214a8 | hosted UI and migration-order merge-blocker follow-up | Fixed both integration defects exposed by the exact-head UI run: the document scope surface now triggers the deferred, deduplicated catalogue load, and viewer navigation closes unrelated disclosures before opening or scrolling to the selected section. Updated SSR-aware browser fixtures without restoring the removed detail request. Renumbered all three new migrations after the latest production migration and regenerated the drift manifest. No remaining high-confidence P0-P2 defect was found in the follow-up diff. | Focused Vitest 65/65; scoped ESLint and Prettier; `git diff --check`; isolated production Webpack build and TypeScript; focused Chromium 7/7 including both stress viewports; Docker schema replay and drift-manifest regeneration passed in 15 seconds with unchanged schema SHA. No OpenAI calls or live Supabase DDL, migration, rate-limit RPC, or data write ran. |
@@ -125,7 +122,6 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-13 | codex/public-anonymous-access | 7f3eded3d17c9daf6a443c9cac3f0553e4e9321b | production UI design and accessibility review | Fixed the fullscreen clinical-table focus leak and divergent modal implementation, removed the non-native table-surface control, and lifted meaningful production metadata from 8-10px to the 11px floor with stronger muted contrast. No remaining high-confidence defect was found in the reviewed visual scope. | Baseline/final screenshots at 1440x1000 and 390x820; focused Chromium table expansion 3/3; focused Vitest 6/6; `npm run typecheck`; targeted ESLint; type-scale and focused Prettier checks; `git diff --check`. `verify:cheap` timed out in full lint/test execution; full `verify:ui` deferred under the API confirmation boundary. |
| 2026-07-13 | main (PR #570 squash, glass header) | cc6bfc1c80902ca3c91e5ba2ebe78a80f3fd9e14 | post-merge review: CSS/visual/a11y/perf + logic/regression | No P0/P1. P2s confirmed and fixed in follow-up: build pipeline dropped ALL hand-authored backdrop-filter declarations (manual -webkit- duplicates confused Lightning CSS — header scrim, bottom dock, and composer pill were tint-only in every engine); scrim retuned to carry the bar's frost alone (header backdrop-root removed) with masks fading to true zero; private-scope alert made sticky inside main (was scroll-away in non-answer modes); scroll-hide reporter reset on breakpoint-gate change; non-forced fallback backgrounds layered to preserve the utility-wins contract. | Ran custom Playwright probe (`node scratchpad/probe-blur.mjs`, Chromium 390x844): baseline showed `getComputedStyle(.edge-glass-header-backdrop).backdropFilter === "none"` on all three passes, after fix `blur(14px)/blur(20px)/blur(26px)` — passed; Ran `node scripts/run-playwright.mjs tests/ui-smoke.spec.ts --project=chromium -g "glass header\|collapse hide\|private-scope alert\|phone (short\|long) answer stays"`: 6/6 passed; Ran `node scripts/run-playwright.mjs tests/ui-smoke.spec.ts --project=chromium` (full file): 71 passed, 4 failed (pre-existing `/privacy` heading test, fails identically on clean main); Ran `npm run verify:cheap`: exit 0 (1935 unit tests passed); Ran `npm run format:check`: passed; Not run: WebKit/Safari real-device check (no WebKit runner in this environment — served client chunk verified to pair `-webkit-backdrop-filter` with each declaration for Safari <= 17) |
| 2026-07-13 | codex/rag-review-followup | 755ac9e517a3b81f8e12a119f80f3769dd58ae4e | PR #575 post-merge review finding remediation | Fixed the P1 path that could combine a medication amount and route from separate chunks, expanded the shared explicit amount/route/frequency intent detector, corrected route-only failure classification, and added microgram-symbol coverage. Requested attributes must now be co-located with the medication subject before the text fast path is accepted. No additional high-confidence defect was found in the changed scope after integrating the production answer-budget fix from PR #580. | Focused Vitest 143/143; `npm run eval:rag:offline` (21 files, 265/265); `npm run typecheck`; targeted ESLint; full `npm test` (211 files passed, 1 skipped; 1,946 tests passed, 1 skipped); PR-local dry-run selected runtime, format, lint, typecheck, full tests, build, and offline RAG; `git diff --check`. `verify:cheap` passed all pre-test stages but its 10-minute host bound expired during the full suite; the same suite then passed independently with a longer bound. |
-
| 2026-07-13 | origin/main (detached review worktree) | c523cabeae4b68ebdf569ecbc18d9f5a7b5afbf1 | repo-wide audit | Changes requested: one P1 clinical-answer trust cluster; three P2 tenancy/reindex guardrail issues; three P3 information-disclosure, dead-code, and transitive-deprecation cleanup items. No P0 found. | `npm run verify:cheap` (1,721 passed, 1 skipped); `npm run test:coverage` (thresholds passed); `npm run build`; `npm run verify:ui` (137/137); `npm run eval:rag:offline` (36 fixtures, 60 tests); format, Edge Function, Codex workflow, import/secret/dead-reference scans. Provider-backed checks skipped. |
| 2026-07-13 | HEAD / origin/main (detached worktree) | 04c1d0b036cae8af4dabfc692055c7aab93d5888 | OpenAI-facing API and integration review | Read-only review found one P1 clinical-streaming defect and four P2 reliability/API-contract issues: provisional clinical prose is exposed before validation; mid-stream failure can silently trigger a second buffered generation; answer caches are not model/prompt fingerprinted; OpenAI access/model errors are under-classified; and table-fact route IDs are not validated before database access. GPT-5.6 migration also requires replacing the legacy prompt-cache parameter. No application code was changed. | Static call-flow, prompt, model, schema, streaming, cache, error, route, test, and governance inspection; official OpenAI model/Responses/structured-output/streaming/prompt-cache guidance reviewed. Provider-backed checks were not run. Local tests were not run because this worktree has no installed dependencies (`openai`, `vitest`). |
| 2026-07-13 | codex/openai-gpt56-rag-upgrade | 4fa4c35e98d60fc104639089494b271a5f1951fd | OpenAI and RAG review remediation | Remediated all recorded findings: clinical SSE is final-only across mixed-version deployments; buffered generation cannot silently replace a partial stream; answer caches are generation/retrieval fingerprinted; GPT-5.6 model, prompt-cache, workload routing, parsed-output, usage, safety-identifier, and error handling are capability-aware; and table-fact UUIDs fail with the shared 400 contract. Added rollout and governance documentation. Independent final review found no remaining high-confidence issue after the mixed-version client guard was added. | Replaced the external `node_modules` junction with a clean `npm ci`; `npm run verify:cheap` passed runtime/policy/lint/typecheck and full Vitest (211 files passed, 1 skipped; 1,941 tests passed, 1 skipped); focused cache/stream tests, offline RAG preflight, production-readiness CI, changed-file Prettier/ESLint, and `git diff --check` passed before the current `origin/main` integration. Provider and post-merge checks are recorded separately when complete. |
@@ -477,7 +473,6 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-14 | codex/specifiers-design | c3e7024e15d2157bbc0b989276324cc6ad3eea5c | Specifiers UI, clinical decision-support, accessibility, and release-readiness review | One P2 WCAG contrast defect was reproduced and fixed across the builder, comparison, and map accent eyebrows. No remaining high-confidence defect was found in the changed scope; residual risk is clinical/manual governance of the original specifier summaries. | Focused Vitest 18/18; focused Chromium desktop/mobile 2/2 with serious/critical axe WCAG A/AA scanning and overflow checks; `npm run check:production-readiness:ci` READY; `npm run verify:cheap` 2,210 passed/1 skipped; `npm run verify:pr-local` 2,213 passed/1 skipped plus production build and client-bundle secret scan; `git diff --check`. Full advisory `verify:ui` exceeded the local 10-minute execution window; provider-backed checks were not run. |
| 2026-07-14 | PR #633 / codex/specifiers-design | 03daca3bfdf86517b9956f3c7d91be27d9f1a751 | Review follow-up and failed UI regression | Eight distinct P2 behaviors across nine review threads were confirmed and fixed: initial selection normalization, duplicate query removal, clinical applicability mapping, canonical Specifiers routing, severity-neutral base wording, diagnostic-section ordering, base/specifier compatibility, and severe psychotic-features wording. The failed app-menu keyboard test was a stale order assertion and now covers the inserted Specifiers item. | Focused Vitest 6/6; focused Chromium 4/4; scoped ESLint and TypeScript; CI-mode production readiness READY; production build and client-bundle secret scan passed. Hosted required checks passed on the refreshed `main` merge before the final compatibility fixes; provider-backed Supabase/OpenAI checks were not run. |
| 2026-07-14 | PR #634 / codex/global-answer-reliability | b411329ec5f181661e5d49276c398440aa928fa2 | review-followup | One late P2 fast-context defect was confirmed: Australian tier ordering could push a higher-ranked supplementary passage outside the four-chunk routine fast budget. Fixed by preserving the retrieval-ranked, crowding-capped candidate budget before applying the order-only Australian preference within that set. | GitHub connector review-thread inspection; focused RAG context-budget suite 22/22; ESLint; TypeScript; Prettier; `git diff --check`. |
-
| 2026-07-14 | codex/release-blocker-remediation | 550e0588866c38583bd9445fc109ea7832a98211 | working-tree release remediation review | Reconciled the remediation onto current main after three retained-stash fast-forward syncs, preserving the extracted RAG and document-viewer architecture and main's Sentry removal. Review confirmed and fixed the Windows offline-release launcher failure, the offline Railway health-check blocker, and shared staging-test passwords. No remaining high-confidence issue was found in the changed local scope. Provider-backed production and staging evidence remains a post-PR gate. | `npm ci` and `npm ls --depth=0` passed; focused registry/offline/RAG/viewer/tenancy Vitest 207/207 plus health/config follow-up 15/15; `npm run format:check`; `npm run check:github-actions`; `npm run check:ci-scope`; `npm run verify:cheap` passed runtime, generated guards, lint, TypeScript, and full Vitest (254 files passed, 1 skipped; 2,325 tests passed, 1 skipped); `git diff --check`. |
| 2026-07-14 | claude/audit-ci-browser-gate-2026-07-13 | 09be064a09e8199e9359c50ea0dfceb25847cacf | branch-cleanup | Deleted local ref after confirming no patch-unique content remained; remote ref was left untouched. | Local cherry-pick-aware comparison to current `origin/main`; worktree/activity scan. |
| 2026-07-14 | claude/beautiful-hamilton-5df54c | 5e2e90f0a3af4039c7e15515151569228476a60c | branch-cleanup | Deleted local redundant ref; exact head was already represented on `origin/main`. | Local cherry-pick-aware comparison and prior exact-head ledger evidence. |
@@ -650,7 +645,6 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-17 | codex/performance-latency-remediation-20260717 | f277d13512e85dcaae4f9b94d028a8087e41375a | end-to-end database, network, middleware, client rendering, migration, privacy, and merge-readiness review | Fixed all confirmed performance findings plus three final review blockers: title-vocabulary backfill now installs its privacy trigger first, canonical schema replay preserves hardened trigger-function ACLs, and medication auto-seeding no longer aborts its own owner-cache flight. The isolated worktree also uses Next's supported Webpack fallback only when shared dependencies resolve outside the project. No remaining high-confidence P0-P2 defect was found in the reviewed diff. | Docker scratch replay and drift-manifest regeneration passed; live read-only plans selected lexical, table-fact trigram, and chunk HNSW indexes; exact TypeScript passed; focused Vitest owner-cache 9/9, runner safety 12/12, bundle budget 10/10, offline RAG 291/291, and earlier aggregate unit run 2,657 passed with its sole corrected schema assertion subsequently validated by direct ordering/ACL checks; production build and bundle budget passed at 1,363,382 gzip bytes; targeted Chromium dashboard deferral and NDJSON search passed, while the viewer trace reached all hydration/preview assertions and its corrected download-control selector remains for exact-head hosted UI. No OpenAI calls, live Supabase writes/migrations, deployment, or production mutation ran. |
| 2026-07-17 | codex/mobile-search-phone-refresh-20260717 (supersedes PR #700) | 42a3e3ce65dc5a0e1dce386e0b91fccd23d13d6c + reviewed follow-up diff | phone universal-search command-panel recovery and merge-readiness review | Recovered the still-useful behavior from PR #700 onto current `main`, including its hydration fix and wide-touch regression coverage. Hosted Production UI then exposed one desktop focus race: capability state intentionally initializes false for hydration safety, but an input could receive focus before the post-hydration effect synchronized the real browser state. The follow-up recomputes the same guarded predicate synchronously on focus; it requires the placement breakpoint plus either a fine pointer or a zero-touch desktop fallback, so wide touch devices remain suppressed while desktop keeps the first command-panel interaction. No remaining high-confidence P0-P2 defect was found in the scoped diff. | Focused Vitest 7/7; `npm run ensure` verified the project at `http://localhost:3751`; hosted static, safety, coverage, build, advisory UI, Semgrep, Gitleaks, and GitGuardian passed; the first hosted Production UI run isolated the nine desktop regressions. The focused browser proof reproduced the desktop race while the wide-touch regression passed, and exact-head hosted Production UI remains required after the focus fix. `format:changed -- --check` and `git diff --check` passed before the final follow-up. No Supabase/OpenAI/product-provider command ran. |
| 2026-07-17 | final historical branch/worktree cleanup against `origin/main` | 5d195d7ca8752b2ae4006725c6b145c5662bb687 | branch-cleanup | Merged PRs #716 and #717, closed superseded PR #700, and removed the three clean task worktrees. Deleted exact remote refs for `codex/mobile-search-phone-fix-20260717` (`590f32b73`), `claude/audit-findings-review-phgz92` (`ea3b8f95b8`), `codex/chat-forms-import-6914` (`b05da82f82`), `codex/chat-supabase-migration-preflight-b463` (`1ef0faee95`), and `codex/dsm-diagnosis-mode` (`f6cda83ca6`); the merged #716/#717 branches were deleted automatically. Deleted 14 unregistered local refs only after direct-main ancestry, exact ledger deletion-pending proof, or exact merged-PR commit provenance. Final inventory found zero remote branches without an open PR or registered worktree, zero locally merged or exact deletion-pending orphan refs, and no retired target refs or paths. Thirteen non-ancestor local refs and 25 registered worktrees remain preserved because they are backups, patch-unique/unresolved, open-PR-owned, or ownership could not be safely disproved. | Fresh fetch/prune; exact GitHub PR/head/merge associations; cherry-pick-aware logs; DSM PR #661 exact commit/file provenance; exact leased remote deletes; exact-old-value local `update-ref` deletes; clean-worktree and path/process checks; worktree prune; final zero-orphan inventory. The Codex task registry lookup timed out, so ambiguous registered worktrees were conservatively retained. No Supabase, OpenAI, production-data, or live clinical workflow ran. |
-
| 2026-07-15 | HEAD detached 570e6ba56 + WIP tree | 570e6ba56ae60bea56a32801b9cc96c5a8dfde4f | thorough multi-lens review: WIP RAG/schema + clinical design/UI + architecture/bug-hunt | Changes requested: no P0. Confirmed P1s in WIP � registryCorpusDetailHref typecheck break; ChunkLoadCache error/null poisoning across parallel hydrations; registry cleanup `::uuid` cast abort; corrector GIN unused by query path; new table-facts trgm index expression mismatch vs trgm_matches. Design: production clinical shell stays token/a11y-aligned; favourites nav multi-gradient bars and mockup hex drift fight clinical density. Residual: concurrent cache race, SECURITY DEFINER revoke gaps, schema/migration lifecycle drift, accidental pnpm-lock.yaml. | `npm run typecheck` (red: registry link callers + stale .next apps types); static SQL/expr/diff review; architecture + bug-hunt agents; design-system grep (tokens, reduced-motion, forced-colors). Not run: vitest, verify:*, ensure/browser screenshots, live Supabase/OpenAI. frontend-ui-reviewer subagent blocked by usage limit � design pass done inline. |
| 2026-07-18 | claude/clinical-kb-pwa-review-asi3wb (PR #826) | 3d9ee5f44dea9edb1ef5af28f5f265d88d8b9f29 | PWA hardening implementation (plan Phase 1) | Implemented the three open findings from the 2026-07-17 PWA setup review with zero cache-semantics change: committed the rule-6 retirement worker `public/sw-kill-switch.js` with a five-test lock (`tests/pwa-kill-switch.test.ts`), bound the `offline.html` sha256 to the sw.js `CACHE_VERSION` pairing in `tests/pwa-manifest.test.ts` (drift trap closed), added the `?pwa-dev=0` local teardown to `pwa-lifecycle.tsx` with a dom test proving foreign workers and caches stay untouched, and updated `docs/pwa.md` rules 1 and 6 plus the local-dev cleanup step. Phase 0 of the approved plan (pr-policy `base_ref` checkout fix + the Set-Cookie worker-test case) was found already merged to main and skipped. | Focused Vitest 53/53. `verify:cheap` and the `verify:pr-local` unit stage green except `tests/pdf-extraction-budget.test.ts`, which fails identically on clean main in this container (child-process semantics; baselined twice). `verify:ui` 218 passed with 2 container-baselined pre-existing failures: the `ui-pwa` installability test (Chromium `in-incognito` artifact, reproduced from a clean-main detached worktree with its own server) and the `ui-smoke` document-viewer PDF-canvas mobile test (also fails on clean main `54229f0`; flagged as possible upstream regression). `format:check` clean for repo files. Conditional build/bundle stages deferred to the blocking hosted CI Build job on PR #826. No provider-backed checks run. |
| 2026-07-18 | claude/clinical-kb-pwa-review-asi3wb (PR #835) | d46f381ac27b53b1bd5ac0ef77962fbd48cf3aa7 | PWA manifest and install-UX polish (plan Phase 2) | Implemented Phase 2 of the PWA plan with cache semantics untouched: `launch_handler` navigate-existing/auto and `display_override` standalone/minimal-ui in `manifest.ts`; `monochrome-192/512` icon variants rendered as a white alpha-only silhouette from the shared brand mark via `BRAND_MONOCHROME`; a one-time iOS/iPadOS Add to Home Screen hint in `pwa-lifecycle.tsx` (30-day dismissal key, never in standalone, timer-deferred eligibility for the set-state-in-effect lint rule). Docs Installability section updated; manifest screenshots remain deferred per the production-capture precondition. Phase 2 re-scout confirmed zero upstream drift before implementation. | Focused Vitest 55/55. `verify:cheap` 2773 passed/1 failed and `verify:pr-local` unit stage identical — the lone failure is the known container-only `pdf-extraction-budget` artifact (clean-main baselined; hosted CI green on #826). `test:e2e:pwa`: privacy journey passed; icon probes validated both new monochrome PNGs; sole installability error remains the container `in-incognito` artifact. `verify:ui` 219 passed/2 failed — exactly the two clean-main-baselined container artifacts, no new failures. `format:check` clean. Build/bundle stages deferred to the blocking hosted CI Build job on PR #835. No provider-backed checks run. |
@@ -733,19 +727,14 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-24 | cursor/search-interactive-perf-af54 (PR #1138 bugbot) | 8d712183 | Bugbot babysit | Fixed medium: formulation builder/home cleared live query still ranked against lagging deferredQuery. Merged main (#1137 search-chrome). No unresolved review threads. | Focused Vitest deferred registry; typecheck pending in CI. |
| 2026-07-24 | cursor/search-interactive-perf-af54 (PR #1138 babysit close) | 2f8509cc | Babysit to merge-ready | Merged main; fixed Bugbot deferred-clear findings; fixed Sheet focus-restore teardown flake that failed Unit coverage; no unresolved review threads. Hosted PR required green. | Hosted CI: Static PR, Unit coverage, Build, Production UI, Advisory UI, PR required PASS. No provider calls. |
| 2026-07-24 | codex/reindex-agent-enrichment-guard (PR #1143) | f82cf9cfa | Run PR sweep: CI fix + threads + drift | Before: PR required green, 1 unresolved reindex/agent-claim serialization thread, branch behind main. After: remote branch already had atomic RPC fix 2bb0470d plus merge-main d2d57d7c; validated pushed head, resolved thread via GraphQL; reply mutation 403 noted in commit f82cf9cf. | node scripts/run-vitest.mjs run --reporter=dot tests/reindex-enrichment-lease.test.ts tests/private-access-routes.test.ts tests/supabase-schema.test.ts tests/drift-detection.test.ts PASS (218/218); npm run check:migration-role PASS; npm run typecheck PASS; npm run check:production-readiness PASS with non-blocking warnings; no live eval gates run. |
-
-## 2026-07-24 — work search chrome behaviour review
-
-- Branch/ref: PR #1137 / `codex/review-search-bar-behavior-and-establish-rules`
-- HEAD: 6ee0484cc97b087c0e4f3661a49493f24a3ea9ba
-- Scope: Targeted review of search bar/header/footer chrome behaviour after the edge-to-edge phone dock fix, plus durable repo rules for page-adaptive search chrome.
-- Outcome: No new P0/P1 search chrome defect found in the static review. Fixed one regression hazard: a stale ClinicalDashboard comment still instructed a 0.75rem hidden dock pad despite the implementation/tests requiring 0rem. Added durable search chrome behaviour rules in AGENTS.md and docs/search-chrome-behaviour.md, with a static guard tying the remembered rules to the hidden-reserve contract.
-- Checks: dependency shortcut section count; git diff --check; targeted rg for stale 0.75rem hidden-pad source wording (only negative test assertions remain); targeted Vitest command attempted but blocked by missing node_modules/vitest under Node 20.20.2 in this container. No provider-backed checks run.
+| 2026-07-24 | PR #1140 / `implement-audit-viewport-fixes` | 1f0aed90d | mobile keyboard viewport audit fixes | REJECTED. Found two P1 defects. 1) Broken keyboard detection due to `resizes-content` conflict. 2) Aggressive keyboard dismissal breaks scrolling. | `npm run verify:cheap` running. |
+| 2026-07-24 | PR #1140 / `implement-audit-viewport-fixes` | 1528f69cda55f46e6eca910671987219ce9cbbaf | mobile keyboard viewport audit fixes | APPROVED. Fixed the two P1 defects (keyboard detection logic, scrollable container touch bubbling). | `npm run verify:cheap` passed. |
| 2026-07-24 | cursor/frontend-ui-review-docs-e8d9 (PR #1146) | 9c373eb1c2308b298a4c3abe970e5db793854ee4 | Run PR sweep: CI fix + threads + drift | Before: CONFLICTING, CI green, 0 threads. After: merged origin/main cleanly (ledger/codebase-index auto-merge); pushed 9c373eb1c. Threads: none. Residual: CI re-running. | merge origin/main only; no provider-backed checks run |
| 2026-07-24 | cursor/search-performance-review-4ee9 (PR #1134) | 022a1ab95718e5e7636226f0dfebe88d7d7bc4f4 | Run PR sweep: CI fix + threads + drift | Before: CONFLICTING, CI green (pr-required), 0 unresolved threads. After: merged origin/main cleanly (auto-merge ledger/codebase-index); pushed 022a1ab95. Threads: none. Residual: CI re-running post-merge. | merge origin/main only; no provider-backed checks run |
| 2026-07-24 | cursor/search-performance-review-4ee9 (PR #1134) | 9311d01212fe42bd41ffb22a83bfa51f1a4d19f2 | Run PR re-sync sweep | Re-check: CONFLICTING on use-differential-catalog.ts (+ related). Not cheap; merge aborted, no push. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
| 2026-07-24 | cursor/comprehensive-repo-review-ledger-d9a1 (PR #1150) | 60a3c3a83a31e65ec2759540629687e7113e2489 | Run PR sweep: CI fix + threads + drift | Before: CONFLICTING, CI green, 0 threads. After: merged origin/main cleanly (ledger auto-merge); pushed 60a3c3a83. Threads: none. Residual: CI re-running. | merge origin/main only; no provider-backed checks run |
| 2026-07-24 | cursor/search-interactive-perf-af54 (PR #1138) | ff4b293d95f922e70ebf5ee9b0c156c41a8bff3b | Run PR sweep: CI fix + threads + drift | Before: CONFLICTING, CI green, 0 threads. RAG impact: no retrieval behaviour change — PR is client deferred-search/UI only (no src/lib/rag/**). After: merged origin/main; conflict resolved in src/components/ui/sheet.tsx by keeping main restoreTimersRef/unmountingRef focus-restore fix; pushed ff4b293d9. Threads: none. | merge origin/main only; no provider-backed checks run |
+| 2026-07-24 | implement-audit-viewport-fixes (PR #1140) | 47ebd3d20184875d80bf192144b614ec58d48e08 | Run PR sweep: CI fix + threads + drift | Before: already contained origin/main. After: ledger-only record. Threads: non-P0/P1 left open. CI not waited. | merge origin/main only; thread scan read-only; no provider-backed checks run |
| 2026-07-24 | codex/hydration-fixes (PR #1131) | 6c093e927d7b4f7261fb78160d85bdc407853001 | Run PR sweep: CI fix + threads + drift | Before: already contained origin/main. After: ledger-only record. Threads: non-P0/P1 left open. CI not waited. | merge origin/main only; thread scan read-only; no provider-backed checks run |
| 2026-07-24 | codex/hydration-fixes (PR #1131) | f5451102cc0f157d0f63a3679e532d02ae85918c | Run PR babysit: CI/threads/drift | Run PR babysit: Codex P2 theme cookie validated+fixed + thread resolved. Before: CI mostly green, 1 unresolved Codex P2 (3644928239; prior Codex claim not on this branch). After: cookie fallback in THEME_BOOTSTRAP_SCRIPT + useTheme write/clear + shared keys; reply+resolve PRRT_kwDOSh5Fis6TiAhF. Not behind main. | npx vitest run tests/theme.test.ts PASS (9/9). No provider-backed checks run. |
| 2026-07-24 | codex/hydration-fixes (PR #1131) | 93518331fd1839e773a0cb08d0e8425e502f876d | Run PR babysit: CI/threads/drift | Theme cookie P2 fixed+resolved; merged origin/main resolving layout.tsx (kept cookie html class + THEME_COOKIE_NAME atop localFont/skip-link from main). | merge origin/main; vitest theme 9/9; no provider-backed checks run. |
@@ -763,12 +752,14 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-24 | codex/query-ribbon-search-headings (PR #1166) | 37cfa5553ccb784ee5e9f47ded1ad69914c053ed | Run PR babysit: CI/threads/drift | Final HEAD after merge origin/main + ledger bookkeeping. 0 unresolved threads; no Bugbot actionable findings; required CI re-running on this SHA. | merge origin/main; no provider-backed checks run. |
| 2026-07-24 | codex/query-ribbon-search-headings (PR #1166) | 9eac2e252bcc5c548aa919b69faeb79b9ff7d2cf | Run PR babysit: CI/threads/drift | Merged origin/main; Codex ledger-SHA P2 dispositioned+resolved (append-only supersede already in 9eac2e252). 0 unresolved threads. | merge origin/main; thread resolve only; no provider-backed checks run. |
| 2026-07-24 | remediate-audit-system-issues (PR #1160) | bdf530fc8c6faaa4491c510396b47872fc39bf25 | Run PR sweep: CI fix + threads + drift | second re-merge after main moved to 2e68888f3 during first push; clean ort merge (ledger + layout.tsx); taskkill /T retained; sitemap prettier retained | merge only; no provider-backed checks run |
+| 2026-07-24 | implement-audit-viewport-fixes (PR #1140) | a541b75c0e49f84125fc7e5d114cd9fc32d1a694 | Run PR re-sync sweep | Before: CONFLICTING. After: merged origin/main clean. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
| 2026-07-24 | codex/hydration-fixes (PR #1131) | a29b0d778b542932972aa6035ee115b91e49025a | Run PR re-sync sweep | Before: CONFLICTING + Static PR FAIL (suppressHydrationWarning on skip link). After: merged origin/main; removed illegal suppressHydrationWarning from skip-to-content anchor; theme fix already on PR head b4b5f21b9. CI re-running. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
| 2026-07-24 | codex/apply-phone-layout-to-all-home-pages (PR #1124) | d0a96caa01b90dffa40e60770b7700f36e8ba43f | Run PR re-sync sweep | Before: CONFLICTING @8adaaf229. After: merged origin/main clean (ort). CI re-running. Threads: not re-triaged. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
| 2026-07-24 | cursor/repo-auditor-ledger-4132 (PR #1147) | 2f47746ad7e13e8cb848da71fb2647644388da8f | Run PR re-sync sweep | Before: CONFLICTING. After: merged origin/main clean. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
| 2026-07-24 | cursor/frontend-ui-review-docs-e8d9 (PR #1146) | 2b17f5fcbe06307e7ff50ad0373789daa8f07a01 | Run PR re-sync sweep | Before: CONFLICTING. After: merged origin/main clean. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
| 2026-07-24 | codex/query-ribbon-search-headings (PR #1166) | c94e89f392f578c4b2c749195dd485b74959074c | Run PR re-sync sweep | Before: CONFLICTING. After: merged origin/main clean. CI re-running. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
| 2026-07-24 | cursor/comprehensive-repo-review-ledger-d9a1 (PR #1150) | 345c02cdbaefb13aeb951a14674aedfe4648a50e | Run PR re-sync sweep | Before: CONFLICTING. After: merged origin/main clean. | merge origin/main and/or conflict re-check only; no provider-backed checks run |
+| 2026-07-25 | implement-audit-viewport-fixes (PR #1140) | 84e930925d929ff45fded8f1276e6746e45bc9b3 | Open-PR maintenance: review fixes + drift | Before: 24 commits behind, 2 unresolved Codex threads; keyboard baseline reset existed but `--keyboard-height` had no dock consumer. After: merged current main cleanly; visible reserves include keyboard height and the edge-to-edge phone dock translates above overlay keyboards while hidden reserve stays zero. | focused Vitest pass (15/15); Prettier check pass; `git diff --check` pass; `npm run ensure` verified project at localhost:3264; full `verify:ui` not run because hosted CI will rerun and repository heavyweight work was active elsewhere; no provider-backed checks run. |
| 2026-07-25 | codex/hydration-fixes (PR #1131) | d6b5d23f7e97f99310a249db8e9f006833e697c6 | Open-PR maintenance: CI fix + threads + drift | Before: 24 commits behind, Static PR checks/PR required failed, 2 unresolved Codex threads. After: merged current main cleanly and removed the branch-introduced byte-identical PR #1149 ledger duplicate; hydration suppression fix was already present. | branch-review-ledger guard pass (717 records); targeted lint blocked by active repository heavyweight lock in worktree 6314; `git diff --check` pass; no provider-backed checks run. |
| 2026-07-24 | codex/apply-phone-layout-to-all-home-pages (PR #1124) | c59ae820db3034ef3cf74ae6d0030a0472a3a264 | Run PR babysit: merge/CI/threads | Before: CONFLICTING + Static PR checks FAIL (duplicate #1149 ledger row) + 2 unresolved Codex P2s. After: merged origin/main; removed duplicate ledger row; Differentials hero slot gated on !(query.trim() && documentMatches.length); threads resolved. | vitest mobile-composer-reserve 9/9; check:branch-review-ledger pass; maintainability 4132/4140. No provider-backed checks run. |
| 2026-07-25 | codex/document-clinical-summary-20260725 (PR #1169) | 6bbce2b97477cb4497624abe2a37c74864e872c8 | Open-PR maintenance: review-thread verification | Before: 2 unresolved Codex threads; branch current with main and required CI running. After: both persisted-profile/placeholder-summary fixes confirmed on the exact head and ready for reply-then-resolve; no further code change required. | `node scripts/run-vitest.mjs run tests/document-clinical-summary.test.ts tests/document-clinical-summary.dom.test.tsx --reporter=dot` pass (5/5); `git diff --check` pass; no provider-backed checks run. |
@@ -786,6 +777,7 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-24 | execute-audit-code-remediation (PR #1162) | 3cb7c977 | Conflict fix + Bugbot + local review | Before: CONFLICTING (21 files). After: mergeable. Restored atomic upload RPC; aligned private-access tests (133/133). Bugbot 2 medium left open. | private-access-routes 133/133; no provider-backed checks |
| 2026-07-25 | codex/document-clinical-summary-20260725 (PR #1169) | 605a47b551a03774fab41416bf980dfbc9610221 | Open-PR maintenance: malformed persisted profile guard | Before: one actionable thread showed non-array or malformed persisted summary groups could throw during render. After: every priority group is normalized through an array/item guard and malformed values are ignored while valid items still render. | Focused Vitest 7/7 pass; Prettier and diff checks pass; no provider-backed checks run. |
| 2026-07-25 | cursor/search-performance-review-4ee9 (PR #1134) | 692834a86e612cc8b311dc6895e007f182f5c5b8 | Open-PR maintenance: superseded docs-link thread and clean main sync | Before: branch was behind current main with one outdated docs-link thread; its product tree already matched main. After: merged current main cleanly and verified the route-group-aware docs-link fix now covers legacy route references. RAG impact: no retrieval behaviour change — history sync and docs tooling verification only. | `node scripts/check-docs-links.mjs` pass (1154 references); clean merge-tree; no live RAG canary or provider-backed check run. |
+| 2026-07-25 | implement-audit-viewport-fixes (PR #1140) | 283ad65377ee3e60ceb70f5cd01974caf0a54227 | Open-PR maintenance: keyboard overlay fallback | Before: fixed docks always consumed the measured visual-viewport height, double-lifting them when `interactive-widget=resizes-content` already resized the layout viewport. After: the provider subtracts layout shrink and exposes only residual overlay height to CSS while retaining keyboard-open state. | Focused Vitest 18/18 pass; `npm run ensure` verified http://localhost:3264; Prettier and diff checks pass; no provider-backed checks run. |
| 2026-07-24 | `main` / `01c209576207a3c279972697718d06c819fff000` | `01c209576207a3c279972697718d06c819fff000` | Sitewide design/UX/interactive review (production pages, breakpoints, a11y) | CHANGES REQUESTED / findings. No P0. Two confirmed P2 UX defects: (1) mobile presentation Compare tab is a self-link that drops `ids`/`q` and resets selection (1→default 4) + clears Query chip; (2) document “Browse by tag” / `searchByTag` navigates to `/?mode=documents&q=…` without `run=1`, so results do not run. P3: comparison disabled dropdown/filter controls lack `aria-describedby` placeholder contract; bare `/documents` 404 (no inbound links; `/documents/search` is canonical); phone mode-switcher truncates “Differenti…”. Deduped: `/tools` vs `/?mode=tools` remains #007; coming-soon density/favourites/forms remain #010. Phone docks flush `bottom:0` on sampled result routes; no document horizontal overflow at 390/768/1280 across 30 routes. | `npm run workflow:design-sweep -- --write-evidence`; `npm run ensure` → http://localhost:4461 identity Clinical KB; Playwright HTTP+overflow matrix 30/30 no overflow; live Compare/tag proofs + phone route matrix; `npm run test:e2e:accessibility` 12/12; screenshots under `/opt/cursor/artifacts/screenshots/design-review-2026-07-24/`. No OpenAI/Supabase/GitHub/hosted CI/provider mutations. Added project subagent `.cursor/agents/design-review.md`. |
| 2026-07-24 | PR #1176 / `cursor/pdf-crop-malformed-repro-9b3e` | `5391bf185cd5dffd00a31eb1d282ccfc93277a73` | #076 page-edge table crop geometry fix + fixture regression | APPROVE. No P0-P1. Fix is narrowly scoped to post-find_tables candidate extension from contiguous cell drawings; title/footer inflation avoided by ignoring text during geometry growth; incompleteness warning retained when content continues past the page. Highest residual risk: text-grid tables without cell drawings still will not edge-extend; left/right/top paths are symmetric but fixture-proven only for bottom. Broad PR #1129 retention/padding/storage changes remain out of scope. | Python page-edge + budget 6/6; Vitest pdf-extractor 3 passed / 1 skipped; offline only. |
| 2026-07-24 | PR #1176 / `cursor/pdf-crop-malformed-repro-9b3e` | `28c1e2352a7cabb9c73f52d5084ee69f47895c5e` | #076 page-edge table crop geometry fix (post-merge tip) | APPROVE (supersedes prior #1176 row for 5391bf18 after remote merge). No P0-P1. Same scoped drawing-based edge extension; residual: text-grid tables without drawings, and left/right/top only unit-symmetric. PR #1129 retention/padding still out of scope. | Re-ran Python page-edge + budget 6/6 and Vitest pdf-extractor 3/1 skipped after merge; offline only. |
diff --git a/src/app/globals.css b/src/app/globals.css
index 71633a46b..883b9104a 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -267,6 +267,7 @@
--shadow-lux: inset 0 1px 0 rgb(255 255 255 / 64%), 0 12px 34px rgb(8 16 24 / 7%);
--shadow-inset: inset 0 1px 0 rgb(255 255 255 / 58%);
--shadow-card: var(--shadow-tight);
+ --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent), var(--shadow-soft);
/* Active left-rail marker (nav/list "current" indicator). One token so the
accent rail is a consistent 2px everywhere instead of hand-inlined at 2px/3px. */
--shadow-rail-active: inset 2px 0 0 var(--clinical-accent);
@@ -283,6 +284,7 @@
header height and those page-fill floors cannot silently drift apart. */
--shell-header-h: 4rem;
/* Keep in sync with mobile-composer-reserve.ts (phone dock clearance). */
+ --keyboard-height: 0px;
--phone-dock-hidden-pad: 0rem;
--phone-dock-differentials-compare-clearance: 12.5rem;
--phone-dock-differentials-compare-compact-clearance: 12.25rem;
@@ -428,6 +430,7 @@
--shadow-elevated: 0 2px 8px rgb(0 0 0 / 46%), 0 12px 30px rgb(0 0 0 / 48%), 0 28px 58px rgb(0 0 0 / 50%);
--shadow-lux: inset 0 1px 0 rgb(255 255 255 / 4%), 0 18px 44px rgb(0 0 0 / 64%);
--shadow-inset: inset 0 1px 0 rgb(255 255 255 / 4%);
+ --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent), var(--shadow-soft);
color-scheme: dark;
}
@@ -1161,6 +1164,7 @@ summary::-webkit-details-marker {
.chat-composer-shell-delta:focus-within {
border-color: var(--clinical-accent);
+ box-shadow: var(--shadow-focus);
}
.chat-composer-input {
@@ -1813,7 +1817,7 @@ summary::-webkit-details-marker {
bottom: 0;
width: 100%;
max-width: none;
- transform: none;
+ transform: translateY(calc(-1 * var(--keyboard-height, 0px)));
padding-inline: max(0.75rem, var(--safe-area-left)) max(0.75rem, var(--safe-area-right));
padding-top: 0.5rem;
padding-bottom: max(0.5rem, var(--safe-area-bottom));
@@ -1847,6 +1851,13 @@ summary::-webkit-details-marker {
transform: translateY(calc(100% + 0.75rem + env(safe-area-inset-bottom)));
}
+ /* Document viewer owns its floating composer (not the shared dock). Lift it
+ with the same --keyboard-height signal so overlay/visual keyboards do not
+ cover the focused input on document detail/source routes. */
+ .document-viewer-composer.floating-composer-edge:not([data-scroll-hidden="true"]) {
+ transform: translateY(calc(-1 * var(--keyboard-height, 0px)));
+ }
+
/* Document viewer bottom composer mirrors the dock's hide-on-scroll. Unlike
the full-bleed dock it floats with a bottom gap (.floating-composer-edge,
bottom: max(0.75rem, safe-area)), so the exit transform must also clear
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index ab735fb94..5912586bb 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -7,6 +7,7 @@ import { PwaLifecycle } from "@/components/pwa-lifecycle";
import { WebVitalsReporter } from "@/components/web-vitals-reporter";
import { resolveMetadataBase } from "@/lib/metadata-base";
import { APP_THEME_COLORS, THEME_BOOTSTRAP_SCRIPT, THEME_COOKIE_NAME } from "@/lib/theme";
+import { MobileKeyboardProvider } from "@/components/use-mobile-keyboard";
import "./globals.css";
const geistSans = localFont({
@@ -60,6 +61,7 @@ export const viewport: Viewport = {
width: "device-width",
initialScale: 1,
viewportFit: "cover",
+ interactiveWidget: "resizes-content",
colorScheme: "light dark",
themeColor: [
{ media: "(prefers-color-scheme: light)", color: APP_THEME_COLORS.light },
@@ -114,7 +116,9 @@ export default async function RootLayout({
- {children}
+
+ {children}
+