Skip to content

style(repo): format the tree with prettier and gate it - #408

Merged
Ducksss merged 1 commit into
devfrom
claude/prettier-reflow
Jul 29, 2026
Merged

Ducksss merged 1 commit into
devfrom
claude/prettier-reflow

Conversation

@Ducksss

@Ducksss Ducksss commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Follow-up to #402, which added a prettier config matched to the house style but reformatted nothing — leaving format:check red on 188 files and therefore impossible to gate. This runs it and turns the check on in both places the gate is enforced: the test:release chain and the workflow's lint-and-type-check step.

189 files: 93 tsx, 68 ts, 11 md, 11 css, 2 json, 2 html, 1 yml, 1 mjs.

Mechanical, with two exceptions that are not — and both are the argument for doing this deliberately instead of letting it happen inside someone's feature PR.

11 eslint-disable directives went stale

Every mobile-nav header wrote its effect on one line:

// eslint-disable-next-line react-hooks/set-state-in-effect
useEffect(() => { setOpen(false) }, [pathname])

Prettier expands the body, so the directive ends up above useEffect(() => { while the setState it suppresses moves two lines down — 11 unused-directive warnings and 11 now-unsuppressed errors. Each directive moved to the line it actually governs, which is also a narrower suppression than before:

useEffect(() => {
  // eslint-disable-next-line react-hooks/set-state-in-effect
  setOpen(false)
}, [pathname])

One integration assertion pinned a line break, not a fact

fumadocs-site.int.spec.ts asserts the blog routes re-declare twitter: { card: 'summary_large_image'. That guards a real trap: Next does not inherit nested openGraph/twitter fields from the root layout, and no e2e covers those fields, so a silent social-card regression is possible.

In [slug]/page.tsx that literal was 126 columns, so prettier split it across lines and the assertion failed — while the metadata it guards was completely untouched. It now matches against whitespace-collapsed source, testing the re-declaration rather than the formatting.

Verification

The full release gate passed on this exact tree (RELEASE EXIT=0, verified from the captured log rather than a piped exit code):

  • 391 e2e tests across all five batches — 44 / 69 / 102 / 43 / 133
  • every visual baseline matched: 102 template snapshots plus the blog and landing sets, so the JSX reflow is render-neutral and no baseline needs re-minting on either platform
  • 379/380 int tests (1 pre-existing skip), eslint clean, tsc clean, format:check clean

Note for anyone with an open PR

This touches 189 files, so open branches will need a rebase. The resolution is mechanical: take your own version of the conflicting hunk, then run pnpm format.

#402 added a prettier config matched to the house style but reformatted nothing,
leaving format:check red on 188 files and therefore ungateable. This runs it and
turns the check on, in both places the gate is enforced: the test:release chain
and the workflow's lint-and-type-check step.

Mechanical, with two exceptions that are not.

Eleven eslint-disable directives went stale. Every mobile-nav header wrote its
effect as a single line — useEffect(() => { setOpen(false) }, [pathname]) — with
"// eslint-disable-next-line react-hooks/set-state-in-effect" above it. Prettier
expands the body, so the directive came to sit above "useEffect(() => {" while
the setState it suppresses moved two lines down: eleven unused-directive warnings
and eleven now-unsuppressed errors. Each directive moved to the line it actually
governs, which is also a narrower suppression than before.

One integration assertion pinned a line break rather than a fact.
fumadocs-site.int.spec.ts asserts the blog routes re-declare
"twitter: { card: 'summary_large_image'", guarding a real trap — Next does not
inherit nested openGraph/twitter fields from the root layout, and no e2e covers
those fields. In [slug]/page.tsx that literal was 126 columns, so prettier split
it and the assertion failed while the metadata it guards was untouched. It now
matches against whitespace-collapsed source, so it tests the re-declaration
instead of the formatting.

Nothing else changed behaviour. The full release gate passed on this tree —
391 e2e tests across all five batches, including every visual baseline
(102 template snapshots, the blog and landing sets), so the JSX reflow is
render-neutral and no baseline needs re-minting on either platform.
379/380 int tests pass, eslint clean, tsc clean, format:check clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI review requested due to automatic review settings July 29, 2026 07:44
@vercel

vercel Bot commented Jul 29, 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, Comment Jul 29, 2026 7:54am
payload-components-97bf Ready Ready Preview, Comment Jul 29, 2026 7:54am

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 189 files, which is 89 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e3d3855-5c6d-458c-9ecc-9b3411fe65a1

📥 Commits

Reviewing files that changed from the base of the PR and between 354ac46 and dc0b644.

📒 Files selected for processing (189)
  • .github/workflows/registry-verification.yml
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • bin/payload-components.mjs
  • docs/superpowers/plans/2026-07-14-landing-hero-editorial-compression.md
  • docs/superpowers/plans/2026-07-15-community-field-journal-visual-system.md
  • docs/superpowers/plans/2026-07-15-curated-tailark-ports.md
  • docs/superpowers/specs/2026-07-15-community-field-journal-visual-system-design.md
  • docs/superpowers/specs/2026-07-15-curated-tailark-ports-design.md
  • docs/superpowers/specs/2026-07-21-ai-discovery-readiness-design.md
  • package.json
  • public/google44d8f9f26e2e2367.html
  • public/googleda94848bf7de62aa.html
  • public/templates/education-course/PROVENANCE.md
  • src/app/_fonts/README.md
  • src/app/about/page.tsx
  • src/app/blog/[slug]/page.tsx
  • src/app/blog/page.tsx
  • src/app/brand-guide/page.tsx
  • src/app/globals.css
  • src/app/llms-full.txt/route.ts
  • src/app/llms.txt/route.ts
  • src/app/not-found.tsx
  • src/app/og/blog/[slug]/image.png/route.tsx
  • src/app/og/docs/[...slug]/route.tsx
  • src/app/opengraph-image.tsx
  • src/app/privacy/page.tsx
  • src/app/templates/[slug]/opengraph-image.tsx
  • src/app/templates/[slug]/page.tsx
  • src/app/templates/[slug]/preview/[[...page]]/page.tsx
  • src/app/templates/opengraph-image.tsx
  • src/app/templates/page.tsx
  • src/components/blog/BlogCard.tsx
  • src/components/blog/BlogFigure.tsx
  • src/components/blog/RelatedPosts.tsx
  • src/components/site/AnalyticsShell.tsx
  • src/components/site/CatalogFamilyTeaser.tsx
  • src/components/site/CommandCopyController.tsx
  • src/components/site/ComponentCard.tsx
  • src/components/site/ComponentCatalogBrowser.tsx
  • src/components/site/ComponentFamily.tsx
  • src/components/site/ComponentPreviewFrame.tsx
  • src/components/site/ComponentRequirements.tsx
  • src/components/site/ComponentUsage.tsx
  • src/components/site/ComponentWiring.tsx
  • src/components/site/ConsentBanner.tsx
  • src/components/site/HeroProductFrame.tsx
  • src/components/site/SiteHeader.tsx
  • src/components/site/Terminal.tsx
  • src/components/site/WiringLedger.tsx
  • src/components/site/demos/ComparatorGridDemo.tsx
  • src/components/site/demos/ComparatorStackDemo.tsx
  • src/components/site/demos/ComparatorTableDemo.tsx
  • src/components/site/demos/ContactRoutingFormDemo.tsx
  • src/components/site/demos/ContentListColumnsDemo.tsx
  • src/components/site/demos/ContentListDemo.tsx
  • src/components/site/demos/DemoFitFrame.tsx
  • src/components/site/demos/DemoLink.tsx
  • src/components/site/demos/EmbedBasicDemo.tsx
  • src/components/site/demos/FaqCardDemo.tsx
  • src/components/site/demos/FaqGridDemo.tsx
  • src/components/site/demos/FeatureAccordionDemo.tsx
  • src/components/site/demos/FeatureCardsMediaDemo.tsx
  • src/components/site/demos/FeatureGridBasicDemo.tsx
  • src/components/site/demos/FeatureIconGridDemo.tsx
  • src/components/site/demos/HeroAuroraDemo.tsx
  • src/components/site/demos/HeroKineticDemo.tsx
  • src/components/site/demos/HeroProductTiltDemo.tsx
  • src/components/site/demos/IntegrationClusterDemo.tsx
  • src/components/site/demos/IntegrationConnectDemo.tsx
  • src/components/site/demos/IntegrationGridDemo.tsx
  • src/components/site/demos/IntegrationListDemo.tsx
  • src/components/site/demos/IntegrationOrbitDemo.tsx
  • src/components/site/demos/IntegrationSplitDemo.tsx
  • src/components/site/demos/IntegrationTestimonialDemo.tsx
  • src/components/site/demos/PricingCardsCtaDemo.tsx
  • src/components/site/demos/PricingCardsDemo.tsx
  • src/components/site/demos/PricingCardsMutedDemo.tsx
  • src/components/site/demos/PricingEnterpriseDemo.tsx
  • src/components/site/demos/PricingSplitDemo.tsx
  • src/components/site/demos/StatsProofDemo.tsx
  • src/components/site/demos/TestimonialsBentoDemo.tsx
  • src/components/site/demos/TestimonialsGridDemo.tsx
  • src/components/site/demos/TestimonialsRatingDemo.tsx
  • src/components/site/demos/TestimonialsWallDemo.tsx
  • src/components/site/graphics/WiringFlow.tsx
  • src/components/site/graphics/WiringFlowCanvas.tsx
  • src/components/site/graphics/WiringNodeMap.tsx
  • src/components/site/section.tsx
  • src/components/site/sections/CommunityCta.tsx
  • src/components/site/sections/HeroSection.tsx
  • src/components/site/templates/TemplateAnalytics.tsx
  • src/components/site/templates/TemplateCard.tsx
  • src/components/site/templates/TemplateDetailPreview.tsx
  • src/components/site/templates/TemplateSectionReveal.tsx
  • src/components/site/templates/TemplateTrackedLink.tsx
  • src/components/site/templates/agency-studio/NorthlineHeader.tsx
  • src/components/site/templates/agency-studio/theme.css
  • src/components/site/templates/commerce-brand/FieldnoteCounter.tsx
  • src/components/site/templates/commerce-brand/theme.css
  • src/components/site/templates/education-course/NorthfieldHeader.tsx
  • src/components/site/templates/education-course/NorthfieldMark.tsx
  • src/components/site/templates/education-course/theme.css
  • src/components/site/templates/event-conference/FrameworksHeader.tsx
  • src/components/site/templates/event-conference/theme.css
  • src/components/site/templates/fintech-trust/LedgerlineFooter.tsx
  • src/components/site/templates/fintech-trust/LedgerlineHeader.tsx
  • src/components/site/templates/fintech-trust/theme.css
  • src/components/site/templates/healthcare-clinic/AlderHeader.tsx
  • src/components/site/templates/healthcare-clinic/theme.css
  • src/components/site/templates/nonprofit-cause/RivermouthHeader.tsx
  • src/components/site/templates/nonprofit-cause/theme.css
  • src/components/site/templates/portfolio-solo/RenkoHeader.tsx
  • src/components/site/templates/portfolio-solo/theme.css
  • src/components/site/templates/saas-launch/Shell.tsx
  • src/components/site/templates/saas-launch/theme.css
  • src/components/site/templates/trade-service/HalloranFooter.tsx
  • src/components/site/templates/trade-service/HalloranHeader.tsx
  • src/components/site/templates/trade-service/theme.css
  • src/components/ui/alert.tsx
  • src/lib/analytics.ts
  • src/lib/blog.ts
  • src/lib/component-page-tree.tsx
  • src/lib/demo-content.ts
  • src/lib/site.ts
  • src/lib/structured-data.ts
  • src/lib/templates/agency-studio.ts
  • src/lib/templates/commerce-brand.ts
  • src/lib/templates/education-course.ts
  • src/lib/templates/event-conference.ts
  • src/lib/templates/fintech-trust.ts
  • src/lib/templates/nonprofit-cause.ts
  • src/lib/templates/registry.ts
  • src/lib/templates/saas-launch.ts
  • src/lib/templates/trade-service.ts
  • tests/e2e/blog.e2e.spec.ts
  • tests/e2e/frontend.e2e.spec.ts
  • tests/e2e/geo.e2e.spec.ts
  • tests/e2e/support/painted-contrast.ts
  • tests/e2e/templates-a11y.e2e.spec.ts
  • tests/e2e/templates.e2e.spec.ts
  • tests/int/analytics-contract.int.spec.ts
  • tests/int/blog-content.int.spec.ts
  • tests/int/blog-platform.int.spec.ts
  • tests/int/blog-visual-system.int.spec.ts
  • tests/int/component-docs.int.spec.ts
  • tests/int/curated-tailark-ports.int.spec.ts
  • tests/int/demo-twins.int.spec.ts
  • tests/int/dependabot-config.int.spec.ts
  • tests/int/e2e-runner.int.spec.ts
  • tests/int/fresh-payload-smoke.int.spec.ts
  • tests/int/fumadocs-site.int.spec.ts
  • tests/int/manifest-factory.ts
  • tests/int/painted-contrast.int.spec.ts
  • tests/int/payload-components-add-command.int.spec.ts
  • tests/int/payload-components-assertions.ts
  • tests/int/payload-components-cli.int.spec.ts
  • tests/int/payload-components-doctor-command.int.spec.ts
  • tests/int/payload-components-fixture.ts
  • tests/int/payload-components-fragment.int.spec.ts
  • tests/int/payload-components-manifest.int.spec.ts
  • tests/int/payload-components-pack.int.spec.ts
  • tests/int/payload-components-project.int.spec.ts
  • tests/int/payload-components-security.int.spec.ts
  • tests/int/payload-components-seed-command.int.spec.ts
  • tests/int/payload-components-seed-runtime.int.spec.ts
  • tests/int/payload-components-state.int.spec.ts
  • tests/int/payload-components.int.spec.ts
  • tests/int/public-registry.int.spec.ts
  • tests/int/release-gate.int.spec.ts
  • tests/int/subprocess.int.spec.ts
  • tests/int/template-showcases.int.spec.ts
  • tests/int/visual-standards.int.spec.ts
  • tools/blog/capture-figures.ts
  • tools/blog/generate-figures.ts
  • tools/blog/render-contact-sheets.ts
  • tools/blog/render-covers.ts
  • tools/blog/render-visuals.ts
  • tools/blog/visual-system/artifacts.ts
  • tools/blog/visual-system/catalog.ts
  • tools/blog/visual-system/cover-template.ts
  • tools/blog/visual-system/diagram-data.ts
  • tools/blog/visual-system/diagram-template.ts
  • tools/blog/visual-system/types.ts
  • tools/run-e2e.ts
  • tools/showcase/capture.ts
  • tools/templates/capture.ts
  • tsconfig.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

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.

@Ducksss
Ducksss merged commit 566d4cd into dev Jul 29, 2026
12 checks passed
Ducksss added a commit that referenced this pull request Jul 29, 2026
…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.
Ducksss added a commit that referenced this pull request Jul 29, 2026
format:check gates on prettier as of #402/#408, and `pnpm lint` does not cover
it — so the privacy page landed unformatted. Reformatted.

The intro also still claimed "Nothing loads until you accept", which the
cookieless split made false: Vercel Analytics and Speed Insights load for
everyone. Now scoped to "nothing that stores anything on your device".

Co-Authored-By: Claude Opus 5 <[email protected]>
Ducksss added a commit that referenced this pull request Jul 29, 2026
* privacy(fix): delete GA's cookies when consent is withdrawn

Found by checking the live site rather than the code: after resetting consent to
a first-visit state, GA4 correctly did not load — but `_ga` and
`_ga_EMGRZ0H9R9` were still sitting in the browser from the earlier opt-in.

Withdrawal stopped collection and cleared our own pc_distinct_id, but never
touched GA's cookies, so the visitor stayed identifiable to Google on their next
visit. That is the cookie analogue of the stale-identifier bug fixed earlier, and
under GDPR withdrawal should remove the identifiers rather than merely stop
processing.

clearAnalyticsCookies() expires the `_ga` / `_ga_*` pair (plus legacy `_gid` /
`_gat*`) on both denial paths: explicit withdrawal and a GPC/DNT signal arriving
after an opt-in. A cookie can only be removed by re-setting it with a matching
domain and path, and script cannot read which domain a cookie came from — GA
writes `_ga` on the registrable domain — so each plausible domain is tried and
the misses are inert. It runs before the existing reload so the tag cannot
re-set them on the way out.

The spec seeds the cookies by hand instead of waiting for a real
googletagmanager fetch, which keeps it deterministic rather than network-flaky,
and asserts an unrelated cookie on the same domain survives so the sweep cannot
grow into deleting everything.

/privacy and contributing.mdx now say withdrawal deletes rather than just stops.

Verified: lint clean, tsc clean, 379 int tests, consent + a11y e2e 20/20.

Co-Authored-By: Claude Opus 5 <[email protected]>

* style(privacy): satisfy prettier and correct the page intro

format:check gates on prettier as of #402/#408, and `pnpm lint` does not cover
it — so the privacy page landed unformatted. Reformatted.

The intro also still claimed "Nothing loads until you accept", which the
cookieless split made false: Vercel Analytics and Speed Insights load for
everyone. Now scoped to "nothing that stores anything on your device".

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
@Ducksss
Ducksss deleted the claude/prettier-reflow branch August 3, 2026 08:49

This branch was successfully deployed

2 active deployments
Preview – payload-components — dc0b644e Deployed Jul 29, 2026 by vercel[bot]
Preview – payload-components-97bf — dc0b644e Deployed Jul 29, 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