Repository navigation
PinZheng(release): promote dev to main — wall fit guard, prettier hardening, dependency refresh - #416
Conversation
…dening, dependency refresh 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe PR clears analytics cookies on consent denial, synchronizes the shadcn CLI version with ChangesApplication consent cleanup
Build and registry tooling
Visual and test infrastructure
Configuration and dependencies
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. 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: 3
🤖 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/lib/consent.ts`:
- Around line 42-46: Update the domain enumeration logic in the consent handling
flow to add every hostname suffix, not just labels.slice(-2), so hosts such as
www.example.co.uk also include example.co.uk. Iterate through progressively
shorter suffixes and add both the plain and dot-prefixed forms to domains,
preserving the existing behavior for short hostnames.
In `@tests/e2e/frontend.e2e.spec.ts`:
- Around line 278-285: Update the stale “60px” overrun ceiling reference in the
comment near the tablet-band assertion to “50px,” matching the threshold
enforced around the phone check; leave the surrounding explanation and assertion
behavior unchanged.
In `@tests/int/painted-contrast.int.spec.ts`:
- Around line 85-86: Update the no-glyph fixture expectations for
measurePaintedTextContrast so skippedNoGlyphPixelsSelectors contains the raw
selector `.stat-value` without the explanatory “(no glyph pixels)” suffix,
including the corresponding expectation at the additional location.
🪄 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: 5cd108f5-40d5-466e-99b9-4f113e9c51e2
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (17)
CONTRIBUTING.mdcontent/docs/contributing.mdxpackage.jsonsrc/app/privacy/page.tsxsrc/components/site/graphics/ComponentWall.tsxsrc/lib/consent.tstests/e2e/consent.e2e.spec.tstests/e2e/frontend.e2e.spec.tstests/e2e/support/painted-contrast.tstests/e2e/templates-a11y.e2e.spec.tstests/int/fumadocs-site.int.spec.tstests/int/painted-contrast.int.spec.tstests/int/payload-components-registry.int.spec.tstests/int/public-registry.int.spec.tstools/payload-components/utils.tstsconfig.jsontsup.config.ts
💤 Files with no reviewable changes (1)
- tsconfig.json
| if (labels.length > 2) { | ||
| const registrable = labels.slice(-2).join('.') | ||
| domains.add(registrable) | ||
| domains.add(`.${registrable}`) | ||
| } |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Enumerate all parent domains, not only the final two labels.
For www.example.co.uk, this only tries co.uk, never example.co.uk; GA cookies scoped to the actual registrable domain remain after withdrawal. Iterate through hostname suffixes (the invalid public-suffix attempts are harmless) so every possible parent cookie domain is expired.
Proposed fix
- if (labels.length > 2) {
- const registrable = labels.slice(-2).join('.')
- domains.add(registrable)
- domains.add(`.${registrable}`)
+ for (let index = 1; index < labels.length - 1; index += 1) {
+ const parentDomain = labels.slice(index).join('.')
+ domains.add(parentDomain)
+ domains.add(`.${parentDomain}`)
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (labels.length > 2) { | |
| const registrable = labels.slice(-2).join('.') | |
| domains.add(registrable) | |
| domains.add(`.${registrable}`) | |
| } | |
| for (let index = 1; index < labels.length - 1; index += 1) { | |
| const parentDomain = labels.slice(index).join('.') | |
| domains.add(parentDomain) | |
| domains.add(`.${parentDomain}`) | |
| } |
🤖 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/lib/consent.ts` around lines 42 - 46, Update the domain enumeration logic
in the consent handling flow to add every hostname suffix, not just
labels.slice(-2), so hosts such as www.example.co.uk also include example.co.uk.
Iterate through progressively shorter suffixes and add both the plain and
dot-prefixed forms to domains, preserving the existing behavior for short
hostnames.
| /* The tablet band gets its own taller fade, and it needs its own assertion: | ||
| the phone check above runs outside the 640–1023px query, so deleting the | ||
| override would still pass it — and pass the overrun ceiling too, since the | ||
| measured 44px tablet residue sits under that deliberately loose 60px. Left | ||
| unpinned, the one band where residue meets the fade exactly is the one band | ||
| with no coverage. Exact, not a floor: 2.75rem at the default root size, and | ||
| the whole point is that it matches the overrun rather than merely exceeding | ||
| the phone value. */ |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update the stale 60px threshold reference.
Line 281 says the ceiling is 60px, but Line 257 now enforces 50px.
Proposed fix
- measured 44px tablet residue sits under that deliberately loose 60px. Left
+ measured 44px tablet residue sits under that deliberately loose 50px. Left📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /* The tablet band gets its own taller fade, and it needs its own assertion: | |
| the phone check above runs outside the 640–1023px query, so deleting the | |
| override would still pass it — and pass the overrun ceiling too, since the | |
| measured 44px tablet residue sits under that deliberately loose 60px. Left | |
| unpinned, the one band where residue meets the fade exactly is the one band | |
| with no coverage. Exact, not a floor: 2.75rem at the default root size, and | |
| the whole point is that it matches the overrun rather than merely exceeding | |
| the phone value. */ | |
| /* The tablet band gets its own taller fade, and it needs its own assertion: | |
| the phone check above runs outside the 640–1023px query, so deleting the | |
| override would still pass it — and pass the overrun ceiling too, since the | |
| measured 44px tablet residue sits under that deliberately loose 50px. Left | |
| unpinned, the one band where residue meets the fade exactly is the one band | |
| with no coverage. Exact, not a floor: 2.75rem at the default root size, and | |
| the whole point is that it matches the overrun rather than merely exceeding | |
| the phone value. */ |
🤖 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 278 - 285, Update the stale
“60px” overrun ceiling reference in the comment near the tablet-band assertion
to “50px,” matching the threshold enforced around the phone check; leave the
surrounding explanation and assertion behavior unchanged.
| skippedNoGlyphPixels: 1, | ||
| skippedNoGlyphPixelsSelectors: ['.stat-value (no glyph pixels)'], |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Keep the no-glyph fixture aligned with the producer contract.
measurePaintedTextContrast records raw selectors such as .stat-value; the fixture currently includes the explanatory suffix, so this test does not verify the actual report shape.
Proposed test fix
- skippedNoGlyphPixelsSelectors: ['.stat-value (no glyph pixels)'],
+ skippedNoGlyphPixelsSelectors: ['.stat-value'],
- expect(report).toContain('no glyph pixels: .stat-value (no glyph pixels)')
+ expect(report).toContain('no glyph pixels: .stat-value')Also applies to: 96-99
🤖 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/int/painted-contrast.int.spec.ts` around lines 85 - 86, Update the
no-glyph fixture expectations for measurePaintedTextContrast so
skippedNoGlyphPixelsSelectors contains the raw selector `.stat-value` without
the explanatory “(no glyph pixels)” suffix, including the corresponding
expectation at the additional location.
…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]>
Brings main level with dev ahead of publishing 1.2.1. Tree is identical to dev by construction — branched from dev and reparented onto main — so the diff is exactly the
main..devdelta with no squash-divergence conflicts.What it carries
fumadocs-site.int.spec.tsno longer pins prettier's line breaks (test(landing,int): tighten the wall ceiling and stop pinning prettier's line breaks #413). The old 44–60px band was room for a card to lose a line while still passing.reacttypes path that failedtest:inton every vite 8.x attempt, so vite 8.1.5 is in. Plus dependency refresh for lucide-react, fumadocs and the test tooling (build(deps-dev): bump the test-tooling group across 1 directory with 2 updates #365, build(deps-dev): bump the documentation-tooling group across 1 directory with 2 updates #366, build(deps-dev): bump lucide-react from 1.25.0 to 1.27.0 #367).Why now
The published CLI is stale: npm
latestis 1.2.0 while the repo declares 1.2.1, and the publish workflow only fires onrelease: published, so no promote has ever triggered it. This promote is the prerequisite for cutting that release.For the record on versioning: the registry holds 67 components before and after 1.2.0, so no new blocks shipped. The published-surface delta is two optional block fields (
logoLabelon ContentQuote and StatsProof) plus CLI internals — a patch, not a minor.Expected noise
None, for once: the recurring CodeQL false positive at
component-docs.int.spec.ts(js/incomplete-url-substring-sanitization— doc-linting over trusted local.mdx, not URL sanitization) has now been dismissed on main, so it should stop surfacing on promote diffs.Summary by CodeRabbit
Privacy
Documentation
Quality Improvements