Skip to content

PinZheng(release): promote dev to main — wall fit guard, prettier hardening, dependency refresh - #416

Merged
Ducksss merged 1 commit into
mainfrom
release/promote-dev-to-main-413
Jul 30, 2026
Merged

Ducksss merged 1 commit into
mainfrom
release/promote-dev-to-main-413

Conversation

@Ducksss

@Ducksss Ducksss commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

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..dev delta with no squash-divergence conflicts.

What it carries

Why now

The published CLI is stale: npm latest is 1.2.0 while the repo declares 1.2.1, and the publish workflow only fires on release: 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 (logoLabel on 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

    • Clarified that analytics processing begins only after consent.
    • Withdrawing consent now clears analytics cookies and identifiers, then reloads the page to stop ongoing collection.
  • Documentation

    • Expanded guidance for updating visual test screenshots.
    • Clarified consent withdrawal behavior and data removal.
  • Quality Improvements

    • Strengthened visual, accessibility, and contrast checks for more reliable presentation across screen sizes.

…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.
Copilot AI review requested due to automatic review settings July 30, 2026 09:05

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
payload-components Ready Ready Preview Jul 30, 2026 9:13am
payload-components-97bf Ready Ready Preview Jul 30, 2026 9:13am

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR clears analytics cookies on consent denial, synchronizes the shadcn CLI version with package.json, strengthens wall and accessibility test coverage, improves painted-contrast reporting, updates dependencies and TypeScript paths, and clarifies consent and snapshot documentation.

Changes

Application consent cleanup

Layer / File(s) Summary
Consent withdrawal cleanup
src/lib/consent.ts, src/app/privacy/page.tsx, tests/e2e/consent.e2e.spec.ts, content/docs/contributing.mdx
Consent denial and privacy signals now clear GA cookies and pc_distinct_id; privacy copy and end-to-end coverage describe and verify the behavior.

Build and registry tooling

Layer / File(s) Summary
Build-time shadcn version synchronization
tools/payload-components/utils.ts, tsup.config.ts, tests/int/*registry*.spec.ts, package.json
The shadcn CLI package spec is derived from the pinned dependency, injected into builds, and used by registry tests.

Visual and test infrastructure

Layer / File(s) Summary
Wall visual regression coverage
src/components/site/graphics/ComponentWall.tsx, tests/e2e/frontend.e2e.spec.ts, CONTRIBUTING.md
Wall-card overrun and fade assertions are tightened, with updated breakpoint comments and snapshot guidance.
Visual and accessibility reporting
tests/e2e/support/painted-contrast.ts, tests/int/painted-contrast.int.spec.ts, tests/e2e/templates-a11y.e2e.spec.ts, tests/int/fumadocs-site.int.spec.ts
Painted-contrast output records no-glyph selectors, reduced-motion checks accept identity matrix3d, and source assertions normalize whitespace.

Configuration and dependencies

Layer / File(s) Summary
Dependency and TypeScript configuration refresh
package.json, tsconfig.json
Playwright, Fumadocs, Lucide, shadcn, and Vite versions and overrides are updated, while the explicit React path alias is removed.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is informative but does not follow the required template sections or include the Verification/Registry Checklist items. Rewrite it using the repo template: Summary, Verification with pnpm test:release, Registry Checklist, and Notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: dev-to-main promotion plus guard, formatting, and dependency updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/promote-dev-to-main-413

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

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.

❤️ Share

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

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8b7a2f0 and 91688e8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (17)
  • CONTRIBUTING.md
  • content/docs/contributing.mdx
  • package.json
  • src/app/privacy/page.tsx
  • src/components/site/graphics/ComponentWall.tsx
  • src/lib/consent.ts
  • tests/e2e/consent.e2e.spec.ts
  • tests/e2e/frontend.e2e.spec.ts
  • tests/e2e/support/painted-contrast.ts
  • tests/e2e/templates-a11y.e2e.spec.ts
  • tests/int/fumadocs-site.int.spec.ts
  • tests/int/painted-contrast.int.spec.ts
  • tests/int/payload-components-registry.int.spec.ts
  • tests/int/public-registry.int.spec.ts
  • tools/payload-components/utils.ts
  • tsconfig.json
  • tsup.config.ts
💤 Files with no reviewable changes (1)
  • tsconfig.json

Comment thread src/lib/consent.ts
Comment on lines +42 to +46
if (labels.length > 2) {
const registrable = labels.slice(-2).join('.')
domains.add(registrable)
domains.add(`.${registrable}`)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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.

Suggested change
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.

Comment on lines +278 to +285
/* 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. */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
/* 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.

Comment on lines +85 to +86
skippedNoGlyphPixels: 1,
skippedNoGlyphPixelsSelectors: ['.stat-value (no glyph pixels)'],

Copy link
Copy Markdown

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

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.

@Ducksss
Ducksss merged commit 65ffe1c into main Jul 30, 2026
15 checks passed
Ducksss added a commit that referenced this pull request Aug 2, 2026
…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]>
@Ducksss
Ducksss deleted the release/promote-dev-to-main-413 branch August 3, 2026 08:49

This branch was successfully deployed

2 active deployments
Preview – payload-components-97bf — 91688e8b Deployed Jul 30, 2026 by vercel[bot]
Preview – payload-components — 91688e8b Deployed Jul 30, 2026 by vercel[bot]
Sign up for free to 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