From d31c4804a6724e9dc0fbd2236ec01e0ab12fac27 Mon Sep 17 00:00:00 2001 From: Warren <5959690+wrn14897@users.noreply.github.com> Date: Fri, 17 Jul 2026 22:32:45 -0700 Subject: [PATCH 1/3] chore: ignore react-is in knip for packages/app react-is is intentionally installed to satisfy recharts 3's peer dependency under React 19 (d137eaab4) but is never imported directly, so knip flags it and fails the pre-commit hook on every commit. --- knip.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/knip.json b/knip.json index 0123bbfeed..8e9cf032c8 100644 --- a/knip.json +++ b/knip.json @@ -8,7 +8,8 @@ "ignoreDependencies": [ "eslint-config-next", "@chromatic-com/storybook", - "@storybook/addon-themes" + "@storybook/addon-themes", + "react-is" ] }, "packages/api": { From 2132c9107834b4faa2d74c153f6a815f3fa94717 Mon Sep 17 00:00:00 2001 From: Warren <5959690+wrn14897@users.noreply.github.com> Date: Fri, 17 Jul 2026 22:32:52 -0700 Subject: [PATCH 2/3] fix: noindex play demo deployments on Vercel Vercel deployments of this repo only serve the public play demo (play.hyperdx.io) and previews, never customer installs. Gate on VERCEL=1 to send X-Robots-Tag: noindex, nofollow on all routes and render a matching robots meta tag as a fallback, keeping the demo out of search engine indexes. Self-hosted and ClickHouse builds are unaffected. --- packages/app/next.config.mjs | 6 ++++++ packages/app/pages/_document.tsx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/app/next.config.mjs b/packages/app/next.config.mjs index ef3a3fc3ee..35ad36689d 100644 --- a/packages/app/next.config.mjs +++ b/packages/app/next.config.mjs @@ -86,6 +86,12 @@ const nextConfig = { key: 'X-Frame-Options', value: 'DENY', }, + // Vercel deployments of this repo only serve the public play demo + // (play.hyperdx.io) and previews — never customer installs — so keep + // them out of search engine indexes. Self-hosted builds are unaffected. + ...(process.env.VERCEL === '1' + ? [{ key: 'X-Robots-Tag', value: 'noindex, nofollow' }] + : []), ], }, ]; diff --git a/packages/app/pages/_document.tsx b/packages/app/pages/_document.tsx index 47a9651c45..6d5e4337be 100644 --- a/packages/app/pages/_document.tsx +++ b/packages/app/pages/_document.tsx @@ -7,6 +7,11 @@ import { themes } from '@/theme'; // Applied before React hydrates to prevent a flash of the wrong theme. // Reads the runtime value from window.__ENV (set by __ENV.js) and swaps // the theme class on so CSS variables are correct on first paint. +// Vercel deployments of this repo only serve the public play demo +// (play.hyperdx.io) and previews — never customer installs. Render a robots +// meta tag there as a fallback for the X-Robots-Tag header in next.config.mjs. +const IS_VERCEL = process.env.VERCEL === '1'; + const validThemes = Object.keys(themes); const themeClasses = validThemes.map(t => `theme-${t}`); const THEME_INIT_SCRIPT = ` @@ -33,6 +38,7 @@ export default function Document() { return (
+ {IS_VERCEL && } {/* eslint-disable-next-line @next/next/no-sync-scripts */} From 6dc27f7665851076cfe9a363ec85eaf09c8c4b18 Mon Sep 17 00:00:00 2001 From: Warren <5959690+wrn14897@users.noreply.github.com> Date: Fri, 17 Jul 2026 22:37:00 -0700 Subject: [PATCH 3/3] fix: gate noindex on NEXT_PUBLIC_NOINDEX env var instead of VERCEL Use an explicit opt-in flag so any demo deployment can enable it and Vercel-hosted installs are not implicitly deindexed. --- packages/app/next.config.mjs | 5 +---- packages/app/pages/_document.tsx | 9 ++------- packages/app/src/config.ts | 1 + 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/app/next.config.mjs b/packages/app/next.config.mjs index 35ad36689d..c3907eef6c 100644 --- a/packages/app/next.config.mjs +++ b/packages/app/next.config.mjs @@ -86,10 +86,7 @@ const nextConfig = { key: 'X-Frame-Options', value: 'DENY', }, - // Vercel deployments of this repo only serve the public play demo - // (play.hyperdx.io) and previews — never customer installs — so keep - // them out of search engine indexes. Self-hosted builds are unaffected. - ...(process.env.VERCEL === '1' + ...(process.env.NEXT_PUBLIC_NOINDEX === 'true' ? [{ key: 'X-Robots-Tag', value: 'noindex, nofollow' }] : []), ], diff --git a/packages/app/pages/_document.tsx b/packages/app/pages/_document.tsx index 6d5e4337be..50ec1d6afb 100644 --- a/packages/app/pages/_document.tsx +++ b/packages/app/pages/_document.tsx @@ -1,17 +1,12 @@ import { Head, Html, Main, NextScript } from 'next/document'; -import { IS_CLICKHOUSE_BUILD } from '@/config'; +import { IS_CLICKHOUSE_BUILD, IS_NOINDEX } from '@/config'; import { ibmPlexMono, inter, roboto, robotoMono } from '@/fonts'; import { themes } from '@/theme'; // Applied before React hydrates to prevent a flash of the wrong theme. // Reads the runtime value from window.__ENV (set by __ENV.js) and swaps // the theme class on so CSS variables are correct on first paint. -// Vercel deployments of this repo only serve the public play demo -// (play.hyperdx.io) and previews — never customer installs. Render a robots -// meta tag there as a fallback for the X-Robots-Tag header in next.config.mjs. -const IS_VERCEL = process.env.VERCEL === '1'; - const validThemes = Object.keys(themes); const themeClasses = validThemes.map(t => `theme-${t}`); const THEME_INIT_SCRIPT = ` @@ -38,7 +33,7 @@ export default function Document() { return ( - {IS_VERCEL && } + {IS_NOINDEX && } {/* eslint-disable-next-line @next/next/no-sync-scripts */} diff --git a/packages/app/src/config.ts b/packages/app/src/config.ts index af8737bd8b..be36368c43 100644 --- a/packages/app/src/config.ts +++ b/packages/app/src/config.ts @@ -54,6 +54,7 @@ export const IS_LOCAL_MODE = //true; (process.env.NEXT_PUBLIC_IS_LOCAL_MODE ?? 'false') === 'true'; export const IS_CLICKHOUSE_BUILD = process.env.NEXT_PUBLIC_CLICKHOUSE_BUILD === 'true'; +export const IS_NOINDEX = process.env.NEXT_PUBLIC_NOINDEX === 'true'; /** Time captured at module load, use this a stable fallback/default time value instead of Date.now() defined in each React component file */ // eslint-disable-next-line no-restricted-syntax