Skip to content

fix: stabilize sheet focus and dom contract - #1356

Closed
BigSimmo wants to merge 18 commits into
mainfrom
codex/run-pr-20260725-sheet-fixes
Closed

fix: stabilize sheet focus and dom contract#1356
BigSimmo wants to merge 18 commits into
mainfrom
codex/run-pr-20260725-sheet-fixes

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Align sheet interaction/focus behavior and adjust dom contract assertions.

RAG impact

  • RAG impact: no retrieval behaviour change

Summary by CodeRabbit

  • Bug Fixes

    • Improved expanded accessible tables with full-height layouts and smoother scrolling.
    • Updated search dropdowns to use more responsive viewport-based height limits, especially on smaller screens.
    • Preserved custom height limits provided to full-screen panels instead of overriding them with defaults.
  • Tests

    • Added coverage for responsive dropdown sizing, panel height overrides, and mobile layout safeguards.
  • Documentation

    • Recorded additional review and maintenance updates in the project ledger.

BigSimmoand others added 18 commits July 24, 2026 13:32
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
GraphQL review-thread replies returned 403; resolved the fixed duplicate-height threads directly after validation.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
# Conflicts:
#	docs/branch-review-ledger.md
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…mendations-fix
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@supabase

supabaseBot commented Jul 28, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated responsive height and flex-layout behavior for Sheet, AccessibleTable, and search dropdowns. Added regression assertions and appended PR #1141 review-ledger entries.

Changes

Responsive UI sizing

Layer / File(s)Summary
Sheet and expanded table layout
src/components/ui/sheet.tsx, src/components/AccessibleTable.tsx, tests/sheet.dom.test.tsx
Sheet defaults now yield to caller-provided height caps, while expanded tables and full-screen content use column flex layouts.
Search dropdown viewport sizing
src/components/clinical-dashboard/universal-search-command-surface.tsx, src/components/universal-search-command-mockups.tsx, tests/search-command-surface.test.ts
Dropdowns use viewport-based mobile height limits and retain fixed small-screen limits, with source-level assertions for the sizing classes.
Regression and ledger records
tests/clinical-dashboard-merge-artifacts.test.ts, docs/branch-review-ledger.md
Added a negative composer-padding assertion and appended four PR #1141 merge, sync, and maintenance ledger records.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels:codex

Suggested reviewers:cursoragent, copilot

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check nameStatusExplanationResolution
Description check⚠️ WarningThe description has a summary but omits the required Verification section and other template fields.Add the Verification section with the relevant checks or explicit not-run notes, and include Risk/Rollback if applicable.
Docstring Coverage⚠️ WarningDocstring coverage is 20.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title is concise and accurately reflects the sheet focus and DOM contract stabilization work.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:a401258517

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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/);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope the safe-area guard to hidden composer padding

When ClinicalDashboard legitimately adds visible-composer padding such as pb-[max(1rem,env(safe-area-inset-bottom))], this file-wide regex fails even though visible chrome may consume the safe-area inset; meanwhile, equivalent hidden padding using var(--safe-area-bottom) passes. This makes the guard both reject valid UI and miss an equivalent regression, so scope it to the hidden-composer branch and cover both inset forms.

AGENTS.md reference: AGENTS.md:L216-L218

