Repository navigation
fix(landing): close the wall's tablet overflow, and assert the fit - #399
Conversation
The wall fix in #392 measured the phone and the desktop. It did not measure the band between them, and that is where the cropping was worst: content-quote, content-feature-media and content-feature-split ran 88/80/79px past a 212px frame at 640-1023px, against 32/26/25px at 390px. The fade absorbs 28px, so those three were still visibly losing a sentence on a tablet after #392 shipped — the same defect as before, one breakpoint over. Cause is the documented caveat, sharper than expected: the twins pick their variant from the VIEWPORT, not from the width the wall lays them out at, and the stacked variants are tallest in the tablet band, not on a phone. Fixed by giving that band a 256px frame (taller than desktop's 216px) and widening the fade to 2.75rem over the same range. Both are scoped to 640-1023px on purpose: 390px and 1440px are pinned by visual baselines and neither moves, which is why no baseline is re-minted here. Worst overrun in the band is now 44px against a 44px fade. Also asserts the fit, at three widths, because a curated fit measured at one width is what produced both regressions. The guard was verified by reverting the per-breakpoint zoom: it fails at 128px on phone and 93px on tablet while desktop still passes, which is exactly the blind spot that let #370 through. A second test pins the frame fade, which has already gone missing once. The 60px ceiling is not snug to the current 44px — it catches losing-a-paragraph regressions without failing on copy edits. Verified: 44/44 frontend e2e (both landing baselines unchanged), 10/10 axe, eslint and tsc clean. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 727-730: Define a named fade-height spacing token in globals.css
and update the tablet .wall-card-frame::after rule to reference it instead of
the literal 2.75rem value.
In `@tests/e2e/frontend.e2e.spec.ts`:
- Around line 255-269: Extend the fade test around the existing .wall-card-frame
pseudo-element assertion to also set a 768px viewport and verify its computed
::after height is exactly 44px. Preserve the current 390px phone assertion and
existing overflow coverage.
🪄 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 Plus
Run ID: 95779a23-bf16-4bfd-a651-6f49d19eaf00
📒 Files selected for processing (3)
src/app/globals.csssrc/components/site/graphics/ComponentWall.tsxtests/e2e/frontend.e2e.spec.ts
| @media (min-width: 40rem) and (max-width: 63.9375rem) { | ||
| .wall-card-frame::after { | ||
| height: 2.75rem; | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Move the tablet fade height into a named token.
2.75rem is a new arbitrary spacing value in globals.css; define a named fade-height token and reference it here. As per coding guidelines, src/app/globals.css must “avoid arbitrary colour, radius, tracking, spacing, or font values; add a token in globals.css instead.”
🤖 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 727 - 730, Define a named fade-height
spacing token in globals.css and update the tablet .wall-card-frame::after rule
to reference it instead of the literal 2.75rem value.
Source: Coding guidelines
| test('keeps the wall frame fade that dissolves an overrun', async ({ page }) => { | ||
| await page.setViewportSize({ height: 844, width: 390 }) | ||
| await page.goto(baseURL) | ||
|
|
||
| /* The other half of the overflow fix, and the half that already went missing | ||
| once: the fade was dropped while the cards were briefly natural-height and | ||
| not restored when they went back to fixed heights, turning every overrun | ||
| back into a hard cut. Without it, the ceiling above is all that stands | ||
| between a content tweak and a guillotined block. */ | ||
| const fadeHeight = await page | ||
| .locator('.wall-card-frame') | ||
| .first() | ||
| .evaluate((frame) => getComputedStyle(frame, '::after').height) | ||
|
|
||
| expect(Number.parseFloat(fadeHeight)).toBeGreaterThan(8) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Assert the tablet-specific fade value.
This runs at 390px, outside the new 640–1023px media query. Removing the 2.75rem tablet rule would still pass this > 8px check and the overflow test. Keep the phone assertion, but add a 768px viewport assertion that pins the tablet fade to its intended computed height (44px at the default root size).
🤖 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 `@tests/e2e/frontend.e2e.spec.ts` around lines 255 - 269, Extend the fade test
around the existing .wall-card-frame pseudo-element assertion to also set a
768px viewport and verify its computed ::after height is exactly 44px. Preserve
the current 390px phone assertion and existing overflow coverage.
…r adoption, template a11y (#409) Brings main level with dev (137 commits). Headline items: - the component wall no longer crops blocks: per-breakpoint zoom pins the twins' inner layout width at 1280px (#392), and the 640-1023px band gets a 256px frame plus a widened fade (#399). Production was cutting content-quote, content-feature-media and content-feature-split by 88/79/78px on a tablet; measured on the live site, not inferred. Three viewport tests now assert the fit so a curated-at-one-width regression cannot recur silently. - prettier is adopted: config matched to the house style (#402), the tree formatted, and format:check gated in test:release and the CI lint step (#408). - template a11y and layout fixes (#394, #398, #404), consent gate split by provider (#400), axe now waits for the consent banner (#405), CodeQL double-escaping fix (#391). Tree is identical to dev by construction: branched from dev, reparented onto main, so the diff is exactly the main..dev delta with no squash-divergence conflicts.
…e days Triaged every bot review on the 60 PRs merged since 2026-07-24. Copilot was quota-limited on all of them and Codex's one finding (#340 Linux baselines) was handled by #342, so everything actionable is CodeRabbit's. Most of its findings were already closed by #378/#380 or superseded by later work; two were false positives. These five were still open and worth taking. - frontend.e2e: pin the tablet wall fade (#399). The 2.75rem override IS that PR, and nothing asserted it — the existing fade check runs at 390px, outside the 640-1023px query, so deleting the rule stayed green, and the overrun ceiling is deliberately loose enough (60px) to swallow the 44px residue too. Asserted exactly, because matching the residue is the point. - templates-a11y: accept the 3D identity as settled (#394). A reveal written with translate3d, or carrying a translateZ(0) compositor hint, serialises as matrix3d — the check saw only the 2D identity and would have failed the gate for a reveal sitting exactly where it belongs. - painted-contrast: name the no-glyph-pixel skips (#394). unresolvedSelectors already exists so a skip cannot hide which node it dropped; this is the other way an unmeasurable node leaves the run, and it was a bare count. - ComponentWall: fix the zoom comment (#396). It claimed every card shows true desktop proportions at every size. zoom pins the 1280px layout width, not the breakpoint — frontend.e2e's own comment says as much — and that claim is exactly what would mislead the next person curating frame heights. - CONTRIBUTING: document the changed-vs-all snapshot trap (#375). A bare --update-snapshots skips baselines whose diff lands under tolerance, which is the same stale-baseline half-mint the section warns about, minus the missing file that would have revealed it. visual-baselines.yml explains this at length; the local instructions did not. Skipped, with reasons: tokenising the wall fade heights and the mask-image black stops (#399/#396/#370) — the token rule scans component utilities, not globals.css, which defines tokens and carries raw lengths throughout, and a mask's black is an alpha keyword rather than a colour; fading only confirmed-overflow cards (#396) — the valve exists for content that has not changed yet; moving privacy copy into site.ts (#372) — real per AGENTS.md, but about/blog/brand-guide hold local copy too, so this belongs in one deliberate pass; subset-aware blog visual validation (#375) — outputRoot defaults to the repo, so a --slug render is incremental against committed assets and the full-catalog gate is the correct final check. Verified: lint, tsc, the three affected int specs, and both e2e specs green (frontend 44 passed, templates-a11y 43 passed) in production mode. Co-Authored-By: Claude Opus 5 <[email protected]>
…e days (#411) Triaged every bot review on the 60 PRs merged since 2026-07-24. Copilot was quota-limited on all of them and Codex's one finding (#340 Linux baselines) was handled by #342, so everything actionable is CodeRabbit's. Most of its findings were already closed by #378/#380 or superseded by later work; two were false positives. These five were still open and worth taking. - frontend.e2e: pin the tablet wall fade (#399). The 2.75rem override IS that PR, and nothing asserted it — the existing fade check runs at 390px, outside the 640-1023px query, so deleting the rule stayed green, and the overrun ceiling is deliberately loose enough (60px) to swallow the 44px residue too. Asserted exactly, because matching the residue is the point. - templates-a11y: accept the 3D identity as settled (#394). A reveal written with translate3d, or carrying a translateZ(0) compositor hint, serialises as matrix3d — the check saw only the 2D identity and would have failed the gate for a reveal sitting exactly where it belongs. - painted-contrast: name the no-glyph-pixel skips (#394). unresolvedSelectors already exists so a skip cannot hide which node it dropped; this is the other way an unmeasurable node leaves the run, and it was a bare count. - ComponentWall: fix the zoom comment (#396). It claimed every card shows true desktop proportions at every size. zoom pins the 1280px layout width, not the breakpoint — frontend.e2e's own comment says as much — and that claim is exactly what would mislead the next person curating frame heights. - CONTRIBUTING: document the changed-vs-all snapshot trap (#375). A bare --update-snapshots skips baselines whose diff lands under tolerance, which is the same stale-baseline half-mint the section warns about, minus the missing file that would have revealed it. visual-baselines.yml explains this at length; the local instructions did not. Skipped, with reasons: tokenising the wall fade heights and the mask-image black stops (#399/#396/#370) — the token rule scans component utilities, not globals.css, which defines tokens and carries raw lengths throughout, and a mask's black is an alpha keyword rather than a colour; fading only confirmed-overflow cards (#396) — the valve exists for content that has not changed yet; moving privacy copy into site.ts (#372) — real per AGENTS.md, but about/blog/brand-guide hold local copy too, so this belongs in one deliberate pass; subset-aware blog visual validation (#375) — outputRoot defaults to the repo, so a --slug render is incremental against committed assets and the full-catalog gate is the correct final check. Verified: lint, tsc, the three affected int specs, and both e2e specs green (frontend 44 passed, templates-a11y 43 passed) in production mode. Co-authored-by: Claude Opus 5 <[email protected]>
Follow-up to #392. Asked whether anything else needed patching, I wrote a test to guard the wall's fit — and it immediately failed, on a breakpoint neither #370 nor #392 had measured.
🔴 The tablet band was still cropping
#392 measured the phone and the desktop. Not the band between them, which turned out to be the worst of the three:
So the same three
content-*blocks were still visibly cut on a tablet after #392 shipped — the original defect, one breakpoint over.Cause is the caveat #392 documented, sharper than it assumed: the twins pick their variant from the viewport, not from the 1280px width the wall lays them out at, and the stacked variants are tallest in the tablet band — not on a phone, which is where I'd looked.
Fix: give that band a 256px frame (deliberately taller than desktop's 216px) and widen the fade to 2.75rem over the same range. Worst overrun in the band is now 44px against a 44px fade, so the residue falls inside the gradient instead of at a hard edge.
Both changes are scoped to
640–1023pxon purpose: 390px and 1440px are pinned by visual baselines, and neither moves — which is why there are no re-minted baselines in this PR, on either platform.The guard, and proof it works
Three viewport tests measuring every card's content against its frame, plus one pinning the fade.
Measuring needed one non-obvious step: the wall is rotated
-1.4degand scaled, and a rotated box reports an axis-aligned bounding box larger than itself — by an amount that grows with width, so frame and content inflate differently and every reading is wrong. The tilt is neutralised for measurement only.Verified the guard actually catches the bug by reverting the per-breakpoint zoom: it fails at 128px on phone and 93px on tablet, while desktop still passes — precisely the blind spot that let #370 through and that made #392 incomplete. The second test pins the frame fade, which has already gone missing once.
The 60px ceiling is intentionally not snug to the current 44px: snug fails on any copy edit, and this exists to catch the class of regression where a block loses a paragraph (88px here, 165px on phone pre-#392), not to freeze today's pixel.
Verification
Worth noting for the next content change: this is the second time a
content-*twin's height has moved the fit (#360'slogoLabeloncontent-quoteis what pushed it past the fade). The assertion is now the thing that catches it, rather than a comment.Summary by CodeRabbit
UI Improvements
Bug Fixes
Tests