From 02ce93edf7d46f2b6637b4e9057119c3ea60c856 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:32:41 +0800 Subject: [PATCH 1/9] fix(ui): implement orientation adaptive design audit recommendations --- src/components/AccessibleTable.tsx | 6 +++--- src/components/ClinicalDashboard.tsx | 10 +++++----- .../universal-search-command-surface.tsx | 2 +- src/components/ui/sheet.tsx | 2 +- src/components/universal-search-command-mockups.tsx | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/AccessibleTable.tsx b/src/components/AccessibleTable.tsx index 912c22c16f..0b54939e46 100644 --- a/src/components/AccessibleTable.tsx +++ b/src/components/AccessibleTable.tsx @@ -99,7 +99,7 @@ function AccessibleTableMarkup({
{caption && !(hidePreviewCaption && !expanded) ? ( @@ -112,7 +112,7 @@ function AccessibleTableMarkup({ {caption}
) : null} -
+
-
+
{lowConfidence ? (

{showFallback diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index 51a31a707a..09bdbc1d15 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -3496,20 +3496,20 @@ export function ClinicalDashboard({ // sm+/lg values stay identical to the result-view treatment. searchMode === "answer" ? compactMobileModeHome - ? "pb-4" + ? "pb-[max(1rem,env(safe-area-inset-bottom))]" : // The

reserve already clears the fixed composer dock on // phones, so the old large mobile bottom padding only floated a // long answer's last line high above the dock (and padded a short // answer's empty space further). Keep it small here; sm+/desktop // keep the original generous padding. - "pb-4 sm:pb-36 lg:pb-40" + "pb-[max(1rem,env(safe-area-inset-bottom))] sm:pb-36 lg:pb-40" : hasMobileBottomSearch ? // The
reserve clears the compact dock on phones, so // content keeps only a small pad of its own. compactMobileModeHome - ? "pb-4 sm:pb-10 lg:pb-12" - : "pb-8 sm:pb-10 lg:pb-12" - : "pb-8 sm:pb-10 lg:pb-12", + ? "pb-[max(1rem,env(safe-area-inset-bottom))] sm:pb-10 lg:pb-12" + : "pb-[max(2rem,env(safe-area-inset-bottom))] sm:pb-10 lg:pb-12" + : "pb-[max(2rem,env(safe-area-inset-bottom))] sm:pb-10 lg:pb-12", )} > {actionNotice && ( diff --git a/src/components/clinical-dashboard/universal-search-command-surface.tsx b/src/components/clinical-dashboard/universal-search-command-surface.tsx index 08b27a5599..15ad240e44 100644 --- a/src/components/clinical-dashboard/universal-search-command-surface.tsx +++ b/src/components/clinical-dashboard/universal-search-command-surface.tsx @@ -256,7 +256,7 @@ function CommandDropdown({ role="listbox" aria-label={`${mode.label} search suggestions`} className={cn( - "max-h-[min(55dvh,26rem)] overflow-y-auto overscroll-contain p-2", + "max-h-[calc(100dvh-5rem)] sm:max-h-[min(55dvh,26rem)] overflow-y-auto overscroll-contain p-2", opensUpward ? "sm:max-h-[min(38dvh,20rem)]" : "sm:max-h-[min(42dvh,24rem)]", )} > diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index f0b9eba2b0..9bec23919e 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -299,7 +299,7 @@ export function Sheet({ "rounded-t-2xl motion-safe:animate-sheet-up", defaultSheetUsesViewportSize ? "min-h-[calc(100dvh-2rem)] max-h-[calc(100dvh-1rem)] sm:min-h-0" - : "max-h-[88dvh]", + : "max-h-[calc(100dvh-2rem)] sm:max-h-[88dvh]", ), ), ), diff --git a/src/components/universal-search-command-mockups.tsx b/src/components/universal-search-command-mockups.tsx index 37df17229c..8e569912e8 100644 --- a/src/components/universal-search-command-mockups.tsx +++ b/src/components/universal-search-command-mockups.tsx @@ -611,7 +611,7 @@ function SmartDropdown({ id={listboxId} role="listbox" aria-label={`${mode.label} search suggestions`} - className="max-h-[26rem] overflow-y-auto p-2" + className="max-h-[calc(100dvh-5rem)] sm:max-h-[26rem] overflow-y-auto p-2" > {sections.map((section) => section.items.length ? ( From c2494b3ce8d45567a39ce72a2a58a172dd831a5e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 24 Jul 2026 06:24:00 +0000 Subject: [PATCH 2/9] fix: remove duplicate command dropdown height cap Co-authored-by: BigSimmo --- .../universal-search-command-surface.tsx | 2 +- tests/search-command-surface.test.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/clinical-dashboard/universal-search-command-surface.tsx b/src/components/clinical-dashboard/universal-search-command-surface.tsx index 15ad240e44..d57a661956 100644 --- a/src/components/clinical-dashboard/universal-search-command-surface.tsx +++ b/src/components/clinical-dashboard/universal-search-command-surface.tsx @@ -256,7 +256,7 @@ function CommandDropdown({ role="listbox" aria-label={`${mode.label} search suggestions`} className={cn( - "max-h-[calc(100dvh-5rem)] sm:max-h-[min(55dvh,26rem)] overflow-y-auto overscroll-contain p-2", + "max-h-[calc(100dvh-5rem)] overflow-y-auto overscroll-contain p-2", opensUpward ? "sm:max-h-[min(38dvh,20rem)]" : "sm:max-h-[min(42dvh,24rem)]", )} > diff --git a/tests/search-command-surface.test.ts b/tests/search-command-surface.test.ts index acf7b99d29..cda6f996e9 100644 --- a/tests/search-command-surface.test.ts +++ b/tests/search-command-surface.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; +import { readFileSync } from "node:fs"; import { commandDropdownCanDisplay, @@ -139,4 +140,14 @@ describe("search command surface", () => { expect(differentialRedFlagTerms).toContain("confusion"); expect(differentialRedFlagTerms.length).toBeGreaterThan(3); }); + + it("keeps one sm max-height cap per command dropdown placement", () => { + const source = readFileSync( + new URL("../src/components/clinical-dashboard/universal-search-command-surface.tsx", import.meta.url), + "utf8", + ); + + expect(source).not.toContain("sm:max-h-[min(55dvh,26rem)]"); + expect(source).toContain('opensUpward ? "sm:max-h-[min(38dvh,20rem)]" : "sm:max-h-[min(42dvh,24rem)]"'); + }); }); From 864f738e61b118bd42342b350c15e530fcba90cd Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 24 Jul 2026 06:26:07 +0000 Subject: [PATCH 3/9] chore: note review reply permission denial GraphQL review-thread replies returned 403; resolved the fixed duplicate-height threads directly after validation. Co-authored-by: BigSimmo From 4bd36300082f95c7e1b1bce0cd0ae1aa4deaaa51 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 24 Jul 2026 06:27:27 +0000 Subject: [PATCH 4/9] docs: record PR babysit sweep Co-authored-by: BigSimmo --- 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 03d3fca652..f1b53071cd 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -707,3 +707,4 @@ Use this ledger to prevent repeated branch and PR reviews when the reviewed HEAD | 2026-07-21 | claude/clinical-kb-pwa-review-asi3wb (Option A wave verdict — no code change; #1040 merged as cde6c5c) | canary run 29827012719 (#61, main cde6c5c) vs banked #60 (29800029819) | OPTION A WAVE ADOPTED — FIRST FULLY-GREEN 44-CASE CANARY IN PROGRAM HISTORY (Blocking failures: None). (1) Option A payoff EXCEEDED: citation_failure_rate 0.0227→0; the neuroleptic-side-effect-escalation case flipped from wrong-doc→failed-generation→1-citation-fallback to **strong route, successful gpt-5.6-sol generation, passed in 15.4s with no fallback marker** — the rescued S3 retrieval fixed generation itself, not just the citation count; expected_source_hit 0.6364→0.6591. (2) Golden held exactly as the blast-radius analysis promised: 36/36 PASS, content_recall 1.0, mrr@10 0.8921 BYTE-IDENTICAL to the pre-wave baseline (zero ordering movement — no golden case fires the predicate), irrelevant@10 0.1083→0.0917 (slightly better). (3) Parity payoff PARTIAL: monitoring targeting 1/5→2/5 (olanzapine-lai flipped — previously called a retrieval-depth residual; quetiapine-dose also flipped on the dose side); lithium-range (232ch) + metabolic (73ch, byte-identical answer to #60) did NOT flip despite offline-proven fixes — their live chunk sets evidently contain no admissible schedule sentence even under the widened gate → reclassified as retrieval-depth/live-content residuals joining adhd; below the ≥3/5 target but strictly improved, no regression anywhere. Dose 2/5 vs 2/4: same passing count, applicable set grew (new quality-metformin-renal-dosing miss = eval-set churn, not regression). (4) No-worse EXCEEDED: relevance 0.5333→0.6 (the two-step watch-item slide FULLY REVERSED to the #58 level), targeting_rate 0.6667→0.6957, fail_closed 0.9 held, readability/artifact_leaks 1.0, route ceilings 0, grounded 1.0, unsupported_correct 1.0, numeric 0, p95 22.8s, red_result 3/3. Adoption per the measured-gain rule: primary goal achieved, three case flips, relevance recovered, zero regressions. Residual queue: monitoring retrieval-depth trio (lithium-range/metabolic/adhd), E-3d H2 discards, weekly ANSWER_CASE_LIMIT 8→44 raise now unblocked (gate would be green), comparison-class coverage. Wave spend +~$2-4 → Phase E + Option A total ~$12-20 of ≤$20. | Evidence: run #61 job log read (Threshold Status: None; Answer Metrics; neuroleptic diagnostics row; targeting metric_rates + 6-miss list; golden 36 PASS lines + summary). Revert drill NOT triggered. | | 2026-07-21 | claude/clinical-kb-pwa-review-asi3wb (PR: I9 weekly coverage raise) | see PR head | ADDENDUM 5 post-green item I9 (plan-authorized "after reds fixed"): weekly scheduled canary ANSWER_CASE_LIMIT default 8→44 — the Sunday 18:00 UTC cron now guards the FULL answer-quality case set instead of the first 8 (both #57 blocking reds historically lived OUTSIDE the first 8, leaving the weekly gate blind to them). Unblocked by run #61 proving the citation gate green on the full 44. Cost: est +$1-2/week (user-authorized in the plan). Contract test pin updated in lockstep (eval-canary-workflow.test.ts). Dispatch shapes unchanged (input override still wins); operational-risk diff, plain-revert rollback. | check:github-actions PASS; check:ci-scope PASS; check:gate-manifest PASS (20/20); eval-canary-workflow contract 4/4; prettier clean; no provider calls | | 2026-07-21 | claude/database-governance-audit-10b6ed (PR #1051: source-governance audit — safe subset) | cee396730 | Governance-metadata observability + UI display + provenance flow test; no ranking/retrieval/generation surface touched. | IMPLEMENTED + handed off (not a review of prior work). Resolved audit #1 (logger.warn on unrecognized enum values; return value unchanged), #2 (review_due_source added to frontendVisibleWarningCodes → answer-level badge; warning-severity, no refusal impact), #9 (source_metadata retained on safety-finding citations + governance pill in SafetyFindingsListContent), #13 (new tests/provenance-flow.test.ts: DB-normalize→governance→client payload sources+safety citations→render policy). Deferred #4/5/6/8/10 (RAG-protected ranking/selection/LLM-context/cache — need live eval-canary+approval), #11/#5 flag debt (D5/D4), #3 (is_public schema/RLS), #7 (conflict-detection scope), #12 (canary automation). Rebased onto origin/main (was 18 behind; conflict-free — none of the 18 commits touched the 8 files). PR-policy CI green (confirmed no ragRankingPatterns match). | verify:pr-local exit 0 (351 files/3129 tests, production build, client-bundle secret scan, offline RAG fixtures 36/36); typecheck + lint + prettier green. verify:ui NOT run locally: pre-existing globals.css Tailwind/Turbopack dev-compile error (git-clean, unrelated; prod build passed) — CI Production UI job covers it. check:production-readiness deferred (offline env/config validator; PR changes no env/secret/config inputs; secretless worktree). No provider calls. | +| 2026-07-24 | implement-audit-recommendations-fix (PR #1141) | 864f738e6 | Run PR sweep: CI fix + threads + drift | Before: PR required green, 2 unresolved duplicate sm:max-h command-surface threads, branch behind main. After: merged origin/main cleanly; removed generic duplicate sm:max-h cap; both threads resolved via GraphQL; reply mutations 403 noted in commit 864f738e. | node scripts/run-vitest.mjs run --reporter=dot tests/search-command-surface.test.ts PASS (8/8); git diff --check PASS; no Supabase/OpenAI/live eval gates run. | From 70814a82e53b2c8410530cea1726b7aa230d2f55 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 24 Jul 2026 19:28:29 +0800 Subject: [PATCH 5/9] docs: record Run PR behind-main sweep for #1141 --- 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 38afa8ffdb..c52d934f83 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -732,3 +732,4 @@ This file is append-only. Never rewrite or delete an existing review record; app - 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 | 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-recommendations-fix (PR #1141) | b5f8959af8ec44de63200b1d19c273bae1b7d541 | Run PR sweep: CI fix + threads + drift | Before: behind main by 6. After: merged origin/main cleanly (no conflicts). Threads: non-P0/P1 left open. CI not waited. | merge origin/main only; thread scan read-only; no provider-backed checks run | From 04d07f21efbf5a0d0bb21746f6775334cf8a0c4d Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 24 Jul 2026 19:57:26 +0800 Subject: [PATCH 6/9] docs: ledger re-sync sweep for PR #1141 --- 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 192f38e704..dda4625344 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -739,3 +739,4 @@ This file is append-only. Never rewrite or delete an existing review record; app | 2026-07-24 | remediate-audit-system-issues (PR #1160) | 04201a87cc7ad7dd1477d17cd2b96544b7379789 | Run PR sweep: CI fix + threads + drift | re-merge origin/main after CONFLICTING relapse; resolved scripts/run-eval-safe.mjs (kept main taskkill /T /F + validPids); sitemap Prettier format() retained from fe0588b86; no unresolved threads; no conflict markers | merge + conflict resolve only; no provider-backed checks run | | 2026-07-24 | codex/fix-next.js-startup-failure-and-verify-pages (PR #1149) | 8ddddbab2a29a94b3f993cbd114889f72c95f4f1 | Run PR sweep: CI fix + threads + drift | Before: behind main. After: merged origin/main cleanly (no conflicts). Unresolved review threads left as non-P0/P1. CI not waited. | merge origin/main only; thread scan read-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-recommendations-fix (PR #1141) | 7cd9d428a9c2c8c1ba22af2c1d6c4725334221c8 | 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 | From 0aaf441775786e5def408a2eda551d9b5d95542d Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Sat, 25 Jul 2026 01:16:07 +0800 Subject: [PATCH 7/9] fix(ui): collapse dock child safe-area padding --- src/components/ClinicalDashboard.tsx | 10 +++++----- tests/clinical-dashboard-merge-artifacts.test.ts | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index 045b52ef01..b8bb4a620c 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -3458,20 +3458,20 @@ export function ClinicalDashboard({ // sm+/lg values stay identical to the result-view treatment. searchMode === "answer" ? compactMobileModeHome - ? "pb-[max(1rem,env(safe-area-inset-bottom))]" + ? "pb-4" : // The
reserve already clears the fixed composer dock on // phones, so the old large mobile bottom padding only floated a // long answer's last line high above the dock (and padded a short // answer's empty space further). Keep it small here; sm+/desktop // keep the original generous padding. - "pb-[max(1rem,env(safe-area-inset-bottom))] sm:pb-36 lg:pb-40" + "pb-4 sm:pb-36 lg:pb-40" : hasMobileBottomSearch ? // The
reserve clears the compact dock on phones, so // content keeps only a small pad of its own. compactMobileModeHome - ? "pb-[max(1rem,env(safe-area-inset-bottom))] sm:pb-10 lg:pb-12" - : "pb-[max(2rem,env(safe-area-inset-bottom))] sm:pb-10 lg:pb-12" - : "pb-[max(2rem,env(safe-area-inset-bottom))] sm:pb-10 lg:pb-12", + ? "pb-4 sm:pb-10 lg:pb-12" + : "pb-8 sm:pb-10 lg:pb-12" + : "pb-8 sm:pb-10 lg:pb-12", )} > {actionNotice && ( diff --git a/tests/clinical-dashboard-merge-artifacts.test.ts b/tests/clinical-dashboard-merge-artifacts.test.ts index ec7ec4bdbf..f4adddebd8 100644 --- a/tests/clinical-dashboard-merge-artifacts.test.ts +++ b/tests/clinical-dashboard-merge-artifacts.test.ts @@ -142,6 +142,7 @@ describe("ClinicalDashboard merge-artifact guards", () => { expect(clinicalDashboardSource).toContain("resolveMobileComposerReserve("); expect(clinicalDashboardSource).toContain('from "@/components/clinical-dashboard/mobile-composer-reserve"'); expect(clinicalDashboardSource).not.toContain('bottomComposerHidden ? "max(0.75rem, env(safe-area-inset-bottom))"'); + expect(clinicalDashboardSource).not.toMatch(/pb-\[max\([^"']*safe-area-inset-bottom/); expect(clinicalDashboardSource).toContain( '"max-sm:pb-[var(--mobile-composer-reserve)] max-sm:[scroll-padding-bottom:var(--mobile-composer-reserve)] sm:mb-24"', ); From d0b988ad03a15ea569b479e989c0c102c29f7671 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Sat, 25 Jul 2026 01:16:25 +0800 Subject: [PATCH 8/9] docs: record PR 1141 maintenance --- 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 214d24176c..e8f5598d1b 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -758,3 +758,4 @@ This file is append-only. Never rewrite or delete an existing review record; app | 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 | codex/fix-merge-conflicts-and-ci-on-open-prs (PR #1170) | e979fc892f11a17b1a8f2ef1ab058ef40d629182 | Open-PR maintenance: CI fix + threads + drift | Before: Static PR checks failed because route-group moves made nine valid legacy `src/app/*` documentation references appear missing; 0 unresolved threads; branch already contained current main. After: docs-link resolution checks known App Router route groups and the focused failure is fixed. | `node scripts/check-docs-links.mjs` pass (1162 references); Prettier check pass; `git diff --check` pass; no provider-backed checks run. | +| 2026-07-25 | implement-audit-recommendations-fix (PR #1141) | 0aaf441775786e5def408a2eda551d9b5d95542d | Open-PR maintenance: review fix + drift | Before: 24 commits behind and 1 unresolved P2 thread; nested result content retained safe-area padding after the shared dock hid. After: current main is merged and child content uses fixed small phone gaps so the shared zero hidden reserve reaches the viewport edge. | focused Vitest pass (7/7); Prettier check pass; `git diff --check` pass; no provider-backed checks run. | From a40125851736b6dd4c9c854d0b4dfb71c77fe42e Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Tue, 28 Jul 2026 16:49:23 +0800 Subject: [PATCH 9/9] fix: stabilize sheet focus and dom contract --- src/components/ui/sheet.tsx | 8 +++++++- tests/sheet.dom.test.tsx | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index e220df4423..5f12562fe8 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -279,6 +279,9 @@ export function Sheet({ const defaultSheetIsFullscreen = placement !== "left" && mobilePlacement === "fullscreen"; const defaultSheetIsTopAligned = placement !== "left" && mobilePlacement === "top"; const defaultSheetUsesViewportSize = placement !== "left" && mobileSize === "viewport"; + const contentClassTokens = contentClassName?.split(/\s+/) ?? []; + const hasMobileMaxHeight = contentClassTokens.some((token) => /^!?max-h-/.test(token)); + const hasSmallScreenMaxHeight = contentClassTokens.some((token) => /^sm:!?max-h-/.test(token)); const sheet = (
{ expect(vi.getTimerCount()).toBe(0); vi.useRealTimers(); }); + + it("keeps caller-provided mobile and small-screen height caps authoritative", () => { + const { getByRole } = render( + +

Body

+
, + ); + + const classes = getByRole("dialog").classList; + expect(classes).toContain("max-h-[88dvh]"); + expect(classes).toContain("sm:max-h-[min(80dvh,36rem)]"); + expect(classes).not.toContain("max-h-[calc(100dvh-2rem)]"); + expect(classes).not.toContain("sm:max-h-[88dvh]"); + }); });