{calc.abbrev}
+{calc.abbrev}
{calc.name}From c78271bae02ddf82792bb0625f479483240e76b8 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Sat, 25 Jul 2026 21:57:22 +0800 Subject: [PATCH 02/16] Format typography cherry-pick and record PR #1185 review. Prettier wraps the expanded font-sans stack and collapses the mockup heading so the push format guard passes. Ledger records the fresh Bugbot/review verdict on contaminated #1185 and the clean replacement. --- docs/branch-review-ledger.md | 3 +++ src/app/globals.css | 4 +++- src/components/calculator-mockups/bedside-sheet-mockup.tsx | 4 +--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 250735a6f..21e266e02 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -872,3 +872,6 @@ This file is append-only. Never rewrite or delete an existing review record; app | 2026-07-25 | open-pr-babysit-continuation-20260725 | multipass | Babysit continuation after 14 merges: #1177 landed; #1174/#1178/#1153 in progress; drafts #1187/#1192 skipped; large cluster #1162/#1185/#1186/#1188/#1190 content-conflicted (skip). | merge-tree inventory; no provider-backed checks. | | 2026-07-25 | audit-remediation (PR #1153) | 5a731df5c25fed9b07fd2321a0ad4b6519471f4b | PR babysit: CodeRabbit thread fixes + merge | Before: MERGEABLE/BLOCKED on required_review_thread_resolution + pending CI; 6 CodeRabbit threads. After: fixed sync-skills pad/YAML escape, PDF temp cleanup, squash-aware rollback wording; dispositioned ledger mid-table + retained false-positive; approved CI; merged to main `191b17d2f` (merge commit); branch deleted; tip is ancestor of main. | Hosted CI green on tip; no provider-backed checks. | | 2026-07-25 | cursor/local-presence-054-7cf3 (PR #1178) | 9135891bfd194394549cb480a7ec86de12b23ee7 | PR babysit: local-presence + /tools + CI/UI fixes + squash merge | Before: flaky Safety audit on package.json scripts, Production UI Sources autofocus flake, CodeRabbit short-env duplicate thread. After: ci-change-scope lockfile-only; strip stale short env keys; sheet open-focus retries + skip focus=1 reclaim under modal; squash-merged `d08ec2e8e`; branch deleted; key-file content-diff empty. | Hosted PR required SUCCESS (Production UI green on tip); focused local-presence vitest; no provider-backed checks. | + +| 2026-07-25 | PR #1185 / `execute-typography-audit-fixes` | `dd641579f4cf54f82de89ef268ac8aa6acb439b5` | Fresh Cursor review + Bugbot + prlanded | DO NOT MERGE / CLOSE+REDO. Confirms prior ledger: intentional tip commit is safe typography-only (5 files), but branch tree still carries committed conflict markers from `faa50e6e3` (answer/upload routes, docs, tests) so the PR cannot build. Codex P1 markers + upload publisher spoof + P2 mobile back regression are real on that dirty tree. `prlanded`: not merged (`state=OPEN`, `mergedAt=null`). Replacement: cherry-pick tip onto current main as `cursor/typography-audit-fixes-1c1e`. | Bugbot on PR head; `git show` of tip; marker scan; `git merge-tree`/diff vs main. No provider calls. Hosted PR policy FAIL. | +| 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | pending-push | Clean cherry-pick of typography audit tip onto `origin/main` | APPROVE-ready local. Scope is only font-stack + mockup heading/truncation/tabular-nums. No conflict markers. Highest residual risk: visual-only mockup/CSS change; unrelated Vitest flakes seen locally (pdf-extractor SIGKILL, reconciliation-preflight timeout) not tied to this delta. | `npm run verify:cheap`: lint+typecheck+static gates pass; Vitest 3379 pass / 2 env flakes. No provider/UI matrix. | diff --git a/src/app/globals.css b/src/app/globals.css index 6ace20cdc..53f6403f7 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -99,7 +99,9 @@ /* Font families: bind Tailwind's font-sans / font-mono to the loaded Geist faces (variables set on by next/font). font-mono is used for clinical codes and IDs (guideline refs, chunk/page numbers, versions). */ - --font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + --font-sans: + var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, + Arial, sans-serif; --font-mono: var(--font-geist-mono), ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace; --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1); diff --git a/src/components/calculator-mockups/bedside-sheet-mockup.tsx b/src/components/calculator-mockups/bedside-sheet-mockup.tsx index a5bdaa76c..ffda9d824 100644 --- a/src/components/calculator-mockups/bedside-sheet-mockup.tsx +++ b/src/components/calculator-mockups/bedside-sheet-mockup.tsx @@ -160,9 +160,7 @@ export function CalculatorsBedsideSheetMockup() {
- Assessment sheet -
+Assessment sheet
Run several scales in one review — a summary builds as you go.
From 3cc6fa0cded305420b2b11a27b5d844660aa092f Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Sat, 25 Jul 2026 21:57:50 +0800 Subject: [PATCH 03/16] docs: record published SHA for typography supersede branch --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 21e266e02..8a0cadb02 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -875,3 +875,4 @@ This file is append-only. Never rewrite or delete an existing review record; app | 2026-07-25 | PR #1185 / `execute-typography-audit-fixes` | `dd641579f4cf54f82de89ef268ac8aa6acb439b5` | Fresh Cursor review + Bugbot + prlanded | DO NOT MERGE / CLOSE+REDO. Confirms prior ledger: intentional tip commit is safe typography-only (5 files), but branch tree still carries committed conflict markers from `faa50e6e3` (answer/upload routes, docs, tests) so the PR cannot build. Codex P1 markers + upload publisher spoof + P2 mobile back regression are real on that dirty tree. `prlanded`: not merged (`state=OPEN`, `mergedAt=null`). Replacement: cherry-pick tip onto current main as `cursor/typography-audit-fixes-1c1e`. | Bugbot on PR head; `git show` of tip; marker scan; `git merge-tree`/diff vs main. No provider calls. Hosted PR policy FAIL. | | 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | pending-push | Clean cherry-pick of typography audit tip onto `origin/main` | APPROVE-ready local. Scope is only font-stack + mockup heading/truncation/tabular-nums. No conflict markers. Highest residual risk: visual-only mockup/CSS change; unrelated Vitest flakes seen locally (pdf-extractor SIGKILL, reconciliation-preflight timeout) not tied to this delta. | `npm run verify:cheap`: lint+typecheck+static gates pass; Vitest 3379 pass / 2 env flakes. No provider/UI matrix. | +| 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | `c78271bae02ddf82792bb0625f479483240e76b8` | Clean cherry-pick published | APPROVE-ready. Published replacement for contaminated #1185; 5-file typography delta + format + ledger. | Local `verify:cheap` as above; pushed to origin. | From 0988e01ca6fc0e1e76e229be65aa3082b1230d65 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Sat, 25 Jul 2026 22:29:44 +0800 Subject: [PATCH 04/16] docs: record PR #1200 typography merge-readiness review Append ledger outcome for head 6bc05690: not ready due to nested heading hierarchy regression and draft/CI blockers. --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 8a0cadb02..38397d6f0 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -876,3 +876,4 @@ This file is append-only. Never rewrite or delete an existing review record; app | 2026-07-25 | PR #1185 / `execute-typography-audit-fixes` | `dd641579f4cf54f82de89ef268ac8aa6acb439b5` | Fresh Cursor review + Bugbot + prlanded | DO NOT MERGE / CLOSE+REDO. Confirms prior ledger: intentional tip commit is safe typography-only (5 files), but branch tree still carries committed conflict markers from `faa50e6e3` (answer/upload routes, docs, tests) so the PR cannot build. Codex P1 markers + upload publisher spoof + P2 mobile back regression are real on that dirty tree. `prlanded`: not merged (`state=OPEN`, `mergedAt=null`). Replacement: cherry-pick tip onto current main as `cursor/typography-audit-fixes-1c1e`. | Bugbot on PR head; `git show` of tip; marker scan; `git merge-tree`/diff vs main. No provider calls. Hosted PR policy FAIL. | | 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | pending-push | Clean cherry-pick of typography audit tip onto `origin/main` | APPROVE-ready local. Scope is only font-stack + mockup heading/truncation/tabular-nums. No conflict markers. Highest residual risk: visual-only mockup/CSS change; unrelated Vitest flakes seen locally (pdf-extractor SIGKILL, reconciliation-preflight timeout) not tied to this delta. | `npm run verify:cheap`: lint+typecheck+static gates pass; Vitest 3379 pass / 2 env flakes. No provider/UI matrix. | | 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | `c78271bae02ddf82792bb0625f479483240e76b8` | Clean cherry-pick published | APPROVE-ready. Published replacement for contaminated #1185; 5-file typography delta + format + ledger. | Local `verify:cheap` as above; pushed to origin. | +| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | `6bc05690a966e3e8aebdc8ea0460b60899201c52` | Explicit merge-readiness review (typography supersede of #1185) | NOT READY. Clean 5-file product delta vs main (font-stack + mockups). Confirmed P2: answer-evidence sheet/modal titles promoted h3->h2 while nested under Section h2 (hierarchy regression). P2 process: PR body describes unrelated audit-remediation work. Process blockers: draft; tip CI/SAST/Secret Scan `action_required` (green only on older `3cc6fa0cd`). No P0/P1 product defects. Font-stack/min-w-0/tabular-nums OK. | `origin/main...HEAD` 6 files; merge-tree clean; marker scan clean; no provider/UI matrix. | From e7d93cddd75a71a4d7c4deff48e0038c98f6706f Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Sat, 25 Jul 2026 22:31:33 +0800 Subject: [PATCH 05/16] fix(pr-1200): restore nested mockup heading hierarchy and PR body. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keep sheet/modal titles as h3 under Section h2 so the mockup stays h1 → h2 → h3. Add PR_POLICY_BODY.md with the typography summary so Sync PR policy body stops reapplying the unrelated audit-remediation description. --- PR_POLICY_BODY.md | 34 +++++++++++++++++++ docs/branch-review-ledger.md | 1 + .../mockups/answer-evidence-popups/page.tsx | 8 ++--- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 PR_POLICY_BODY.md diff --git a/PR_POLICY_BODY.md b/PR_POLICY_BODY.md new file mode 100644 index 000000000..c2e9abe3a --- /dev/null +++ b/PR_POLICY_BODY.md @@ -0,0 +1,34 @@ +## Summary + +Clean re-delivery of the intentional typography audit tip from closed PR #1185, cherry-picked onto current `main`. + +Scope (production CSS + design mockups only): + +- Broader `--font-sans` fallback stack in `globals.css` (Geist remains first) +- Truncation `min-w-0` on recent-search chips +- Remove redundant `leading-tight` on bedside sheet title +- `tabular-nums` on clinical console abbrev + +Nested sheet/modal titles in the answer-evidence mockup stay at `h3` under section `h2` so heading hierarchy remains `h1 → h2 → h3`. + +Please keep #1185 closed; this is the mergeable supersede. + +RAG impact: no retrieval behaviour change — CSS font stack and mockup markup only. + +## Verification + +- [x] `npm run verify:cheap` on the clean cherry-pick tip (lint/typecheck/static gates; unit suite) +- Verification not run: `npm run verify:pr-local` (typography-only CSS/mockup; cheap gate covered lint/typecheck/unit) +- UI verification not run: `npm run verify:ui` (font-stack fallback + mockup class changes; residual risk visual-only) +- Verification not run: `npm run verify:release` / provider-backed evals (no clinical/retrieval/provider surface) + +## Risk and rollout + +- Risk: Low. Visual/CSS + design-mockup only; no API, auth, retrieval, or schema changes. +- Rollback: Revert this PR. +- Provider or production effects: None + +## Notes + +- #1185 was closed as contaminated (committed conflict markers from archive checkpoint). +- Temporary `PR_POLICY_BODY.md` restores the correct description after a stale sync overwrite; safe to delete after Sync PR policy body is green. diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 38397d6f0..93278cd95 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -877,3 +877,4 @@ This file is append-only. Never rewrite or delete an existing review record; app | 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | pending-push | Clean cherry-pick of typography audit tip onto `origin/main` | APPROVE-ready local. Scope is only font-stack + mockup heading/truncation/tabular-nums. No conflict markers. Highest residual risk: visual-only mockup/CSS change; unrelated Vitest flakes seen locally (pdf-extractor SIGKILL, reconciliation-preflight timeout) not tied to this delta. | `npm run verify:cheap`: lint+typecheck+static gates pass; Vitest 3379 pass / 2 env flakes. No provider/UI matrix. | | 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | `c78271bae02ddf82792bb0625f479483240e76b8` | Clean cherry-pick published | APPROVE-ready. Published replacement for contaminated #1185; 5-file typography delta + format + ledger. | Local `verify:cheap` as above; pushed to origin. | | 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | `6bc05690a966e3e8aebdc8ea0460b60899201c52` | Explicit merge-readiness review (typography supersede of #1185) | NOT READY. Clean 5-file product delta vs main (font-stack + mockups). Confirmed P2: answer-evidence sheet/modal titles promoted h3->h2 while nested under Section h2 (hierarchy regression). P2 process: PR body describes unrelated audit-remediation work. Process blockers: draft; tip CI/SAST/Secret Scan `action_required` (green only on older `3cc6fa0cd`). No P0/P1 product defects. Font-stack/min-w-0/tabular-nums OK. | `origin/main...HEAD` 6 files; merge-tree clean; marker scan clean; no provider/UI matrix. | +| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | pending-push | Follow-up perfection pass | FIXED: reverted nested mockup titles to `h3` under Section `h2`; restored correct `PR_POLICY_BODY.md` after stale overwrite; remaining product delta is font-stack + recent-search `min-w-0` + bedside `leading-tight` drop + clinical-console `tabular-nums` + ledger. | Heading hierarchy re-check; Prettier check on touched files. | diff --git a/src/app/mockups/answer-evidence-popups/page.tsx b/src/app/mockups/answer-evidence-popups/page.tsx index b267c11ea..e4e67cb45 100644 --- a/src/app/mockups/answer-evidence-popups/page.tsx +++ b/src/app/mockups/answer-evidence-popups/page.tsx @@ -279,7 +279,7 @@ function MobileSheetFrame({{title}
+{title}
{description}
Evidence
+Evidence
Clozapine monitoring table
+Clozapine monitoring table
Expanded from visual evidence. Use the source PDF for final verification.
@@ -662,7 +662,7 @@ function WeakEvidencePopup() {Evidence support is limited
+Evidence support is limited
From 58ea460ace8ff4373f93b59c5bb54fc3ccb380df Mon Sep 17 00:00:00 2001
From: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Date: Sat, 25 Jul 2026 22:31:49 +0800
Subject: [PATCH 06/16] docs: record PR #1200 perfection-pass tip SHA
---
docs/branch-review-ledger.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md
index 93278cd95..ac473e111 100644
--- a/docs/branch-review-ledger.md
+++ b/docs/branch-review-ledger.md
@@ -878,3 +878,4 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-25 | `cursor/typography-audit-fixes-1c1e` (supersedes #1185) | `c78271bae02ddf82792bb0625f479483240e76b8` | Clean cherry-pick published | APPROVE-ready. Published replacement for contaminated #1185; 5-file typography delta + format + ledger. | Local `verify:cheap` as above; pushed to origin. |
| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | `6bc05690a966e3e8aebdc8ea0460b60899201c52` | Explicit merge-readiness review (typography supersede of #1185) | NOT READY. Clean 5-file product delta vs main (font-stack + mockups). Confirmed P2: answer-evidence sheet/modal titles promoted h3->h2 while nested under Section h2 (hierarchy regression). P2 process: PR body describes unrelated audit-remediation work. Process blockers: draft; tip CI/SAST/Secret Scan `action_required` (green only on older `3cc6fa0cd`). No P0/P1 product defects. Font-stack/min-w-0/tabular-nums OK. | `origin/main...HEAD` 6 files; merge-tree clean; marker scan clean; no provider/UI matrix. |
| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | pending-push | Follow-up perfection pass | FIXED: reverted nested mockup titles to `h3` under Section `h2`; restored correct `PR_POLICY_BODY.md` after stale overwrite; remaining product delta is font-stack + recent-search `min-w-0` + bedside `leading-tight` drop + clinical-console `tabular-nums` + ledger. | Heading hierarchy re-check; Prettier check on touched files. |
+| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | `e7d93cddd75a71a4d7c4deff48e0038c98f6706f` | Follow-up perfection published | APPROVE once tip CI green. Heading hierarchy fixed; correct policy body template on branch; product scope reduced to 4 source files + ledger/template. | Prettier check; pushed tip. |
From 259b12a187a5390c6704329f7b7512ee2be3b6e4 Mon Sep 17 00:00:00 2001
From: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Date: Sat, 25 Jul 2026 22:32:43 +0800
Subject: [PATCH 07/16] docs: ledger note for PR #1200 main sync after conflict
---
docs/branch-review-ledger.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md
index 2929bb49f..f4f8b01e9 100644
--- a/docs/branch-review-ledger.md
+++ b/docs/branch-review-ledger.md
@@ -963,3 +963,4 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-25 | execute-audit-code-remediation (PR #1162) | f07c711a0e1ee853b128733a51db182d8192c3c4 | CI unblock after Bugbot | Fixed Prettier (11 files), restored package-lock/.npmrc to main so blocking npm audit is advisory (lockfile_changed=false), updated mobile-composer-reserve contract for answer-home hero breakpoint. Prior tip e5c8c49c had Static/Safety/Unit failures. | format:check; focused Vitest 41; ci-change-scope lockfile_changed=false; no provider-backed checks. |
| 2026-07-25 | execute-audit-code-remediation (PR #1162) | 1de1b32f562c0a972997750a5dc97a02ab1a9c15 | Production UI fix | Fixed ui-tools services referral header test (H1/quick-filters contract). Prior tip 09c6eb2d had Static/Safety/Unit/Migration green; only Production UI failed. | Local Playwright chromium services referral test PASS; no provider-backed checks. |
| 2026-07-25 | execute-audit-code-remediation (PR #1162) | b9b56c140eb14cbba5a2c2230e3fa28d3a791add | CI unblock after bot sync | Tip 96188eca had PR required SUCCESS (Static/Safety/Unit/Build/Migration/Production UI). Hosted pr-branch-sync then merged main (a420b86b/b9b56c14), leaving CI action_required for bot-authored runs. Pushing agent commit to re-trigger non-bot CI. | Prior tip 96188eca hosted CI green; local services referral Playwright PASS; no provider-backed checks. |
+| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | `80421c38c54c5960bf51210d6bc29109b52afb53` | Main sync after CONFLICTING + perfection | MERGE-READY product scope. Merged `origin/main` cleanly; no markers; product delta remains font-stack + 3 mockup tweaks + policy body/ledger. Heading hierarchy fix retained. | merge-tree clean; marker scan clean; type-scale + design-system-contract + Prettier pass. |
From 7a94877745c652b7bb7144cf9be02a22a9a0dbdf Mon Sep 17 00:00:00 2001
From: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Date: Sat, 25 Jul 2026 23:07:05 +0800
Subject: [PATCH 08/16] fix(ui): let Sheet autofocus win over close-button
fallback.
Sources Find failed Production UI because open-focus retries would not
move off the close control once a late-mounted data-sheet-autofocus
input appeared. Allow that upgrade during the open retry window and
cover it with a Sheet DOM regression test. Drop temporary PR policy
body template after the live description was restored.
---
PR_POLICY_BODY.md | 34 ----------------------------------
docs/branch-review-ledger.md | 1 +
src/components/ui/sheet.tsx | 5 ++++-
tests/sheet.dom.test.tsx | 31 ++++++++++++++++++++++++++++++-
4 files changed, 35 insertions(+), 36 deletions(-)
delete mode 100644 PR_POLICY_BODY.md
diff --git a/PR_POLICY_BODY.md b/PR_POLICY_BODY.md
deleted file mode 100644
index c2e9abe3a..000000000
--- a/PR_POLICY_BODY.md
+++ /dev/null
@@ -1,34 +0,0 @@
-## Summary
-
-Clean re-delivery of the intentional typography audit tip from closed PR #1185, cherry-picked onto current `main`.
-
-Scope (production CSS + design mockups only):
-
-- Broader `--font-sans` fallback stack in `globals.css` (Geist remains first)
-- Truncation `min-w-0` on recent-search chips
-- Remove redundant `leading-tight` on bedside sheet title
-- `tabular-nums` on clinical console abbrev
-
-Nested sheet/modal titles in the answer-evidence mockup stay at `h3` under section `h2` so heading hierarchy remains `h1 → h2 → h3`.
-
-Please keep #1185 closed; this is the mergeable supersede.
-
-RAG impact: no retrieval behaviour change — CSS font stack and mockup markup only.
-
-## Verification
-
-- [x] `npm run verify:cheap` on the clean cherry-pick tip (lint/typecheck/static gates; unit suite)
-- Verification not run: `npm run verify:pr-local` (typography-only CSS/mockup; cheap gate covered lint/typecheck/unit)
-- UI verification not run: `npm run verify:ui` (font-stack fallback + mockup class changes; residual risk visual-only)
-- Verification not run: `npm run verify:release` / provider-backed evals (no clinical/retrieval/provider surface)
-
-## Risk and rollout
-
-- Risk: Low. Visual/CSS + design-mockup only; no API, auth, retrieval, or schema changes.
-- Rollback: Revert this PR.
-- Provider or production effects: None
-
-## Notes
-
-- #1185 was closed as contaminated (committed conflict markers from archive checkpoint).
-- Temporary `PR_POLICY_BODY.md` restores the correct description after a stale sync overwrite; safe to delete after Sync PR policy body is green.
diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md
index f4f8b01e9..380163c71 100644
--- a/docs/branch-review-ledger.md
+++ b/docs/branch-review-ledger.md
@@ -964,3 +964,4 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-25 | execute-audit-code-remediation (PR #1162) | 1de1b32f562c0a972997750a5dc97a02ab1a9c15 | Production UI fix | Fixed ui-tools services referral header test (H1/quick-filters contract). Prior tip 09c6eb2d had Static/Safety/Unit/Migration green; only Production UI failed. | Local Playwright chromium services referral test PASS; no provider-backed checks. |
| 2026-07-25 | execute-audit-code-remediation (PR #1162) | b9b56c140eb14cbba5a2c2230e3fa28d3a791add | CI unblock after bot sync | Tip 96188eca had PR required SUCCESS (Static/Safety/Unit/Build/Migration/Production UI). Hosted pr-branch-sync then merged main (a420b86b/b9b56c14), leaving CI action_required for bot-authored runs. Pushing agent commit to re-trigger non-bot CI. | Prior tip 96188eca hosted CI green; local services referral Playwright PASS; no provider-backed checks. |
| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | `80421c38c54c5960bf51210d6bc29109b52afb53` | Main sync after CONFLICTING + perfection | MERGE-READY product scope. Merged `origin/main` cleanly; no markers; product delta remains font-stack + 3 mockup tweaks + policy body/ledger. Heading hierarchy fix retained. | merge-tree clean; marker scan clean; type-scale + design-system-contract + Prettier pass. |
+| 2026-07-25 | PR #1200 / `cursor/typography-audit-fixes-1c1e` | pending-push | Production UI flake fix | FIXED reproducible Sources Find autofocus: Sheet open retries now upgrade from close-button fallback to late-mounted `data-sheet-autofocus` (was leaving focus on Close after drawer children mount). Typography product delta unchanged. Removed temporary `PR_POLICY_BODY.md`. | `node scripts/run-vitest.mjs run tests/sheet.dom.test.tsx` 5/5. |
diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx
index aa8c4c6c1..b3cc863e4 100644
--- a/src/components/ui/sheet.tsx
+++ b/src/components/ui/sheet.tsx
@@ -215,11 +215,14 @@ export function Sheet({
if (!focusTarget?.isConnected) return null;
if (document.activeElement === focusTarget) return focusTarget;
// Reclaim when focus is outside the panel (or still on body after a
- // remount). Do not steal from another in-panel control the user tabbed to.
+ // remount). Do not steal from another in-panel control the user tabbed to —
+ // except the close-button fallback chosen before a late-mounted
+ // data-sheet-autofocus target appears (Sources Find field race).
const active = document.activeElement;
if (
active == null ||
active === document.body ||
+ active === closeRef.current ||
(panelRef.current != null && !panelRef.current.contains(active))
) {
focusTarget.focus({ preventScroll: true });
diff --git a/tests/sheet.dom.test.tsx b/tests/sheet.dom.test.tsx
index 9ff02d501..6973a7456 100644
--- a/tests/sheet.dom.test.tsx
+++ b/tests/sheet.dom.test.tsx
@@ -1,4 +1,4 @@
-import { render } from "@testing-library/react";
+import { render, waitFor } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { Sheet } from "@/components/ui/sheet";
@@ -118,4 +118,33 @@ describe("Sheet stacked-overlay coordination", () => {
expect(vi.getTimerCount()).toBe(0);
vi.useRealTimers();
});
+
+ it("upgrades from the close-button fallback to a late-mounted data-sheet-autofocus target", async () => {
+ const onClose = vi.fn();
+ const { rerender } = render(
+ Loading filters…