Skip to content

fix: DR-8002 web UI tweaks#7821

Open
carlagn wants to merge 13 commits intomainfrom
fix/DR-8002-web-ui
Open

fix: DR-8002 web UI tweaks#7821
carlagn wants to merge 13 commits intomainfrom
fix/DR-8002-web-ui

Conversation

@carlagn
Copy link
Copy Markdown
Contributor

@carlagn carlagn commented Apr 24, 2026

Fixes #DR-8002
Part 1 of detected UI bugs from website post-release.

Summary by CodeRabbit

  • New Features

    • Added theme-specific light/dark icons and improved logo image handling for consistent visuals.
  • Bug Fixes

    • Fixed spacing between CTA text and icons for clearer buttons.
  • Style

    • Consolidated footer CTAs into a consistent component across pages.
    • Adjusted hero and section padding and responsive alignment for improved layout.
    • Updated several CTAs to point to external Prisma pages for clearer navigation.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

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

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Apr 24, 2026 0:22am
docs Ready Ready Preview, Comment Apr 24, 2026 0:22am
eclipse Ready Ready Preview, Comment Apr 24, 2026 0:22am
site Ready Ready Preview, Comment Apr 24, 2026 0:22am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Walkthrough

This PR adds a new reusable PageFooterCta component and replaces several inline footer CTA sections with it across the site. It also introduces theme-aware icon rendering, tweaks many pages' vertical spacing/padding, refactors some Button usages/styles, and applies widespread JSX reflow/formatting changes.

Changes

Cohort / File(s) Summary
New PageFooterCta Component
apps/site/src/components/page-footer-cta.tsx
Adds exported PageFooterCta with typed props (title via dangerouslySetInnerHTML, optional description, btns array or children, optional footer, color theme). Buttons map to ConsoleCtaButton when defaultUtm is present or render standard Button/<a>; supports external links.
Footer CTA Replacements
apps/site/src/app/(index)/page.tsx, apps/site/src/app/orm/page.tsx, apps/site/src/app/postgres/page.tsx, apps/site/src/app/typedsql/page.tsx, apps/site/src/app/mcp/_components/mcp-cta-section.tsx, apps/site/src/app/pricing/page.tsx
Replaced bespoke footer CTA sections with PageFooterCta calls, passing title/description/btns/footer props and removing previous inline button markup.
Theme-aware Icons & Logo Grid
apps/site/src/app/client/page.tsx, apps/site/src/components/homepage/card-section/logo-grid.tsx, apps/site/src/components/client/technology.tsx
Added icon_light variants and conditional dark/light Image rendering; changed LogoImage fallback behavior and visibility logic so dark image always present and light image rendered only if available.
Button & Console CTA changes
packages/eclipse/src/components/button.tsx, apps/site/src/components/console-cta-button.tsx
Added border-none to default-strong variant; minor formatting changes to buildConsoleHref and related code; many Button usages reformatted.
Layout / Spacing Adjustments
apps/site/src/app/careers/page.tsx, apps/site/src/app/enterprise/page.tsx, apps/site/src/app/mcp/_components/mcp-hero-section.tsx, apps/site/src/app/migrate/page.tsx, apps/site/src/app/newsletter/page.tsx, apps/site/src/app/oss-friends/page.tsx, apps/site/src/app/showcase/page.tsx, apps/site/src/app/startups/page.tsx, apps/site/src/app/support/page.tsx, apps/site/src/app/privacy/page.tsx, apps/site/src/app/sla/page.tsx, apps/site/src/app/event-code-of-conduct/page.tsx, apps/site/src/app/terms/page.tsx
Multiple pages adjusted Tailwind padding/margin utilities (e.g., pt-50pt-31, pt-70pt-48, my-24my-12), plus occasional flex/wrapping/layout tweaks.
Hero / CTA / Copy Formatting
apps/site/src/app/community/page.tsx, apps/site/src/app/events/page.tsx, apps/site/src/app/client/page.tsx, apps/site/src/app/startups/page.tsx, apps/site/src/app/(index)/page.tsx, and others
Widespread JSX reflow: multi-line JSX for buttons/links, paragraph rewrapping/splitting lines, explicit spaces ({" "}) added in places; no content changes.
Navigation & Support UI
apps/site/src/components/navigation-wrapper.tsx, apps/site/src/components/support/search-toggle.tsx
Added "/startups" to orm pathname list affecting color variant selection; search toggle alignment changed from justify-center to justify-end; minor type/import quoting and formatting updates.
Miscellaneous component formatting
apps/site/src/components/homepage/card-section/card-section.tsx, apps/site/src/components/client/technology.tsx, apps/site/src/components/support/search-toggle.tsx
Formatting and argument/layout reflows (multi-line destructuring, cn(...) calls, JSX layout) with no behavioral changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive The title 'fix: DR-8002 web UI tweaks' is vague and generic, using the non-descriptive term 'tweaks' that doesn't convey meaningful information about the changeset scope or specific improvements. Replace 'tweaks' with specific change descriptions such as 'fix: DR-8002 refactor footer CTAs and adjust page hero spacing' to clarify the main changes across affected files.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

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


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

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 24, 2026, 12:27 PM

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/site/src/components/support/search-toggle.tsx (1)

