Skip to content

feat: DR-7915 Add query insights page#7728

Open
carlagn wants to merge 6 commits intomainfrom
feat/DR-7915-query-insights
Open

feat: DR-7915 Add query insights page#7728
carlagn wants to merge 6 commits intomainfrom
feat/DR-7915-query-insights

Conversation

@carlagn
Copy link
Copy Markdown
Contributor

@carlagn carlagn commented Mar 30, 2026

Pulling from website + updating some tokens

Summary by CodeRabbit

  • New Features

    • Added a Query Insights landing page with hero, marketing content, CTAs, feature cards (one marked “Coming soon”), and a footer callout.
    • Introduced interactive visualizations: line and bar charts for latency trends and a responsive data table.
  • Chores

    • Added a charting library to support the new visualizations.
  • Refactor

    • Simplified logo parade class handling for cleaner styling implementation.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

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

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

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8c02465e-f049-47a6-9e66-98551d0b34fe

📥 Commits

Reviewing files that changed from the base of the PR and between 65d5c4c and bcb3c56.

⛔ Files ignored due to path filters (12)
  • apps/site/public/illustrations/query-insights/features_1.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_1_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_1_mobile_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_2.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_2_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_2_mobile_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_3.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_3_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_3_mobile_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_mobile_1.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_mobile_2.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_mobile_3.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • apps/site/package.json
✅ Files skipped from review due to trivial changes (1)
  • apps/site/package.json

Walkthrough

Adds the recharts dependency, a new "Query insights" Next.js route page and metadata, a client-side query-insights component module (charts, table, responsive content), and swaps clsx for the cn utility in the logo-parade component.

Changes

Cohort / File(s) Summary
Dependency Addition
apps/site/package.json
Added recharts to dependencies using a catalog: version spec.
Query Insights Page
apps/site/src/app/query-insights/page.tsx
New Next.js app route exporting generateMetadata() and an async default Page that renders hero, latency visualization (charts + responsive table), feature cards, CTAs, and footer callout. searchParams prop accepted but not used.
Query Insights Components
apps/site/src/components/query-insights.tsx
New client-side component module exporting QueryInsightsTable, ContentBox, QueryInsightsLine, and QueryInsightsBars. Implements recharts charts with static datasets, custom tooltip styling, responsive image handling, and table/code sample markup.
Logo Parade Update
packages/ui/src/components/logo-parade.tsx
Replaced clsx import/calls with cn utility import and calls; className composition logic preserved; no public API changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: DR-7915 Add query insights page' directly and clearly summarizes the main change: introducing a new query insights page feature.

✏️ 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 Mar 30, 2026

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 1, 2026, 12:43 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: 1

🧹 Nitpick comments (2)
apps/site/src/app/query-insights/page.tsx (1)

209-227: Remove the large commented JSX block before merging.

Keeping this much commented UI in the page makes future edits noisier. Prefer removing it and tracking reintroduction via an issue/PR when the video is ready.

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

In `@apps/site/src/app/query-insights/page.tsx` around lines 209 - 227, Remove the
large commented JSX block that contains the placeholder video section (the
commented div with the YouTubePlayer component and its surrounding
headings/paragraphs) from page.tsx; delete the entire commented block so the
file no longer contains the noisy commented UI and, if needed, create an
issue/PR to reintroduce the YouTubePlayer section (reference the YouTubePlayer
usage and the "See how it works" heading) when the video is available.
apps/site/src/components/query-insights.tsx (1)

14-51: Prefer semantic table markup for accessibility.

This “table” is built from divs, so assistive tech won’t get native header/cell relationships. Consider using <table>, <thead>, <tbody>, <tr>, <th>, <td> (or explicit ARIA roles) for better accessibility and long-term maintainability.

Also applies to: 53-95

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

