+
{contextualOpenLabel(document)}
@@ -995,7 +998,7 @@ function DocumentSearchResultsPanelImpl({
onScopeDocument(document.document_id)}
icon={Filter}
- className="min-h-tap rounded-lg px-2.5 text-xs text-[color:var(--text)]"
+ className="min-w-0 flex-col rounded-md px-1 text-2xs text-[color:var(--text-muted)] [font-size:var(--text-2xs)] [font-weight:500] [gap:0.125rem] [&_svg]:size-icon-sm sm:w-auto sm:flex-row sm:rounded-lg sm:px-2.5 sm:text-xs sm:[font-size:var(--text-xs)] sm:[gap:0.375rem]"
aria-label={`Scope search to ${document.title}`}
>
Scope
@@ -1003,7 +1006,7 @@ function DocumentSearchResultsPanelImpl({
onAnswerFromDocument(document.document_id)}
icon={Sparkles}
- className="ml-auto min-h-tap rounded-lg px-2.5 text-xs text-[color:var(--clinical-accent)] hover:bg-[color:var(--clinical-accent-soft)]"
+ className="min-w-0 flex-col rounded-md px-1 text-2xs text-[color:var(--clinical-accent)] [font-size:var(--text-2xs)] [font-weight:500] [gap:0.125rem] hover:bg-[color:var(--clinical-accent-soft)] [&_svg]:size-icon-sm sm:ml-auto sm:w-auto sm:flex-row sm:rounded-lg sm:px-2.5 sm:text-xs sm:[font-size:var(--text-xs)] sm:[gap:0.375rem]"
aria-label={`Answer from ${document.title}`}
>
Answer
diff --git a/tests/ui-smoke.spec.ts b/tests/ui-smoke.spec.ts
index 9afecd4412..a91d92d963 100644
--- a/tests/ui-smoke.spec.ts
+++ b/tests/ui-smoke.spec.ts
@@ -3273,6 +3273,51 @@ test.describe("Clinical KB UI smoke coverage", () => {
await expect(documentResults).toContainText("Best match");
await expect(documentResults).toContainText("1 table");
+ // Phone actions share the card width evenly, then become a natural toolbar
+ // from tablet upward. Keep the production result card inside every viewport
+ // used by the design workflow and prove the quieter action typography.
+ for (const width of [320, 390, 639, 768, 1440, 1920]) {
+ await page.setViewportSize({ width, height: 900 });
+ await expectNoPageHorizontalOverflow(page);
+ const actionGeometry = await documentResults.getByTestId("document-result-actions").evaluate((rail) => {
+ const railStyle = getComputedStyle(rail);
+ const widths = Array.from(rail.children).map((child) => child.getBoundingClientRect().width);
+ const firstActionStyle = getComputedStyle(rail.children[0]);
+ const card = rail.closest("article")?.getBoundingClientRect();
+ return {
+ display: railStyle.display,
+ widths,
+ actionFontSize: firstActionStyle.fontSize,
+ actionFontWeight: firstActionStyle.fontWeight,
+ actionDirection: firstActionStyle.flexDirection,
+ cardLeft: card?.left ?? 0,
+ cardRight: card?.right ?? 0,
+ viewportWidth: window.innerWidth,
+ };
+ });
+ expect(actionGeometry.cardLeft).toBeGreaterThanOrEqual(0);
+ expect(actionGeometry.cardRight).toBeLessThanOrEqual(actionGeometry.viewportWidth + 1);
+ if (width < 640) {
+ expect(actionGeometry.display).toBe("grid");
+ expect(Math.max(...actionGeometry.widths) - Math.min(...actionGeometry.widths)).toBeLessThanOrEqual(1);
+ expect(actionGeometry.actionFontSize).toBe("11px");
+ expect(actionGeometry.actionDirection).toBe("column");
+ } else {
+ expect(actionGeometry.display).toBe("flex");
+ expect(actionGeometry.actionFontSize).toBe("12px");
+ expect(actionGeometry.actionDirection).toBe("row");
+ }
+ expect(actionGeometry.actionFontWeight).toBe("500");
+ }
+ await page.setViewportSize({ width: 390, height: 820 });
+ const openResultLink = documentResults.getByRole("link", { name: /Open Synthetic lithium monitoring protocol/i });
+ await openResultLink.focus();
+ await expect(openResultLink).toBeFocused();
+ await page.emulateMedia({ forcedColors: "active" });
+ await expect(documentResults.getByTestId("document-result-actions")).toBeVisible();
+ await expectNoPageHorizontalOverflow(page);
+ await page.emulateMedia({ forcedColors: "none" });
+
if ((await mobileTypeFilter.locator('option[value="tables"]').count()) > 0) {
await mobileTypeFilter.selectOption("tables");
await expect(mobileTypeFilter).toHaveValue("tables");
From e69eae490a35b76e81105432f1a07cd7a07690a0 Mon Sep 17 00:00:00 2001
From: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Date: Wed, 29 Jul 2026 20:45:04 +0800
Subject: [PATCH 2/5] Record document results UI review
---
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 c986aaa00b..a74130d058 100644
--- a/docs/branch-review-ledger.md
+++ b/docs/branch-review-ledger.md
@@ -1264,3 +1264,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie
| 2026-07-29 | claude/clinical-design-system-update-e34ca9 | 0cdae091ad92f40e0ad7335b3e2d396c44188a4f | PR #1375 conflict fix + Bugbot | FIXED second CONFLICTING after #1378: took main removal of SelectedDocumentEvidencePanel; retained tracking-eyebrow on surviving document-search-results. Prior DocumentViewerRail + form-detail settlement retained. MERGEABLE; CI re-running. | local: document-search-record-fault + design-token tests; merge-tree CLEAN; prior Production UI PASS on 6903f51f; form-detail e2e 2/2. |
| 2026-07-29 | claude/test-coverage-analysis-2vcd8a | 0922d7f56624ef84be8abcb2bbc89205027cf9a6 | PR #1383 babysit | BLOCKER CLEARED: merged origin/main; renumbered coverage follow-ups #098/#099 -> #106/#107 (main claimed #098-#105). Before: CONFLICTING/DIRTY, 4 behind; CI green on prior tip; 0 review threads; 0 Bugbot findings. After: mergeable expected; verify:cheap 424 files/4371 passed; test:coverage exit 0; format:changed + check:rag:fixtures pass. | verify:cheap PASS (424 files, 4371 passed \| 4 skipped); test:coverage PASS (no threshold errors); format:changed PASS; check:rag:fixtures PASS (36 golden); Bugbot: no findings; no provider-backed checks |
| 2026-07-29 | claude/test-coverage-analysis-2vcd8a | 6f476b5f741627cb622af57d1b4665e3989789ca | PR #1383 babysit | CLOSEOUT at tip after ledger bookkeeping commit. Merge conflict cleared; coverage follow-ups live as #106/#107; local gates green; awaiting hosted CI on tip. | same as prior tip 0922d7f5 plus ledger append only; no product code change |
+| 2026-07-29 | codex/document-results-responsive-polish | 94bef3d193f449e6396b1bf4688180281d260ca7 | document results responsive UI polish | No P0-P3 findings. Current-main three-action cards preserved; responsive typography, equal phone geometry, warning hierarchy, and no-overflow behavior verified. | focused ESLint; typecheck; 30 focused unit tests; isolated production Playwright 1 passed; verify:cheap static/design/governance/lint passed then lock-blocked at repeated typecheck |
From 0f02d086e0716ed072df5fe73a7962b6c02891d1 Mon Sep 17 00:00:00 2001
From: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Date: Wed, 29 Jul 2026 21:18:44 +0800
Subject: [PATCH 3/5] Restore document action tap targets
---
.../clinical-dashboard/document-search-results.tsx | 6 +++---
tests/ui-smoke.spec.ts | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/components/clinical-dashboard/document-search-results.tsx b/src/components/clinical-dashboard/document-search-results.tsx
index 5337c1164c..849baed7c3 100644
--- a/src/components/clinical-dashboard/document-search-results.tsx
+++ b/src/components/clinical-dashboard/document-search-results.tsx
@@ -990,7 +990,7 @@ function DocumentSearchResultsPanelImpl({
>
{contextualOpenLabel(document)}
@@ -998,7 +998,7 @@ function DocumentSearchResultsPanelImpl({
onScopeDocument(document.document_id)}
icon={Filter}
- className="min-w-0 flex-col rounded-md px-1 text-2xs text-[color:var(--text-muted)] [font-size:var(--text-2xs)] [font-weight:500] [gap:0.125rem] [&_svg]:size-icon-sm sm:w-auto sm:flex-row sm:rounded-lg sm:px-2.5 sm:text-xs sm:[font-size:var(--text-xs)] sm:[gap:0.375rem]"
+ className="min-h-12 min-w-0 flex-col rounded-md px-1 text-2xs text-[color:var(--text-muted)] [font-size:var(--text-2xs)] [font-weight:500] [gap:0.125rem] [&_svg]:size-icon-sm sm:w-auto sm:flex-row sm:rounded-lg sm:px-2.5 sm:text-xs sm:[font-size:var(--text-xs)] sm:[gap:0.375rem]"
aria-label={`Scope search to ${document.title}`}
>
Scope
@@ -1006,7 +1006,7 @@ function DocumentSearchResultsPanelImpl({
onAnswerFromDocument(document.document_id)}
icon={Sparkles}
- className="min-w-0 flex-col rounded-md px-1 text-2xs text-[color:var(--clinical-accent)] [font-size:var(--text-2xs)] [font-weight:500] [gap:0.125rem] hover:bg-[color:var(--clinical-accent-soft)] [&_svg]:size-icon-sm sm:ml-auto sm:w-auto sm:flex-row sm:rounded-lg sm:px-2.5 sm:text-xs sm:[font-size:var(--text-xs)] sm:[gap:0.375rem]"
+ className="min-h-12 min-w-0 flex-col rounded-md px-1 text-2xs text-[color:var(--clinical-accent)] [font-size:var(--text-2xs)] [font-weight:500] [gap:0.125rem] hover:bg-[color:var(--clinical-accent-soft)] [&_svg]:size-icon-sm sm:ml-auto sm:w-auto sm:flex-row sm:rounded-lg sm:px-2.5 sm:text-xs sm:[font-size:var(--text-xs)] sm:[gap:0.375rem]"
aria-label={`Answer from ${document.title}`}
>
Answer
diff --git a/tests/ui-smoke.spec.ts b/tests/ui-smoke.spec.ts
index 5d782045e2..f237aebba4 100644
--- a/tests/ui-smoke.spec.ts
+++ b/tests/ui-smoke.spec.ts
@@ -3302,6 +3302,9 @@ test.describe("Clinical KB UI smoke coverage", () => {
expect(Math.max(...actionGeometry.widths) - Math.min(...actionGeometry.widths)).toBeLessThanOrEqual(1);
expect(actionGeometry.actionFontSize).toBe("11px");
expect(actionGeometry.actionDirection).toBe("column");
+ for (const action of await documentResults.getByTestId("document-result-actions").locator(":scope > *").all()) {
+ await expectMinTouchTarget(action, 48);
+ }
} else {
expect(actionGeometry.display).toBe("flex");
expect(actionGeometry.actionFontSize).toBe("12px");
From 55183f974a9c2e21d8fa9585415fdcfad31f2444 Mon Sep 17 00:00:00 2001
From: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Date: Wed, 29 Jul 2026 21:19:23 +0800
Subject: [PATCH 4/5] Record tap target review fix
---
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 3625852ea6..919afb96f8 100644
--- a/docs/branch-review-ledger.md
+++ b/docs/branch-review-ledger.md
@@ -1268,3 +1268,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie
| 2026-07-29 | claude/test-coverage-analysis-2vcd8a | 6f476b5f741627cb622af57d1b4665e3989789ca | PR #1383 babysit | CLOSEOUT at tip after ledger bookkeeping commit. Merge conflict cleared; coverage follow-ups live as #106/#107; local gates green; awaiting hosted CI on tip. | same as prior tip 0922d7f5 plus ledger append only; no product code change |
| 2026-07-29 | codex/document-results-responsive-polish | 94bef3d193f449e6396b1bf4688180281d260ca7 | document results responsive UI polish | No P0-P3 findings. Current-main three-action cards preserved; responsive typography, equal phone geometry, warning hierarchy, and no-overflow behavior verified. | focused ESLint; typecheck; 30 focused unit tests; isolated production Playwright 1 passed; verify:cheap static/design/governance/lint passed then lock-blocked at repeated typecheck |
| 2026-07-29 | codex/document-reader-condensed-view | 5678e878d4fe681d33bb58df5b5b3468a138a1c8 | pr-1380-ci-green-resync | hosted CI green on 7150899a (Static/Build/Unit/Advisory/Production UI/PR required/CircleCI); CodeRabbit density fallback + summary keys + search/plain compact tests landed; unresolved review threads none; resynced main after tip went BEHIND by 1 | hosted CI success on 7150899a; merge-tree clean; bugbot no P0/P1 |
+| 2026-07-29 | codex/document-results-responsive-polish | 0f02d086e0716ed072df5fe73a7962b6c02891d1 | document results responsive UI polish | P2 tap-target review finding fixed with 48px actions and regression coverage | focused production Playwright 1 passed; eslint passed; format passed; diff-check passed |
From c9141be1e440a41054511282c67475dea4a72485 Mon Sep 17 00:00:00 2001
From: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Date: Wed, 29 Jul 2026 22:13:42 +0800
Subject: [PATCH 5/5] Repair duplicate review ledger merge artifacts
---
docs/branch-review-ledger.md | 3 ---
1 file changed, 3 deletions(-)
diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md
index 9cd408858c..825837393f 100644
--- a/docs/branch-review-ledger.md
+++ b/docs/branch-review-ledger.md
@@ -1269,9 +1269,6 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie
| 2026-07-29 | claude/test-coverage-analysis-2vcd8a | 0922d7f56624ef84be8abcb2bbc89205027cf9a6 | PR #1383 babysit | BLOCKER CLEARED: merged origin/main; renumbered coverage follow-ups #098/#099 -> #106/#107 (main claimed #098-#105). Before: CONFLICTING/DIRTY, 4 behind; CI green on prior tip; 0 review threads; 0 Bugbot findings. After: mergeable expected; verify:cheap 424 files/4371 passed; test:coverage exit 0; format:changed + check:rag:fixtures pass. | verify:cheap PASS (424 files, 4371 passed \| 4 skipped); test:coverage PASS (no threshold errors); format:changed PASS; check:rag:fixtures PASS (36 golden); Bugbot: no findings; no provider-backed checks |
| 2026-07-29 | claude/test-coverage-analysis-2vcd8a | 6f476b5f741627cb622af57d1b4665e3989789ca | PR #1383 babysit | CLOSEOUT at tip after ledger bookkeeping commit. Merge conflict cleared; coverage follow-ups live as #106/#107; local gates green; awaiting hosted CI on tip. | same as prior tip 0922d7f5 plus ledger append only; no product code change |
| 2026-07-29 | codex/document-results-responsive-polish | 94bef3d193f449e6396b1bf4688180281d260ca7 | document results responsive UI polish | No P0-P3 findings. Current-main three-action cards preserved; responsive typography, equal phone geometry, warning hierarchy, and no-overflow behavior verified. | focused ESLint; typecheck; 30 focused unit tests; isolated production Playwright 1 passed; verify:cheap static/design/governance/lint passed then lock-blocked at repeated typecheck |
-| 2026-07-29 | agent/document-topbar-actions (PR #1381) | 9da8ccfb19ff81b876a9bfff4e6b5870641e44d8 | PR #1381 CI triage | merged via squash auto-merge after main sync; all required checks green; no product code fix; no Bugbot/review threads | hosted CI pr-required pass; Production UI pass; CircleCI pass; lint; typecheck; document-viewer-shell.dom; Bugbot none |
-| 2026-07-29 | codex/chat-document-header-overlay-document-header-overlay-20260729 | 48ed6cc95f886837f4ddbb369fdbc611a0958f17 | document phone header overlay | No high-confidence findings; physical iPhone acceptance remains | verify:pr-local unit 4373 pass; build PASS; focused Playwright 2 pass; phone gate contended |
-| 2026-07-29 | codex/document-reader-condensed-view | 5678e878d4fe681d33bb58df5b5b3468a138a1c8 | pr-1380-ci-green-resync | hosted CI green on 7150899a (Static/Build/Unit/Advisory/Production UI/PR required/CircleCI); CodeRabbit density fallback + summary keys + search/plain compact tests landed; unresolved review threads none; resynced main after tip went BEHIND by 1 | hosted CI success on 7150899a; merge-tree clean; bugbot no P0/P1 |
| 2026-07-29 | codex/document-results-responsive-polish | 0f02d086e0716ed072df5fe73a7962b6c02891d1 | document results responsive UI polish | P2 tap-target review finding fixed with 48px actions and regression coverage | focused production Playwright 1 passed; eslint passed; format passed; diff-check passed |
| 2026-07-29 | claude/test-coverage-analysis-2vcd8a | 5145dc990af47fba8b4c68f2b4537f21406535b6 | PR #1383 babysit | Hosted CI green on prior tip bebc6c02 (PR required / Unit coverage / Static / Safety / Migration replay / CircleCI all PASS). Synced one more clean main commit (ledger-only). MERGEABLE; 0 unresolved threads; 0 Bugbot findings; no code defects. | hosted: PR required PASS, Unit coverage PASS 4m41s, Static PR PASS, Safety PASS, Migration replay PASS, CircleCI verify PASS; local prior: verify:cheap + test:coverage PASS; Bugbot none |
| 2026-07-29 | agent/document-topbar-actions (PR #1381) | 9da8ccfb19ff81b876a9bfff4e6b5870641e44d8 | PR #1381 CI triage | merged via squash auto-merge after main sync; all required checks green; no product code fix; no Bugbot/review threads | hosted CI pr-required pass; Production UI pass; CircleCI pass; lint; typecheck; document-viewer-shell.dom; Bugbot none |