17-31: ⚠️ Potential issue | 🟡 Minor

Support-page search copy still says “blog”.

Line 17 (aria-label) and Line 31 (visible text) are blog-specific, which is confusing in the support surface and weakens accessibility wording consistency.

Suggested copy fix
-      aria-label={props["aria-label"] ?? "Search the blog"}
+      aria-label={props["aria-label"] ?? "Search support"}

...
-        Search the blog
+        Search support
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/components/support/search-toggle.tsx` around lines 17 - 31, The
component uses blog-specific copy for accessibility and visible text; update the
fallback aria-label and the visible span text to support-specific wording (e.g.,
change props["aria-label"] ?? "Search the blog" to a support-focused fallback
like "Search support" and change the <span> text "Search the blog" to the same
support wording) so accessibility and UI copy match the support surface; these
changes live in the JSX where aria-label is set and the sr-only/visible <span>
is rendered (the onClick handler and setOpenSearch logic remain unchanged).
apps/site/src/components/client/technology.tsx (1)

10-18: ⚠️ Potential issue | 🟠 Major

Technology should accept and merge caller className.

Line 468 in apps/site/src/app/enterprise/page.tsx now passes className to Technology, but this component does not expose that prop and hardcodes button classes. That prevents the new styling from being applied (and can fail type-checking depending on how @/components/technology is exported).

Proposed fix
+import { cn } from "@/lib/cn";
 import {
   Button,
   Tooltip,
   TooltipContent,
   TooltipProvider,
   TooltipTrigger,
 } from "@prisma/eclipse";

 export const Technology = ({
   children,
   text,
   url,
+  className,
 }: {
   children: React.ReactNode;
   text: string;
   url?: string;
+  className?: string;
 }) => {
   return (
     <TooltipProvider>
       <Tooltip>
         <TooltipTrigger asChild>
           <Button
             asChild
             variant="default-strong"
-            className="font-sans-display! font-normal! text-base! font-mono! w-[75px]! h-[75px]!"
+            className={cn(
+              "font-sans-display! font-normal! text-base! font-mono! w-[75px]! h-[75px]!",
+              className,
+            )}
           >
             <a href={url}>{children}</a>
           </Button>
         </TooltipTrigger>
         <TooltipContent>{text}</TooltipContent>

Also applies to: 23-27

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/components/client/technology.tsx` around lines 10 - 18, The
Technology component currently accepts only children, text, and url and
hardcodes its button classes; update the Technology props to include an optional
className?: string, and merge that incoming className with the component's
existing classes when rendering the root button/link (e.g., combine with the
hardcoded class string or use the project's clsx utility) so callers (like the
usage in page.tsx) can pass styles through without breaking types; ensure the
TypeScript type for Technology's props and the rendered element use the new
className prop.
🧹 Nitpick comments (1)
apps/site/src/components/client/technology.tsx (1)