Useful? React with 👍 / 👎.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/ui/sheet.tsx`:
- Around line 282-284: Update the max-height detection checks near
contentClassTokens to recognize Tailwind v4 trailing ! modifiers, including
unprefixed and sm-prefixed classes such as max-h-[88dvh]! and
sm:max-h-[min(80dvh,36rem)]!, while preserving existing prefix-! support. Add a
regression test covering both suffix forms and verify the Sheet does not append
its default cap.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eff51b4b-66fe-420d-a844-43d3d26f6097

📥 Commits

Reviewing files that changed from the base of the PR and between b92c272 and a401258.

📒 Files selected for processing (8)
  • docs/branch-review-ledger.md
  • src/components/AccessibleTable.tsx
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
  • src/components/ui/sheet.tsx
  • src/components/universal-search-command-mockups.tsx
  • tests/clinical-dashboard-merge-artifacts.test.ts
  • tests/search-command-surface.test.ts
  • tests/sheet.dom.test.tsx

Comment on lines +282 to +284
const contentClassTokens = contentClassName?.split(/\s+/) ?? [];
const hasMobileMaxHeight = contentClassTokens.some((token) => /^!?max-h-/.test(token));
const hasSmallScreenMaxHeight = contentClassTokens.some((token) => /^sm:!?max-h-/.test(token));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'\n== sheet.tsx around the predicates ==\n'
sed -n '270,360p' src/components/ui/sheet.tsx
printf'\n== Tailwind docs in node_modules (if present) ==\n'
find node_modules/next/dist/docs -maxdepth 3 -type f \( -iname '*tailwind*' -o -iname '*css*' -o -iname '*important*'\)| sed -n '1,80p'printf'\n== Search for important modifier references ==\n'
rg -n "trailing important|important modifier|!$|max-h-\\[|max-h-" node_modules/next/dist/docs src/components/ui/sheet.tsx -S ||true

Repository: BigSimmo/Database

Length of output: 10359


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'\n== package manifests mentioning tailwind ==\n'
rg -n '"tailwindcss"|tailwindcss|`@tailwind`' package.json pnpm-lock.yaml yarn.lock package-lock.json bun.lockb . -g '!node_modules' -S ||trueprintf'\n== sheet.tsx snippet with line numbers ==\n'
cat -n src/components/ui/sheet.tsx | sed -n '278,356p'printf'\n== search for related tests or utilities ==\n'
rg -n "hasMobileMaxHeight|hasSmallScreenMaxHeight|max-h-\\[|max-h-" src test tests __tests__ . -g '!node_modules' -S ||true

Repository: BigSimmo/Database

Length of output: 33149


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'\n== package.json tailwind entries ==\n'
python3 - <<'PY'import json, pathlibp = pathlib.Path('package.json')if p.exists(): data = json.loads(p.read_text()) for section in ('dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'): deps = data.get(section, {}) for name, ver in deps.items(): if 'tailwind' in name.lower(): print(section, name, ver)else: print('package.json not found')PYprintf'\n== lockfile tailwind entries (first matches) ==\n'forfin package-lock.json pnpm-lock.yaml yarn.lock bun.lockb;do
[ -f"$f" ] ||continueecho"--- $f ---"
rg -n "tailwindcss|tailwind""$f" -S | sed -n '1,40p'doneprintf'\n== local docs search for important modifier phrasing ==\n'
rg -n "important modifier|trailing .*!|prefix .*!|max-h-\\[" node_modules/next/dist/docs . -g '!node_modules/**/dist/**' -S ||true

Repository: BigSimmo/Database

Length of output: 10681


🌐 Web query:

Tailwind CSS v4 important modifier trailing exclamation mark utility syntax max-h-[88dvh]!

💡 Result:

In Tailwind CSS v4, the syntax for marking a utility as important has changed. You must now place the exclamation mark (!) at the end of the class name, rather than at the beginning [1][2]. For your specific case, the correct syntax is: max-h-[88dvh]! Key details regarding this change: - New Placement: The! modifier is now a suffix [1]. For example, a class like!text-blue-500 (v3 style) should be updated to text-blue-500! (v4 style) [1][2]. - Compatibility: While Tailwind v4 still supports the older prefix syntax (e.g.,!text-blue-500) for backwards compatibility, it is officially deprecated and you are encouraged to migrate to the suffix syntax [1]. - Arbitrary Values: The syntax for arbitrary values (square brackets) remains compatible with this modifier. Placing the! after the closing bracket correctly applies!important to the generated CSS rule [1][2]. - Global Important: If you intended to make all utilities important, the v4 approach is to use the important flag in your CSS import directive rather than the tailwind.config.js file [3][4]: @import "tailwindcss" important;

Citations:


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'\n== tailwindcss package version and docs hits ==\n'
node - <<'JS'const pkg = require('./node_modules/tailwindcss/package.json');console.log(pkg.version);JSprintf'\n== search installed tailwindcss for important modifier docs/code ==\n'
rg -n "important modifier|prefix it with !|!mt-4|max-h-\\[88dvh\\]!|trailing" node_modules/tailwindcss node_modules/@tailwindcss -S ||trueprintf'\n== inspect candidate parser/source symbols for ! handling ==\n'
fd -a "" node_modules/tailwindcss | sed -n '1,120p'

Repository: BigSimmo/Database

Length of output: 728


Recognize Tailwind v4 trailing ! important modifier. These checks miss classes like max-h-[88dvh]! and sm:max-h-[min(80dvh,36rem)]!, so the Sheet can still append its default cap when callers mark their height utility important. Accept the suffix form and add a regression test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/ui/sheet.tsx` around lines 282 - 284, Update the max-height
detection checks near contentClassTokens to recognize Tailwind v4 trailing !
modifiers, including unprefixed and sm-prefixed classes such as max-h-[88dvh]!
and sm:max-h-[min(80dvh,36rem)]!, while preserving existing prefix-! support.
Add a regression test covering both suffix forms and verify the Sheet does not
append its default cap.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

Reviewed at exact head a401258. Superseded by draft #1361. Only the current-main-compatible responsive Sheet max-height precedence was retained. Source branch and worktree are preserved; this PR is closed only to remove the superseded review queue entry.

@BigSimmo
BigSimmo deleted the codex/run-pr-20260725-sheet-fixes branch July 30, 2026 09:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@cursoragent