Repository navigation
test(landing,int): tighten the wall ceiling and stop pinning prettier's line breaks - #413
Conversation
…'s line breaks Two follow-ups from the wall and prettier work, both about assertions that pass for the wrong reason. The wall fit guard allowed 60px of overrun against a measured worst case of 44px. That 44-60 band was room for a card to quietly lose a line and still go green, and twin content does drift — TestimonialsBentoDemo changed height in the same promote that shipped the guard. The ceiling is now 50px: still clear of an ordinary copy edit, but no longer a place a regression can hide. If a legitimate content change trips it, the frame should move, not the ceiling. fumadocs-site.int.spec.ts pins ~197 exact substrings of source files, and prettier owns the line breaks in every one of those files, so any pin spanning more than a single token is partly a pin on formatting. That is what broke here: the twitter literal in blog/[slug]/page.tsx crossed 100 columns, prettier split it, and the assertion failed while the metadata it guards was untouched. The whitespace- collapsing helper introduced for that case is now file-scoped and documented, and applied to the three remaining pins that span a brace, an arrow or a ternary (heroComponent's payload-types import, docsLayout's themeSwitch, siteHeader's rel ternary). Bare identifiers cannot wrap and stay matched raw. No behaviour change; both are test-only. Verified: 4/4 wall guard tests at the new ceiling, 379/380 int tests, eslint / tsc / format:check clean. The int run also confirms vite 8.1.5 is healthy on dev now that #412 dropped the tsconfig react types path that used to block it. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
…dening, dependency refresh (#416) Brings main level with dev ahead of publishing 1.2.1. - wall fit guard tightened from 60px to 50px, and the fumadocs int spec no longer pins prettier's line breaks (#413) - CodeRabbit findings from the last five days closed (#411) - tsconfig drops the redundant react types path that blocked every vite 8 bump (#412), unblocking vite 8.1.5; dependency refresh for lucide-react, fumadocs and the test tooling (#365, #366, #367) - shadcn bumped to 4.15.0 with the CLI pin single-sourced, so a version bump no longer has to be written in four places (#401) 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.
…le test claims (#418) Closes the three CodeRabbit findings on promote #416. Each was verified against the source before changing anything. 1. src/lib/consent.ts — GA cookie withdrawal missed the registrable domain on multi-label public suffixes. `labels.slice(-2)` sends `www.example.co.uk` to `co.uk` and never `example.co.uk`, so a cookie on the real registrable domain survived withdrawal. Which parent IS registrable needs a public-suffix list the browser does not expose, so enumerate every parent instead of assuming two labels — matching the function's existing "the misses are inert" design. The bare TLD is skipped since no host can set a cookie there. Latent rather than live: for `www.payload-components.xyz`, `slice(-2)` already yielded `payload-components.xyz`, the correct domain. It bit only hosts under a two-part suffix. Verified the new enumeration across host shapes — `www.example.co.uk` now reaches `example.co.uk`, `a.b.example.com` reaches both parents, `payload-components.xyz` and `localhost` are unchanged. No test pinned the old behaviour: consent.e2e sets its cookies with no domain, which the pre-existing `''` entry covers, and the change is purely additive. 2. tests/e2e/frontend.e2e.spec.ts — a comment still called the overrun ceiling "deliberately loose 60px" after #413 tightened it to 50px. The neighbouring line 245 reference is deliberate history ("It was 60px, but…") and is left alone; only the claim about the current value was wrong. 3. tests/int/painted-contrast.int.spec.ts — the fixture carried `'.stat-value (no glyph pixels)'`, but the producer pushes the bare selector (painted-contrast.ts:572) and the label supplies the reason. The two lists genuinely differ in shape — `unresolvedSelectors` IS pushed pre-suffixed (:229, :233), so that fixture is correct and untouched — and the asymmetry is now written down so the next edit does not "fix" the wrong one. Scope note: this makes the fixture faithful to what the producer emits. It does not couple the two — the spec imports only `formatPaintedContrastReport` and never calls `measurePaintedTextContrast`, which needs a browser. Local: lint, format:check, tsc --noEmit, test:int (32 files / 379 tests) green. The consent behaviour itself is covered by consent.e2e in release-gate. Co-authored-by: Claude Opus 5 <[email protected]>
Two follow-ups from the wall and prettier work. Both are about assertions that were passing for the wrong reason. Test-only, no behaviour change.
The wall fit guard had a blind band
The ceiling was 60px against a measured worst case of 44px, so 44–60 was room for a card to quietly lose a line and still go green. That isn't hypothetical:
TestimonialsBentoDemochanged height in the very promote that shipped the guard, so twin content demonstrably drifts.Now 50px — still clear of an ordinary copy edit, but with nowhere for a regression to hide. Comment records the intent: if a legitimate content change trips it, move the frame, not the ceiling.
~197 assertions pin prettier's line breaks
fumadocs-site.int.spec.tsasserts exact substrings of source files, and prettier owns the line breaks in every one of those files. So any pin spanning more than a single token is partly a pin on formatting — which is exactly what broke during the reflow: the twitter literal inblog/[slug]/page.tsxcrossed 100 columns, prettier split it, and the assertion failed while the metadata it guards was completely untouched.The whitespace-collapsing helper added for that case is now file-scoped and documented, and applied to the three remaining pins that span a brace, an arrow, or a ternary:
import type { HeroBasicBlock as HeroBasicBlockData }themeSwitch={{ enabled: false }}rel={item.label === 'GitHub' ? 'noreferrer' : undefined}I checked all 19 candidates that looked fragile; the rest either target
.mdx/docs content (prettier-ignored, so they can't wrap) or are bare identifiers, which cannot wrap either. Those stay matched raw.Verification
format:checkcleanreacttypes path that used to breaktest:inton every vite 8 bump