28-28: Handle optional url without rendering a link missing href.

Because url is optional, rendering <a href={url}> can produce a non-link element state for keyboard users. Prefer conditional rendering: anchor when url exists, otherwise a real button element.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/components/client/technology.tsx` at line 28, The Technology
component currently always renders <a href={url}>{children}</a> even when the
optional prop url is undefined; change it to conditionally render an anchor only
when url is truthy and render a proper interactive element (e.g., <button
type="button"> or an element with role/button and keyboard handlers) when url is
absent so keyboard users still get a focusable, actionable control. Locate the
Technology component (where the prop url and children are used) and replace the
unconditional anchor with a conditional expression: if (url) return an <a
href={url} ...>{children}</a> preserving existing classes/aria, else return a
<button type="button" ...>{children}</button> (or an element with equivalent
accessibility attributes and event handlers) so styling and behavior remain
consistent. Ensure any shared className/props are applied to both branches and
add aria-disabled or disabled if the control should be inert.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/site/src/app/`(index)/page.tsx:
- Around line 27-28: The hero support text in the default export Page component
contains a missing space in the string "Works with your existing stack, wherever
you deploy.Your choice of ORM…"; update that JSX string in the Page component
(the hero copy) to insert a space after the period so it reads "Works with your
existing stack, wherever you deploy. Your choice of ORM, frameworks, and tools,
they all just connect."

In `@apps/site/src/app/client/page.tsx`:
- Around line 245-265: The two next/image usages rendering icons (the Image
components using props src={db.icon} and src={db.icon_light} with fill) are
missing a sizes attribute, causing Next.js to generate oversized srcsets; add a
sizes prop that matches the rendered 75×75 layout (for example sizes="75px" or
sizes="(max-width:75px) 75px, 75px") to both Image components so the generated
responsive images are limited to the actual icon size.

