fix(ui): implement comprehensive CSS layout audit remediations (Antigravity) - #1296
Conversation
This commit resolves the critical 32-bit z-index escalation, flexbox truncation overflow, global z-index token architecture, @container queries, GPU-accelerated motion optimizations, and forced-colors high contrast modes.
This addresses the remaining items in the CSS layout audit: removing ad-hoc z-index drift in headers/viewers, establishing semantic CSS variables for rigid viewport widths, and applying off-screen content-visibility constraints to heavy search result nodes.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughShared layout and z-index tokens are added in global CSS and adopted by overlays and viewer components. Search cards, tables, and rename-dialog text receive layout utilities. The review ledger records audit, CI, closeout, and re-inspection updates. ChangesUI foundation updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/app/globals.css (1)
2683-2690: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAvoid a persistent
will-changehint on entire content surfaces.Applying
will-change: transformto#main-contentand the full document-viewer surface can create large compositor layers and new containing/stacking contexts even when nothing is animating. Scope this to the actively animated element or transition state, then verify fixed composer and viewer-overlay behavior.🤖 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/app/globals.css` around lines 2683 - 2690, Remove the persistent will-change: transform hint from the broad `#main-content` and [data-testid="document-viewer-content"] selectors in the mobile media rule. Scope compositor hints to the actively animated reserve-pad element or its transition state, while preserving padding-bottom optimization and fixed composer/viewer-overlay behavior.
🤖 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/app/globals.css`:
- Around line 2703-2707: Increase the intrinsic fallback height in
.content-visibility-auto to match the tuned dimensions used by the service and
document result cards, or make the fallback component-specific where their sizes
differ, while preserving the existing off-screen rendering behavior.
---
Nitpick comments:
In `@src/app/globals.css`:
- Around line 2683-2690: Remove the persistent will-change: transform hint from
the broad `#main-content` and [data-testid="document-viewer-content"] selectors in
the mobile media rule. Scope compositor hints to the actively animated
reserve-pad element or its transition state, while preserving padding-bottom
optimization and fixed composer/viewer-overlay behavior.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
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 Plus
Run ID: 684f4235-7b87-43ea-b1f9-a11243949890
📒 Files selected for processing (8)
src/app/globals.csssrc/components/AccessibleTable.tsxsrc/components/DocumentManagementActions.tsxsrc/components/clinical-dashboard/document-search-results.tsxsrc/components/clinical-dashboard/master-search-header.tsxsrc/components/clinical-dashboard/source-preview-popover.tsxsrc/components/document-viewer/pdf-canvas-viewer.tsxsrc/components/settings-search-mockups/settings-search-mockup-page.tsx
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. ❌ Cannot run autofix: This PR has merge conflicts. Please resolve the conflicts with the base branch and try again. Alternatively, use |
|
@cursoragent please resolve all CI failing tests after understanding the issue. Please also fix any comments and resolve them and also ensure that you fix with smallest required fix with best coding practice and u derstabding the fix rather than simple patch. Please fix any merge conflicts and ensure any issues are found. Please resolve any issues you find. Please also run bugbot. Please mark comments resolved also once you resolve them. |
|
PR #1296 is mergeable with required CI green and review threads resolved. Fixes
BugbotNo Verification
Latest tip also has a docs-only ledger closeout commit; product delta is unchanged. |
|
@codex review PR |
Resolve conflicts with origin/main in globals.css, AccessibleTable, and master-search-header. Reuse the existing content-auto intrinsic-size utility for search result cards, keep reserve-transition-scoped will-change from main, and preserve semantic z-index token utilities.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: faa618fa2d
ℹ️ 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".
Satisfy the push format guard / CI format:check on the conflict-resolved globals.css utility and forced-colors blocks.
The audit remediations replaced the literal z-[60] stacking utility with the semantic z-modal class; update the source-contract pin accordingly.
Capture the main merge, CodeRabbit/Codex thread resolutions, local Bugbot outcome, and verification evidence for the CSS layout audit PR.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/app/globals.css (1)
102-105: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winFix the failing font-family lint.
Stylelint reports
value-keyword-caseerrors for these unquoted font names, which will fail the style check.Proposed fix
- 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; + 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;🤖 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/app/globals.css` around lines 102 - 105, Update the --font-sans and --font-mono custom property values to satisfy the value-keyword-case lint rule, normalizing the unquoted font-family keywords while preserving the existing font fallback order and quoted names.Source: Linters/SAST tools
🧹 Nitpick comments (1)
src/app/globals.css (1)
2387-2391: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the shared header stacking token.
This new
30duplicates--z-header; use the token so the header ordering cannot drift from the global ladder.Proposed fix
.phone-sticky-header-stack { position: sticky; top: 0; - z-index: 30; + z-index: var(--z-header); }🤖 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/app/globals.css` around lines 2387 - 2391, Update the z-index declaration in .phone-sticky-header-stack to use the shared --z-header token instead of the duplicated numeric value 30, preserving the existing sticky positioning and header stacking behavior.
🤖 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.
Outside diff comments:
In `@src/app/globals.css`:
- Around line 102-105: Update the --font-sans and --font-mono custom property
values to satisfy the value-keyword-case lint rule, normalizing the unquoted
font-family keywords while preserving the existing font fallback order and
quoted names.
---
Nitpick comments:
In `@src/app/globals.css`:
- Around line 2387-2391: Update the z-index declaration in
.phone-sticky-header-stack to use the shared --z-header token instead of the
duplicated numeric value 30, preserving the existing sticky positioning and
header stacking behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a1b00484-2c8d-4f1d-9c73-1626a18f97ba
📒 Files selected for processing (2)
src/app/globals.csssrc/components/AccessibleTable.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/AccessibleTable.tsx
GitHub-hosted ubuntu-24.04 runners often report ~7.8 GiB total RAM even when Build otherwise succeeds. Keep the local hard stop for low-memory Docker Desktop hosts, but warn-only under CI/GITHUB_ACTIONS so required Build checks stop flaking.
Container app-image failed for the same <10 GiB RAM guard because Docker build stages do not set CI/GITHUB_ACTIONS. Opt in via DOCKER_BUILD=1 in the app Dockerfile and honor that flag (plus ALLOW_LOW_MEMORY_NEXT_BUILD) in guard-next-build.
Pair with the guard-next-build allowlist so app-image CI builds on ~8 GiB GitHub runners can proceed past the local RAM hard-stop.
Prior tip updated guard-next-build + Dockerfile after app-image failed the RAM hard-stop; re-signal pull_request synchronize so required checks run on the current head.
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #6154 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Merge origin/main and adopt its tested low-RAM Next build guard (evaluateNextBuildRamGuard + ALLOW_LOW_RAM_BUILD) instead of the interim DOCKER_BUILD opt-in, clearing Dockerfile/guard conflicts.
|
@cursoragent Inspect the PR and repository state, identify the root cause of every failing CI check, unresolved review comment, merge conflict, and related defect. Apply the smallest robust fix using existing project patterns and best practices, without unrelated changes. Run all relevant lint, type-check, test, build, and CI-equivalent commands, fix any issues found, then resolve only the review comments that are fully addressed. Summarise the root causes, changes made, validation results, and any remaining blockers. Also run Bugbot if not already done on this PR yet. |
|
PR #1296 is clean again: mergeable, required CI green on Root causes found
Changes this pass
BugbotRe-ran locally: no P0/P1. No open Validation
Remaining blockersNone for merge. Tip now has a docs-only ledger closeout commit ( |
|
@cursoragent resolve merge conflict please |
|
Merge conflict resolved. Cause: Branch was 2 commits behind Fix: Merged State now: |
|
@cursoragent Inspect the PR and repository state, identify the root cause of every failing CI check, unresolved review comment, merge conflict, and related defect. Apply the smallest robust fix using existing project patterns and best practices, without unrelated changes. Run Bugbot and all relevant lint, type-check, test, build, and CI-equivalent commands, fix any issues found, then resolve only the review comments that are fully addressed. Summarise the root causes, changes made, validation results, and any remaining blockers. |
|
PR #1296 is MERGEABLE again (0 behind main). Review threads stay resolved. Root causes
Changes
BugbotRe-ran: no P0/P1. P2 forced-colors issue fixed. No open Validation
Remaining blockerExact-head CI is re-running on |
Merge origin/main to clear GitHub CONFLICTING, drop the broad forced-colors !important wipe on aria-selected/header that flattened HCM selected tabs, and pin the settings mockup board to ladder rung z-[100] instead of the 32-bit escalation.


This PR implements all critical and architectural improvements identified in the CSS Layout Audit (Part 1 & 2).
What Changed:
Verification:
Manual verification of unified diff confirms alignment with the audit report. Note: Local
pm run verify:cheap\ skipped due to known shared
ode_modules\ workspace constraints on this worktree.
Summary by CodeRabbit