In `@apps/site/src/components/query-insights.tsx` around lines 14 - 51, The
current components (Table, TableHeader, TableRow, TableHead, TableCell,
TableBody) use divs which breaks native table semantics; change them to use
proper HTML table elements (Table -> table, TableHeader -> thead, TableBody ->
tbody, TableRow -> tr, TableHead -> th, TableCell -> td) or, if you must keep
divs, add explicit ARIA roles/attributes
(role="table"/"rowgroup"/"row"/"columnheader"/"cell" and proper scope on
headers) and ensure props like className and children are preserved; update
TableRow to accept placement of <th> vs <td> as needed and ensure keyboard/focus
behavior is preserved for accessible reading by assistive tech.
🤖 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/components/query-insights.tsx`:
- Around line 114-117: The component ContentBox (where className={clsx(...)} is
used) references clsx but it's not imported; add an import for clsx (e.g.,
import clsx from "clsx") at the top of the module and ensure the "clsx" package
is listed in dependencies (install it if missing) so the JSX expression using
clsx resolves and the component renders correctly.

---

Nitpick comments:
In `@apps/site/src/app/query-insights/page.tsx`:
- Around line 209-227: Remove the large commented JSX block that contains the
placeholder video section (the commented div with the YouTubePlayer component
and its surrounding headings/paragraphs) from page.tsx; delete the entire
commented block so the file no longer contains the noisy commented UI and, if
needed, create an issue/PR to reintroduce the YouTubePlayer section (reference
the YouTubePlayer usage and the "See how it works" heading) when the video is
available.

In `@apps/site/src/components/query-insights.tsx`:
- Around line 14-51: The current components (Table, TableHeader, TableRow,
TableHead, TableCell, TableBody) use divs which breaks native table semantics;
change them to use proper HTML table elements (Table -> table, TableHeader ->
thead, TableBody -> tbody, TableRow -> tr, TableHead -> th, TableCell -> td) or,
if you must keep divs, add explicit ARIA roles/attributes
(role="table"/"rowgroup"/"row"/"columnheader"/"cell" and proper scope on
headers) and ensure props like className and children are preserved; update
TableRow to accept placement of <th> vs <td> as needed and ensure keyboard/focus
behavior is preserved for accessible reading by assistive tech.
🪄 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: 45707511-9298-4de1-a0d5-2ec5b6ce9c13

📥 Commits

Reviewing files that changed from the base of the PR and between c654d65 and 43e2e38.

⛔ Files ignored due to path filters (13)
  • apps/site/public/illustrations/query-insights/features_1.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_1_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_1_mobile_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_2.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_2_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_2_mobile_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_3.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_3_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_3_mobile_light.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_mobile_1.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_mobile_2.svg is excluded by !**/*.svg
  • apps/site/public/illustrations/query-insights/features_mobile_3.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • apps/site/package.json
  • apps/site/src/app/query-insights/page.tsx
  • apps/site/src/components/query-insights.tsx
Comment on lines +114 to +117
className={clsx(
"flex flex-col gap-12 py-12",
reverse ? "md:flex-row-reverse" : "md:flex-row",
)}
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 | 🔴 Critical

clsx is undefined in ContentBox and will break rendering.

clsx is used on Line 114 but never imported. This causes a build/type error (Cannot find name 'clsx') or runtime failure depending on toolchain settings.

Proposed fix
-      className={clsx(
+      className={cn(
         "flex flex-col gap-12 py-12",
         reverse ? "md:flex-row-reverse" : "md:flex-row",
       )}
📝 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
className={clsx(
"flex flex-col gap-12 py-12",
reverse ? "md:flex-row-reverse" : "md:flex-row",
)}
className={cn(
"flex flex-col gap-12 py-12",
reverse ? "md:flex-row-reverse" : "md:flex-row",
)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/components/query-insights.tsx` around lines 114 - 117, The
component ContentBox (where className={clsx(...)} is used) references clsx but
it's not imported; add an import for clsx (e.g., import clsx from "clsx") at the
top of the module and ensure the "clsx" package is listed in dependencies
(install it if missing) so the JSX expression using clsx resolves and the
component renders correctly.
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