In `@apps/site/src/components/page-footer-cta.tsx`:
- Around line 38-41: Change the component to accept title as ReactNode instead
of string and stop using dangerouslySetInnerHTML: update the prop type for title
to React.ReactNode, remove dangerouslySetInnerHTML from the h2 and render the
title directly as {title}, and adjust any prop type/interface (e.g., the
component's Props type) to import/declare ReactNode; ensure callers still pass
plain strings or JSX so no runtime changes are needed.

---

Outside diff comments:
In `@apps/site/src/components/client/technology.tsx`:
- Around line 10-18: The Technology component currently accepts only children,
text, and url and hardcodes its button classes; update the Technology props to
include an optional className?: string, and merge that incoming className with
the component's existing classes when rendering the root button/link (e.g.,
combine with the hardcoded class string or use the project's clsx utility) so
callers (like the usage in page.tsx) can pass styles through without breaking
types; ensure the TypeScript type for Technology's props and the rendered
element use the new className prop.

In `@apps/site/src/components/support/search-toggle.tsx`:
- Around line 17-31: The component uses blog-specific copy for accessibility and
visible text; update the fallback aria-label and the visible span text to
support-specific wording (e.g., change props["aria-label"] ?? "Search the blog"
to a support-focused fallback like "Search support" and change the <span> text
"Search the blog" to the same support wording) so accessibility and UI copy
match the support surface; these changes live in the JSX where aria-label is set
and the sr-only/visible <span> is rendered (the onClick handler and
setOpenSearch logic remain unchanged).

---

Nitpick comments:
In `@apps/site/src/components/client/technology.tsx`:
- Line 28: The Technology component currently always renders <a
href={url}>{children}</a> even when the optional prop url is undefined; change
it to conditionally render an anchor only when url is truthy and render a proper
interactive element (e.g., <button type="button"> or an element with role/button
and keyboard handlers) when url is absent so keyboard users still get a
focusable, actionable control. Locate the Technology component (where the prop
url and children are used) and replace the unconditional anchor with a
conditional expression: if (url) return an <a href={url} ...>{children}</a>
preserving existing classes/aria, else return a <button type="button"
...>{children}</button> (or an element with equivalent accessibility attributes
and event handlers) so styling and behavior remain consistent. Ensure any shared
className/props are applied to both branches and add aria-disabled or disabled
if the control should be inert.
🪄 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

Run ID: 410a7f4d-4e6d-4af4-8784-c41af42a1590

📥 Commits

Reviewing files that changed from the base of the PR and between 7cb302a and e9cfb4f.

⛔ Files ignored due to path filters (7)
  • apps/site/public/icons/technologies/apollo_light.svg is excluded by !**/*.svg
  • apps/site/public/icons/technologies/express_light.svg is excluded by !**/*.svg
  • apps/site/public/icons/technologies/planetscale.svg is excluded by !**/*.svg
  • apps/site/public/icons/technologies/planetscale_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/typedsql/end-to-end-type-safety_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/typedsql/full-controll-sql_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/typedsql/great-dx_light.svg is excluded by !**/*.svg
📒 Files selected for processing (24)
  • apps/site/src/app/(index)/page.tsx
  • apps/site/src/app/careers/page.tsx
  • apps/site/src/app/client/page.tsx
  • apps/site/src/app/community/page.tsx
  • apps/site/src/app/enterprise/page.tsx
  • apps/site/src/app/events/page.tsx
  • apps/site/src/app/mcp/_components/mcp-cta-section.tsx
  • apps/site/src/app/mcp/_components/mcp-hero-section.tsx
  • apps/site/src/app/migrate/page.tsx
  • apps/site/src/app/newsletter/page.tsx
  • apps/site/src/app/orm/page.tsx
  • apps/site/src/app/oss-friends/page.tsx
  • apps/site/src/app/postgres/page.tsx
  • apps/site/src/app/showcase/page.tsx
  • apps/site/src/app/startups/page.tsx
  • apps/site/src/app/support/page.tsx
  • apps/site/src/app/typedsql/page.tsx
  • apps/site/src/components/client/technology.tsx
  • apps/site/src/components/console-cta-button.tsx
  • apps/site/src/components/homepage/card-section/card-section.tsx
  • apps/site/src/components/navigation-wrapper.tsx
  • apps/site/src/components/page-footer-cta.tsx
  • apps/site/src/components/support/search-toggle.tsx
  • packages/eclipse/src/components/button.tsx

Comment on lines +27 to +28
Works with your existing stack, wherever you deploy.Your choice of
ORM, frameworks, and tools, they all just connect.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix user-facing copy typo in hero support text.

Line 27 is missing a space after the period (deploy.Your), which will render as a typo.

✏️ Proposed fix
-          Works with your existing stack, wherever you deploy.Your choice of
+          Works with your existing stack, wherever you deploy. Your choice of
📝 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
Works with your existing stack, wherever you deploy.Your choice of
ORM, frameworks, and tools, they all just connect.
Works with your existing stack, wherever you deploy. Your choice of
ORM, frameworks, and tools, they all just connect.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/`(index)/page.tsx around lines 27 - 28, The hero support
text in the default export Page component contains a missing space in the string
"Works with your existing stack, wherever you deploy.Your choice of ORM…";
update that JSX string in the Page component (the hero copy) to insert a space
after the period so it reads "Works with your existing stack, wherever you
deploy. Your choice of ORM, frameworks, and tools, they all just connect."

Comment on lines +245 to +265
<Image
src={db.icon}
alt={db.name}
fill
className={cn(
"contain",
db.icon_light && "hidden dark:block",
)}
loading="lazy"
/>
{db.icon_light && (
<Image
src={db.icon_light}
alt={db.name}
fill
className={cn(
"contain",
db.icon_light && "block dark:hidden",
)}
loading="lazy"
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
python - <<'PY'
from pathlib import Path
import re

path = Path("apps/site/src/app/client/page.tsx")
text = path.read_text()

for m in re.finditer(r"<Image\b[\s\S]*?/>", text):
    block = m.group(0)
    if "fill" in block and "sizes=" not in block:
        line = text[:m.start()].count("\n") + 1
        print(f"Missing sizes on fill Image at line {line}")
        print(block.replace("\n", " ")[:240], "\n")
PY

Repository: prisma/web

Length of output: 620


🏁 Script executed:

cd apps/site/src/app && grep -B 10 -A 5 'src={db\.icon}' client/page.tsx | head -30

Repository: prisma/web

Length of output: 820


Add sizes attribute to next/image components using fill.

The Image components on lines 245 and 256 use fill without specifying sizes. When Next.js doesn't know the rendered width of a filled image, it generates a srcset that includes unnecessarily large image variants—wasting bandwidth since these icons render at a fixed 75px × 75px size (from the parent Action component's h-[75px]! w-[75px]! classes).

💡 Suggested patch
                         <Image
                           src={db.icon}
                           alt={db.name}
                           fill
+                          sizes="75px"
                           className={cn(
                             "contain",
                             db.icon_light && "hidden dark:block",
                           )}
                           loading="lazy"
                         />
                         {db.icon_light && (
                           <Image
                             src={db.icon_light}
                             alt={db.name}
                             fill
+                            sizes="75px"
                             className={cn(
                               "contain",
                               db.icon_light && "block dark:hidden",
                             )}
                             loading="lazy"
                           />
                         )}
📝 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
<Image
src={db.icon}
alt={db.name}
fill
className={cn(
"contain",
db.icon_light && "hidden dark:block",
)}
loading="lazy"
/>
{db.icon_light && (
<Image
src={db.icon_light}
alt={db.name}
fill
className={cn(
"contain",
db.icon_light && "block dark:hidden",
)}
loading="lazy"
/>
<Image
src={db.icon}
alt={db.name}
fill
sizes="75px"
className={cn(
"contain",
db.icon_light && "hidden dark:block",
)}
loading="lazy"
/>
{db.icon_light && (
<Image
src={db.icon_light}
alt={db.name}
fill
sizes="75px"
className={cn(
"contain",
db.icon_light && "block dark:hidden",
)}
loading="lazy"
/>
)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/client/page.tsx` around lines 245 - 265, The two next/image
usages rendering icons (the Image components using props src={db.icon} and
src={db.icon_light} with fill) are missing a sizes attribute, causing Next.js to
generate oversized srcsets; add a sizes prop that matches the rendered 75×75
layout (for example sizes="75px" or sizes="(max-width:75px) 75px, 75px") to both
Image components so the generated responsive images are limited to the actual
icon size.

Comment on lines +38 to +41
<h2
className="text-3xl text-foreground-neutral font-sans-display stretch-display"
dangerouslySetInnerHTML={{ __html: title }}
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether `PageFooterCta` receives only static/safe `title` values.
# Expected: title props should be string literals or JSX, not user/CMS-derived unsanitized HTML.

rg -n --type=tsx -C3 '<PageFooterCta|title=' apps/site/src/app apps/site/src/components

Repository: prisma/web

Length of output: 82


🏁 Script executed:

#!/bin/bash
# First, locate the component file
fd -e tsx page-footer-cta apps/site/src

# Then search for all usages of PageFooterCta without type filter
rg -n "PageFooterCta" apps/site/src --context=3

Repository: prisma/web

Length of output: 8338


🏁 Script executed:

#!/bin/bash
# Read the full component file to see all uses of title
cat -n apps/site/src/components/page-footer-cta.tsx

Repository: prisma/web

Length of output: 4032


Refactor title prop to accept ReactNode instead of string with dangerouslySetInnerHTML.

The component currently accepts title as a string and renders it via dangerouslySetInnerHTML (line 40). While all current callers pass static string literals, the prop type allows any consumer to pass unsanitized HTML, creating an XSS vector if the pattern spreads. The refactor below is safer and more idiomatic:

🔐 Safer refactor
 interface PageFooterCtaProps {
-  title: string;
+  title: ReactNode;
   description?: string;
   btns?: Btn[];
   children?: ReactNode;
   footer?: string;
   color?: "ppg" | "orm";
 }
@@
             <h2
               className="text-3xl text-foreground-neutral font-sans-display stretch-display"
-              dangerouslySetInnerHTML={{ __html: title }}
-            />
+            >
+              {title}
+            </h2>
📝 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
<h2
className="text-3xl text-foreground-neutral font-sans-display stretch-display"
dangerouslySetInnerHTML={{ __html: title }}
/>
<h2
className="text-3xl text-foreground-neutral font-sans-display stretch-display"
>
{title}
</h2>
🧰 Tools
🪛 ast-grep (0.42.1)

[warning] 39-39: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
- https://cwe.mitre.org/data/definitions/79.html

(react-unsafe-html-injection)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/components/page-footer-cta.tsx` around lines 38 - 41, Change
the component to accept title as ReactNode instead of string and stop using
dangerouslySetInnerHTML: update the prop type for title to React.ReactNode,
remove dangerouslySetInnerHTML from the h2 and render the title directly as
{title}, and adjust any prop type/interface (e.g., the component's Props type)
to import/declare ReactNode; ensure callers still pass plain strings or JSX so
no runtime changes are needed.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
apps/site/src/components/page-footer-cta.tsx (1)

38-41: ⚠️ Potential issue | 🟠 Major

Avoid dangerouslySetInnerHTML for title; this keeps an XSS vector open.

title is typed as string and injected as raw HTML. Even if current callsites are safe literals, this pattern is risky and unnecessary here. Prefer ReactNode and render directly.

🔧 Safer refactor
 interface PageFooterCtaProps {
-  title: string;
+  title: ReactNode;
   description?: string;
   btns?: Btn[];
   children?: ReactNode;
   footer?: string;
   color?: "ppg" | "orm";
 }
@@
             <h2
               className="text-3xl text-foreground-neutral font-sans-display stretch-display"
-              dangerouslySetInnerHTML={{ __html: title }}
-            />
+            >
+              {title}
+            </h2>
#!/bin/bash
# Verify all current usages of PageFooterCta title props and current raw HTML injection usage
rg -n --type=tsx -C2 'PageFooterCta|title=' apps/site/src
rg -n --type=tsx 'dangerouslySetInnerHTML' apps/site/src/components/page-footer-cta.tsx
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/components/page-footer-cta.tsx` around lines 38 - 41, The
PageFooterCta component currently injects the title string via
dangerouslySetInnerHTML which opens an XSS vector; change the prop type for
title from string to React.ReactNode (or ReactNode) in the PageFooterCta
props/type, remove dangerouslySetInnerHTML in the render, and render the title
directly inside the h2 (e.g., <h2 className=...>{title}</h2>); update any
callsites that pass raw HTML to instead pass sanitized JSX or plain strings (or
wrap in <span/>/<> if markup was intended), and add the React type import if
missing so the compiler recognizes React.ReactNode.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/site/src/app/terms/page.tsx`:
- Line 7: Update the metadata description string in
apps/site/src/app/terms/page.tsx to use the singular phrase “terms of service”
(matching the page title and standard phrasing) instead of “terms of services”;
locate the description field in the metadata object inside page.tsx and replace
the current value with a corrected sentence such as "Read our terms of service
and see how they relate to you."

In `@apps/site/src/app/typedsql/page.tsx`:
- Line 118: The className on the hero div contains an invalid Tailwind spacing
utility "pt-31" which Tailwind won't generate; either replace "pt-31" with a
valid spacing token (e.g., "pt-32") in the className string in page.tsx (look
for the hero -mt-24 ... pt-31 pb-16 line) or add a custom spacing key "31" to
your Tailwind theme spacing in tailwind.config (extend.theme.spacing) so "pt-31"
becomes valid; pick one approach and apply it consistently where "pt-31"
appears.

---

Duplicate comments:
In `@apps/site/src/components/page-footer-cta.tsx`:
- Around line 38-41: The PageFooterCta component currently injects the title
string via dangerouslySetInnerHTML which opens an XSS vector; change the prop
type for title from string to React.ReactNode (or ReactNode) in the
PageFooterCta props/type, remove dangerouslySetInnerHTML in the render, and
render the title directly inside the h2 (e.g., <h2 className=...>{title}</h2>);
update any callsites that pass raw HTML to instead pass sanitized JSX or plain
strings (or wrap in <span/>/<> if markup was intended), and add the React type
import if missing so the compiler recognizes React.ReactNode.
🪄 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

Run ID: 4acf2de5-e608-496e-a404-b51b45bfca0a

📥 Commits

Reviewing files that changed from the base of the PR and between e9cfb4f and f01b0a8.

⛔ Files ignored due to path filters (7)
  • apps/site/public/icons/technologies/apollo_light.svg is excluded by !**/*.svg
  • apps/site/public/icons/technologies/express_light.svg is excluded by !**/*.svg
  • apps/site/public/icons/technologies/planetscale.svg is excluded by !**/*.svg
  • apps/site/public/icons/technologies/planetscale_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/typedsql/end-to-end-type-safety_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/typedsql/full-controll-sql_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/typedsql/great-dx_light.svg is excluded by !**/*.svg
📒 Files selected for processing (33)
  • apps/site/src/app/(index)/page.tsx
  • apps/site/src/app/about/page.tsx
  • apps/site/src/app/careers/page.tsx
  • apps/site/src/app/client/page.tsx
  • apps/site/src/app/community/page.tsx
  • apps/site/src/app/enterprise/page.tsx
  • apps/site/src/app/event-code-of-conduct/page.tsx
  • apps/site/src/app/events/page.tsx
  • apps/site/src/app/mcp/_components/mcp-cta-section.tsx
  • apps/site/src/app/mcp/_components/mcp-hero-section.tsx
  • apps/site/src/app/migrate/page.tsx
  • apps/site/src/app/newsletter/page.tsx
  • apps/site/src/app/orm/page.tsx
  • apps/site/src/app/oss-friends/page.tsx
  • apps/site/src/app/postgres/page.tsx
  • apps/site/src/app/pricing/page.tsx
  • apps/site/src/app/pricing/pricing-hero-plans.tsx
  • apps/site/src/app/privacy/page.tsx
  • apps/site/src/app/showcase/page.tsx
  • apps/site/src/app/sla/page.tsx
  • apps/site/src/app/startups/page.tsx
  • apps/site/src/app/studio/page.tsx
  • apps/site/src/app/support/page.tsx
  • apps/site/src/app/terms/page.tsx
  • apps/site/src/app/typedsql/page.tsx
  • apps/site/src/components/client/technology.tsx
  • apps/site/src/components/console-cta-button.tsx
  • apps/site/src/components/homepage/card-section/card-section.tsx
  • apps/site/src/components/homepage/card-section/logo-grid.tsx
  • apps/site/src/components/navigation-wrapper.tsx
  • apps/site/src/components/page-footer-cta.tsx
  • apps/site/src/components/support/search-toggle.tsx
  • packages/eclipse/src/components/button.tsx
✅ Files skipped from review due to trivial changes (18)
  • apps/site/src/app/oss-friends/page.tsx
  • apps/site/src/app/pricing/pricing-hero-plans.tsx
  • apps/site/src/app/newsletter/page.tsx
  • apps/site/src/app/privacy/page.tsx
  • apps/site/src/app/event-code-of-conduct/page.tsx
  • apps/site/src/components/homepage/card-section/card-section.tsx
  • apps/site/src/app/events/page.tsx
  • apps/site/src/app/showcase/page.tsx
  • apps/site/src/app/mcp/_components/mcp-hero-section.tsx
  • apps/site/src/components/console-cta-button.tsx
  • apps/site/src/app/support/page.tsx
  • apps/site/src/app/careers/page.tsx
  • apps/site/src/app/sla/page.tsx
  • apps/site/src/components/client/technology.tsx
  • packages/eclipse/src/components/button.tsx
  • apps/site/src/components/support/search-toggle.tsx
  • apps/site/src/app/enterprise/page.tsx
  • apps/site/src/app/migrate/page.tsx
🚧 Files skipped from review as they are similar to previous changes (6)
  • apps/site/src/app/community/page.tsx
  • apps/site/src/app/orm/page.tsx
  • apps/site/src/app/postgres/page.tsx
  • apps/site/src/app/(index)/page.tsx
  • apps/site/src/app/startups/page.tsx
  • apps/site/src/app/client/page.tsx

title: "Terms of Service",
description:
"Read our terms of services and see how they relate to you.",
description: "Read our terms of services and see how they relate to you.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Metadata copy has a grammar mismatch.

Use “terms of service” (singular) for consistency with the page title and standard phrasing.

✏️ Suggested copy fix
-  description: "Read our terms of services and see how they relate to you.",
+  description: "Read our terms of service and see how they relate to you.",
📝 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
description: "Read our terms of services and see how they relate to you.",
description: "Read our terms of service and see how they relate to you.",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/terms/page.tsx` at line 7, Update the metadata description
string in apps/site/src/app/terms/page.tsx to use the singular phrase “terms of
service” (matching the page title and standard phrasing) instead of “terms of
services”; locate the description field in the metadata object inside page.tsx
and replace the current value with a corrected sentence such as "Read our terms
of service and see how they relate to you."

return (
<main className="flex-1 w-full z-1 bg-background-default">
<div className="hero -mt-24 flex items-center md:items-end justify-center px-4 relative overflow-hidden pt-50 pb-16 md:pb-0">
<div className="hero -mt-24 flex items-center md:items-end justify-center px-4 relative overflow-hidden pt-31 pb-16 md:pb-0">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking Tailwind config files..."
fd -i 'tailwind.config.*' | while read -r f; do
  echo "---- $f ----"
  rg -n -C2 'spacing|extend|31' "$f" || true
done

echo
echo "Checking whether custom *-31 spacing utilities are used elsewhere..."
rg -n --type=ts --type=tsx --type=js --type=jsx '\b[pmtblrxy]-31\b|\bpt-31\b'

Repository: prisma/web

Length of output: 347


🏁 Script executed:

cat -n apps/site/tailwind.config.ts

Repository: prisma/web

Length of output: 1758


🏁 Script executed:

sed -n '110,125p' apps/site/src/app/typedsql/page.tsx

Repository: prisma/web

Length of output: 1173


pt-31 is not a valid Tailwind spacing value and will be silently ignored.

The Tailwind config does not define a spacing key 31—neither in the default theme nor in the custom extend. Tailwind's default spacing scale includes 0–12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96, but not 31. This means the pt-31 utility class will not be generated, causing the hero section padding to fail silently and creating a layout regression.

Either add 31 to the theme spacing in tailwind.config.ts or correct pt-31 to a valid spacing value like pt-32.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/typedsql/page.tsx` at line 118, The className on the hero
div contains an invalid Tailwind spacing utility "pt-31" which Tailwind won't
generate; either replace "pt-31" with a valid spacing token (e.g., "pt-32") in
the className string in page.tsx (look for the hero -mt-24 ... pt-31 pb-16 line)
or add a custom spacing key "31" to your Tailwind theme spacing in
tailwind.config (extend.theme.spacing) so "pt-31" becomes valid; pick one
approach and apply it consistently where "pt-31" appears.

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.

1 participant