Skip to content

chore(): add missing scripts to layout#7493

Merged
mhartington merged 1 commit intomainfrom
add-cookies
Feb 13, 2026
Merged

chore(): add missing scripts to layout#7493
mhartington merged 1 commit intomainfrom
add-cookies

Conversation

@mhartington
Copy link
Member

@mhartington mhartington commented Feb 13, 2026

Summary by CodeRabbit

  • New Features

    • Added asynchronous loading of external scripts for improved performance.
  • Style

    • Updated code formatting and quote conventions for consistency throughout the layout configuration.

@vercel
Copy link

vercel bot commented Feb 13, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 13, 2026 8:45pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Walkthrough

Modified the Next.js layout component to introduce external script loading via Script components, restructured the HTML element with multi-line formatting and explicit props including suppressHydrationWarning, and standardized string literals to use single quotes throughout font configurations and metadata declarations.

Changes

Cohort / File(s) Summary
Layout Configuration Update
apps/docs/src/app/layout.tsx
Added Script imports and two Script tags for asynchronous external script loading; restructured HTML element to multi-line format with explicit lang, className, and suppressHydrationWarning props; standardized string quotes to single quotes across font subsets, font weights, and metadata; preserved existing font variable configurations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(): add missing scripts to layout' directly and clearly describes the main change—adding Script tags to the layout file.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
apps/docs/src/app/layout.tsx (2)

36-45: Consider the security posture of loading third-party scripts.

You're pulling in two external scripts (cdn.tolt.io and cdn-cookieyes.com) directly in the root layout, which means they execute on every single page of the docs site. A couple of things worth thinking about:

  1. No Subresource Integrity (SRI): If either CDN is compromised, the scripts served could change without your knowledge. SRI hashes aren't always feasible for third-party scripts that update frequently, but it's worth confirming with the vendors whether they support pinned/versioned URLs.

  2. Placement in root layout: These scripts will load on every route. If they're only needed on specific pages (e.g., marketing/landing pages), consider scoping them more narrowly to avoid unnecessary execution on all documentation pages.

Neither of these is a blocker — cookie consent scripts and referral tracking are commonly loaded this way — but it's good to be intentional about the trade-offs.


36-45: Remove the redundant async prop from both <Script> components.

Next.js's Script component uses the strategy prop (not native HTML attributes) to control when scripts load. When no strategy is specified, it defaults to "afterInteractive", which injects the script client-side after hydration—already async. The native async attribute isn't even part of Next.js's documented API surface. Passing it through gets forwarded to the underlying HTML element but has no practical effect, and worse, it muddies the intent by suggesting you're opting into async behavior when the framework already handles it. Use strategy to express loading intent; remove async to keep the code clear.

♻️ Suggested cleanup
        <Script
-         async
          src="https://cdn.tolt.io/tolt.js"
          data-tolt="fda67739-7ed0-42d2-b716-6da0edbec191"
        />
        <Script
-         async
          src="https://cdn-cookieyes.com/client_data/96980f76df67ad5235fc3f0d/script.js"
          id="cookieyes"
        />

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 and usage tips.

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

3660 links: ✅ 2990 OK | 🚫 4 errors | 🔀 0 redirects | 👻 664 excluded

❌ Errors

./apps/docs/content/docs.v6/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

./apps/docs/content/docs.v6/orm/prisma-client/observability-and-logging/opentelemetry-tracing.mdx

./apps/docs/content/docs/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

./apps/docs/content/docs/orm/prisma-client/observability-and-logging/opentelemetry-tracing.mdx


Full Statistics Table
Status Count
✅ Successful 2990
🔀 Redirected 0
👻 Excluded 664
🚫 Errors 4
⛔ Unsupported 2
⏳ Timeouts 0
❓ Unknown 0

@mhartington mhartington merged commit 7670a34 into main Feb 13, 2026
7 of 10 checks passed
@mhartington mhartington deleted the add-cookies branch February 13, 2026 20:53
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

Comments