🤖 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/query-insights/page.tsx`:
- Line 54: The decorative <i> icons in the Query Insights page are being
announced by screen readers; update each decorative icon element in
apps/site/src/app/query-insights/page.tsx (specifically the <i> with className
"fa-solid fa-brain-circuit ml-2! inline-block!" and the other <i> occurrences
referenced in the review) to include aria-hidden="true" so they are ignored by
assistive tech; locate the <i> elements used alongside text (e.g., the
brain-circuit icon and the icons near "Start with Prisma Postgres" / "Read the
docs") and add the aria-hidden attribute to each decorative <i> tag.
- Around line 41-45: The exported async component Page currently declares an
unused parameter searchParams with a synchronous type that conflicts with
Next.js 16 async request APIs; remove the searchParams parameter and its type
annotation from the Page function signature (i.e., change export default async
function Page({ searchParams }: { ... }) to export default async function
Page()) and ensure there are no remaining references to searchParams inside the
Page function or its helpers (update any imports/usages if present).
🪄 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: d346a8d3-c42f-472e-b368-4b5e62dd11a1

📥 Commits

Reviewing files that changed from the base of the PR and between da373c2 and 65d5c4c.

📒 Files selected for processing (3)
  • apps/site/src/app/query-insights/page.tsx
  • apps/site/src/components/query-insights.tsx
  • packages/ui/src/components/logo-parade.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/site/src/components/query-insights.tsx
Comment on lines +41 to +45
export default async function Page({
searchParams,
}: {
searchParams: { [key: string]: string | string[] | undefined };
}) {
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:

cat -n apps/site/src/app/query-insights/page.tsx

Repository: prisma/web

Length of output: 13741


🏁 Script executed:

# Check Next.js version
cat package.json | grep -A 2 -B 2 "next"

Repository: prisma/web

Length of output: 36


🏁 Script executed:

# Check if there's a root layout that might define metadataBase
find apps/site/src -name "layout.tsx" | head -5

Repository: prisma/web

Length of output: 82


🏁 Script executed:

head -50 package.json

Repository: prisma/web

Length of output: 1113


🏁 Script executed:

cat -n apps/site/src/app/layout.tsx | head -80

Repository: prisma/web

Length of output: 2995


🏁 Script executed:

cat apps/site/package.json | grep -A 2 -B 2 "next"

Repository: prisma/web

Length of output: 671


🌐 Web query:

Next.js 15 searchParams page props async App Router

💡 Result:

In Next.js 15 (App Router), the Page component props changed: params and searchParams are now Promises, so you must await them (or unwrap them with use() in a Client Component). [1][2]

Server Component (recommended)

type SearchParams = Promise<Record<string, string | string[] | undefined>>

export default async function Page(props: { searchParams: SearchParams }) {
  const searchParams = await props.searchParams
  const q = searchParams.q
  return <div>{q}</div>
}

[1]

Client Component option

'use client'
import { use } from 'react'

export default function Page(props: { searchParams: Promise<any> }) {
  const searchParams = use(props.searchParams)
  return <div>{searchParams.q}</div>
}

[1]

If you’re seeing errors about accessing searchParams “synchronously”, it’s because Next 15 still allows some sync access for migration, but it can error (e.g. with certain caching/prerender settings). The fix is to refactor to the async form (and/or run the Next codemod). [2]

Sources:
[1] Next.js “Upgrading: Version 15” (Async Request APIs / searchParams and params examples)
[2] Next.js error doc: “Cannot access Request information synchronously…” (explains Promises + migration guidance)


🏁 Script executed:

grep -r "next" pnpm-lock.yaml 2>/dev/null | grep "version:" | head -3

Repository: prisma/web

Length of output: 1850


🏁 Script executed:

cat -n apps/site/package.json | head -30

Repository: prisma/web

Length of output: 1132


Remove unused searchParams prop typed with incorrect synchronous API.

Line 41–45 declares searchParams with synchronous typing, which conflicts with Next.js 16's async request APIs. Since this prop is never used in the component, remove it entirely to avoid type misalignment and future friction.

Suggested fix
-export default async function Page({
-  searchParams,
-}: {
-  searchParams: { [key: string]: string | string[] | undefined };
-}) {
+export default async function Page() {
   return (
📝 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
export default async function Page({
searchParams,
}: {
searchParams: { [key: string]: string | string[] | undefined };
}) {
export default async function Page() {
return (
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/query-insights/page.tsx` around lines 41 - 45, The exported
async component Page currently declares an unused parameter searchParams with a
synchronous type that conflicts with Next.js 16 async request APIs; remove the
searchParams parameter and its type annotation from the Page function signature
(i.e., change export default async function Page({ searchParams }: { ... }) to
export default async function Page()) and ensure there are no remaining
references to searchParams inside the Page function or its helpers (update any
imports/usages if present).
<div className="title">
<div className="eyebrow text-center uppercase font-mona-sans stretch-display font-extrabold text-foreground-ppg-weak mb-4!">
<span>Query insights</span>
<i className="fa-solid fa-brain-circuit ml-2! inline-block!"></i>
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:

# First, let's find and read the file
fd query-insights/page.tsx

Repository: prisma/web

Length of output: 36


🏁 Script executed:

# Read the file to check the content at the specified lines
cat -n apps/site/src/app/query-insights/page.tsx | sed -n '45,85p'

Repository: prisma/web

Length of output: 2497


🏁 Script executed:

# Check lines around 243 and 251
cat -n apps/site/src/app/query-insights/page.tsx | sed -n '235,260p'

Repository: prisma/web

Length of output: 1110


Hide decorative icons from screen readers with aria-hidden="true".

The <i> elements at lines 54, 73, 77, 243, and 251 are purely decorative—each is paired with adjacent text that conveys the actual meaning. Without aria-hidden="true", screen readers will announce these icons unnecessarily, creating noise for assistive technology users. Since the text alone communicates the intent (e.g., "Start with Prisma Postgres", "Read the docs"), the icons should be explicitly hidden.

-<i className="fa-regular fa-book-open ml-3!" />
+<i className="fa-regular fa-book-open ml-3!" aria-hidden="true" focusable="false" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/query-insights/page.tsx` at line 54, The decorative <i>
icons in the Query Insights page are being announced by screen readers; update
each decorative icon element in apps/site/src/app/query-insights/page.tsx
(specifically the <i> with className "fa-solid fa-brain-circuit ml-2!
inline-block!" and the other <i> occurrences referenced in the review) to
include aria-hidden="true" so they are ignored by assistive tech; locate the <i>
elements used alongside text (e.g., the brain-circuit icon and the icons near
"Start with Prisma Postgres" / "Read the docs") and add the aria-hidden
attribute to each decorative <i> tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant