OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
style: apply biome's safe lint fixes across the repo
Carl-Gerhard Lindesvärde2caab9bc6ae
diff --git a/apps/api/e2e/session-e2e.ts b/apps/api/e2e/session-e2e.tsindex 9782f3b2b..3cec3984a 100644--- a/apps/api/e2e/session-e2e.ts+++ b/apps/api/e2e/session-e2e.ts@@ -13,8 +13,10 @@*/import {- chQuery,+ API_URL,check,+ chQuery,+ claimKey,countByName,ensureFixtures,getBlob,@@ -22,22 +24,20 @@ import {PROJECT_ID,pollUntil,preflight,+ profileKey,redis,runId,+ SESSION_TIMEOUT_MS,scenario,screenView,- SESSION_TIMEOUT_MS,+ sessionKey,shutdown,sleep,summarize,track,triggerReaper,- wallclockKey,- claimKey,- sessionKey,- profileKey,WORKER_URL,- API_URL,+ wallclockKey,} from './lib';async function scenarioSingleSession() {diff --git a/apps/api/scripts/test-manage-api.ts b/apps/api/scripts/test-manage-api.tsindex 9e3b6c2b0..2b2236fab 100644--- a/apps/api/scripts/test-manage-api.ts+++ b/apps/api/scripts/test-manage-api.ts@@ -14,7 +14,7 @@ const CLIENT_ID = process.env.CLIENT_ID!;const CLIENT_SECRET = process.env.CLIENT_SECRET!;const API_BASE_URL = process.env.API_URL || 'http://localhost:3333';-if (!CLIENT_ID || !CLIENT_SECRET) {+if (!(CLIENT_ID && CLIENT_SECRET)) {console.error('CLIENT_ID and CLIENT_SECRET must be set');process.exit(1);}@@ -92,7 +92,9 @@ async function testProjects() {console.log(`✓ POST /manage/projects: ${createResult.success ? '✅' : '❌'} ${createResult.status}`);- if (createResult.error) console.log(` Error: ${createResult.error}`);+ if (createResult.error) {+ console.log(` Error: ${createResult.error}`);+ }const projectId = createResult.data?.data?.id;const clientId = createResult.data?.data?.client?.id;@@ -100,8 +102,12 @@ async function testProjects() {if (projectId) {console.log(` Created project: ${projectId}`);- if (clientId) console.log(` Created client: ${clientId}`);- if (clientSecret) console.log(` Client secret: ${clientSecret}`);+ if (clientId) {+ console.log(` Created client: ${clientId}`);+ }+ if (clientSecret) {+ console.log(` Client secret: ${clientSecret}`);+ }}// List projects@@ -163,14 +169,18 @@ async function testClients(projectId?: string) {console.log(`✓ POST /manage/clients: ${createResult.success ? '✅' : '❌'} ${createResult.status}`);- if (createResult.error) console.log(` Error: ${createResult.error}`);+ if (createResult.error) {+ console.log(` Error: ${createResult.error}`);+ }const clientId = createResult.data?.data?.id;const clientSecret = createResult.data?.data?.secret;if (clientId) {console.log(` Created client: ${clientId}`);- if (clientSecret) console.log(` Client secret: ${clientSecret}`);+ if (clientSecret) {+ console.log(` Client secret: ${clientSecret}`);+ }}// List clients@@ -238,7 +248,9 @@ async function testReferences(projectId?: string) {console.log(`✓ POST /manage/references: ${createResult.success ? '✅' : '❌'} ${createResult.status}`);- if (createResult.error) console.log(` Error: ${createResult.error}`);+ if (createResult.error) {+ console.log(` Error: ${createResult.error}`);+ }const referenceId = createResult.data?.data?.id;@@ -328,7 +340,9 @@ async function main() {.filter((r) => !r.success).forEach((r) => {console.log(` ❌ ${r.name} (${r.status})`);- if (r.error) console.log(` Error: ${r.error}`);+ if (r.error) {+ console.log(` Error: ${r.error}`);+ }});}} catch (error) {diff --git a/apps/api/src/config/bun-version.test.ts b/apps/api/src/config/bun-version.test.tsindex bc903e529..fc531c861 100644--- a/apps/api/src/config/bun-version.test.ts+++ b/apps/api/src/config/bun-version.test.ts@@ -1,6 +1,6 @@+import { describe, expect, it } from 'bun:test';import { readFileSync } from 'node:fs';import { join } from 'node:path';-import { describe, expect, it } from 'bun:test';// ADR-016 rule 5 wants the Bun pin asserted in three places: .bun-version,// scripts/doctor.sh, and a boot log line — and all three must agree withdiff --git a/apps/justfuckinguseopenpanel/index.html b/apps/justfuckinguseopenpanel/index.htmlindex 839063db9..69d16f02a 100644--- a/apps/justfuckinguseopenpanel/index.html+++ b/apps/justfuckinguseopenpanel/index.html@@ -732,24 +732,25 @@</div><script>+ 'use strict';window.op =window.op ||- (function () {+ (() => {var n = [];return new Proxy(function () {arguments.length && n.push([].slice.call(arguments));},{- get: function (t, r) {- return 'q' === r+ get(t, r) {+ return r === 'q'? n: function () {n.push([r].concat([].slice.call(arguments)));};},- has: function (t, r) {- return 'q' === r;+ has(t, r) {+ return r === 'q';},});diff --git a/apps/public/components/sections/supporter-perks.tsx b/apps/public/components/sections/supporter-perks.tsxindex 8fa95be0e..fdd3dff14 100644--- a/apps/public/components/sections/supporter-perks.tsx+++ b/apps/public/components/sections/supporter-perks.tsx@@ -1,15 +1,15 @@-import { cn } from '@/lib/utils';import {CheckIcon,HeartHandshakeIcon,MessageSquareIcon,+ PackageIcon,RocketIcon,SparklesIcon,StarIcon,ZapIcon,- PackageIcon,} from 'lucide-react';import Link from 'next/link';+import { cn } from '@/lib/utils';const perks = [{@@ -52,17 +52,17 @@ export function SupporterPerks({ className }: { className?: string }) {return (<divclassName={cn(- 'col gap-4 p-6 rounded-xl border bg-card',+ 'col gap-4 rounded-xl border bg-card p-6','sticky top-24',className)}>- <div className="col gap-2 mb-2">- <div className="row gap-2 items-center">+ <div className="col mb-2 gap-2">+ <div className="row items-center gap-2"><HeartHandshakeIcon className="size-5 text-primary" /><h3 className="font-semibold text-lg">Supporter Perks</h3></div>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">Everything you get when you support OpenPanel</p></div>@@ -72,23 +72,23 @@ export function SupporterPerks({ className }: { className?: string }) {const Icon = perk.icon;return (<div- key={index}className={cn(- 'col gap-1.5 p-3 rounded-lg border transition-colors',+ 'col gap-1.5 rounded-lg border p-3 transition-colors',perk.highlight- ? 'bg-primary/5 border-primary/20'- : 'bg-background border-border'+ ? 'border-primary/20 bg-primary/5'+ : 'border-border bg-background')}+ key={index}>- <div className="row gap-2 items-start">+ <div className="row items-start gap-2"><IconclassName={cn(- 'size-4 mt-0.5 shrink-0',+ 'mt-0.5 size-4 shrink-0',perk.highlight ? 'text-primary' : 'text-muted-foreground')}/>- <div className="col gap-0.5 flex-1 min-w-0">- <div className="row gap-2 items-center">+ <div className="col min-w-0 flex-1 gap-0.5">+ <div className="row items-center gap-2"><h4className={cn('font-medium text-sm',@@ -98,16 +98,16 @@ export function SupporterPerks({ className }: { className?: string }) {{perk.title}</h4>{perk.highlight && (- <CheckIcon className="size-3.5 text-primary shrink-0" />+ <CheckIcon className="size-3.5 shrink-0 text-primary" />)}</div>- <p className="text-xs text-muted-foreground">+ <p className="text-muted-foreground text-xs">{perk.description}</p>{perk.href && (<Link+ className="mt-1 text-primary text-xs hover:underline"href={perk.href}- className="text-xs text-primary hover:underline mt-1">Learn more →</Link>@@ -119,8 +119,8 @@ export function SupporterPerks({ className }: { className?: string }) {})}</div>- <div className="mt-4 pt-4 border-t">- <p className="text-xs text-muted-foreground text-center">+ <div className="mt-4 border-t pt-4">+ <p className="text-center text-muted-foreground text-xs">Starting at <strong className="text-foreground">$20/month</strong></p></div>diff --git a/apps/public/content/compare/ensure.ts b/apps/public/content/compare/ensure.tsindex d0889529b..fafeb1f09 100644--- a/apps/public/content/compare/ensure.ts+++ b/apps/public/content/compare/ensure.ts@@ -1,4 +1,4 @@-import { readFile, readdir } from 'node:fs/promises';+import { readdir, readFile } from 'node:fs/promises';import { join } from 'node:path';interface FileStructure {@@ -117,7 +117,7 @@ async function analyzeJsonFiles(): Promise<void> {console.log(separator);const validFiles = structures.filter((s) => s.hasContent && !s.error);- const emptyFiles = structures.filter((s) => !s.hasContent && !s.error);+ const emptyFiles = structures.filter((s) => !(s.hasContent || s.error));const errorFiles = structures.filter((s) => s.error);console.log(` Total files: ${structures.length}`);@@ -148,7 +148,9 @@ async function analyzeJsonFiles(): Promise<void> {console.log(separator);sortedGroups.forEach(([structureKey, files], index) => {- if (structureKey === 'empty' || structureKey === 'error') return;+ if (structureKey === 'empty' || structureKey === 'error') {+ return;+ }const groupNum = index + 1;console.log(`\nGroup ${groupNum} structure:`);diff --git a/apps/public/src/app/(content)/[...pages]/page.tsx b/apps/public/src/app/(content)/[...pages]/page.tsxindex 63e72a76e..bc2a29a85 100644--- a/apps/public/src/app/(content)/[...pages]/page.tsx+++ b/apps/public/src/app/(content)/[...pages]/page.tsx@@ -1,12 +1,12 @@+import type { Metadata } from 'next';+import { notFound } from 'next/navigation';+import Script from 'next/script';import { HeroContainer } from '@/app/(home)/_sections/hero';import { SectionHeader } from '@/components/section';import { url } from '@/lib/layout.shared';import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { pageSource } from '@/lib/source';import { getMDXComponents } from '@/mdx-components';-import type { Metadata } from 'next';-import { notFound } from 'next/navigation';-import Script from 'next/script';export async function generateMetadata({params,@@ -46,7 +46,7 @@ export default async function Page({const page = await pageSource.getPage(pages);const Body = page?.data.body;- if (!page || !Body) {+ if (!(page && Body)) {return notFound();}@@ -70,16 +70,16 @@ export default async function Page({return (<div><Script+ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}id="page-schema"strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/><HeroContainer><SectionHeaderas="h1"- title={page.data.title}description={page.data.description}+ title={page.data.title}/></HeroContainer><main className="container">diff --git a/apps/public/src/app/(content)/articles/[articleSlug]/page.tsx b/apps/public/src/app/(content)/articles/[articleSlug]/page.tsxindex 14eabf814..22804b154 100644--- a/apps/public/src/app/(content)/articles/[articleSlug]/page.tsx+++ b/apps/public/src/app/(content)/articles/[articleSlug]/page.tsx@@ -1,3 +1,9 @@+import { ArrowLeftIcon } from 'lucide-react';+import type { Metadata } from 'next';+import Image from 'next/image';+import Link from 'next/link';+import { notFound } from 'next/navigation';+import Script from 'next/script';import { CtaBanner } from '@/app/(home)/_sections/cta-banner';import { HeroContainer } from '@/app/(home)/_sections/hero';import { Testimonials } from '@/app/(home)/_sections/testimonials';@@ -7,16 +13,10 @@ import { GetStartedButton } from '@/components/get-started-button';import { Logo } from '@/components/logo';import { SectionHeader } from '@/components/section';import { Toc } from '@/components/toc';-import { url, getAuthor } from '@/lib/layout.shared';+import { getAuthor, url } from '@/lib/layout.shared';import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { articleSource } from '@/lib/source';import { getMDXComponents } from '@/mdx-components';-import { ArrowLeftIcon } from 'lucide-react';-import type { Metadata } from 'next';-import Image from 'next/image';-import Link from 'next/link';-import { notFound } from 'next/navigation';-import Script from 'next/script';export async function generateStaticParams() {const articles = await articleSource.getPages();@@ -106,29 +106,29 @@ export default async function Page({<HeroContainer><div className="col"><Link+ className="mb-4 flex items-center gap-2 text-muted-foreground"href={goBackUrl}- className="flex items-center gap-2 mb-4 text-muted-foreground">- <ArrowLeftIcon className="w-4 h-4" />+ <ArrowLeftIcon className="h-4 w-4" /><span>Back to all articles</span></Link><SectionHeaderas="h1"- title={article?.data.title}description={article?.data.description}+ title={article?.data.title}/>- <div className="row gap-4 items-center mt-8">- <div className="size-10 center-center bg-black rounded-full">+ <div className="row mt-8 items-center gap-4">+ <div className="center-center size-10 rounded-full bg-black">{author.image ? (<Image- className="size-10 object-cover rounded-full"- src={author.image}alt={author.name}- width={48}+ className="size-10 rounded-full object-cover"height={48}+ src={author.image}+ width={48}/>) : (- <Logo className="w-6 h-6 fill-white" />+ <Logo className="h-6 w-6 fill-white" />)}</div><div className="col">@@ -148,23 +148,23 @@ export default async function Page({</div></HeroContainer><Script- strategy="beforeInteractive"+ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}id="article-schema"+ strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/>- <article className="container max-w-5xl col">- <div className="grid grid-cols-1 md:grid-cols-[1fr_300px] gap-0">+ <article className="col container max-w-5xl">+ <div className="grid grid-cols-1 gap-0 md:grid-cols-[1fr_300px]"><div className="min-w-0">- <div className="prose [&_table]:w-auto [&_img]:max-w-full [&_img]:h-auto">+ <div className="prose [&_img]:h-auto [&_img]:max-w-full [&_table]:w-auto"><Body components={getMDXComponents()} /></div></div>- <aside className="pl-12 pb-12 gap-8 col">+ <aside className="col gap-8 pb-12 pl-12"><Toc toc={article?.data.toc} /><FeatureCardContainer className="gap-2">- <span className="text-lg font-semibold">Try OpenPanel</span>- <p className="text-muted-foreground text-sm mb-4">+ <span className="font-semibold text-lg">Try OpenPanel</span>+ <p className="mb-4 text-muted-foreground text-sm">Give it a spin for free. No credit card required.</p><GetStartedButton />@@ -174,17 +174,17 @@ export default async function Page({{relatedArticles.length > 0 && (<div className="my-16">- <h3 className="text-2xl font-bold mb-8">Related articles</h3>- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">+ <h3 className="mb-8 font-bold text-2xl">Related articles</h3>+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">{relatedArticles.map((item) => (<ArticleCard+ cover={item.data.cover}+ date={item.data.date}key={item.url}- url={item.url}- title={item.data.title}tag={item.data.tag}- cover={item.data.cover}team={item.data.team}- date={item.data.date}+ title={item.data.title}+ url={item.url}/>))}</div>diff --git a/apps/public/src/app/(content)/articles/page.tsx b/apps/public/src/app/(content)/articles/page.tsxindex c23c9849c..374852dba 100644--- a/apps/public/src/app/(content)/articles/page.tsx+++ b/apps/public/src/app/(content)/articles/page.tsx@@ -1,3 +1,4 @@+import type { Metadata } from 'next';import { CtaBanner } from '@/app/(home)/_sections/cta-banner';import { HeroContainer } from '@/app/(home)/_sections/hero';import { Testimonials } from '@/app/(home)/_sections/testimonials';@@ -6,9 +7,6 @@ import { Section, SectionHeader } from '@/components/section';import { url } from '@/lib/layout.shared';import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { articleSource } from '@/lib/source';-import type { Metadata } from 'next';-import Image from 'next/image';-import Link from 'next/link';export const metadata: Metadata = getPageMetadata({title: 'Articles',@@ -26,24 +24,24 @@ export default async function Page() {<div><HeroContainer className="-mb-32"><SectionHeader- as="h1"align="center"+ as="h1"className="flex-1"- title="Articles"description="Read our latest articles and stay up to date with the latest news and updates."+ title="Articles"/></HeroContainer>- <Section className="container grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-8">+ <Section className="container grid grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3">{articles.map((item) => (<ArticleCard+ cover={item.data.cover}+ date={item.data.date}key={item.url}- url={item.url}- title={item.data.title}tag={item.data.tag}- cover={item.data.cover}team={item.data.team}- date={item.data.date}+ title={item.data.title}+ url={item.url}/>))}</Section>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/benefits-section.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/benefits-section.tsxindex 742ef159e..d68559df8 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/benefits-section.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/benefits-section.tsx@@ -1,8 +1,8 @@+import { CheckIcon } from 'lucide-react';+import Link from 'next/link';import { Section } from '@/components/section';import { Button } from '@/components/ui/button';import { cn } from '@/lib/utils';-import { CheckIcon } from 'lucide-react';-import Link from 'next/link';interface BenefitsSectionProps {label?: string;@@ -26,23 +26,23 @@ export function BenefitsSection({}: BenefitsSectionProps) {return (<Section className={cn('container', className)}>- <div className="max-w-3xl col gap-6">+ <div className="col max-w-3xl gap-6">{label && (- <p className="text-sm italic text-primary font-medium">{label}</p>+ <p className="font-medium text-primary text-sm italic">{label}</p>)}- <h2 className="text-4xl md:text-5xl font-semibold leading-tight">+ <h2 className="font-semibold text-4xl leading-tight md:text-5xl">{title}</h2><p className="text-lg text-muted-foreground">{description}</p>{cta && (- <Button size="lg" asChild className="w-fit">+ <Button asChild className="w-fit" size="lg"><Link href={cta.href}>{cta.label}</Link></Button>)}- <div className="col gap-4 mt-4">+ <div className="col mt-4 gap-4">{benefits.map((benefit) => (- <div key={benefit} className="row gap-3 items-start">- <CheckIcon className="size-5 text-green-500 shrink-0 mt-0.5" />+ <div className="row items-start gap-3" key={benefit}>+ <CheckIcon className="mt-0.5 size-5 shrink-0 text-green-500" /><p className="text-muted-foreground">{benefit}</p></div>))}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/compare-hero.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/compare-hero.tsxindex d54e4dfbd..12cedb190 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/compare-hero.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/compare-hero.tsx@@ -1,12 +1,12 @@+import { CheckCircle2Icon } from 'lucide-react';+import Link from 'next/link';+import { CompareToc } from './compare-toc';import { HeroContainer } from '@/app/(home)/_sections/hero';import { GetStartedButton } from '@/components/get-started-button';import { Perks } from '@/components/perks';import { SectionHeader } from '@/components/section';import { Button } from '@/components/ui/button';import type { CompareHero as CompareHeroData } from '@/lib/compare';-import { CheckCircle2Icon } from 'lucide-react';-import Link from 'next/link';-import { CompareToc } from './compare-toc';interface CompareHeroProps {hero: CompareHeroData;@@ -15,11 +15,11 @@ interface CompareHeroProps {export function CompareHero({ hero, tocItems = [] }: CompareHeroProps) {return (- <HeroContainer divider={false} className="-mb-32">+ <HeroContainer className="-mb-32" divider={false}><divclassName={tocItems.length > 0- ? 'grid md:grid-cols-[1fr_auto] gap-8 items-start'+ ? 'grid items-start gap-8 md:grid-cols-[1fr_auto]': 'col gap-6'}>@@ -27,24 +27,24 @@ export function CompareHero({ hero, tocItems = [] }: CompareHeroProps) {<SectionHeaderas="h1"className="flex-1"- title={hero.heading}description={hero.subheading}+ title={hero.heading}variant="sm"/><div className="row gap-4"><GetStartedButton />- <Button size="lg" variant="outline" asChild>+ <Button asChild size="lg" variant="outline"><Linkhref={'https://demo.openpanel.dev'}- target="_blank"rel="noreferrer noopener nofollow"+ target="_blank">See live demo</Link></Button></div><Perks- className="flex gap-4 flex-wrap"+ className="flex flex-wrap gap-4"perks={hero.badges.map((badge) => ({text: badge,icon: CheckCircle2Icon,diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsxindex 2a8619560..0263d5a7e 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsx@@ -8,13 +8,13 @@ interface CompareOverviewProps {export function CompareOverview({ overview }: CompareOverviewProps) {return (<Section className="container">- <article className="col gap-6 max-w-3xl">- <h2 className="text-3xl md:text-4xl font-semibold">{overview.title}</h2>+ <article className="col max-w-3xl gap-6">+ <h2 className="font-semibold text-3xl md:text-4xl">{overview.title}</h2><div className="col gap-4">{overview.paragraphs.map((paragraph) => (<p+ className="text-base text-muted-foreground leading-relaxed md:text-lg"key={paragraph.slice(0, 48)}- className="text-muted-foreground leading-relaxed text-base md:text-lg">{paragraph}</p>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsxindex 93f7c5ad0..a2796e225 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsx@@ -1,10 +1,10 @@'use client';-import { FeatureCardContainer } from '@/components/feature-card';-import { cn } from '@/lib/utils';import { ArrowRightIcon } from 'lucide-react';import Link from 'next/link';import { usePathname } from 'next/navigation';+import { FeatureCardContainer } from '@/components/feature-card';+import { cn } from '@/lib/utils';interface TocItem {id: string;@@ -22,17 +22,17 @@ export function CompareToc({ items, className }: CompareTocProps) {return (<FeatureCardContainerclassName={cn(- 'hidden md:block sticky top-24 h-fit w-64 shrink-0',- 'col gap-3 p-4 rounded-xl border bg-background/50 backdrop-blur-sm',+ 'sticky top-24 hidden h-fit w-64 shrink-0 md:block',+ 'col gap-3 rounded-xl border bg-background/50 p-4 backdrop-blur-sm',className)}><nav className="col gap-1">{items.map((item) => (<Link- key={item.id}+ className="group/toc relative flex min-h-6 items-center py-1 text-muted-foreground text-sm transition-colors duration-200 hover:text-foreground"href={`${pathname}#${item.id}`}- className="group/toc relative flex items-center text-sm text-muted-foreground hover:text-foreground transition-colors duration-200 py-1 min-h-6"+ key={item.id}onClick={(e) => {e.preventDefault();e.stopPropagation();@@ -45,8 +45,8 @@ export function CompareToc({ items, className }: CompareTocProps) {}}}>- <div className="absolute left-0 flex items-center w-0 overflow-hidden transition-all duration-300 ease-out group-hover/toc:w-5">- <ArrowRightIcon className="size-3 shrink-0 -translate-x-full group-hover/toc:translate-x-0 transition-transform duration-300 ease-out delay-75" />+ <div className="absolute left-0 flex w-0 items-center overflow-hidden transition-all duration-300 ease-out group-hover/toc:w-5">+ <ArrowRightIcon className="size-3 shrink-0 -translate-x-full transition-transform delay-75 duration-300 ease-out group-hover/toc:translate-x-0" /></div><span className="transition-transform duration-300 ease-out group-hover/toc:translate-x-5">{item.label}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsxindex 317395a66..97617bad6 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsx@@ -1,6 +1,9 @@-import { Section, SectionHeader } from '@/components/section';-import { CompareHighlights, CompareFeatureComparison } from '@/lib/compare';import { CheckIcon, XIcon } from 'lucide-react';+import { Section, SectionHeader } from '@/components/section';+import type {+ CompareFeatureComparison,+ CompareHighlights,+} from '@/lib/compare';import { cn } from '@/lib/utils';interface ComparisonTableProps {@@ -56,18 +59,18 @@ export function ComparisonTable({return (<Section className="container"><SectionHeader- title={highlights.title}description={highlights.intro}+ title={highlights.title}variant="sm"/>- <div className="mt-12 border rounded-2xl overflow-hidden">+ <div className="mt-12 overflow-hidden rounded-2xl border"><div className="overflow-x-auto"><table className="w-full"><thead><tr className="border-b bg-muted/30">- <th className="text-left p-4 font-semibold">Feature</th>- <th className="text-left p-4 font-semibold">OpenPanel</th>- <th className="text-left p-4 font-semibold">+ <th className="p-4 text-left font-semibold">Feature</th>+ <th className="p-4 text-left font-semibold">OpenPanel</th>+ <th className="p-4 text-left font-semibold">{competitorName}</th></tr>@@ -75,25 +78,25 @@ export function ComparisonTable({<tbody>{allRows.map((row, index) => (<tr- key={row.feature}className={cn('border-b last:border-b-0',index % 2 === 0 ? 'bg-background' : 'bg-muted/20')}+ key={row.feature}><td className="p-4 font-medium">{row.feature}</td><td className="p-4">- <div className="row gap-2 items-center">+ <div className="row items-center gap-2">{renderValue(row.openpanel)}</div></td><td className="p-4"><div className="col gap-1">- <div className="row gap-2 items-center text-muted-foreground">+ <div className="row items-center gap-2 text-muted-foreground">{renderValue(row.competitor)}</div>{row.notes && (- <span className="text-xs text-muted-foreground/70 mt-1">+ <span className="mt-1 text-muted-foreground/70 text-xs">{row.notes}</span>)}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsxindex e3dc8d125..739ffbd46 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsx@@ -1,13 +1,12 @@-import { Section, SectionHeader } from '@/components/section';-import { CompareFeatureGroup } from '@/lib/compare';import { CheckIcon, XIcon } from 'lucide-react';-import { cn } from '@/lib/utils';+import { Section, SectionHeader } from '@/components/section';import {Accordion,AccordionContent,AccordionItem,AccordionTrigger,} from '@/components/ui/accordion';+import type { CompareFeatureGroup } from '@/lib/compare';interface FeatureComparisonProps {featureGroups: CompareFeatureGroup[];@@ -21,39 +20,39 @@ function renderFeatureValue(value: boolean | string) {<XIcon className="size-5 text-red-500" />);}- return <span className="text-sm text-muted-foreground">{value}</span>;+ return <span className="text-muted-foreground text-sm">{value}</span>;}export function FeatureComparison({ featureGroups }: FeatureComparisonProps) {return (<Section className="container"><SectionHeader- title="Feature comparison"- description="Detailed breakdown of capabilities"align="center"+ description="Detailed breakdown of capabilities"+ title="Feature comparison"/>- <div className="mt-12 col gap-4">+ <div className="col mt-12 gap-4">{featureGroups.map((group) => (- <div key={group.group} className="border rounded-3xl overflow-hidden">- <Accordion type="single" collapsible className="w-full">- <AccordionItem value={group.group} className="border-0">+ <div className="overflow-hidden rounded-3xl border" key={group.group}>+ <Accordion className="w-full" collapsible type="single">+ <AccordionItem className="border-0" value={group.group}><AccordionTrigger className="px-6 py-4 hover:no-underline">- <h3 className="text-lg font-semibold">{group.group}</h3>+ <h3 className="font-semibold text-lg">{group.group}</h3></AccordionTrigger><AccordionContent className="px-6 pb-6"><div className="col gap-4">{group.features.map((feature) => (<div+ className="grid gap-4 border-b py-3 last:border-b-0 md:grid-cols-3"key={feature.name}- className="grid md:grid-cols-3 gap-4 py-3 border-b last:border-b-0"><div className="font-medium text-sm">{feature.name}</div>- <div className="row gap-2 items-center">+ <div className="row items-center gap-2">{renderFeatureValue(feature.openpanel)}</div>- <div className="row gap-2 items-center text-muted-foreground">+ <div className="row items-center gap-2 text-muted-foreground">{renderFeatureValue(feature.competitor)}</div></div>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsxindex 783197264..470cc40a4 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsx@@ -1,15 +1,15 @@-import { Section, SectionHeader } from '@/components/section';-import { CompareFeatureComparison } from '@/lib/compare';import {+ BellIcon,+ BrainIcon,HeartIcon,+ LayoutIcon,+ LockIcon,MessageSquareIcon,RefreshCwIcon,SparklesIcon,- LayoutIcon,- BellIcon,- BrainIcon,- LockIcon,} from 'lucide-react';+import { Section, SectionHeader } from '@/components/section';+import type { CompareFeatureComparison } from '@/lib/compare';interface FeaturesShowcaseProps {featureComparison: CompareFeatureComparison;@@ -40,16 +40,16 @@ export function FeaturesShowcase({ featureComparison }: FeaturesShowcaseProps) {return (<Section className="container"><SectionHeader- title={featureComparison.title}description={featureComparison.intro}+ title={featureComparison.title}variant="sm"/>- <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mt-12">+ <div className="mt-12 grid gap-6 md:grid-cols-2 lg:grid-cols-4">{openpanelFeatures.map((feature, index) => {const Icon = featureIcons[index] || SparklesIcon;return (- <div key={feature.name} className="col gap-3">- <div className="size-10 rounded-lg bg-primary/10 center-center">+ <div className="col gap-3" key={feature.name}>+ <div className="center-center size-10 rounded-lg bg-primary/10"><Icon className="size-5 text-primary" /></div><h3 className="font-semibold text-sm">{feature.name}</h3>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsxindex d3b0dcad4..ddd6c52c1 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsx@@ -1,6 +1,6 @@+import { CheckIcon, MinusIcon, XIcon } from 'lucide-react';import { Section, SectionHeader } from '@/components/section';-import { CompareHighlight } from '@/lib/compare';-import { CheckIcon, XIcon, MinusIcon } from 'lucide-react';+import type { CompareHighlight } from '@/lib/compare';import { cn } from '@/lib/utils';interface HighlightsGridProps {@@ -22,28 +22,28 @@ export function HighlightsGrid({ highlights }: HighlightsGridProps) {return (<Section className="container"><SectionHeader- title="Key differences"- description="See how OpenPanel compares at a glance"align="center"+ description="See how OpenPanel compares at a glance"+ title="Key differences"/>- <div className="mt-12 border rounded-3xl overflow-hidden">+ <div className="mt-12 overflow-hidden rounded-3xl border"><div className="divide-y divide-border">{highlights.map((highlight, index) => (<div- key={highlight.label}className={cn(- 'grid md:grid-cols-3 gap-4 p-6',+ 'grid gap-4 p-6 md:grid-cols-3',index % 2 === 0 ? 'bg-muted/30' : 'bg-background')}+ key={highlight.label}><div className="font-semibold text-sm md:text-base">{highlight.label}</div>- <div className="row gap-3 items-center">+ <div className="row items-center gap-3">{getIcon(highlight.openpanel)}<span className="text-sm">{highlight.openpanel}</span></div>- <div className="row gap-3 items-center text-muted-foreground">+ <div className="row items-center gap-3 text-muted-foreground">{getIcon(highlight.competitor)}<span className="text-sm">{highlight.competitor}</span></div>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsxindex a079e12d2..fb1cc25c9 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsx@@ -1,7 +1,6 @@-import { Section, SectionHeader } from '@/components/section';-import { CompareMigration } from '@/lib/compare';import { CheckIcon, ClockIcon } from 'lucide-react';-import { cn } from '@/lib/utils';+import { Section, SectionHeader } from '@/components/section';+import type { CompareMigration } from '@/lib/compare';interface MigrationSectionProps {migration: CompareMigration;@@ -11,22 +10,22 @@ export function MigrationSection({ migration }: MigrationSectionProps) {return (<Section className="container"><SectionHeader- title={migration.title}description={migration.intro}+ title={migration.title}variant="sm"/>{/* Difficulty and time */}- <div className="row gap-6 mt-8">+ <div className="row mt-8 gap-6"><div className="col gap-2">- <div className="row gap-2 items-center text-sm text-muted-foreground">+ <div className="row items-center gap-2 text-muted-foreground text-sm"><ClockIcon className="size-4" /><span className="font-medium">Difficulty:</span><span className="capitalize">{migration.difficulty}</span></div></div><div className="col gap-2">- <div className="row gap-2 items-center text-sm text-muted-foreground">+ <div className="row items-center gap-2 text-muted-foreground text-sm"><ClockIcon className="size-4" /><span className="font-medium">Estimated time:</span><span>{migration.estimated_time}</span>@@ -35,16 +34,16 @@ export function MigrationSection({ migration }: MigrationSectionProps) {</div>{/* Steps */}- <div className="col gap-4 mt-12">+ <div className="col mt-12 gap-4">{migration.steps.map((step, index) => (- <div key={step.title} className="col gap-2 p-6 border rounded-2xl">- <div className="row gap-3 items-start">- <div className="size-8 rounded-full bg-primary/10 center-center shrink-0 font-semibold text-sm">+ <div className="col gap-2 rounded-2xl border p-6" key={step.title}>+ <div className="row items-start gap-3">+ <div className="center-center size-8 shrink-0 rounded-full bg-primary/10 font-semibold text-sm">{index + 1}</div>- <div className="col gap-1 flex-1">+ <div className="col flex-1 gap-1"><h3 className="font-semibold">{step.title}</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">{step.description}</p></div>@@ -54,22 +53,22 @@ export function MigrationSection({ migration }: MigrationSectionProps) {</div>{/* SDK Compatibility */}- <div className="mt-12 p-6 border rounded-2xl bg-muted/30">+ <div className="mt-12 rounded-2xl border bg-muted/30 p-6"><div className="col gap-4">- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><CheckIcon className="size-5 text-green-500" /><h3 className="font-semibold">SDK Compatibility</h3></div>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">{migration.sdk_compatibility.notes}</p></div></div>{/* Historical Data */}- <div className="mt-6 p-6 border rounded-2xl bg-muted/30">+ <div className="mt-6 rounded-2xl border bg-muted/30 p-6"><div className="col gap-4">- <div className="row gap-2 items-center">+ <div className="row items-center gap-2">{migration.historical_data.can_import ? (<CheckIcon className="size-5 text-green-500" />) : (@@ -77,7 +76,7 @@ export function MigrationSection({ migration }: MigrationSectionProps) {)}<h3 className="font-semibold">Historical Data Import</h3></div>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">{migration.historical_data.notes}</p></div>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsxindex 7f4013980..c7bcf4beb 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsx@@ -1,8 +1,8 @@+import { DollarSignIcon } from 'lucide-react';import { FeatureCard } from '@/components/feature-card';import { Section, SectionHeader } from '@/components/section';import type { ComparePricing } from '@/lib/compare';import { cn } from '@/lib/utils';-import { DollarSignIcon } from 'lucide-react';interface PricingComparisonRow {feature: string;@@ -24,34 +24,34 @@ export function PricingComparison({return (<Section className="container"><SectionHeader- title={pricing.title}- description={pricing.intro}align="center"+ description={pricing.intro}+ title={pricing.title}/>- <div className="grid md:grid-cols-2 gap-6 mt-12">+ <div className="mt-12 grid gap-6 md:grid-cols-2"><FeatureCard- title="OpenPanel"+ className="border-green-500/20 bg-green-500/5"description={pricing.openpanel.model}icon={DollarSignIcon}- className="border-green-500/20 bg-green-500/5"+ title="OpenPanel">- <div className="col gap-3 mt-4">- <p className="text-sm text-muted-foreground">+ <div className="col mt-4 gap-3">+ <p className="text-muted-foreground text-sm">{pricing.openpanel.description}</p></div></FeatureCard><FeatureCard- title={competitorName}description={pricing.competitor.model}icon={DollarSignIcon}+ title={competitorName}>- <div className="col gap-3 mt-4">- <p className="text-sm text-muted-foreground">+ <div className="col mt-4 gap-3">+ <p className="text-muted-foreground text-sm">{pricing.competitor.description}</p>{pricing.competitor.free_tier && (- <p className="text-xs text-muted-foreground">+ <p className="text-muted-foreground text-xs">Free tier: {pricing.competitor.free_tier}</p>)}@@ -59,21 +59,21 @@ export function PricingComparison({</FeatureCard></div>{pricingTable.length > 0 && (- <div className="mt-12 border rounded-3xl overflow-hidden">+ <div className="mt-12 overflow-hidden rounded-3xl border"><div className="divide-y divide-border">{pricingTable.map((row, index) => (<div- key={row.feature}className={cn(- 'grid md:grid-cols-3 gap-4 p-6',+ 'grid gap-4 p-6 md:grid-cols-3',index % 2 === 0 ? 'bg-muted/30' : 'bg-background')}+ key={row.feature}><div className="font-semibold text-sm md:text-base">{row.feature}</div><div className="text-sm">{row.openpanel}</div>- <div className="text-sm text-muted-foreground">+ <div className="text-muted-foreground text-sm">{row.competitor}</div></div>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsxindex 68d166b52..60b4dadc0 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsx@@ -1,10 +1,10 @@'use client';-import { Section, SectionHeader } from '@/components/section';-import type { ComparePricing } from '@/lib/compare';-import { ArrowRightIcon, CheckIcon } from 'lucide-react';import { motion } from 'framer-motion';+import { ArrowRightIcon, CheckIcon } from 'lucide-react';import Link from 'next/link';+import { Section, SectionHeader } from '@/components/section';+import type { ComparePricing } from '@/lib/compare';interface PricingSectionProps {pricing: ComparePricing;@@ -47,69 +47,69 @@ export function PricingSection({return (<Section className="container"><SectionHeader- title={pricing.title}description={pricing.intro}+ title={pricing.title}variant="sm"/>{/* Pricing comparison */}<motion.div+ className="mt-12 grid gap-6 md:grid-cols-2"initial="hidden"- whileInView="visible"- viewport={{ once: true, margin: '-100px' }}variants={containerVariants}- className="grid md:grid-cols-2 gap-6 mt-12"+ viewport={{ once: true, margin: '-100px' }}+ whileInView="visible">{/* OpenPanel Card */}<motion.div+ className="col group relative gap-4 overflow-hidden rounded-2xl border bg-background p-6 transition-all duration-300 hover:border-emerald-500/30"variants={cardVariants}- className="col gap-4 p-6 rounded-2xl border bg-background group relative overflow-hidden hover:border-emerald-500/30 transition-all duration-300">- <div className="pointer-events-none absolute inset-0 bg-linear-to-br opacity-100 blur-2xl dark:from-emerald-500/5 dark:via-transparent dark:to-green-500/5 light:from-emerald-800/10 light:via-transparent light:to-green-900/10 group-hover:opacity-150 transition-opacity duration-500" />- <div className="col gap-3 relative z-10">+ <div className="pointer-events-none absolute inset-0 bg-linear-to-br light:from-emerald-800/10 light:via-transparent light:to-green-900/10 opacity-100 blur-2xl transition-opacity duration-500 group-hover:opacity-150 dark:from-emerald-500/5 dark:via-transparent dark:to-green-500/5" />+ <div className="col relative z-10 gap-3"><div className="col gap-2">- <h3 className="text-xl font-semibold">OpenPanel</h3>- <p className="text-sm text-muted-foreground font-medium">+ <h3 className="font-semibold text-xl">OpenPanel</h3>+ <p className="font-medium text-muted-foreground text-sm">{pricing.openpanel.model}</p></div>- <div className="col gap-2 mt-2">+ <div className="col mt-2 gap-2">{openpanelPoints.map((point, index) => (<motion.div- key={index}+ className="row group/item items-start gap-2"initial={{ opacity: 0, x: -10 }}- whileInView={{ opacity: 1, x: 0 }}- viewport={{ once: true }}+ key={index}transition={{ delay: index * 0.1 }}- className="row gap-2 items-start group/item"+ viewport={{ once: true }}+ whileInView={{ opacity: 1, x: 0 }}>- <CheckIcon className="size-4 text-emerald-600 dark:text-emerald-400 shrink-0 mt-0.5 group-hover/item:scale-110 transition-transform duration-300" />- <p className="text-sm text-muted-foreground flex-1 group-hover/item:text-foreground transition-colors duration-300">+ <CheckIcon className="mt-0.5 size-4 shrink-0 text-emerald-600 transition-transform duration-300 group-hover/item:scale-110 dark:text-emerald-400" />+ <p className="flex-1 text-muted-foreground text-sm transition-colors duration-300 group-hover/item:text-foreground">{point.trim()}</p></motion.div>))}</div><motion.div+ className="col mt-2 gap-2"initial={{ opacity: 0 }}- whileInView={{ opacity: 1 }}- viewport={{ once: true }}transition={{ delay: 0.3 }}- className="col gap-2 mt-2"+ viewport={{ once: true }}+ whileInView={{ opacity: 1 }}>- <div className="row gap-2 items-center p-3 rounded-lg bg-muted/30 border border-emerald-500/10">- <span className="text-xs font-medium text-muted-foreground">+ <div className="row items-center gap-2 rounded-lg border border-emerald-500/10 bg-muted/30 p-3">+ <span className="font-medium text-muted-foreground text-xs">Free tier:</span>- <span className="text-xs text-muted-foreground">+ <span className="text-muted-foreground text-xs">Self-hosting (unlimited events)</span></div>- <div className="row gap-2 items-center p-3 rounded-lg bg-muted/30 border border-emerald-500/10">- <span className="text-xs font-medium text-muted-foreground">+ <div className="row items-center gap-2 rounded-lg border border-emerald-500/10 bg-muted/30 p-3">+ <span className="font-medium text-muted-foreground text-xs">Free trial:</span>- <span className="text-xs text-muted-foreground">30 days</span>+ <span className="text-muted-foreground text-xs">30 days</span></div></motion.div></div>@@ -117,29 +117,29 @@ export function PricingSection({{/* Competitor Card */}<motion.div+ className="col group relative gap-4 overflow-hidden rounded-2xl border bg-background p-6 transition-all duration-300 hover:border-orange-500/30"variants={cardVariants}- className="col gap-4 p-6 rounded-2xl border bg-background group relative overflow-hidden hover:border-orange-500/30 transition-all duration-300">- <div className="pointer-events-none absolute inset-0 bg-linear-to-br opacity-100 blur-2xl dark:from-orange-500/5 dark:via-transparent dark:to-amber-500/5 light:from-orange-800/10 light:via-transparent light:to-amber-900/10 group-hover:opacity-150 transition-opacity duration-500" />- <div className="col gap-3 relative z-10">+ <div className="pointer-events-none absolute inset-0 bg-linear-to-br light:from-orange-800/10 light:via-transparent light:to-amber-900/10 opacity-100 blur-2xl transition-opacity duration-500 group-hover:opacity-150 dark:from-orange-500/5 dark:via-transparent dark:to-amber-500/5" />+ <div className="col relative z-10 gap-3"><div className="col gap-2">- <h3 className="text-xl font-semibold">{competitorName}</h3>- <p className="text-sm text-muted-foreground font-medium">+ <h3 className="font-semibold text-xl">{competitorName}</h3>+ <p className="font-medium text-muted-foreground text-sm">{pricing.competitor.model}</p></div>- <div className="col gap-2 mt-2">+ <div className="col mt-2 gap-2">{competitorPoints.map((point, index) => (<motion.div- key={index}+ className="row group/item items-start gap-2"initial={{ opacity: 0, x: -10 }}- whileInView={{ opacity: 1, x: 0 }}- viewport={{ once: true }}+ key={index}transition={{ delay: index * 0.1 }}- className="row gap-2 items-start group/item"+ viewport={{ once: true }}+ whileInView={{ opacity: 1, x: 0 }}>- <CheckIcon className="size-4 text-orange-600 dark:text-orange-400 shrink-0 mt-0.5 group-hover/item:scale-110 transition-transform duration-300" />- <p className="text-sm text-muted-foreground flex-1 group-hover/item:text-foreground transition-colors duration-300">+ <CheckIcon className="mt-0.5 size-4 shrink-0 text-orange-600 transition-transform duration-300 group-hover/item:scale-110 dark:text-orange-400" />+ <p className="flex-1 text-muted-foreground text-sm transition-colors duration-300 group-hover/item:text-foreground">{point.trim()}</p></motion.div>@@ -147,16 +147,16 @@ export function PricingSection({</div>{pricing.competitor.free_tier && (<motion.div+ className="row mt-2 items-center gap-2 rounded-lg border border-orange-500/10 bg-muted/30 p-3"initial={{ opacity: 0 }}- whileInView={{ opacity: 1 }}- viewport={{ once: true }}transition={{ delay: 0.3 }}- className="row gap-2 items-center mt-2 p-3 rounded-lg bg-muted/30 border border-orange-500/10"+ viewport={{ once: true }}+ whileInView={{ opacity: 1 }}>- <span className="text-xs font-medium text-muted-foreground">+ <span className="font-medium text-muted-foreground text-xs">Free tier:</span>- <span className="text-xs text-muted-foreground">+ <span className="text-muted-foreground text-xs">{pricing.competitor.free_tier}</span></motion.div>@@ -164,18 +164,18 @@ export function PricingSection({{pricing.competitor.pricing_url && (<motion.divinitial={{ opacity: 0 }}- whileInView={{ opacity: 1 }}- viewport={{ once: true }}transition={{ delay: 0.4 }}+ viewport={{ once: true }}+ whileInView={{ opacity: 1 }}><Link+ className="row group/link mt-2 items-center gap-2 text-primary text-xs transition-colors duration-300 hover:text-primary/80"href={pricing.competitor.pricing_url}- target="_blank"rel="noopener noreferrer"- className="row gap-2 items-center text-xs text-primary hover:text-primary/80 transition-colors duration-300 mt-2 group/link"+ target="_blank"><span>View pricing</span>- <ArrowRightIcon className="size-3 group-hover/link:translate-x-1 transition-transform duration-300" />+ <ArrowRightIcon className="size-3 transition-transform duration-300 group-hover/link:translate-x-1" /></Link></motion.div>)}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsxindex a0b46cedd..fb5b6d262 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsx@@ -1,11 +1,11 @@-import { Section, SectionHeader } from '@/components/section';-import { CompareSummary } from '@/lib/compare';import {- UsersIcon,- TrendingUpIcon,PuzzleIcon,ShieldIcon,+ TrendingUpIcon,+ UsersIcon,} from 'lucide-react';+import { Section, SectionHeader } from '@/components/section';+import type { CompareSummary } from '@/lib/compare';interface ProblemSectionProps {summary: CompareSummary;@@ -23,19 +23,19 @@ export function ProblemSection({return (<Section className="container"><SectionHeader- title={summary.title}description={summary.intro}+ title={summary.title}variant="sm"/>- <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mt-12">+ <div className="mt-12 grid gap-6 md:grid-cols-2 lg:grid-cols-4">{problems.map((problem, index) => {const Icon = problemIcons[index] || UsersIcon;return (- <div key={problem} className="col gap-3 text-center">- <div className="size-12 rounded-full bg-muted center-center mx-auto">+ <div className="col gap-3 text-center" key={problem}>+ <div className="center-center mx-auto size-12 rounded-full bg-muted"><Icon className="size-6 text-muted-foreground" /></div>- <p className="text-sm text-muted-foreground">{problem}</p>+ <p className="text-muted-foreground text-sm">{problem}</p></div>);})}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsxindex 7e7192181..c793fecc9 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsx@@ -10,9 +10,11 @@ interface RelatedLinksProps {export function RelatedLinksSection({ relatedLinks }: RelatedLinksProps) {if (!relatedLinks ||- (!relatedLinks.guides?.length &&- !relatedLinks.articles?.length &&- !relatedLinks.alternatives?.length)+ !(+ relatedLinks.guides?.length ||+ relatedLinks.articles?.length ||+ relatedLinks.alternatives?.length+ )) {return null;}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsxindex c24ec4a3f..78f3a7422 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsx@@ -1,7 +1,7 @@+import { CheckIcon, XIcon } from 'lucide-react';import { FeatureCard } from '@/components/feature-card';import { Section, SectionHeader } from '@/components/section';-import { CompareSummary } from '@/lib/compare';-import { CheckIcon, XIcon } from 'lucide-react';+import type { CompareSummary } from '@/lib/compare';interface SummaryComparisonProps {summary: CompareSummary;@@ -15,34 +15,34 @@ export function SummaryComparison({return (<Section className="container"><SectionHeader- title="Quick comparison"- description={summary.one_liner}align="center"+ description={summary.one_liner}+ title="Quick comparison"/>- <div className="grid md:grid-cols-2 gap-6 mt-12">+ <div className="mt-12 grid gap-6 md:grid-cols-2"><FeatureCard- title="Best for OpenPanel"- description=""className="border-green-500/20 bg-green-500/5"+ description=""+ title="Best for OpenPanel">- <ul className="col gap-3 mt-4">+ <ul className="col mt-4 gap-3">{summary.best_for_openpanel.map((item) => (- <li key={item} className="row gap-2 items-start text-sm">- <CheckIcon className="size-4 shrink-0 mt-0.5 text-green-500" />+ <li className="row items-start gap-2 text-sm" key={item}>+ <CheckIcon className="mt-0.5 size-4 shrink-0 text-green-500" /><span>{item}</span></li>))}</ul></FeatureCard><FeatureCard- title={`Best for ${competitorName}`}- description=""className="border-muted"+ description=""+ title={`Best for ${competitorName}`}>- <ul className="col gap-3 mt-4">+ <ul className="col mt-4 gap-3">{summary.best_for_competitor.map((item) => (- <li key={item} className="row gap-2 items-start text-sm">- <XIcon className="size-4 shrink-0 mt-0.5 text-muted-foreground" />+ <li className="row items-start gap-2 text-sm" key={item}>+ <XIcon className="mt-0.5 size-4 shrink-0 text-muted-foreground" /><span className="text-muted-foreground">{item}</span></li>))}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsxindex 79f6e3baf..efe3fbcd3 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsx@@ -1,6 +1,5 @@import { Section, SectionHeader } from '@/components/section';-import { CompareTechnicalComparison } from '@/lib/compare';-import { CheckIcon, XIcon } from 'lucide-react';+import type { CompareTechnicalComparison } from '@/lib/compare';import { cn } from '@/lib/utils';interface TechnicalComparisonProps {@@ -13,7 +12,7 @@ function renderValue(value: string | string[]) {return (<ul className="col gap-1">{value.map((item, idx) => (- <li key={idx} className="text-sm">+ <li className="text-sm" key={idx}>{item}</li>))}@@ -30,18 +29,18 @@ export function TechnicalComparison({return (<Section className="container"><SectionHeader- title={technical.title}description={technical.intro}+ title={technical.title}variant="sm"/>- <div className="mt-12 border rounded-2xl overflow-hidden">+ <div className="mt-12 overflow-hidden rounded-2xl border"><div className="overflow-x-auto"><table className="w-full"><thead><tr className="border-b bg-muted/30">- <th className="text-left p-4 font-semibold">Feature</th>- <th className="text-left p-4 font-semibold">OpenPanel</th>- <th className="text-left p-4 font-semibold">+ <th className="p-4 text-left font-semibold">Feature</th>+ <th className="p-4 text-left font-semibold">OpenPanel</th>+ <th className="p-4 text-left font-semibold">{competitorName}</th></tr>@@ -49,11 +48,11 @@ export function TechnicalComparison({<tbody>{technical.items.map((item, index) => (<tr- key={item.label}className={cn('border-b last:border-b-0',index % 2 === 0 ? 'bg-background' : 'bg-muted/20')}+ key={item.label}><td className="p-4 font-medium">{item.label}</td><td className="p-4">{renderValue(item.openpanel)}</td>@@ -61,7 +60,7 @@ export function TechnicalComparison({<div className="col gap-1">{renderValue(item.competitor)}{item.notes && (- <span className="text-xs text-muted-foreground/70 mt-1">+ <span className="mt-1 text-muted-foreground/70 text-xs">{item.notes}</span>)}diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsxindex 35d0f7d29..d40ce93f8 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsx@@ -1,8 +1,13 @@+import {+ CheckIcon,+ MapPinIcon,+ ServerIcon,+ ShieldIcon,+ XIcon,+} from 'lucide-react';import { FeatureCard } from '@/components/feature-card';import { Section, SectionHeader } from '@/components/section';-import { CompareTrustCompliance } from '@/lib/compare';-import { ShieldIcon, MapPinIcon, ServerIcon } from 'lucide-react';-import { CheckIcon, XIcon } from 'lucide-react';+import type { CompareTrustCompliance } from '@/lib/compare';interface TrustComplianceProps {trust: CompareTrustCompliance;@@ -12,41 +17,41 @@ export function TrustCompliance({ trust }: TrustComplianceProps) {return (<Section className="container"><SectionHeader- title={trust.title}description={trust.intro}+ title={trust.title}variant="sm"/>- <div className="grid md:grid-cols-2 gap-6 mt-12">+ <div className="mt-12 grid gap-6 md:grid-cols-2"><FeatureCard- title="OpenPanel"- description=""className="border-green-500/20 bg-green-500/5"+ description=""+ title="OpenPanel">- <div className="col gap-4 mt-4">+ <div className="col mt-4 gap-4"><div className="col gap-2">- <div className="row gap-2 items-center text-sm">+ <div className="row items-center gap-2 text-sm"><ShieldIcon className="size-4" /><span className="font-medium">Data Processing</span></div>- <p className="text-sm text-muted-foreground ml-6">+ <p className="ml-6 text-muted-foreground text-sm">{trust.openpanel.data_processing}</p></div><div className="col gap-2">- <div className="row gap-2 items-center text-sm">+ <div className="row items-center gap-2 text-sm"><MapPinIcon className="size-4" /><span className="font-medium">Data Location</span></div>- <p className="text-sm text-muted-foreground ml-6">+ <p className="ml-6 text-muted-foreground text-sm">{trust.openpanel.data_location}</p></div><div className="col gap-2">- <div className="row gap-2 items-center text-sm">+ <div className="row items-center gap-2 text-sm"><ServerIcon className="size-4" /><span className="font-medium">Self-Hosting</span></div>- <div className="row gap-2 items-center text-sm ml-6">+ <div className="row ml-6 items-center gap-2 text-sm">{trust.openpanel.self_hosting ? (<><CheckIcon className="size-4 text-green-500" />@@ -62,32 +67,32 @@ export function TrustCompliance({ trust }: TrustComplianceProps) {</div></div></FeatureCard>- <FeatureCard title="Competitor" description="">- <div className="col gap-4 mt-4">+ <FeatureCard description="" title="Competitor">+ <div className="col mt-4 gap-4"><div className="col gap-2">- <div className="row gap-2 items-center text-sm">+ <div className="row items-center gap-2 text-sm"><ShieldIcon className="size-4" /><span className="font-medium">Data Processing</span></div>- <p className="text-sm text-muted-foreground ml-6">+ <p className="ml-6 text-muted-foreground text-sm">{trust.competitor.data_processing}</p></div><div className="col gap-2">- <div className="row gap-2 items-center text-sm">+ <div className="row items-center gap-2 text-sm"><MapPinIcon className="size-4" /><span className="font-medium">Data Location</span></div>- <p className="text-sm text-muted-foreground ml-6">+ <p className="ml-6 text-muted-foreground text-sm">{trust.competitor.data_location}</p></div><div className="col gap-2">- <div className="row gap-2 items-center text-sm">+ <div className="row items-center gap-2 text-sm"><ServerIcon className="size-4" /><span className="font-medium">Self-Hosting</span></div>- <div className="row gap-2 items-center text-sm ml-6">+ <div className="row ml-6 items-center gap-2 text-sm">{trust.competitor.self_hosting ? (<><CheckIcon className="size-4 text-green-500" />diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsxindex 20b26e85e..c000306f0 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsx@@ -1,5 +1,5 @@import { Section, SectionHeader } from '@/components/section';-import { CompareUseCases } from '@/lib/compare';+import type { CompareUseCases } from '@/lib/compare';interface UseCasesProps {useCases: CompareUseCases;@@ -9,15 +9,15 @@ export function UseCases({ useCases }: UseCasesProps) {return (<Section className="container"><SectionHeader- title={useCases.title}description={useCases.intro}+ title={useCases.title}variant="sm"/>- <div className="grid md:grid-cols-2 gap-6 mt-12">+ <div className="mt-12 grid gap-6 md:grid-cols-2">{useCases.items.map((useCase) => (- <div key={useCase.title} className="col gap-2 p-6 border rounded-2xl">+ <div className="col gap-2 rounded-2xl border p-6" key={useCase.title}><h3 className="font-semibold">{useCase.title}</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">{useCase.description}</p></div>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/who-should-choose.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/who-should-choose.tsxindex 2bb2f4368..c22da317c 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/who-should-choose.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/who-should-choose.tsx@@ -1,8 +1,8 @@'use client';+import { motion } from 'framer-motion';import { Section } from '@/components/section';import type { CompareSummary } from '@/lib/compare';-import { motion } from 'framer-motion';interface WhoShouldChooseProps {summary: CompareSummary;@@ -36,43 +36,43 @@ export function WhoShouldChoose({return (<Section className="container">- <div className="col gap-4 mb-12">- <h2 className="text-3xl md:text-4xl font-semibold">{summary.title}</h2>- <p className="text-muted-foreground max-w-3xl">{summary.intro}</p>+ <div className="col mb-12 gap-4">+ <h2 className="font-semibold text-3xl md:text-4xl">{summary.title}</h2>+ <p className="max-w-3xl text-muted-foreground">{summary.intro}</p></div><motion.div+ className="grid gap-6 md:grid-cols-2"initial="hidden"- whileInView="visible"- viewport={{ once: true, margin: '-100px' }}variants={containerVariants}- className="grid md:grid-cols-2 gap-6"+ viewport={{ once: true, margin: '-100px' }}+ whileInView="visible">{/* OpenPanel Card */}<motion.div+ className="col group relative gap-4 overflow-hidden rounded-2xl border bg-background p-6 transition-all duration-300 hover:border-emerald-500/30"variants={cardVariants}- className="col gap-4 p-6 rounded-2xl border bg-background group relative overflow-hidden hover:border-emerald-500/30 transition-all duration-300">- <div className="pointer-events-none absolute inset-0 bg-linear-to-br opacity-100 blur-2xl dark:from-emerald-500/5 dark:via-transparent dark:to-green-500/5 light:from-emerald-800/10 light:via-transparent light:to-green-900/10 group-hover:opacity-150 transition-opacity duration-500" />- <div className="col gap-3 relative z-10">+ <div className="pointer-events-none absolute inset-0 bg-linear-to-br light:from-emerald-800/10 light:via-transparent light:to-green-900/10 opacity-100 blur-2xl transition-opacity duration-500 group-hover:opacity-150 dark:from-emerald-500/5 dark:via-transparent dark:to-green-500/5" />+ <div className="col relative z-10 gap-3"><div className="col gap-2">- <h3 className="text-xl font-semibold">Choose OpenPanel if...</h3>+ <h3 className="font-semibold text-xl">Choose OpenPanel if...</h3></div>- <div className="col gap-2 mt-2">+ <div className="col mt-2 gap-2">{openpanelItems.map((item, index) => (<motion.div- key={item}+ className="row group/item items-start gap-2"initial={{ opacity: 0, x: -10 }}- whileInView={{ opacity: 1, x: 0 }}- viewport={{ once: true }}+ key={item}transition={{ delay: index * 0.1 }}- className="row gap-2 items-start group/item"+ viewport={{ once: true }}+ whileInView={{ opacity: 1, x: 0 }}>- <div className="size-4 rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0 mt-0.5 flex items-center justify-center group-hover/item:scale-110 transition-transform duration-300">- <span className="text-[10px] font-bold text-white">+ <div className="mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-emerald-600 transition-transform duration-300 group-hover/item:scale-110 dark:bg-emerald-400">+ <span className="font-bold text-[10px] text-white">{index + 1}</span></div>- <p className="text-sm text-muted-foreground flex-1 group-hover/item:text-foreground transition-colors duration-300">+ <p className="flex-1 text-muted-foreground text-sm transition-colors duration-300 group-hover/item:text-foreground">{item}</p></motion.div>@@ -83,32 +83,32 @@ export function WhoShouldChoose({{/* Competitor Card */}<motion.div+ className="col group relative gap-4 overflow-hidden rounded-2xl border bg-background p-6 transition-all duration-300 hover:border-orange-500/30"variants={cardVariants}- className="col gap-4 p-6 rounded-2xl border bg-background group relative overflow-hidden hover:border-orange-500/30 transition-all duration-300">- <div className="pointer-events-none absolute inset-0 bg-linear-to-br opacity-100 blur-2xl dark:from-orange-500/5 dark:via-transparent dark:to-amber-500/5 light:from-orange-800/10 light:via-transparent light:to-amber-900/10 group-hover:opacity-150 transition-opacity duration-500" />- <div className="col gap-3 relative z-10">+ <div className="pointer-events-none absolute inset-0 bg-linear-to-br light:from-orange-800/10 light:via-transparent light:to-amber-900/10 opacity-100 blur-2xl transition-opacity duration-500 group-hover:opacity-150 dark:from-orange-500/5 dark:via-transparent dark:to-amber-500/5" />+ <div className="col relative z-10 gap-3"><div className="col gap-2">- <h3 className="text-xl font-semibold">+ <h3 className="font-semibold text-xl">Choose {competitorName} if...</h3></div>- <div className="col gap-2 mt-2">+ <div className="col mt-2 gap-2">{competitorItems.map((item, index) => (<motion.div- key={item}+ className="row group/item items-start gap-2"initial={{ opacity: 0, x: -10 }}- whileInView={{ opacity: 1, x: 0 }}- viewport={{ once: true }}+ key={item}transition={{ delay: index * 0.1 }}- className="row gap-2 items-start group/item"+ viewport={{ once: true }}+ whileInView={{ opacity: 1, x: 0 }}>- <div className="size-4 rounded-full bg-orange-600 dark:bg-orange-400 shrink-0 mt-0.5 flex items-center justify-center group-hover/item:scale-110 transition-transform duration-300">- <span className="text-[10px] font-bold text-white">+ <div className="mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-orange-600 transition-transform duration-300 group-hover/item:scale-110 dark:bg-orange-400">+ <span className="font-bold text-[10px] text-white">{index + 1}</span></div>- <p className="text-sm text-muted-foreground flex-1 group-hover/item:text-foreground transition-colors duration-300">+ <p className="flex-1 text-muted-foreground text-sm transition-colors duration-300 group-hover/item:text-foreground">{item}</p></motion.div>diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsxindex 13ec8ec5d..20795f5fe 100644--- a/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsx+++ b/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsx@@ -1,15 +1,15 @@-import { Section, SectionHeader } from '@/components/section';-import { CompareSummary } from '@/lib/compare';import {- UsersIcon,- SparklesIcon,- SearchIcon,+ CheckCircleIcon,MoonIcon,- ShieldIcon,+ SearchIcon,ServerIcon,+ ShieldIcon,+ SparklesIcon,+ UsersIcon,ZapIcon,- CheckCircleIcon,} from 'lucide-react';+import { Section, SectionHeader } from '@/components/section';+import type { CompareSummary } from '@/lib/compare';interface WhySwitchProps {summary: CompareSummary;@@ -32,16 +32,16 @@ export function WhySwitch({ summary }: WhySwitchProps) {return (<Section className="container"><SectionHeader- title={summary.title}description={summary.intro}+ title={summary.title}variant="sm"/>- <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-8 mt-12">+ <div className="mt-12 grid gap-8 md:grid-cols-2 lg:grid-cols-4">{benefits.map((benefit, index) => {const Icon = benefitIcons[index] || CheckCircleIcon;return (- <div key={benefit} className="col gap-3">- <div className="size-10 rounded-lg bg-primary/10 center-center">+ <div className="col gap-3" key={benefit}>+ <div className="center-center size-10 rounded-lg bg-primary/10"><Icon className="size-5 text-primary" /></div><h3 className="font-semibold text-sm">{benefit}</h3>diff --git a/apps/public/src/app/(content)/compare/_components/compare-card.tsx b/apps/public/src/app/(content)/compare/_components/compare-card.tsxindex ada8d095b..a4ee4516e 100644--- a/apps/public/src/app/(content)/compare/_components/compare-card.tsx+++ b/apps/public/src/app/(content)/compare/_components/compare-card.tsx@@ -1,8 +1,7 @@-import { FeatureCard, FeatureCardContainer } from '@/components/feature-card';-import { cn } from '@/lib/utils';import { ArrowRightIcon } from 'lucide-react';import Image from 'next/image';import Link from 'next/link';+import { FeatureCardContainer } from '@/components/feature-card';interface CompareCardProps {name: string;@@ -20,27 +19,27 @@ export function CompareCard({return (<Link href={url}><FeatureCardContainer>- <div className="row gap-3 items-center">+ <div className="row items-center gap-3">{logo && (- <div className="relative size-10 shrink-0 rounded-lg overflow-hidden border bg-background p-1.5">+ <div className="relative size-10 shrink-0 overflow-hidden rounded-lg border bg-background p-1.5"><Image- src={logo}alt={`${name} logo`}- width={40}+ className="h-full w-full object-contain"height={40}- className="object-contain w-full h-full"+ src={logo}+ width={40}/></div>)}- <div className="col gap-1 flex-1 min-w-0">- <h3 className="text-lg font-semibold group-hover:text-primary transition-colors">+ <div className="col min-w-0 flex-1 gap-1">+ <h3 className="font-semibold text-lg transition-colors group-hover:text-primary">{name}</h3>- <p className="text-sm text-muted-foreground line-clamp-2">+ <p className="line-clamp-2 text-muted-foreground text-sm">{description}</p></div>- <ArrowRightIcon className="opacity-0 group-hover:opacity-100 size-5 shrink-0 text-muted-foreground group-hover:text-primary group-hover:translate-x-1 transition-all duration-300" />+ <ArrowRightIcon className="size-5 shrink-0 text-muted-foreground opacity-0 transition-all duration-300 group-hover:translate-x-1 group-hover:text-primary group-hover:opacity-100" /></div></FeatureCardContainer></Link>diff --git a/apps/public/src/app/(content)/compare/page.tsx b/apps/public/src/app/(content)/compare/page.tsxindex d62c6f693..e2912712b 100644--- a/apps/public/src/app/(content)/compare/page.tsx+++ b/apps/public/src/app/(content)/compare/page.tsx@@ -1,12 +1,12 @@+import type { Metadata } from 'next';+import { CompareCard } from './_components/compare-card';+import { CompareHero } from './[slug]/_components/compare-hero';import { CtaBanner } from '@/app/(home)/_sections/cta-banner';import { Section, SectionHeader } from '@/components/section';import { WindowImage } from '@/components/window-image';import { url } from '@/lib/layout.shared';import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { compareSource } from '@/lib/source';-import type { Metadata } from 'next';-import { CompareHero } from './[slug]/_components/compare-hero';-import { CompareCard } from './_components/compare-card';const title = 'Compare OpenPanel with alternatives';const description =@@ -37,36 +37,36 @@ export default async function CompareIndexPage() {<div className="container my-16"><WindowImage- srcDark="/screenshots/overview-dark.png"- srcLight="/screenshots/overview-light.png"alt="OpenPanel Dashboard Overview"caption="This is our web analytics dashboard, its an out-of-the-box experience so you can start understanding your traffic and engagement right away."+ srcDark="/screenshots/overview-dark.png"+ srcLight="/screenshots/overview-light.png"/></div><Section className="container"><SectionHeader- title="All product comparisons"description="Browse our complete list of detailed comparisons. See how OpenPanel stacks up against each competitor on features, pricing, and value."+ title="All product comparisons"variant="sm"/>- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mt-12">+ <div className="mt-12 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">{comparisons.map((comparison) => (<CompareCard+ description={comparison.competitor.short_description}key={comparison.slug}- url={comparison.url}name={comparison.competitor.name}- description={comparison.competitor.short_description}+ url={comparison.url}/>))}</div></Section><CtaBanner- title="Ready to get started?"- description="Join thousands of teams using OpenPanel for their analytics needs."- ctaText="Get Started Free"ctaLink="https://dashboard.openpanel.dev/onboarding"+ ctaText="Get Started Free"+ description="Join thousands of teams using OpenPanel for their analytics needs."+ title="Ready to get started?"/></div>);diff --git a/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsx b/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsxindex ecca97a70..46222aa84 100644--- a/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsx+++ b/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsx@@ -1,7 +1,7 @@+import { ZapIcon } from 'lucide-react';import { FeatureCard } from '@/components/feature-card';import { Section, SectionHeader } from '@/components/section';import type { FeatureCapability } from '@/lib/features';-import { ZapIcon } from 'lucide-react';interface CapabilitiesProps {title: string;@@ -17,18 +17,18 @@ export function Capabilities({return (<Section className="container"><SectionHeader- title={title}+ className="mb-12"description={intro}+ title={title}variant="sm"- className="mb-12"/>- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">+ <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">{capabilities.map((cap) => (<FeatureCard- key={cap.title}- title={cap.title}description={cap.description}icon={ZapIcon}+ key={cap.title}+ title={cap.title}/>))}</div>diff --git a/apps/public/src/app/(content)/features/[slug]/_components/feature-hero.tsx b/apps/public/src/app/(content)/features/[slug]/_components/feature-hero.tsxindex 04b87e99d..54982f7f8 100644--- a/apps/public/src/app/(content)/features/[slug]/_components/feature-hero.tsx+++ b/apps/public/src/app/(content)/features/[slug]/_components/feature-hero.tsx@@ -1,11 +1,11 @@+import { CheckCircle2Icon } from 'lucide-react';+import Link from 'next/link';import { HeroContainer } from '@/app/(home)/_sections/hero';import { GetStartedButton } from '@/components/get-started-button';import { Perks } from '@/components/perks';import { SectionHeader } from '@/components/section';import { Button } from '@/components/ui/button';import type { FeatureHero as FeatureHeroData } from '@/lib/features';-import { CheckCircle2Icon } from 'lucide-react';-import Link from 'next/link';interface FeatureHeroProps {hero: FeatureHeroData;@@ -13,29 +13,29 @@ interface FeatureHeroProps {export function FeatureHero({ hero }: FeatureHeroProps) {return (- <HeroContainer divider={false} className="-mb-32">+ <HeroContainer className="-mb-32" divider={false}><div className="col gap-6"><SectionHeaderas="h1"className="flex-1"- title={hero.heading}description={hero.subheading}+ title={hero.heading}variant="sm"/><div className="row gap-4"><GetStartedButton />- <Button size="lg" variant="outline" asChild>+ <Button asChild size="lg" variant="outline"><Linkhref="https://demo.openpanel.dev"- target="_blank"rel="noreferrer noopener nofollow"+ target="_blank">See live demo</Link></Button></div><Perks- className="flex gap-4 flex-wrap"+ className="flex flex-wrap gap-4"perks={hero.badges.map((badge) => ({text: badge,icon: CheckCircle2Icon,diff --git a/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsx b/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsxindex 79189e3cc..5dbacd8f7 100644--- a/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsx+++ b/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsx@@ -9,19 +9,19 @@ export function FeatureUseCasesSection({ useCases }: FeatureUseCasesProps) {return (<Section className="container"><SectionHeader- title={useCases.title}+ className="mb-12"description={useCases.intro}+ title={useCases.title}variant="sm"- className="mb-12"/>- <div className="grid md:grid-cols-2 gap-6">+ <div className="grid gap-6 md:grid-cols-2">{useCases.items.map((useCase) => (<div+ className="col gap-2 rounded-2xl border bg-card/50 p-6"key={useCase.title}- className="col gap-2 p-6 border rounded-2xl bg-card/50"><h3 className="font-semibold">{useCase.title}</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">{useCase.description}</p></div>diff --git a/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsx b/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsxindex 667060057..33f89444f 100644--- a/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsx+++ b/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsx@@ -10,27 +10,27 @@ export function HowItWorks({ data }: HowItWorksProps) {return (<Section className="container"><SectionHeader- title={data.title}+ className="mb-12"description={data.intro}+ title={data.title}variant="sm"- className="mb-12"/><div className="relative">{data.steps.map((step, index) => (<div+ className="relative mb-8 flex min-w-0 gap-4 last:mb-0"key={step.title}- className="relative flex gap-4 mb-8 last:mb-0 min-w-0">- <div className="flex flex-col items-center shrink-0">- <div className="flex items-center justify-center size-10 rounded-full bg-primary text-primary-foreground font-semibold text-sm shadow-sm">+ <div className="flex shrink-0 flex-col items-center">+ <div className="flex size-10 items-center justify-center rounded-full bg-primary font-semibold text-primary-foreground text-sm shadow-sm">{index + 1}</div>{index < data.steps.length - 1 && (- <div className="w-0.5 bg-border mt-2 flex-1 min-h-[2rem]" />+ <div className="mt-2 min-h-[2rem] w-0.5 flex-1 bg-border" />)}</div>- <div className="flex-1 pt-1 min-w-0 pb-8">- <h3 className="font-semibold text-foreground mb-1">+ <div className="min-w-0 flex-1 pt-1 pb-8">+ <h3 className="mb-1 font-semibold text-foreground">{step.title}</h3><p className={cn('text-muted-foreground text-sm')}>diff --git a/apps/public/src/app/(content)/features/[slug]/_components/related-features.tsx b/apps/public/src/app/(content)/features/[slug]/_components/related-features.tsxindex d107b9571..5bd62c8e3 100644--- a/apps/public/src/app/(content)/features/[slug]/_components/related-features.tsx+++ b/apps/public/src/app/(content)/features/[slug]/_components/related-features.tsx@@ -1,8 +1,8 @@+import { ArrowRightIcon } from 'lucide-react';+import Link from 'next/link';import { FeatureCardContainer } from '@/components/feature-card';import { Section, SectionHeader } from '@/components/section';import type { RelatedFeature } from '@/lib/features';-import { ArrowRightIcon } from 'lucide-react';-import Link from 'next/link';interface RelatedFeaturesProps {title?: string;@@ -13,32 +13,34 @@ export function RelatedFeatures({title = 'Related features',related,}: RelatedFeaturesProps) {- if (related.length === 0) return null;+ if (related.length === 0) {+ return null;+ }return (<Section className="container"><SectionHeader- title={title}+ className="mb-12"description="Explore more capabilities that work together with this feature."+ title={title}variant="sm"- className="mb-12"/>- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">{related.map((item) => (- <Link key={item.slug} href={`/features/${item.slug}`}>+ <Link href={`/features/${item.slug}`} key={item.slug}><FeatureCardContainer>- <div className="row gap-3 items-center">- <div className="col gap-1 flex-1 min-w-0">- <h3 className="text-lg font-semibold group-hover:text-primary transition-colors">+ <div className="row items-center gap-3">+ <div className="col min-w-0 flex-1 gap-1">+ <h3 className="font-semibold text-lg transition-colors group-hover:text-primary">{item.title}</h3>{item.description && (- <p className="text-sm text-muted-foreground line-clamp-2">+ <p className="line-clamp-2 text-muted-foreground text-sm">{item.description}</p>)}</div>- <ArrowRightIcon className="opacity-0 group-hover:opacity-100 size-5 shrink-0 text-muted-foreground group-hover:text-primary group-hover:translate-x-1 transition-all duration-300" />+ <ArrowRightIcon className="size-5 shrink-0 text-muted-foreground opacity-0 transition-all duration-300 group-hover:translate-x-1 group-hover:text-primary group-hover:opacity-100" /></div></FeatureCardContainer></Link>diff --git a/apps/public/src/app/(content)/features/[slug]/_components/what-it-is.tsx b/apps/public/src/app/(content)/features/[slug]/_components/what-it-is.tsxindex 59ab2dd08..934acc222 100644--- a/apps/public/src/app/(content)/features/[slug]/_components/what-it-is.tsx+++ b/apps/public/src/app/(content)/features/[slug]/_components/what-it-is.tsx@@ -1,7 +1,7 @@+import Markdown from 'react-markdown';import { Section, SectionHeader } from '@/components/section';import type { FeatureDefinition } from '@/lib/features';import { cn } from '@/lib/utils';-import Markdown from 'react-markdown';interface WhatItIsProps {definition: FeatureDefinition;@@ -12,7 +12,7 @@ export function WhatItIs({ definition, className }: WhatItIsProps) {return (<Section className={cn('container', className)}>{definition.title && (- <SectionHeader title={definition.title} variant="sm" className="mb-8" />+ <SectionHeader className="mb-8" title={definition.title} variant="sm" />)}<div className="prose prose-lg max-w-3xl text-muted-foreground [&_strong]:text-foreground"><Markdown>{definition.text}</Markdown>diff --git a/apps/public/src/app/(content)/features/[slug]/page.tsx b/apps/public/src/app/(content)/features/[slug]/page.tsxindex 9cc33171c..e7d6a305e 100644--- a/apps/public/src/app/(content)/features/[slug]/page.tsx+++ b/apps/public/src/app/(content)/features/[slug]/page.tsx@@ -1,12 +1,3 @@-import { CtaBanner } from '@/app/(home)/_sections/cta-banner';-import { WindowImage } from '@/components/window-image';-import {- type FeatureData,- getAllFeatureSlugs,- getFeatureData,-} from '@/lib/features';-import { url } from '@/lib/layout.shared';-import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import type { Metadata } from 'next';import { notFound } from 'next/navigation';import Script from 'next/script';@@ -17,6 +8,11 @@ import { FeatureUseCasesSection } from './_components/feature-use-cases';import { HowItWorks } from './_components/how-it-works';import { RelatedFeatures } from './_components/related-features';import { WhatItIs } from './_components/what-it-is';+import { CtaBanner } from '@/app/(home)/_sections/cta-banner';+import { WindowImage } from '@/components/window-image';+import { getAllFeatureSlugs, getFeatureData } from '@/lib/features';+import { url } from '@/lib/layout.shared';+import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';export async function generateStaticParams() {const slugs = await getAllFeatureSlugs();@@ -82,10 +78,10 @@ export default async function FeaturePage({return (<div><Script+ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}id="feature-schema"strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/><FeatureHero hero={data.hero} />@@ -98,9 +94,9 @@ export default async function FeaturePage({<WhatItIs definition={data.definition} /><Capabilities- title={capabilitiesSection.title}- intro={capabilitiesSection.intro}capabilities={data.capabilities}+ intro={capabilitiesSection.intro}+ title={capabilitiesSection.title}/>{data.screenshots[1] && (@@ -132,10 +128,10 @@ export default async function FeaturePage({</div><CtaBanner- title="Ready to get started?"- description="Track events in minutes. Free 30-day trial, no credit card required."- ctaText={data.cta.label}ctaLink={data.cta.href}+ ctaText={data.cta.label}+ description="Track events in minutes. Free 30-day trial, no credit card required."+ title="Ready to get started?"/></div>);diff --git a/apps/public/src/app/(content)/guides/[guideSlug]/page.tsx b/apps/public/src/app/(content)/guides/[guideSlug]/page.tsxindex a467fbeb5..032d67ed7 100644--- a/apps/public/src/app/(content)/guides/[guideSlug]/page.tsx+++ b/apps/public/src/app/(content)/guides/[guideSlug]/page.tsx@@ -1,3 +1,9 @@+import { ArrowLeftIcon, ClockIcon } from 'lucide-react';+import type { Metadata } from 'next';+import Image from 'next/image';+import Link from 'next/link';+import { notFound } from 'next/navigation';+import Script from 'next/script';import { CtaBanner } from '@/app/(home)/_sections/cta-banner';import { HeroContainer } from '@/app/(home)/_sections/hero';import { Testimonials } from '@/app/(home)/_sections/testimonials';@@ -7,16 +13,10 @@ import { GuideCard } from '@/components/guide-card';import { Logo } from '@/components/logo';import { SectionHeader } from '@/components/section';import { Toc } from '@/components/toc';-import { url, getAuthor } from '@/lib/layout.shared';+import { getAuthor, url } from '@/lib/layout.shared';import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { guideSource } from '@/lib/source';import { getMDXComponents } from '@/mdx-components';-import { ArrowLeftIcon, ClockIcon } from 'lucide-react';-import type { Metadata } from 'next';-import Image from 'next/image';-import Link from 'next/link';-import { notFound } from 'next/navigation';-import Script from 'next/script';const difficultyColors = {beginner: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',@@ -108,34 +108,34 @@ export default async function Page({<HeroContainer><div className="col"><Link+ className="mb-4 flex items-center gap-2 text-muted-foreground"href={goBackUrl}- className="flex items-center gap-2 mb-4 text-muted-foreground">- <ArrowLeftIcon className="w-4 h-4" />+ <ArrowLeftIcon className="h-4 w-4" /><span>Back to all guides</span></Link><SectionHeaderas="h1"- title={guide?.data.title}description={guide?.data.description}+ title={guide?.data.title}/>- <div className="row gap-4 items-center mt-8">- <div className="size-10 center-center bg-black rounded-full">+ <div className="row mt-8 items-center gap-4">+ <div className="center-center size-10 rounded-full bg-black">{author?.image ? (<Image- className="size-10 object-cover rounded-full"- src={author.image}alt={author.name}- width={48}+ className="size-10 rounded-full object-cover"height={48}+ src={author.image}+ width={48}/>) : (- <Logo className="w-6 h-6 fill-white" />+ <Logo className="h-6 w-6 fill-white" />)}</div><div className="col flex-1"><p className="font-medium">{author?.name || 'OpenPanel Team'}</p>- <div className="row gap-4 items-center">+ <div className="row items-center gap-4"><p className="text-muted-foreground text-sm">{guide?.data.date.toLocaleDateString()}</p>@@ -146,14 +146,14 @@ export default async function Page({)}</div></div>- <div className="row gap-3 items-center">+ <div className="row items-center gap-3"><span- className={`font-mono text-xs px-3 py-1 rounded ${difficultyColors[guide?.data.difficulty || 'beginner']}`}+ className={`rounded px-3 py-1 font-mono text-xs ${difficultyColors[guide?.data.difficulty || 'beginner']}`}>{difficultyLabels[guide?.data.difficulty || 'beginner']}</span>- <div className="row gap-1 items-center text-muted-foreground text-sm">- <ClockIcon className="w-4 h-4" />+ <div className="row items-center gap-1 text-muted-foreground text-sm">+ <ClockIcon className="h-4 w-4" /><span>{guide?.data.timeToComplete} min</span></div></div>@@ -161,23 +161,23 @@ export default async function Page({</div></HeroContainer><Script- strategy="beforeInteractive"+ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}id="guide-howto-schema"+ strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/>- <article className="container max-w-5xl col">- <div className="grid grid-cols-1 md:grid-cols-[1fr_300px] gap-0">+ <article className="col container max-w-5xl">+ <div className="grid grid-cols-1 gap-0 md:grid-cols-[1fr_300px]"><div className="min-w-0">- <div className="prose [&_table]:w-auto [&_img]:max-w-full [&_img]:h-auto">+ <div className="prose [&_img]:h-auto [&_img]:max-w-full [&_table]:w-auto"><Body components={getMDXComponents()} /></div></div>- <aside className="pl-12 pb-12 gap-8 col">+ <aside className="col gap-8 pb-12 pl-12"><Toc toc={guide?.data.toc} /><FeatureCardContainer className="gap-2">- <span className="text-lg font-semibold">Try OpenPanel</span>- <p className="text-muted-foreground text-sm mb-4">+ <span className="font-semibold text-lg">Try OpenPanel</span>+ <p className="mb-4 text-muted-foreground text-sm">Give it a spin for free. No credit card required.</p><GetStartedButton />@@ -187,18 +187,18 @@ export default async function Page({{relatedGuides.length > 0 && (<div className="my-16">- <h3 className="text-2xl font-bold mb-8">Related guides</h3>- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">+ <h3 className="mb-8 font-bold text-2xl">Related guides</h3>+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">{relatedGuides.map((item) => (<GuideCard- key={item.url}- url={item.url}- title={item.data.title}- difficulty={item.data.difficulty}- timeToComplete={item.data.timeToComplete}cover={item.data.cover}- team={item.data.team}date={item.data.date}+ difficulty={item.data.difficulty}+ key={item.url}+ team={item.data.team}+ timeToComplete={item.data.timeToComplete}+ title={item.data.title}+ url={item.url}/>))}</div>diff --git a/apps/public/src/app/(content)/guides/page.tsx b/apps/public/src/app/(content)/guides/page.tsxindex 175e5ea4e..ab5b11109 100644--- a/apps/public/src/app/(content)/guides/page.tsx+++ b/apps/public/src/app/(content)/guides/page.tsx@@ -1,3 +1,5 @@+import type { Metadata } from 'next';+import Script from 'next/script';import { CtaBanner } from '@/app/(home)/_sections/cta-banner';import { HeroContainer } from '@/app/(home)/_sections/hero';import { Testimonials } from '@/app/(home)/_sections/testimonials';@@ -6,8 +8,6 @@ import { Section, SectionHeader } from '@/components/section';import { url } from '@/lib/layout.shared';import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { guideSource } from '@/lib/source';-import type { Metadata } from 'next';-import Script from 'next/script';export const metadata: Metadata = getPageMetadata({title: 'Implementation Guides',@@ -43,32 +43,32 @@ export default async function Page() {<div><HeroContainer className="-mb-32"><SectionHeader- as="h1"align="center"+ as="h1"className="flex-1"- title="Implementation Guides"description="Step-by-step tutorials for adding privacy-first analytics to your app with OpenPanel."+ title="Implementation Guides"/></HeroContainer><Script- strategy="beforeInteractive"+ dangerouslySetInnerHTML={{ __html: JSON.stringify(itemListSchema) }}id="guides-itemlist-schema"+ strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(itemListSchema) }}/>- <Section className="container grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-8">+ <Section className="container grid grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3">{guides.map((item) => (<GuideCard- key={item.url}- url={item.url}- title={item.data.title}- difficulty={item.data.difficulty}- timeToComplete={item.data.timeToComplete}cover={item.data.cover}- team={item.data.team}date={item.data.date}+ difficulty={item.data.difficulty}+ key={item.url}+ team={item.data.team}+ timeToComplete={item.data.timeToComplete}+ title={item.data.title}+ url={item.url}/>))}</Section>diff --git a/apps/public/src/app/(content)/layout.tsx b/apps/public/src/app/(content)/layout.tsxindex ae80561e9..7fd2e5e87 100644--- a/apps/public/src/app/(content)/layout.tsx+++ b/apps/public/src/app/(content)/layout.tsx@@ -1,6 +1,6 @@+import type { ReactNode } from 'react';import { Footer } from '@/components/footer';import Navbar from '@/components/navbar';-import type { ReactNode } from 'react';export default function Layout({children,diff --git a/apps/public/src/app/(content)/open-source/page.tsx b/apps/public/src/app/(content)/open-source/page.tsxindex 70312ef50..30eadf0c3 100644--- a/apps/public/src/app/(content)/open-source/page.tsx+++ b/apps/public/src/app/(content)/open-source/page.tsx@@ -1,11 +1,3 @@-import { CtaBanner } from '@/app/(home)/_sections/cta-banner';-import { HeroContainer } from '@/app/(home)/_sections/hero';-import { FaqItem, Faqs } from '@/components/faq';-import { FeatureCard } from '@/components/feature-card';-import { Section, SectionHeader } from '@/components/section';-import { Button } from '@/components/ui/button';-import { url } from '@/lib/layout.shared';-import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import {BarChartIcon,CheckIcon,@@ -22,6 +14,14 @@ import {import type { Metadata } from 'next';import Link from 'next/link';import Script from 'next/script';+import { CtaBanner } from '@/app/(home)/_sections/cta-banner';+import { HeroContainer } from '@/app/(home)/_sections/hero';+import { FaqItem, Faqs } from '@/components/faq';+import { FeatureCard } from '@/components/feature-card';+import { Section, SectionHeader } from '@/components/section';+import { Button } from '@/components/ui/button';+import { url } from '@/lib/layout.shared';+import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';export const metadata: Metadata = getPageMetadata({title: 'Free Analytics for Open Source Projects | OpenPanel OSS Program',@@ -60,17 +60,18 @@ export default function OpenSourcePage() {return (<div><Script+ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}id="open-source-schema"strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/><HeroContainer><div className="col center-center flex-1"><SectionHeader- as="h1"align="center"+ as="h1"className="flex-1"+ description="Track your users, understand adoption, and grow your project - all without cost. Get free analytics for your open source project with up to 2.5M events per month."title={<>Free Analytics for@@ -78,16 +79,15 @@ export default function OpenSourcePage() {Open Source Projects</>}- description="Track your users, understand adoption, and grow your project - all without cost. Get free analytics for your open source project with up to 2.5M events per month."/>- <div className="col gap-4 justify-center items-center mt-8">- <Button size="lg" asChild>+ <div className="col mt-8 items-center justify-center gap-4">+ <Button asChild size="lg"><Link href="mailto:[email protected]">Apply for Free Access<MailIcon className="size-4" /></Link></Button>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">Up to 2.5M events/month • No credit card required</p></div>@@ -99,29 +99,29 @@ export default function OpenSourcePage() {{/* What You Get Section */}<Section className="my-0"><SectionHeader- title="What you get"description="Everything you need to understand your users and grow your open source project."+ title="What you get"/>- <div className="grid md:grid-cols-2 gap-6 mt-8">+ <div className="mt-8 grid gap-6 md:grid-cols-2"><FeatureCard- title="2.5 Million Events/Month"description="More than enough for most open source projects. Track page views, user actions, and custom events without worrying about limits."icon={BarChartIcon}+ title="2.5 Million Events/Month"/><FeatureCard- title="Full Feature Access"description="Same powerful capabilities as paid plans. Funnels, retention analysis, custom dashboards, and real-time analytics."icon={ZapIcon}+ title="Full Feature Access"/><FeatureCard- title="Unlimited Team Members"description="Invite your entire contributor team. Collaborate with maintainers and core contributors on understanding your project's growth."icon={UsersIcon}+ title="Unlimited Team Members"/><FeatureCard- title="Priority Support"description="Dedicated help for open source maintainers. Get faster responses and priority assistance when you need it."icon={MessageSquareIcon}+ title="Priority Support"/></div></Section>@@ -129,10 +129,10 @@ export default function OpenSourcePage() {{/* Why We Do This Section */}<Section className="my-0"><SectionHeader- title="Why we do this"description="OpenPanel is built by and for the open source community. We believe in giving back."+ title="Why we do this"/>- <div className="col gap-6 mt-8">+ <div className="col mt-8 gap-6"><p className="text-muted-foreground">We started OpenPanel because we believed analytics toolsshouldn't be complicated or locked behind expensive enterprise@@ -140,21 +140,21 @@ export default function OpenSourcePage() {understand the challenges of building and growing a projectwithout the resources of big corporations.</p>- <div className="grid md:grid-cols-3 gap-4">+ <div className="grid gap-4 md:grid-cols-3"><FeatureCard- title="Built for OSS"description="OpenPanel is open source. We know what it's like to build in the open."icon={CodeIcon}+ title="Built for OSS"/><FeatureCard- title="No Barriers"description="Analytics shouldn't be a barrier to understanding your users. We're removing that barrier."icon={HeartHandshakeIcon}+ title="No Barriers"/><FeatureCard- title="Giving Back"description="We're giving back to the projects that inspire us and the community that supports us."icon={SparklesIcon}+ title="Giving Back"/></div></div>@@ -163,21 +163,21 @@ export default function OpenSourcePage() {{/* What We Ask In Return Section */}<Section className="my-0"><SectionHeader- title="What we ask in return"description="We keep it simple. Just a small way to help us grow and support more projects."+ title="What we ask in return"/>- <div className="row gap-6 mt-8">+ <div className="row mt-8 gap-6"><div className="col gap-6"><FeatureCard- title="Backlink to OpenPanel"description="A simple link on your website or README helps others discover OpenPanel. It's a win-win for the community."icon={LinkIcon}+ title="Backlink to OpenPanel">- <p className="text-sm text-muted-foreground mt-2">+ <p className="mt-2 text-muted-foreground text-sm">Example: "Analytics powered by{' '}<Link- href="https://openpanel.dev"className="text-primary hover:underline"+ href="https://openpanel.dev">OpenPanel</Link>@@ -185,9 +185,9 @@ export default function OpenSourcePage() {</p></FeatureCard><FeatureCard- title="Display a Widget"description="Showcase your visitor count with our real-time analytics widget. It's completely optional but helps spread the word."icon={GlobeIcon}+ title="Display a Widget"><ahref="https://openpanel.dev"@@ -200,15 +200,15 @@ export default function OpenSourcePage() {}}><iframe- src="https://dashboard.openpanel.dev/widget/badge?shareId=ancygl&color=%231F1F1F"height="48"- width="100%"+ src="https://dashboard.openpanel.dev/widget/badge?shareId=ancygl&color=%231F1F1F"style={{border: 'none',overflow: 'hidden',pointerEvents: 'none',}}title="OpenPanel Analytics Badge"+ width="100%"/></a></FeatureCard>@@ -218,13 +218,13 @@ export default function OpenSourcePage() {</p></div><div>- <div className="text-center text-xs text-muted-foreground">+ <div className="text-center text-muted-foreground text-xs"><iframe- title="Realtime Widget"+ className="mb-2 rounded-xl border"+ height="400"src="https://dashboard.openpanel.dev/widget/realtime?shareId=26wVGY"+ title="Realtime Widget"width="300"- height="400"- className="rounded-xl border mb-2"/>Analytics from{' '}<a className="underline" href="https://openpanel.dev">@@ -238,48 +238,48 @@ export default function OpenSourcePage() {{/* Eligibility Criteria Section */}<Section className="my-0"><SectionHeader- title="Eligibility criteria"description="We want to support legitimate open source projects that are making a difference."+ title="Eligibility criteria"/>- <div className="col gap-4 mt-8">- <div className="grid md:grid-cols-2 gap-4">+ <div className="col mt-8 gap-4">+ <div className="grid gap-4 md:grid-cols-2"><div className="flex gap-3">- <CheckIcon className="size-5 text-primary mt-0.5 shrink-0" />+ <CheckIcon className="mt-0.5 size-5 shrink-0 text-primary" /><div>- <h3 className="font-semibold mb-1">OSI-Approved License</h3>- <p className="text-sm text-muted-foreground">+ <h3 className="mb-1 font-semibold">OSI-Approved License</h3>+ <p className="text-muted-foreground text-sm">Your project must use an OSI-approved open source license(MIT, Apache, GPL, etc.)</p></div></div><div className="flex gap-3">- <CheckIcon className="size-5 text-primary mt-0.5 shrink-0" />+ <CheckIcon className="mt-0.5 size-5 shrink-0 text-primary" /><div>- <h3 className="font-semibold mb-1">Public Repository</h3>- <p className="text-sm text-muted-foreground">+ <h3 className="mb-1 font-semibold">Public Repository</h3>+ <p className="text-muted-foreground text-sm">Your code must be publicly available on GitHub, GitLab, orsimilar platforms</p></div></div><div className="flex gap-3">- <CheckIcon className="size-5 text-primary mt-0.5 shrink-0" />+ <CheckIcon className="mt-0.5 size-5 shrink-0 text-primary" /><div>- <h3 className="font-semibold mb-1">Active Development</h3>- <p className="text-sm text-muted-foreground">+ <h3 className="mb-1 font-semibold">Active Development</h3>+ <p className="text-muted-foreground text-sm">Show evidence of active development and a growingcommunity</p></div></div><div className="flex gap-3">- <CheckIcon className="size-5 text-primary mt-0.5 shrink-0" />+ <CheckIcon className="mt-0.5 size-5 shrink-0 text-primary" /><div>- <h3 className="font-semibold mb-1">+ <h3 className="mb-1 font-semibold">Non-Commercial Primary Purpose</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">The primary purpose should be non-commercial, thoughcommercial OSS projects may be considered</p>@@ -292,21 +292,21 @@ export default function OpenSourcePage() {{/* How to Apply Section */}<Section className="my-0"><SectionHeader- title="How to apply"description="Getting started is simple. Just send us an email with a few details about your project."+ title="How to apply"/>- <div className="col gap-6 mt-8">- <div className="grid md:grid-cols-3 gap-6">+ <div className="col mt-8 gap-6">+ <div className="grid gap-6 md:grid-cols-3"><div className="col gap-3">- <div className="size-10 rounded-full bg-primary/10 center-center text-primary font-semibold">+ <div className="center-center size-10 rounded-full bg-primary/10 font-semibold text-primary">1</div><h3 className="font-semibold">Send us an email</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">Reach out to{' '}<Link- href="mailto:[email protected]"className="text-primary hover:underline"+ href="mailto:[email protected]"></Link>{' '}@@ -314,28 +314,28 @@ export default function OpenSourcePage() {</p></div><div className="col gap-3">- <div className="size-10 rounded-full bg-primary/10 center-center text-primary font-semibold">+ <div className="center-center size-10 rounded-full bg-primary/10 font-semibold text-primary">2</div><h3 className="font-semibold">Include project info</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">Share your project URL, license type, and a briefdescription of what you're building</p></div><div className="col gap-3">- <div className="size-10 rounded-full bg-primary/10 center-center text-primary font-semibold">+ <div className="center-center size-10 rounded-full bg-primary/10 font-semibold text-primary">3</div><h3 className="font-semibold">We'll review</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">We'll evaluate your project and respond within a fewbusiness days</p></div></div><div className="mt-4">- <Button size="lg" asChild>+ <Button asChild size="lg"><Link href="mailto:[email protected]?subject=Open Source Program Application">Apply Now<MailIcon className="size-4" />@@ -348,8 +348,8 @@ export default function OpenSourcePage() {{/* FAQ Section */}<Section className="my-0"><SectionHeader- title="Frequently asked questions"description="Everything you need to know about our open source program."+ title="Frequently asked questions"/><div className="mt-8"><Faqs>@@ -396,10 +396,10 @@ export default function OpenSourcePage() {</Section><CtaBanner- title="Ready to get free analytics for your open source project?"- description="Join other open source projects using OpenPanel to understand their users and grow their communities. Apply today and get started in minutes."- ctaText="Apply for Free Access"ctaLink="mailto:[email protected]?subject=Open Source Program Application"+ ctaText="Apply for Free Access"+ description="Join other open source projects using OpenPanel to understand their users and grow their communities. Apply today and get started in minutes."+ title="Ready to get free analytics for your open source project?"/></div></div>diff --git a/apps/public/src/app/(content)/pricing/page.tsx b/apps/public/src/app/(content)/pricing/page.tsxindex 8dc60d4bf..3a1a265cc 100644--- a/apps/public/src/app/(content)/pricing/page.tsx+++ b/apps/public/src/app/(content)/pricing/page.tsx@@ -1,3 +1,8 @@+import { PRICING } from '@openpanel/payments/prices';+import type { Metadata } from 'next';+import Link from 'next/link';+import Script from 'next/script';+import { CompareCard } from '../compare/_components/compare-card';import { CtaBanner } from '@/app/(home)/_sections/cta-banner';import { Faq } from '@/app/(home)/_sections/faq';import { HeroContainer } from '@/app/(home)/_sections/hero';@@ -9,11 +14,6 @@ import { url } from '@/lib/layout.shared';import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { compareSource } from '@/lib/source';import { formatEventsCount } from '@/lib/utils';-import { PRICING } from '@openpanel/payments/prices';-import type { Metadata } from 'next';-import Link from 'next/link';-import Script from 'next/script';-import { CompareCard } from '../compare/_components/compare-card';const title = 'OpenPanel Cloud Pricing';const description =@@ -30,7 +30,7 @@ const jsonLd = {'@context': 'https://schema.org','@type': 'WebPage',name: title,- description: description,+ description,url: url('/pricing'),publisher: {'@type': 'Organization',@@ -46,18 +46,18 @@ export default function SupporterPage() {return (<div><Script+ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}id="pricing-schema"strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/><HeroContainer className="-mb-32"><SectionHeader- as="h1"align="center"+ as="h1"className="flex-1"- title={title}description={description}+ title={title}/></HeroContainer><Pricing />@@ -74,8 +74,8 @@ function PricingTable() {return (<Section className="container"><SectionHeader- title="Full pricing table"description="Here's the full pricing table for all plans. You can use the discount code to get a discount on your subscription."+ title="Full pricing table"/><div className="prose mt-8"><table className="bg-card">@@ -125,32 +125,32 @@ function ComparisonSection() {return (<Section className="container"><SectionHeader- title="How do we compare?"description={<>See how OpenPanel stacks up against other analytics tools in our{' '}<Link+ className="underline transition-colors hover:text-primary"href="/articles/self-hosted-web-analytics"- className="underline hover:text-primary transition-colors">comprehensive comparison of open source web analytics tools</Link>.</>}+ title="How do we compare?"/><Button asChild className="mt-8 self-start"><Link href="/compare">View all comparisons</Link></Button>- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mt-12">+ <div className="mt-12 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">{comparisons.map((comparison) => (<CompareCard+ description={comparison.competitor.short_description}key={comparison.slug}- url={comparison.url}name={`OpenPanel vs ${comparison.competitor.name}`}- description={comparison.competitor.short_description}+ url={comparison.url}/>))}</div>diff --git a/apps/public/src/app/(content)/supporter/page.tsx b/apps/public/src/app/(content)/supporter/page.tsxindex d9729eefc..b30de6c11 100644--- a/apps/public/src/app/(content)/supporter/page.tsx+++ b/apps/public/src/app/(content)/supporter/page.tsx@@ -1,10 +1,3 @@-import { CtaBanner } from '@/app/(home)/_sections/cta-banner';-import { HeroContainer } from '@/app/(home)/_sections/hero';-import { FeatureCard } from '@/components/feature-card';-import { Section, SectionHeader } from '@/components/section';-import { Button } from '@/components/ui/button';-import { url } from '@/lib/layout.shared';-import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';import { SupporterPerks } from 'components/sections/supporter-perks';import {ClockIcon,@@ -19,6 +12,13 @@ import {import type { Metadata } from 'next';import Link from 'next/link';import Script from 'next/script';+import { CtaBanner } from '@/app/(home)/_sections/cta-banner';+import { HeroContainer } from '@/app/(home)/_sections/hero';+import { FeatureCard } from '@/components/feature-card';+import { Section, SectionHeader } from '@/components/section';+import { Button } from '@/components/ui/button';+import { url } from '@/lib/layout.shared';+import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';export const metadata: Metadata = getPageMetadata({title: 'Become a Supporter',@@ -49,17 +49,18 @@ export default function SupporterPage() {return (<div><Script+ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}id="supporter-schema"strategy="beforeInteractive"type="application/ld+json"- dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/><HeroContainer><div className="col center-center flex-1"><SectionHeader- as="h1"align="center"+ as="h1"className="flex-1"+ description="Your support accelerates development, funds infrastructure, and helps us build features faster. Plus, you get exclusive perks and early access to everything we ship."title={<>Help us build@@ -67,16 +68,15 @@ export default function SupporterPage() {the future of open analytics</>}- description="Your support accelerates development, funds infrastructure, and helps us build features faster. Plus, you get exclusive perks and early access to everything we ship."/>- <div className="col gap-4 justify-center items-center mt-8">- <Button size="lg" asChild>+ <div className="col mt-8 items-center justify-center gap-4">+ <Button asChild size="lg"><Link href="https://buy.polar.sh/polar_cl_Az1CruNFzQB2bYdMOZmGHqTevW317knWqV44W1FqZmV">Become a Supporter<SparklesIcon className="size-4" /></Link></Button>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">Starting at $20/month • Cancel anytime</p></div>@@ -85,34 +85,34 @@ export default function SupporterPage() {<div className="container">{/* Main Content with Sidebar */}- <div className="grid lg:grid-cols-[1fr_380px] gap-8 mb-16">+ <div className="mb-16 grid gap-8 lg:grid-cols-[1fr_380px]">{/* Main Content */}<div className="col gap-16">{/* Why Support Section */}<Section className="my-0"><SectionHeader- title="Why your support matters"description="We're not a big corporation – just a small team passionate about building something useful for developers. OpenPanel started because we believed analytics tools shouldn't be complicated or locked behind expensive enterprise subscriptions."+ title="Why your support matters"/>- <div className="col gap-6 mt-8">+ <div className="col mt-8 gap-6"><p className="text-muted-foreground">When you become a supporter, you're directly funding:</p>- <div className="grid md:grid-cols-2 gap-4">+ <div className="grid gap-4 md:grid-cols-2"><FeatureCard- title="Active Development"description="More time fixing bugs, adding features, and improving documentation"icon={ZapIcon}+ title="Active Development"/><FeatureCard- title="Infrastructure"description="Keeping servers running, CI/CD pipelines, and development tools"icon={ZapIcon}+ title="Infrastructure"/><FeatureCard- title="Independence"description="Staying focused on what matters: building a tool developers actually want"icon={ZapIcon}+ title="Independence"/></div><p className="text-muted-foreground">@@ -127,36 +127,36 @@ export default function SupporterPage() {{/* What You Get Section */}<Section className="my-0"><SectionHeader- title="What you get as a supporter"description="Exclusive perks and early access to everything we ship."+ title="What you get as a supporter"/>- <div className="grid md:grid-cols-2 gap-6 mt-8">+ <div className="mt-8 grid gap-6 md:grid-cols-2"><FeatureCard- title="Latest Docker Images"description="Get bleeding-edge builds on every commit. Access new features weeks before public release."icon={RocketIcon}+ title="Latest Docker Images"><Link+ className="mt-2 text-primary text-sm hover:underline"href="/docs/self-hosting/supporter-access-latest-docker-images"- className="text-sm text-primary hover:underline mt-2">Learn more →</Link></FeatureCard><FeatureCard- title="Prioritized Support"description="Get help faster with priority support in our Discord community. Your questions get answered first."icon={MessageSquareIcon}+ title="Prioritized Support"/><FeatureCard- title="Feature Requests"description="Your ideas and feature requests get prioritized in our roadmap. Shape the future of OpenPanel."icon={SparklesIcon}+ title="Feature Requests"/><FeatureCard- title="Exclusive Discord Role"description="Special badge and recognition in our community. Show your support with pride."icon={StarIcon}+ title="Exclusive Discord Role"/></div></Section>@@ -164,49 +164,49 @@ export default function SupporterPage() {{/* Impact Section */}<Section className="my-0"><SectionHeader- title="Your impact"description="Every dollar you contribute goes directly into development, infrastructure, and making OpenPanel better. Here's what your support enables:"+ title="Your impact"/>- <div className="grid md:grid-cols-2 gap-6 mt-8">+ <div className="mt-8 grid gap-6 md:grid-cols-2"><FeatureCard- title="100% Open Source"description="Full transparency. Audit the code, contribute, fork it, or self-host without lock-in."icon={GithubIcon}+ title="100% Open Source"/><FeatureCard- title="24/7 Active Development"description="Continuous improvements and updates. Your support enables faster development cycles."icon={ClockIcon}+ title="24/7 Active Development"/><FeatureCard- title="Self-Hostable"description="Deploy OpenPanel anywhere - your server, your cloud, or locally. Full flexibility."icon={InfinityIcon}+ title="Self-Hostable"/></div></Section></div>{/* Sidebar */}- <aside className="lg:block hidden">+ <aside className="hidden lg:block"><SupporterPerks /></aside></div>{/* Mobile Perks */}- <div className="lg:hidden mb-16">+ <div className="mb-16 lg:hidden"><SupporterPerks /></div><CtaBanner- title="Ready to support OpenPanel?"- description="Join our community of supporters and help us build the best open-source alternative to Mixpanel. Every contribution helps accelerate development and make OpenPanel better for everyone."- ctaText="Become a Supporter"ctaLink="https://buy.polar.sh/polar_cl_Az1CruNFzQB2bYdMOZmGHqTevW317knWqV44W1FqZmV"+ ctaText="Become a Supporter"+ description="Join our community of supporters and help us build the best open-source alternative to Mixpanel. Every contribution helps accelerate development and make OpenPanel better for everyone."+ title="Ready to support OpenPanel?"/></div>- <div className="lg:-mx-20 xl:-mx-40 not-prose mt-16">+ <div className="not-prose mt-16 lg:-mx-20 xl:-mx-40">{/* <Testimonials /><Faq /> */}</div>diff --git a/apps/public/src/app/(home)/_sections/collaboration-chart.tsx b/apps/public/src/app/(home)/_sections/collaboration-chart.tsxindex 637c98531..c8ba0c0e2 100644--- a/apps/public/src/app/(home)/_sections/collaboration-chart.tsx+++ b/apps/public/src/app/(home)/_sections/collaboration-chart.tsx@@ -1,6 +1,5 @@'use client';-import { FeatureCardContainer } from '@/components/feature-card';import { MoreVerticalIcon } from 'lucide-react';import { useMemo, useState } from 'react';import {@@ -14,6 +13,7 @@ import {XAxis,YAxis,} from 'recharts';+import { FeatureCardContainer } from '@/components/feature-card';// Sample data for the last 7 daysconst data = [@@ -35,18 +35,18 @@ const CustomTooltip = ({ active, payload, label }: any) => {payload.find((p: any) => p.dataKey === 'revenue')?.value || 0;return (- <div className="bg-card border border-border rounded-lg p-3 shadow-lg min-w-[200px]">- <div className="text-sm font-semibold mb-2">{label}</div>- <div className="text-sm text-muted-foreground space-y-1 flex-1">- <div className="row gap-2 items-center flex-1">- <div className="h-6 bg-foreground w-1 rounded-full" />- <div className="font-medium row items-center gap-2 justify-between flex-1">+ <div className="min-w-[200px] rounded-lg border border-border bg-card p-3 shadow-lg">+ <div className="mb-2 font-semibold text-sm">{label}</div>+ <div className="flex-1 space-y-1 text-muted-foreground text-sm">+ <div className="row flex-1 items-center gap-2">+ <div className="h-6 w-1 rounded-full bg-foreground" />+ <div className="row flex-1 items-center justify-between gap-2 font-medium"><span>Visitors</span> <span>{visitors.toLocaleString()}</span></div></div>- <div className="row gap-2 items-center flex-1">- <div className="h-6 bg-emerald-500 w-1 rounded-full" />- <div className="font-medium row items-center gap-2 justify-between flex-1">+ <div className="row flex-1 items-center gap-2">+ <div className="h-6 w-1 rounded-full bg-emerald-500" />+ <div className="row flex-1 items-center justify-between gap-2 font-medium"><span>Revenue</span> <span>${revenue.toLocaleString()}</span></div></div>@@ -69,101 +69,101 @@ export function CollaborationChart() {const totalRevenue = activeData.revenue;return (- <FeatureCardContainer className="col gap-4 h-full">+ <FeatureCardContainer className="col h-full gap-4">{/* Header */}<div className="row items-center justify-between"><div><h3 className="font-semibold">Product page views</h3>- <p className="text-sm text-muted-foreground">Last 7 days</p>+ <p className="text-muted-foreground text-sm">Last 7 days</p></div><button+ className="text-muted-foreground transition-colors hover:text-foreground"type="button"- className="text-muted-foreground hover:text-foreground transition-colors"><MoreVerticalIcon className="size-4" /></button></div>{/* Chart */}- <div className="flex-1 min-h-[200px]">- <ResponsiveContainer width="100%" height="100%">+ <div className="min-h-[200px] flex-1">+ <ResponsiveContainer height="100%" width="100%"><ComposedChartdata={data}margin={{ top: 5, right: 5, left: 5, bottom: 5 }}+ onMouseLeave={() => setActiveIndex(null)}onMouseMove={(state) => {if (state?.activeTooltipIndex !== undefined) {setActiveIndex(state.activeTooltipIndex);}}}- onMouseLeave={() => setActiveIndex(null)}><CartesianGrid- strokeDasharray="3 3"- stroke="hsl(var(--border))"opacity={0.3}+ stroke="hsl(var(--border))"+ strokeDasharray="3 3"/><XAxis- dataKey="day"axisLine={false}- tickLine={false}+ dataKey="day"tick={{ fill: 'var(--muted-foreground)', fontSize: 10 }}+ tickLine={false}/><YAxis- yAxisId="left"axisLine={false}- tickLine={false}- tick={{ fill: 'var(--muted-foreground)', fontSize: 10 }}hide+ tick={{ fill: 'var(--muted-foreground)', fontSize: 10 }}+ tickLine={false}+ yAxisId="left"/><YAxis- yAxisId="right"- orientation="right"axisLine={false}- tickLine={false}- tick={{ fill: 'var(--muted-foreground)', fontSize: 10 }}domain={[0, 2400]}hide+ orientation="right"+ tick={{ fill: 'var(--muted-foreground)', fontSize: 10 }}+ tickLine={false}+ yAxisId="right"/><Tooltip content={<CustomTooltip />} cursor={false} />{/* Revenue bars */}- <Bar yAxisId="right" dataKey="revenue" radius={4}>+ <Bar dataKey="revenue" radius={4} yAxisId="right">{data.map((entry, index) => (<Cell- key={`cell-${entry.day}`}className={activeIndex === index? 'fill-emerald-500' // Lighter green on hover: 'fill-foreground/30' // Default green}+ key={`cell-${entry.day}`}style={{ transition: 'fill 0.2s ease' }}/>))}</Bar><Line- yAxisId="left"- type="monotone"dataKey="visitors"- strokeWidth={2}- stroke="var(--foreground)"dot={false}+ stroke="var(--foreground)"+ strokeWidth={2}+ type="monotone"+ yAxisId="left"/></ComposedChart></ResponsiveContainer></div>{/* Metrics */}- <div className="grid grid-cols-2 gap-4 center-center">+ <div className="center-center grid grid-cols-2 gap-4"><div>- <div className="text-2xl font-semibold font-mono">+ <div className="font-mono font-semibold text-2xl">{totalVisitors.toLocaleString()}</div>- <div className="text-xs text-muted-foreground">Visitors</div>+ <div className="text-muted-foreground text-xs">Visitors</div></div><div>- <div className="text-2xl font-semibold font-mono text-emerald-500">+ <div className="font-mono font-semibold text-2xl text-emerald-500">${totalRevenue.toLocaleString()}</div>- <div className="text-xs text-muted-foreground">Revenue</div>+ <div className="text-muted-foreground text-xs">Revenue</div></div></div></FeatureCardContainer>diff --git a/apps/public/src/app/(home)/_sections/collaboration.tsx b/apps/public/src/app/(home)/_sections/collaboration.tsxindex 99e4334cd..abf2339d2 100644--- a/apps/public/src/app/(home)/_sections/collaboration.tsx+++ b/apps/public/src/app/(home)/_sections/collaboration.tsx@@ -1,17 +1,13 @@-import { FeatureCard } from '@/components/feature-card';-import { GetStartedButton } from '@/components/get-started-button';-import { Section, SectionHeader } from '@/components/section';-import { Button } from '@/components/ui/button';import {ChartBarIcon,ChevronRightIcon,- DollarSignIcon,LayoutDashboardIcon,- RocketIcon,WorkflowIcon,} from 'lucide-react';import Link from 'next/link';import { CollaborationChart } from './collaboration-chart';+import { GetStartedButton } from '@/components/get-started-button';+import { Section, SectionHeader } from '@/components/section';const features = [{@@ -40,33 +36,33 @@ const features = [export function Collaboration() {return (<Section className="container">- <div className="grid grid-cols-1 md:grid-cols-2 gap-16">+ <div className="grid grid-cols-1 gap-16 md:grid-cols-2"><CollaborationChart /><div><SectionHeader- title="Turn data into actionable insights"description="Build interactive dashboards, share insights with your team, and make data-driven decisions faster. OpenPanel helps you understand not just what's happening, but why."+ title="Turn data into actionable insights"/><GetStartedButton className="mt-6" />- <div className="col gap-6 mt-16">+ <div className="col mt-16 gap-6">{features.map((feature) => (<Link+ className="group col relative gap-2 overflow-hidden pr-10"href={`/features/${feature.slug}`}- className="group relative col gap-2 pr-10 overflow-hidden"key={feature.title}><h3 className="font-semibold">- <feature.icon className="size-6 inline-block mr-2 relative -top-0.5" />+ <feature.icon className="relative -top-0.5 mr-2 inline-block size-6" />{feature.title}</h3><p className="text-muted-foreground text-sm">{feature.description}</p><ChevronRightIcon- className="absolute right-0 top-1/2 size-5 -translate-y-1/2 text-muted-foreground transition-transform duration-200 translate-x-full group-hover:translate-x-0"aria-hidden+ className="absolute top-1/2 right-0 size-5 translate-x-full -translate-y-1/2 text-muted-foreground transition-transform duration-200 group-hover:translate-x-0"/></Link>))}diff --git a/apps/public/src/app/(home)/_sections/cta-banner.tsx b/apps/public/src/app/(home)/_sections/cta-banner.tsxindex 5c2ea0ef4..8b6d6fbde 100644--- a/apps/public/src/app/(home)/_sections/cta-banner.tsx+++ b/apps/public/src/app/(home)/_sections/cta-banner.tsx@@ -1,18 +1,15 @@import { GetStartedButton } from '@/components/get-started-button';-import { Button } from '@/components/ui/button';import { cn } from '@/lib/utils';-import { ChevronRightIcon } from 'lucide-react';-import Link from 'next/link';function Svg({ className }: { className?: string }) {return (<svg- width="409"+ className={cn('text-foreground', className)}+ fill="none"height="539"viewBox="0 0 409 539"- fill="none"+ width="409"xmlns="http://www.w3.org/2000/svg"- className={cn('text-foreground', className)}><pathd="M222.146 483.444C332.361 429.581 378.043 296.569 324.18 186.354C270.317 76.1395 137.306 30.4572 27.0911 84.3201"@@ -21,12 +18,12 @@ function Svg({ className }: { className?: string }) {/><defs><linearGradient+ gradientUnits="userSpaceOnUse"id="paint0_linear_552_3808"x1="324.18"- y1="186.354"x2="161.365"+ y1="186.354"y2="265.924"- gradientUnits="userSpaceOnUse"><stop stopColor="currentColor" /><stop offset="1" stopColor="currentColor" stopOpacity="0" />@@ -57,23 +54,23 @@ export function CtaBanner({<div className="container"><sectionclassName={cn(- 'relative overflow-hidden border rounded-3xl py-16 px-4 md:px-16'+ 'relative overflow-hidden rounded-3xl border px-4 py-16 md:px-16')}>- <div className="size-px absolute left-12 bottom-12 rounded-full shadow-[0_0_250px_80px_var(--color-foreground)]" />- <div className="size-px absolute right-12 top-12 rounded-full shadow-[0_0_250px_80px_var(--color-foreground)]" />- <Svg className="absolute left-0 bottom-0 -translate-x-1/2 translate-y-1/2 max-md:scale-50 opacity-50" />- <Svg className="absolute right-0 top-0 translate-x-1/2 -translate-y-1/2 rotate-105 max-md:scale-50 scale-75 opacity-50" />+ <div className="absolute bottom-12 left-12 size-px rounded-full shadow-[0_0_250px_80px_var(--color-foreground)]" />+ <div className="absolute top-12 right-12 size-px rounded-full shadow-[0_0_250px_80px_var(--color-foreground)]" />+ <Svg className="absolute bottom-0 left-0 -translate-x-1/2 translate-y-1/2 opacity-50 max-md:scale-50" />+ <Svg className="absolute top-0 right-0 translate-x-1/2 -translate-y-1/2 rotate-105 scale-75 opacity-50 max-md:scale-50" /><div className="absolute inset-0 bg-linear-to-br from-foreground/5 via-transparent to-foreground/5" />- <div className="container relative z-10 col gap-6 center-center max-w-3xl">- <h2 className="text-4xl md:text-4xl font-semibold text-center">+ <div className="col center-center container relative z-10 max-w-3xl gap-6">+ <h2 className="text-center font-semibold text-4xl md:text-4xl">{title}</h2>- <p className="text-muted-foreground text-center max-w-md">+ <p className="max-w-md text-center text-muted-foreground">{description}</p>- <GetStartedButton className="mt-4" text={ctaText} href={ctaLink} />+ <GetStartedButton className="mt-4" href={ctaLink} text={ctaText} /></div></section></div>diff --git a/apps/public/src/app/(home)/_sections/sdks.tsx b/apps/public/src/app/(home)/_sections/sdks.tsxindex b3177efdf..0e27a4fd4 100644--- a/apps/public/src/app/(home)/_sections/sdks.tsx+++ b/apps/public/src/app/(home)/_sections/sdks.tsx@@ -1,24 +1,24 @@-import { FeatureCardContainer } from '@/components/feature-card';-import { Section, SectionHeader } from '@/components/section';import { frameworks } from '@openpanel/sdk-info';import { ArrowRightIcon } from 'lucide-react';import Link from 'next/link';+import { FeatureCardContainer } from '@/components/feature-card';+import { Section, SectionHeader } from '@/components/section';export function Sdks() {return (<Section className="container"><SectionHeader- title="Get started in minutes"- description="Integrate OpenPanel with your favorite framework using our lightweight SDKs. A few lines of code and you're tracking."className="mb-16"+ description="Integrate OpenPanel with your favorite framework using our lightweight SDKs. A few lines of code and you're tracking."+ title="Get started in minutes"/>- <div className="grid grid-cols-2 md:grid-cols-5 gap-6">+ <div className="grid grid-cols-2 gap-6 md:grid-cols-5">{frameworks.map((sdk) => (<Link href={sdk.href} key={sdk.key}><FeatureCardContainer key={sdk.key}><sdk.IconComponent className="size-6" />- <div className="row justify-between items-center">- <span className="text-sm font-semibold">{sdk.name}</span>+ <div className="row items-center justify-between">+ <span className="font-semibold text-sm">{sdk.name}</span><ArrowRightIcon className="size-4" /></div></FeatureCardContainer>diff --git a/apps/public/src/app/(home)/_sections/testimonials.tsx b/apps/public/src/app/(home)/_sections/testimonials.tsxindex fe266eabc..eaf727f0a 100644--- a/apps/public/src/app/(home)/_sections/testimonials.tsx+++ b/apps/public/src/app/(home)/_sections/testimonials.tsx@@ -1,9 +1,9 @@'use client';+import { useEffect, useMemo, useRef } from 'react';import { InfiniteMovingCards } from '@/components/infinite-moving-cards';import { Section, SectionHeader } from '@/components/section';import { TwitterCard } from '@/components/twitter-card';-import { useEffect, useMemo, useRef } from 'react';const testimonials = [{@@ -111,7 +111,9 @@ export function Testimonials() {useEffect(() => {const scrollerElement = scrollerRef.current;- if (!scrollerElement) return;+ if (!scrollerElement) {+ return;+ }const handleScroll = () => {// When we've scrolled to the end of the first set, reset to the beginning@@ -165,21 +167,21 @@ export function Testimonials() {<Section className="overflow-hidden"><div className="container mb-16"><SectionHeader- title="Loved by builders everywhere"description="From indie hackers to global teams, OpenPanel helps people understand their users effortlessly."+ title="Loved by builders everywhere"/></div><div className="relative -mx-4 px-4">{/* Gradient masks for fade effect */}<div- className="absolute left-0 top-0 bottom-0 w-32 z-10 pointer-events-none"+ className="pointer-events-none absolute top-0 bottom-0 left-0 z-10 w-32"style={{background:'linear-gradient(to right, hsl(var(--background)), transparent)',}}/><div- className="absolute right-0 top-0 bottom-0 w-32 z-10 pointer-events-none"+ className="pointer-events-none absolute top-0 right-0 bottom-0 z-10 w-32"style={{background:'linear-gradient(to left, hsl(var(--background)), transparent)',@@ -187,19 +189,19 @@ export function Testimonials() {/><InfiniteMovingCards- items={testimonials}+ className="gap-8"direction="left"+ items={testimonials}pauseOnHover- speed="slow"- className="gap-8"renderItem={(item) => (<TwitterCard- name={item.name}- handle={item.handle}- content={item.content}avatarUrl={item.avatarUrl}+ content={item.content}+ handle={item.handle}+ name={item.name}/>)}+ speed="slow"/></div></Section>diff --git a/apps/public/src/app/(home)/layout.tsx b/apps/public/src/app/(home)/layout.tsxindex 202689593..73ce0ca99 100644--- a/apps/public/src/app/(home)/layout.tsx+++ b/apps/public/src/app/(home)/layout.tsx@@ -1,6 +1,6 @@+import type { ReactNode } from 'react';import { Footer } from '@/components/footer';import Navbar from '@/components/navbar';-import type { ReactNode } from 'react';export default function Layout({children,diff --git a/apps/public/src/app/(home)/page.tsx b/apps/public/src/app/(home)/page.tsxindex ec9659f15..7a7c8423a 100644--- a/apps/public/src/app/(home)/page.tsx+++ b/apps/public/src/app/(home)/page.tsx@@ -1,12 +1,12 @@import { AnalyticsInsights } from './_sections/analytics-insights';import { Collaboration } from './_sections/collaboration';-import { FeatureSpotlight } from './_sections/feature-spotlight';import { CtaBanner } from './_sections/cta-banner';import { DataPrivacy } from './_sections/data-privacy';import { Faq } from './_sections/faq';+import { FeatureSpotlight } from './_sections/feature-spotlight';+import { Hero } from './_sections/hero';import { Mcp } from './_sections/mcp';import { MixpanelAlternative } from './_sections/mixpanel-alternative';-import { Hero } from './_sections/hero';import { Pricing } from './_sections/pricing';import { Sdks } from './_sections/sdks';import { Testimonials } from './_sections/testimonials';diff --git a/apps/public/src/app/api/search/route.ts b/apps/public/src/app/api/search/route.tsindex 7ba7e8231..5069e9066 100644--- a/apps/public/src/app/api/search/route.ts+++ b/apps/public/src/app/api/search/route.ts@@ -1,5 +1,5 @@-import { source } from '@/lib/source';import { createFromSource } from 'fumadocs-core/search/server';+import { source } from '@/lib/source';export const { GET } = createFromSource(source, {// https://docs.orama.com/docs/orama-js/supported-languagesdiff --git a/apps/public/src/app/docs/(docs)/[[...slug]]/page.tsx b/apps/public/src/app/docs/(docs)/[[...slug]]/page.tsxindex 38bb89d6f..65876119c 100644--- a/apps/public/src/app/docs/(docs)/[[...slug]]/page.tsx+++ b/apps/public/src/app/docs/(docs)/[[...slug]]/page.tsx@@ -1,7 +1,3 @@-import { url } from '@/lib/layout.shared';-import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';-import { getPageImage, source } from '@/lib/source';-import { getMDXComponents } from '@/mdx-components';import { createRelativeLink } from 'fumadocs-ui/mdx';import {DocsBody,@@ -11,6 +7,10 @@ import {} from 'fumadocs-ui/page';import type { Metadata } from 'next';import { notFound } from 'next/navigation';+import { url } from '@/lib/layout.shared';+import { getOgImageUrl, getPageMetadata } from '@/lib/metadata';+import { source } from '@/lib/source';+import { getMDXComponents } from '@/mdx-components';type PageProps = {params: Promise<{ slug: string[] }>;@@ -19,12 +19,14 @@ type PageProps = {export default async function Page(props: PageProps) {const params = await props.params;const page = source.getPage(params.slug);- if (!page) notFound();+ if (!page) {+ notFound();+ }const MDX = page.data.body;return (- <DocsPage toc={page.data.toc} full={page.data.full}>+ <DocsPage full={page.data.full} toc={page.data.toc}><DocsTitle>{page.data.title}</DocsTitle><DocsDescription>{page.data.description}</DocsDescription><DocsBody>@@ -46,7 +48,9 @@ export async function generateStaticParams() {export async function generateMetadata(props: PageProps): Promise<Metadata> {const params = await props.params;const page = source.getPage(params.slug);- if (!page) notFound();+ if (!page) {+ notFound();+ }return getPageMetadata({title: page.data.title,diff --git a/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsx b/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsxindex ca0fdb34e..b6719d6f9 100644--- a/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsx+++ b/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsx@@ -1,6 +1,3 @@-import React from 'react';-import { getMDXComponents } from '@/mdx-components';-import { getApiReferenceSource, openapi } from '@/lib/openapi';import { createAPIPage } from 'fumadocs-openapi/ui';import {DocsBody,@@ -9,6 +6,9 @@ import {DocsTitle,} from 'fumadocs-ui/page';import { notFound, redirect } from 'next/navigation';+import type React from 'react';+import { getApiReferenceSource, openapi } from '@/lib/openapi';+import { getMDXComponents } from '@/mdx-components';const APIPage = createAPIPage(openapi);@@ -22,12 +22,16 @@ export default async function Page(props: PageProps) {if (!params.slug) {const first = source.getPages()[0];- if (first) redirect(first.url);+ if (first) {+ redirect(first.url);+ }notFound();}const page = source.getPage(params.slug);- if (!page) notFound();+ if (!page) {+ notFound();+ }const data = page.data as Record<string, unknown>;diff --git a/apps/public/src/app/dpa/download/page.tsx b/apps/public/src/app/dpa/download/page.tsxindex 574cf4df2..8aab6fac1 100644--- a/apps/public/src/app/dpa/download/page.tsx+++ b/apps/public/src/app/dpa/download/page.tsx@@ -96,7 +96,7 @@ export default function DpaDownloadPage() {require it for their own compliance documentation and records ofprocessing activities.</p>- <p className="mb-1 text-gray-700 text-sm font-semibold">+ <p className="mb-1 font-semibold text-gray-700 text-sm">Session replay (optional feature)</p><p className="mb-3 text-gray-700 text-sm">@@ -108,7 +108,7 @@ export default function DpaDownloadPage() {use of session replay complies with applicable privacy law,including providing appropriate notice to end users.</p>- <p className="mb-1 text-gray-700 text-sm font-semibold">+ <p className="mb-1 font-semibold text-gray-700 text-sm">AI features (optional, opt-in)</p><p className="text-gray-700 text-sm">@@ -511,7 +511,7 @@ export default function DpaDownloadPage() {{/* Controller - blank */}<div>- <div className="flex flex-col h-32 gap-2">+ <div className="flex h-32 flex-col gap-2"><p className="font-semibold text-gray-500 text-xs uppercase tracking-widest">Controller</p>diff --git a/apps/public/src/app/llms-full.txt/route.ts b/apps/public/src/app/llms-full.txt/route.tsindex 27e3a4f43..aa618d92f 100644--- a/apps/public/src/app/llms-full.txt/route.ts+++ b/apps/public/src/app/llms-full.txt/route.ts@@ -1,8 +1,4 @@-import {- OPENPANEL_BASE_URL,- OPENPANEL_DESCRIPTION,- OPENPANEL_NAME,-} from '@/lib/openpanel-brand';+import { OPENPANEL_DESCRIPTION, OPENPANEL_NAME } from '@/lib/openpanel-brand';import { getLLMText, source } from '@/lib/source';export const dynamic = 'force-static';diff --git a/apps/public/src/app/md/route.ts b/apps/public/src/app/md/route.tsindex f9a133d29..8e1b15e19 100644--- a/apps/public/src/app/md/route.ts+++ b/apps/public/src/app/md/route.ts@@ -1,6 +1,6 @@+import { NextResponse } from 'next/server';import { OPENPANEL_BASE_URL } from '@/lib/openpanel-brand';import { articleSource, guideSource, pageSource, source } from '@/lib/source';-import { NextResponse } from 'next/server';const ALLOWED_PAGE_PATHS = new Set(['privacy',@@ -68,8 +68,9 @@ export async function GET(request: Request) {.replace(/^\/articles\/?/, '').split('/').filter(Boolean);- if (slug.length === 0)+ if (slug.length === 0) {return new NextResponse('Not found', { status: 404 });+ }const page = articleSource.getPage(slug);if (!page) {return new NextResponse('Not found', { status: 404 });@@ -89,8 +90,9 @@ export async function GET(request: Request) {.replace(/^\/guides\/?/, '').split('/').filter(Boolean);- if (slug.length === 0)+ if (slug.length === 0) {return new NextResponse('Not found', { status: 404 });+ }const page = guideSource.getPage(slug);if (!page) {return new NextResponse('Not found', { status: 404 });diff --git a/apps/public/src/app/tools/ip-lookup/layout.tsx b/apps/public/src/app/tools/ip-lookup/layout.tsxindex 0644813ba..2721621e0 100644--- a/apps/public/src/app/tools/ip-lookup/layout.tsx+++ b/apps/public/src/app/tools/ip-lookup/layout.tsx@@ -1,5 +1,5 @@-import { getPageMetadata } from '@/lib/metadata';import type { Metadata } from 'next';+import { getPageMetadata } from '@/lib/metadata';export const metadata: Metadata = getPageMetadata({url: '/tools/ip-lookup',diff --git a/apps/public/src/app/tools/ip-lookup/page.tsx b/apps/public/src/app/tools/ip-lookup/page.tsxindex 297be402b..ab157dd0f 100644--- a/apps/public/src/app/tools/ip-lookup/page.tsx+++ b/apps/public/src/app/tools/ip-lookup/page.tsx@@ -1,5 +1,7 @@'use client';+import { AlertCircle, Globe, Loader2, MapPin, Search } from 'lucide-react';+import { useEffect, useState } from 'react';import { FaqItem, Faqs } from '@/components/faq';import { FeatureCardContainer } from '@/components/feature-card';import { SectionHeader } from '@/components/section';@@ -7,17 +9,6 @@ import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { API_URL } from '@/lib/api-url';import { cn } from '@/lib/utils';-import {- AlertCircle,- Building2,- Globe,- Loader2,- MapPin,- Network,- Search,- Server,-} from 'lucide-react';-import { useEffect, useState } from 'react';interface IPInfo {ip: string;@@ -78,7 +69,9 @@ export default function IPLookupPage() {const handleSubmit = async (e: React.FormEvent) => {e.preventDefault();- if (!ip.trim()) return;+ if (!ip.trim()) {+ return;+ }setLoading(true);setError(null);@@ -123,14 +116,14 @@ export default function IPLookupPage() {className?: string;}) => (<FeatureCardContainer- className={cn('p-4 flex items-start gap-3', className)}+ className={cn('flex items-start gap-3 p-4', className)}>- <div className="text-muted-foreground mt-0.5">{icon}</div>- <div className="flex-1 min-w-0">- <div className="text-sm font-medium text-muted-foreground mb-1">+ <div className="mt-0.5 text-muted-foreground">{icon}</div>+ <div className="min-w-0 flex-1">+ <div className="mb-1 font-medium text-muted-foreground text-sm">{label}</div>- <div className="text-base font-semibold break-words">+ <div className="break-words font-semibold text-base">{value || '—'}</div></div>@@ -138,35 +131,37 @@ export default function IPLookupPage() {);const getCountryFlag = (countryCode?: string): string => {- if (!countryCode || countryCode.length !== 2) return '🌐';+ if (!countryCode || countryCode.length !== 2) {+ return '🌐';+ }// Convert country code to flag emojiconst codePoints = countryCode.toUpperCase().split('')- .map((char) => 127397 + char.charCodeAt(0));+ .map((char) => 127_397 + char.charCodeAt(0));return String.fromCodePoint(...codePoints);};return (<div className="max-w-4xl"><SectionHeader- title="IP Lookup Tool"+ as="h1"description="Find detailed information about any IP address including geolocation, ISP, and network details."+ title="IP Lookup Tool"variant="default"- as="h1"/>- <form onSubmit={handleSubmit} className="mt-8">+ <form className="mt-8" onSubmit={handleSubmit}><div className="flex gap-2"><Input- type="text"- placeholder="Enter IP address or leave empty to detect yours"- value={ip}- onChange={(e) => setIp(e.target.value)}className="flex-1"+ onChange={(e) => setIp(e.target.value)}+ placeholder="Enter IP address or leave empty to detect yours"size="lg"+ type="text"+ value={ip}/>- <Button type="submit" disabled={loading || autoDetecting} size="lg">+ <Button disabled={loading || autoDetecting} size="lg" type="submit">{loading || autoDetecting ? (<><Loader2 className="size-4 animate-spin" />@@ -185,18 +180,18 @@ export default function IPLookupPage() {{error && (<divclassName={cn(- 'mt-4 p-4 rounded-lg border',+ 'mt-4 rounded-lg border p-4',isRateLimited- ? 'bg-amber-500/10 border-amber-500/20 text-amber-600 dark:text-amber-400'- : 'bg-destructive/10 border-destructive/20 text-destructive'+ ? 'border-amber-500/20 bg-amber-500/10 text-amber-600 dark:text-amber-400'+ : 'border-destructive/20 bg-destructive/10 text-destructive')}><div className="flex items-start gap-2">- <AlertCircle className="size-5 mt-0.5 flex-shrink-0" />+ <AlertCircle className="mt-0.5 size-5 flex-shrink-0" /><div className="flex-1"><div className="font-medium">{error}</div>{isRateLimited && (- <div className="text-sm mt-1 opacity-90">+ <div className="mt-1 text-sm opacity-90">You can make up to 20 requests per minute. Please try againshortly.</div>@@ -210,17 +205,17 @@ export default function IPLookupPage() {<div className="mt-8 space-y-6">{/* IP Address Display */}<FeatureCardContainer>- <div className="flex items-center gap-3 mb-2">+ <div className="mb-2 flex items-center gap-3"><Globe className="size-6" /><div>- <div className="text-sm text-muted-foreground">+ <div className="text-muted-foreground text-sm">{autoDetecting ? 'Detected IP Address' : 'IP Address'}</div>- <div className="text-2xl font-bold font-mono">{result.ip}</div>+ <div className="font-bold font-mono text-2xl">{result.ip}</div></div></div>{(result.isLocalhost || result.isPrivate) && (- <div className="mt-3 flex items-center gap-2 text-sm text-muted-foreground">+ <div className="mt-3 flex items-center gap-2 text-muted-foreground text-sm"><AlertCircle className="size-4" /><span>{result.isLocalhost@@ -234,11 +229,11 @@ export default function IPLookupPage() {{/* Location Information */}{result.location.country && (<div>- <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">+ <h3 className="mb-4 flex items-center gap-2 font-semibold text-lg"><MapPin className="size-5" />Location Information</h3>- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">+ <div className="grid grid-cols-1 gap-4 md:grid-cols-2"><InfoCardicon={<Globe className="size-5" />}label="Country"@@ -279,40 +274,40 @@ export default function IPLookupPage() {{/* Map Preview */}{result.location.latitude && result.location.longitude && (<div>- <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">+ <h3 className="mb-4 flex items-center gap-2 font-semibold text-lg"><MapPin className="size-5" />Map Location</h3>- <div className="border border-border rounded-lg overflow-hidden bg-card">+ <div className="overflow-hidden rounded-lg border border-border bg-card"><iframe- width="100%"- height="400"+ className="aspect-video w-full"frameBorder="0"- scrolling="no"+ height="400"marginHeight={0}marginWidth={0}+ scrolling="no"src={`https://www.openstreetmap.org/export/embed.html?bbox=${result.location.longitude - 0.1},${result.location.latitude - 0.1},${result.location.longitude + 0.1},${result.location.latitude + 0.1}&layer=mapnik&marker=${result.location.latitude},${result.location.longitude}`}- className="w-full aspect-video"title="Map location"+ width="100%"/>- <div className="p-2 bg-muted border-t border-border text-xs text-center text-muted-foreground flex items-center justify-between gap-4">+ <div className="flex items-center justify-between gap-4 border-border border-t bg-muted p-2 text-center text-muted-foreground text-xs"><div>©{' '}<a+ className="text-primary hover:underline"href="https://www.openstreetmap.org/copyright"- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline"+ target="_blank">OpenStreetMap</a>{' '}contributors</div><a+ className="text-primary hover:underline"href={`https://www.openstreetmap.org/?mlat=${result.location.latitude}&mlon=${result.location.longitude}#map=12/${result.location.latitude}/${result.location.longitude}`}- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline"+ target="_blank">View Larger Map</a>@@ -322,14 +317,14 @@ export default function IPLookupPage() {)}{/* Attribution */}- <div className="pt-4 border-t text-xs text-muted-foreground space-y-2">+ <div className="space-y-2 border-t pt-4 text-muted-foreground text-xs"><div><strong>Location data:</strong> Powered by{' '}<a+ className="text-primary hover:underline"href="https://www.maxmind.com/en/geoip2-services-and-databases"- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline"+ target="_blank">MaxMind GeoLite2</a>{' '}@@ -339,10 +334,10 @@ export default function IPLookupPage() {<div><strong>Network data:</strong> ISP/ASN information from{' '}<a+ className="text-primary hover:underline"href="https://ip-api.com"- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline"+ target="_blank">ip-api.com</a>@@ -353,13 +348,13 @@ export default function IPLookupPage() {)}{/* SEO Content Section */}- <div className="mt-16 prose prose-neutral dark:prose-invert max-w-none">+ <div className="prose prose-neutral dark:prose-invert mt-16 max-w-none"><article className="space-y-8"><div>- <h2 className="text-3xl font-bold mb-4">+ <h2 className="mb-4 font-bold text-3xl">Free IP Lookup Tool - Find Your IP Address and Geolocation</h2>- <p className="text-lg text-muted-foreground mb-6">+ <p className="mb-6 text-lg text-muted-foreground">Discover your IP address instantly and get detailed geolocationinformation including country, city, ISP, ASN, and networkdetails. Our free IP lookup tool provides accurate location data@@ -368,7 +363,7 @@ export default function IPLookupPage() {</div><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">What is an IP Address?</h3><p className="mb-4">@@ -377,7 +372,7 @@ export default function IPLookupPage() {it as a mailing address for your device on the internet. There aretwo main types:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><strong>IPv4:</strong> The most common format, consisting offour numbers separated by dots (e.g., 192.168.1.1)@@ -391,7 +386,7 @@ export default function IPLookupPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">How IP Geolocation Works</h3><p className="mb-4">@@ -399,7 +394,7 @@ export default function IPLookupPage() {IP address by analyzing routing information and regional IPaddress allocations. Our tool uses:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><strong>MaxMind GeoLite2 Database:</strong> Industry-standardgeolocation database providing accurate city and country-level@@ -427,15 +422,15 @@ export default function IPLookupPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Understanding IP Lookup Results</h3>- <h4 className="text-xl font-semibold mt-6 mb-3">Location Data</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">Location Data</h4><p className="mb-4">Our IP lookup provides detailed geographic information:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><strong>Country:</strong> The country where the IP address isregistered or routed through@@ -452,11 +447,11 @@ export default function IPLookupPage() {</li></ul>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Network Information</h4><p className="mb-4">Technical details about the network:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><strong>ISP (Internet Service Provider):</strong> The companyproviding internet service for this IP address@@ -477,10 +472,10 @@ export default function IPLookupPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Common Use Cases for IP Lookup</h3>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><strong>Security:</strong> Identify suspicious login attempts ortrack potential security threats@@ -509,7 +504,7 @@ export default function IPLookupPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Public vs Private IP Addresses</h3><p className="mb-4">@@ -517,7 +512,7 @@ export default function IPLookupPage() {addresses:</p>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Public IP Address</h4><p className="mb-4">@@ -526,7 +521,7 @@ export default function IPLookupPage() {detects your public IP address automatically.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Private IP Address</h4><p className="mb-4">@@ -534,7 +529,7 @@ export default function IPLookupPage() {etc.) and are not routable on the public internet. Common privateIP ranges include:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li>10.0.0.0 to 10.255.255.255</li><li>172.16.0.0 to 172.31.255.255</li><li>192.168.0.0 to 192.168.255.255</li>@@ -546,7 +541,7 @@ export default function IPLookupPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Privacy and IP Addresses</h3><p className="mb-4">@@ -554,7 +549,7 @@ export default function IPLookupPage() {network, but it doesn't expose your exact physical address orpersonal identity. Here's what you should know:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li>IP addresses show general location (city/region level), notexact addresses@@ -572,10 +567,10 @@ export default function IPLookupPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">How to Use Our IP Lookup Tool</h3>- <ol className="list-decimal list-inside space-y-3 mb-6 ml-4">+ <ol className="mb-6 ml-4 list-inside list-decimal space-y-3"><li><strong>Auto-Detection:</strong> When you visit the page, yourIP address is automatically detected and displayed@@ -596,7 +591,7 @@ export default function IPLookupPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Frequently Asked Questions</h3>@@ -634,8 +629,8 @@ export default function IPLookupPage() {</Faqs></section>- <section className="border-t pt-8 mt-8">- <h3 className="text-2xl font-semibold mb-4">+ <section className="mt-8 border-t pt-8">+ <h3 className="mb-4 font-semibold text-2xl">Start Using Our Free IP Lookup Tool</h3><p className="mb-6">diff --git a/apps/public/src/app/tools/layout.tsx b/apps/public/src/app/tools/layout.tsxindex 9834dc62d..5c3187e35 100644--- a/apps/public/src/app/tools/layout.tsx+++ b/apps/public/src/app/tools/layout.tsx@@ -1,7 +1,7 @@-import { Footer } from '@/components/footer';-import Navbar from '@/components/navbar';import type { ReactNode } from 'react';import ToolsSidebar from './tools-sidebar';+import { Footer } from '@/components/footer';+import Navbar from '@/components/navbar';export default function ToolsLayout({children,@@ -11,9 +11,9 @@ export default function ToolsLayout({return (<><Navbar />- <div className="min-h-screen mt-12 md:mt-32">+ <div className="mt-12 min-h-screen md:mt-32"><div className="container py-8 md:py-12">- <div className="grid grid-cols-1 lg:grid-cols-4 gap-8">+ <div className="grid grid-cols-1 gap-8 lg:grid-cols-4"><main className="lg:col-span-3">{children}</main><ToolsSidebar /></div>diff --git a/apps/public/src/app/tools/tools-sidebar.tsx b/apps/public/src/app/tools/tools-sidebar.tsxindex dea8196b0..a86009c86 100644--- a/apps/public/src/app/tools/tools-sidebar.tsx+++ b/apps/public/src/app/tools/tools-sidebar.tsx@@ -1,9 +1,9 @@'use client';-import { cn } from '@/lib/utils';import Link from 'next/link';import { usePathname } from 'next/navigation';import { TOOLS } from './tools';+import { cn } from '@/lib/utils';export default function ToolsSidebar(): React.ReactElement {const pathname = usePathname();@@ -17,21 +17,21 @@ export default function ToolsSidebar(): React.ReactElement {const isActive = pathname === tool.url;return (<Link- key={tool.url}- href={tool.url}className={cn(- 'flex items-start gap-3 p-3 rounded-lg transition-colors',+ 'flex items-start gap-3 rounded-lg p-3 transition-colors',isActive? 'bg-accent text-accent-foreground'- : 'hover:bg-accent/50 text-muted-foreground hover:text-foreground'+ : 'text-muted-foreground hover:bg-accent/50 hover:text-foreground')}+ href={tool.url}+ key={tool.url}>- <Icon className="size-5 shrink-0 mt-0.5" />- <div className="flex-1 min-w-0">+ <Icon className="mt-0.5 size-5 shrink-0" />+ <div className="min-w-0 flex-1"><div className="flex items-center gap-2"><span className="font-medium text-sm">{tool.name}</span></div>- <p className="text-xs text-muted-foreground mt-0.5 line-clamp-2">+ <p className="mt-0.5 line-clamp-2 text-muted-foreground text-xs">{tool.description}</p></div>diff --git a/apps/public/src/app/tools/tools.tsx b/apps/public/src/app/tools/tools.tsxindex 06e087880..3bea6e481 100644--- a/apps/public/src/app/tools/tools.tsx+++ b/apps/public/src/app/tools/tools.tsx@@ -1,10 +1,4 @@-import {- GlobeIcon,- Link2Icon,- QrCodeIcon,- SearchIcon,- TimerIcon,-} from 'lucide-react';+import { GlobeIcon, SearchIcon } from 'lucide-react';export const TOOLS = [{diff --git a/apps/public/src/app/tools/url-checker/layout.tsx b/apps/public/src/app/tools/url-checker/layout.tsxindex cdda228c4..1859fc92c 100644--- a/apps/public/src/app/tools/url-checker/layout.tsx+++ b/apps/public/src/app/tools/url-checker/layout.tsx@@ -1,5 +1,5 @@-import { getPageMetadata } from '@/lib/metadata';import type { Metadata } from 'next';+import { getPageMetadata } from '@/lib/metadata';export const metadata: Metadata = getPageMetadata({url: '/tools/url-checker',diff --git a/apps/public/src/app/tools/url-checker/page.tsx b/apps/public/src/app/tools/url-checker/page.tsxindex 0bed2acbc..7142f0415 100644--- a/apps/public/src/app/tools/url-checker/page.tsx+++ b/apps/public/src/app/tools/url-checker/page.tsx@@ -1,12 +1,5 @@'use client';-import { FaqItem, Faqs } from '@/components/faq';-import { FeatureCardContainer } from '@/components/feature-card';-import { SectionHeader } from '@/components/section';-import { Button } from '@/components/ui/button';-import { Input } from '@/components/ui/input';-import { API_URL } from '@/lib/api-url';-import { cn } from '@/lib/utils';import {AlertCircle,CheckCircle2,@@ -21,6 +14,13 @@ import {} from 'lucide-react';import { useState } from 'react';import { SocialPreview } from './social-preview';+import { FaqItem, Faqs } from '@/components/faq';+import { FeatureCardContainer } from '@/components/feature-card';+import { SectionHeader } from '@/components/section';+import { Button } from '@/components/ui/button';+import { Input } from '@/components/ui/input';+import { API_URL } from '@/lib/api-url';+import { cn } from '@/lib/utils';interface SiteCheckResult {url: string;@@ -106,7 +106,9 @@ export default function SiteCheckerPage() {const handleSubmit = async (e: React.FormEvent) => {e.preventDefault();- if (!url.trim()) return;+ if (!url.trim()) {+ return;+ }setLoading(true);setError(null);@@ -171,15 +173,15 @@ export default function SiteCheckerPage() {status?: 'pass' | 'fail' | 'warning' | 'info';helpText?: string;}) => (- <div className="flex items-start gap-3 py-3 border-b last:border-b-0">- <div className="flex-1 min-w-0">- <div className="flex items-center gap-2 mb-1">- <span className="text-sm font-medium">{label}</span>+ <div className="flex items-start gap-3 border-b py-3 last:border-b-0">+ <div className="min-w-0 flex-1">+ <div className="mb-1 flex items-center gap-2">+ <span className="font-medium text-sm">{label}</span>{status && <StatusIcon status={status} />}</div>- <div className="text-sm text-muted-foreground break-words">{value}</div>+ <div className="break-words text-muted-foreground text-sm">{value}</div>{helpText && (- <div className="text-xs text-muted-foreground mt-1">{helpText}</div>+ <div className="mt-1 text-muted-foreground text-xs">{helpText}</div>)}</div></div>@@ -195,23 +197,23 @@ export default function SiteCheckerPage() {return (<div className="max-w-4xl"><SectionHeader- title="URL Checker"+ as="h1"description="Analyze any website for SEO, social media, technical, and security information. Get comprehensive insights about any URL."+ title="URL Checker"variant="default"- as="h1"/>- <form onSubmit={handleSubmit} className="mt-8">+ <form className="mt-8" onSubmit={handleSubmit}><div className="flex gap-2"><Input- type="url"- placeholder="https://example.com"- value={url}- onChange={(e) => setUrl(e.target.value)}className="flex-1"+ onChange={(e) => setUrl(e.target.value)}+ placeholder="https://example.com"size="lg"+ type="url"+ value={url}/>- <Button type="submit" disabled={loading} size="lg">+ <Button disabled={loading} size="lg" type="submit">{loading ? (<><Loader2 className="size-4 animate-spin" />@@ -230,18 +232,18 @@ export default function SiteCheckerPage() {{error && (<divclassName={cn(- 'mt-4 p-4 rounded-lg border',+ 'mt-4 rounded-lg border p-4',isRateLimited- ? 'bg-amber-500/10 border-amber-500/20 text-amber-600 dark:text-amber-400'- : 'bg-destructive/10 border-destructive/20 text-destructive'+ ? 'border-amber-500/20 bg-amber-500/10 text-amber-600 dark:text-amber-400'+ : 'border-destructive/20 bg-destructive/10 text-destructive')}><div className="flex items-start gap-2">- <AlertCircle className="size-5 mt-0.5 flex-shrink-0" />+ <AlertCircle className="mt-0.5 size-5 flex-shrink-0" /><div className="flex-1"><div className="font-medium">{error}</div>{isRateLimited && (- <div className="text-sm mt-1 opacity-90">+ <div className="mt-1 text-sm opacity-90">You can make up to 10 requests per minute. Please try againshortly.</div>@@ -258,43 +260,43 @@ export default function SiteCheckerPage() {<div className="flex items-center gap-2"><span className="font-medium">Final URL</span></div>- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><img- src={`https://api.openpanel.dev/misc/favicon?url=${encodeURIComponent(result.finalUrl)}`}alt="Favicon"className="size-4 rounded-xs"+ src={`https://api.openpanel.dev/misc/favicon?url=${encodeURIComponent(result.finalUrl)}`}/><a+ className="flex items-center gap-1 break-all text-muted-foreground text-sm hover:text-foreground"href={result.finalUrl}- target="_blank"rel="noopener noreferrer"- className="text-sm text-muted-foreground hover:text-foreground flex items-center gap-1 break-all"+ target="_blank">{result.finalUrl}<ExternalLink className="size-3" /></a></div>{result.url !== result.finalUrl && (- <div className="text-xs text-muted-foreground mt-1">+ <div className="mt-1 text-muted-foreground text-xs">Redirected from: {result.url}</div>)}</FeatureCardContainer>{/* Tabs */}- <div className="border-b mb-6">+ <div className="mb-6 border-b"><div className="flex gap-2 overflow-x-auto">{tabs.map((tab) => (<button- type="button"- key={tab.id}- onClick={() => setActiveTab(tab.id)}className={cn(- 'flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors',+ 'flex items-center gap-2 border-b-2 px-4 py-2 font-medium text-sm transition-colors',activeTab === tab.id? 'border-foreground text-foreground': 'border-transparent text-muted-foreground hover:text-foreground')}+ key={tab.id}+ onClick={() => setActiveTab(tab.id)}+ type="button">{tab.icon}{tab.label}@@ -307,8 +309,8 @@ export default function SiteCheckerPage() {{activeTab === 'seo' && (<div className="space-y-4"><InfoRow+ helpText={`${result.seo.title.length} characters (recommended: 30-60)`}label="Title"- value={result.seo.title.value || 'Not set'}status={result.seo.title.length > 0? result.seo.title.length >= 30 &&@@ -317,11 +319,11 @@ export default function SiteCheckerPage() {: 'warning': 'fail'}- helpText={`${result.seo.title.length} characters (recommended: 30-60)`}+ value={result.seo.title.value || 'Not set'}/><InfoRow+ helpText={`${result.seo.description.length} characters (recommended: 120-160)`}label="Meta Description"- value={result.seo.description.value || 'Not set'}status={result.seo.description.length > 0? result.seo.description.length >= 120 &&@@ -330,18 +332,32 @@ export default function SiteCheckerPage() {: 'warning': 'fail'}- helpText={`${result.seo.description.length} characters (recommended: 120-160)`}+ value={result.seo.description.value || 'Not set'}/><InfoRowlabel="Canonical URL"- value={result.seo.canonical || 'Not set'}status={result.seo.canonical ? 'pass' : 'warning'}+ value={result.seo.canonical || 'Not set'}/><InfoRow+ helpText={+ result.seo.h1.length === 0+ ? 'No H1 tag found'+ : result.seo.h1.length > 1+ ? 'Multiple H1 tags found (recommended: 1)'+ : 'One H1 tag found'+ }label="H1 Tags"+ status={+ result.seo.h1.length === 1+ ? 'pass'+ : result.seo.h1.length === 0+ ? 'fail'+ : 'warning'+ }value={result.seo.h1.length > 0 ? (- <ul className="list-disc list-inside space-y-1">+ <ul className="list-inside list-disc space-y-1">{result.seo.h1.map((h1) => (<li key={h1}>{h1}</li>))}@@ -350,35 +366,14 @@ export default function SiteCheckerPage() {'Not found')}- status={- result.seo.h1.length === 1- ? 'pass'- : result.seo.h1.length === 0- ? 'fail'- : 'warning'- }- helpText={- result.seo.h1.length === 0- ? 'No H1 tag found'- : result.seo.h1.length > 1- ? 'Multiple H1 tags found (recommended: 1)'- : 'One H1 tag found'- }/><InfoRowlabel="Robots Meta"- value={result.seo.robotsMeta || 'Not set'}status={result.seo.robotsMeta ? 'info' : 'pass'}+ value={result.seo.robotsMeta || 'Not set'}/><InfoRowlabel="Robots.txt"- value={- result.seo.robotsTxtStatus === 'allowed'- ? 'Allowed'- : result.seo.robotsTxtStatus === 'blocked'- ? 'Blocked'- : 'Error checking'- }status={result.seo.robotsTxtStatus === 'allowed'? 'pass'@@ -386,16 +381,23 @@ export default function SiteCheckerPage() {? 'fail': 'warning'}+ value={+ result.seo.robotsTxtStatus === 'allowed'+ ? 'Allowed'+ : result.seo.robotsTxtStatus === 'blocked'+ ? 'Blocked'+ : 'Error checking'+ }/><InfoRow- label="Sitemap"- value={result.seo.hasSitemap ? 'Found' : 'Not found'}- status={result.seo.hasSitemap ? 'pass' : 'warning'}helpText={result.seo.hasSitemap? '/sitemap.xml exists': '/sitemap.xml not found'}+ label="Sitemap"+ status={result.seo.hasSitemap ? 'pass' : 'warning'}+ value={result.seo.hasSitemap ? 'Found' : 'Not found'}/></div>)}@@ -406,59 +408,60 @@ export default function SiteCheckerPage() {{/* Preview Card */}<div><div className="mb-4">- <h3 className="text-lg font-semibold mb-2">+ <h3 className="mb-2 font-semibold text-lg">Social Media Preview</h3>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">See how your link will appear when shared on social mediaplatforms</p></div><div className="max-w-md"><SocialPreview- title={- result.social.og.title ||- result.social.twitter.title ||- result.seo.title.value- }description={result.social.og.description ||result.social.twitter.description ||result.seo.description.value}+ domain={new URL(result.finalUrl).hostname}image={result.social.og.image || result.social.twitter.image}+ title={+ result.social.og.title ||+ result.social.twitter.title ||+ result.seo.title.value+ }url={result.finalUrl}- domain={new URL(result.finalUrl).hostname}/></div></div><div className="mb-4">- <h3 className="text-lg font-semibold mb-3">+ <h3 className="mb-3 font-semibold text-lg">Open Graph Details</h3><div className="space-y-2"><InfoRowlabel="OG Title"- value={result.social.og.title || 'Not set'}status={result.social.og.title ? 'pass' : 'warning'}+ value={result.social.og.title || 'Not set'}/><InfoRowlabel="OG Description"- value={result.social.og.description || 'Not set'}status={result.social.og.description ? 'pass' : 'warning'}+ value={result.social.og.description || 'Not set'}/><InfoRowlabel="OG Image"+ status={result.social.og.image ? 'pass' : 'warning'}value={result.social.og.image ? (<a+ className="flex items-center gap-1 text-primary hover:underline"href={result.social.og.image}- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline flex items-center gap-1"+ target="_blank">{result.social.og.image}<ExternalLink className="size-3" />@@ -467,52 +470,52 @@ export default function SiteCheckerPage() {'Not set')}- status={result.social.og.image ? 'pass' : 'warning'}/><InfoRowlabel="OG URL"- value={result.social.og.url || 'Not set'}status={result.social.og.url ? 'pass' : 'warning'}+ value={result.social.og.url || 'Not set'}/><InfoRowlabel="OG Type"- value={result.social.og.type || 'Not set'}status={result.social.og.type ? 'pass' : 'warning'}+ value={result.social.og.type || 'Not set'}/></div></div><div>- <h3 className="text-lg font-semibold mb-3">+ <h3 className="mb-3 font-semibold text-lg">Twitter Card Details</h3><div className="space-y-2"><InfoRowlabel="Card Type"- value={result.social.twitter.card || 'Not set'}status={result.social.twitter.card ? 'pass' : 'warning'}+ value={result.social.twitter.card || 'Not set'}/><InfoRowlabel="Twitter Title"- value={result.social.twitter.title || 'Not set'}status={result.social.twitter.title ? 'pass' : 'warning'}+ value={result.social.twitter.title || 'Not set'}/><InfoRowlabel="Twitter Description"- value={result.social.twitter.description || 'Not set'}status={result.social.twitter.description ? 'pass' : 'warning'}+ value={result.social.twitter.description || 'Not set'}/><InfoRowlabel="Twitter Image"+ status={result.social.twitter.image ? 'pass' : 'warning'}value={result.social.twitter.image ? (<a+ className="flex items-center gap-1 text-primary hover:underline"href={result.social.twitter.image}- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline flex items-center gap-1"+ target="_blank">{result.social.twitter.image}<ExternalLink className="size-3" />@@ -521,7 +524,6 @@ export default function SiteCheckerPage() {'Not set')}- status={result.social.twitter.image ? 'pass' : 'warning'}/></div></div>@@ -533,6 +535,15 @@ export default function SiteCheckerPage() {<div className="space-y-4"><InfoRowlabel="HTTP Status"+ status={+ result.technical.statusCode >= 200 &&+ result.technical.statusCode < 300+ ? 'pass'+ : result.technical.statusCode >= 300 &&+ result.technical.statusCode < 400+ ? 'warning'+ : 'fail'+ }value={<spanclassName={cn(@@ -549,24 +560,15 @@ export default function SiteCheckerPage() {{result.technical.statusCode}</span>}- status={- result.technical.statusCode >= 200 &&- result.technical.statusCode < 300- ? 'pass'- : result.technical.statusCode >= 300 &&- result.technical.statusCode < 400- ? 'warning'- : 'fail'- }/>{result.technical.redirectChain.length > 0 && (<div>- <div className="font-medium mb-2">Redirect Chain</div>+ <div className="mb-2 font-medium">Redirect Chain</div><div className="space-y-2">{result.technical.redirectChain.map((hop, i) => (<div+ className="flex items-center gap-2 rounded bg-accent p-2 text-sm"key={hop.url}- className="flex items-center gap-2 text-sm p-2 bg-accent rounded"><span className="font-mono text-xs">{hop.status}</span><span className="flex-1 truncate">{hop.url}</span>@@ -580,11 +582,11 @@ export default function SiteCheckerPage() {)}{/* Detailed Response Time Breakdown */}<FeatureCardContainer className="space-y-3">- <div className="flex items-center justify-between mb-3">+ <div className="mb-3 flex items-center justify-between"><h4 className="font-semibold">Response Time Breakdown</h4><spanclassName={cn(- 'text-lg font-bold',+ 'font-bold text-lg',result.technical.responseTime.total < 1000? 'text-emerald-600 dark:text-emerald-400': result.technical.responseTime.total < 3000@@ -626,7 +628,7 @@ export default function SiteCheckerPage() {{result.technical.responseTime.ttfb}ms</span></div>- <div className="pt-2 border-t">+ <div className="border-t pt-2"><div className="flex items-center justify-between"><span className="font-medium">Total</span><span className="font-mono font-semibold">@@ -638,26 +640,27 @@ export default function SiteCheckerPage() {</FeatureCardContainer><InfoRowlabel="Content Type"- value={result.technical.contentType}status="info"+ value={result.technical.contentType}/><InfoRowlabel="Page Size"- value={`${(result.technical.pageSize / 1024).toFixed(2)} KB`}status="info"+ value={`${(result.technical.pageSize / 1024).toFixed(2)} KB`}/><InfoRowlabel="Server"- value={result.technical.server || 'Not detected'}status="info"+ value={result.technical.server || 'Not detected'}/>{result.technical.ssl && (<InfoRowlabel="SSL Certificate"+ status={result.technical.ssl.valid ? 'pass' : 'fail'}value={<div><div>Issuer: {result.technical.ssl.issuer}</div>- <div className="text-xs text-muted-foreground mt-1">+ <div className="mt-1 text-muted-foreground text-xs">Expires:{' '}{new Date(result.technical.ssl.expires@@ -665,26 +668,26 @@ export default function SiteCheckerPage() {</div></div>}- status={result.technical.ssl.valid ? 'pass' : 'fail'}/>)}{/* Server IP & Hosting Info */}{result.hosting.ip && (<FeatureCardContainer className="space-y-3">- <div className="flex items-center gap-2 mb-3">+ <div className="mb-3 flex items-center gap-2"><Globe className="size-5" /><h4 className="font-semibold">Server IP & Hosting</h4></div><InfoRowlabel="IP Address"- value={result.hosting.ip}status="info"+ value={result.hosting.ip}/>{result.hosting.location && (<InfoRowlabel="Location"+ status="info"value={<div>{result.hosting.location.city &&@@ -696,7 +699,7 @@ export default function SiteCheckerPage() {{`, ${result.hosting.location.country}`}{result.hosting.location.latitude &&result.hosting.location.longitude && (- <div className="text-xs text-muted-foreground mt-1">+ <div className="mt-1 text-muted-foreground text-xs">{result.hosting.location.latitude.toFixed(4)}@@ -712,50 +715,49 @@ export default function SiteCheckerPage() {)}</div>}- status="info"/>)}{result.hosting.isp && (<InfoRowlabel="ISP"- value={result.hosting.isp}status="info"+ value={result.hosting.isp}/>)}{result.hosting.asn && (<InfoRowlabel="ASN"- value={result.hosting.asn}status="info"+ value={result.hosting.asn}/>)}{result.hosting.organization && (<InfoRowlabel="Organization"- value={result.hosting.organization}status="info"+ value={result.hosting.organization}/>)}{result.hosting.cdn && (<InfoRowlabel="CDN"- value={result.hosting.cdn}status="pass"+ value={result.hosting.cdn}/>)}- <div className="pt-2 border-t text-xs text-muted-foreground space-y-2">+ <div className="space-y-2 border-t pt-2 text-muted-foreground text-xs"><div><strong>Location data:</strong> Powered by{' '}<a+ className="text-primary hover:underline"href="https://www.maxmind.com/en/geoip2-services-and-databases"- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline"+ target="_blank">MaxMind GeoLite2</a>{' '}@@ -765,10 +767,10 @@ export default function SiteCheckerPage() {<div><strong>Network data:</strong> ISP/ASN information from{' '}<a+ className="text-primary hover:underline"href="https://ip-api.com"- target="_blank"rel="noopener noreferrer"- className="text-primary hover:underline"+ target="_blank">ip-api.com</a>@@ -781,8 +783,8 @@ export default function SiteCheckerPage() {{!result.hosting.ip && (<InfoRowlabel="Server IP"- value="Not resolved"status="warning"+ value="Not resolved"/>)}</div>@@ -792,14 +794,14 @@ export default function SiteCheckerPage() {{activeTab === 'security' && (<div className="space-y-4"><FeatureCardContainer className="mb-4">- <div className="flex items-center gap-2 mb-2">+ <div className="mb-2 flex items-center gap-2"><Shield className="size-5" /><span className="font-semibold">Security Score</span></div>- <div className="text-3xl font-bold">+ <div className="font-bold text-3xl">{result.security.score}/100</div>- <div className="w-full bg-muted rounded-full h-2 mt-2">+ <div className="mt-2 h-2 w-full rounded-full bg-muted"><divclassName={cn('h-2 rounded-full transition-all',@@ -815,18 +817,22 @@ export default function SiteCheckerPage() {</FeatureCardContainer><InfoRow- label="Content-Security-Policy"- value={result.security.csp || 'Not set'}- status={result.security.csp ? 'pass' : 'fail'}helpText={result.security.csp? 'CSP header is present': 'CSP header is missing'}+ label="Content-Security-Policy"+ status={result.security.csp ? 'pass' : 'fail'}+ value={result.security.csp || 'Not set'}/><InfoRow+ helpText={+ result.security.xFrameOptions+ ? 'Protects against clickjacking'+ : 'Missing X-Frame-Options header'+ }label="X-Frame-Options"- value={result.security.xFrameOptions || 'Not set'}status={result.security.xFrameOptions? result.security.xFrameOptions.toLowerCase() === 'deny' ||@@ -836,15 +842,16 @@ export default function SiteCheckerPage() {: 'warning': 'fail'}- helpText={- result.security.xFrameOptions- ? 'Protects against clickjacking'- : 'Missing X-Frame-Options header'- }+ value={result.security.xFrameOptions || 'Not set'}/><InfoRow+ helpText={+ result.security.xContentTypeOptions?.toLowerCase() ===+ 'nosniff'+ ? 'Prevents MIME type sniffing'+ : 'Missing or incorrect X-Content-Type-Options header'+ }label="X-Content-Type-Options"- value={result.security.xContentTypeOptions || 'Not set'}status={result.security.xContentTypeOptions?.toLowerCase() ==='nosniff'@@ -853,22 +860,17 @@ export default function SiteCheckerPage() {? 'warning': 'fail'}- helpText={- result.security.xContentTypeOptions?.toLowerCase() ===- 'nosniff'- ? 'Prevents MIME type sniffing'- : 'Missing or incorrect X-Content-Type-Options header'- }+ value={result.security.xContentTypeOptions || 'Not set'}/><InfoRow- label="Strict-Transport-Security (HSTS)"- value={result.security.hsts || 'Not set'}- status={result.security.hsts ? 'pass' : 'warning'}helpText={result.security.hsts? 'Forces HTTPS connections': 'HSTS header is missing (only applies to HTTPS sites)'}+ label="Strict-Transport-Security (HSTS)"+ status={result.security.hsts ? 'pass' : 'warning'}+ value={result.security.hsts || 'Not set'}/></div>)}@@ -876,13 +878,13 @@ export default function SiteCheckerPage() {)}{/* SEO Content Section */}- <div className="mt-16 prose prose-neutral dark:prose-invert max-w-none">+ <div className="prose prose-neutral dark:prose-invert mt-16 max-w-none"><article className="space-y-8"><div>- <h2 className="text-3xl font-bold mb-4">+ <h2 className="mb-4 font-bold text-3xl">Free URL Checker & Website Analysis Tool</h2>- <p className="text-lg text-muted-foreground mb-6">+ <p className="mb-6 text-lg text-muted-foreground">Check any URL for SEO issues, security problems, and performancebottlenecks. Our free site checker analyzes meta tags, socialpreviews, security headers, and server configuration in seconds.@@ -890,14 +892,14 @@ export default function SiteCheckerPage() {</div><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">What This URL Checker Analyzes</h3><p className="mb-4">Paste any URL and get a complete breakdown of how the pageperforms across four critical areas:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><strong>SEO Health:</strong> Title tags, meta descriptions, H1tags, canonical URLs, and indexability status@@ -918,21 +920,21 @@ export default function SiteCheckerPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">SEO Analysis</h3>+ <h3 className="mb-4 font-semibold text-2xl">SEO Analysis</h3>- <h4 className="text-xl font-semibold mt-6 mb-3">Title Tags</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">Title Tags</h4><p className="mb-4">Title tags appear in search results and browser tabs. They're oneof the strongest on-page ranking signals. Our URL checker verifiesyour title is:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li>Between 30-60 characters (optimal for search display)</li><li>Present and not empty</li><li>Unique and descriptive</li></ul>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Meta Descriptions</h4><p className="mb-4">@@ -942,14 +944,14 @@ export default function SiteCheckerPage() {clicks.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">H1 Tags</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">H1 Tags</h4><p className="mb-4">Each page should have exactly one H1 tag that clearly describesthe page content. Our checker flags missing H1s and helps ensureproper heading structure.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">Canonical URLs</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">Canonical URLs</h4><p className="mb-4">Canonical tags prevent duplicate content issues by telling searchengines which URL version is authoritative. This matters for pages@@ -957,7 +959,7 @@ export default function SiteCheckerPage() {and www/non-www variants.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">Indexability</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">Indexability</h4><p className="mb-4">The checker analyzes robots.txt rules and meta robots tags todetermine if search engines can crawl and index your page. You'll@@ -966,7 +968,7 @@ export default function SiteCheckerPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Social Media Previews</h3><p className="mb-4">@@ -975,12 +977,12 @@ export default function SiteCheckerPage() {guess—often poorly.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">Open Graph Tags</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">Open Graph Tags</h4><p className="mb-4">Open Graph controls how links display on Facebook, LinkedIn, andmost other platforms. Essential tags include:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><code>og:title</code> — Title shown in the share card</li>@@ -995,11 +997,11 @@ export default function SiteCheckerPage() {</li></ul>- <h4 className="text-xl font-semibold mt-6 mb-3">Twitter Cards</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">Twitter Cards</h4><p className="mb-4">Twitter uses its own card format. Our site checker verifies:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><code>twitter:card</code> — Card type (summary orsummary_large_image)@@ -1014,12 +1016,12 @@ export default function SiteCheckerPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">Performance Metrics</h3>+ <h3 className="mb-4 font-semibold text-2xl">Performance Metrics</h3><p className="mb-4">Page speed affects both user experience and search rankings. OurURL checker breaks down exactly where time is spent:</p>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li><strong>DNS Lookup:</strong> Time to resolve domain to IPaddress. Slow DNS? Consider a faster provider or DNS caching.@@ -1043,7 +1045,7 @@ export default function SiteCheckerPage() {</li></ul>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Server Information</h4><p className="mb-4">@@ -1054,13 +1056,13 @@ export default function SiteCheckerPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">Security Analysis</h3>+ <h3 className="mb-4 font-semibold text-2xl">Security Analysis</h3><p className="mb-4">Security headers protect your site and visitors from commonattacks. Our checker evaluates four critical headers:</p>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Content Security Policy (CSP)</h4><p className="mb-4">@@ -1069,13 +1071,13 @@ export default function SiteCheckerPage() {blocks inline execution.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">X-Frame-Options</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">X-Frame-Options</h4><p className="mb-4">Prevents clickjacking by controlling whether your page can beembedded in iframes. Set to DENY or SAMEORIGIN for protection.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">X-Content-Type-Options</h4><p className="mb-4">@@ -1083,7 +1085,7 @@ export default function SiteCheckerPage() {sniffing, which can lead to security vulnerabilities.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Strict-Transport-Security (HSTS)</h4><p className="mb-4">@@ -1091,7 +1093,7 @@ export default function SiteCheckerPage() {Essential for sites handling any sensitive data.</p>- <h4 className="text-xl font-semibold mt-6 mb-3">SSL Certificate</h4>+ <h4 className="mt-6 mb-3 font-semibold text-xl">SSL Certificate</h4><p className="mb-4">The checker verifies your SSL certificate is valid, trusted, andnot expiring soon. Expired certificates trigger browser warnings@@ -1100,10 +1102,10 @@ export default function SiteCheckerPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">How to Use This Website Checker</h3>- <ol className="list-decimal list-inside space-y-3 mb-6 ml-4">+ <ol className="mb-6 ml-4 list-inside list-decimal space-y-3"><li><strong>Enter a URL:</strong> Paste any web address (with orwithout https://)@@ -1128,12 +1130,12 @@ export default function SiteCheckerPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Quick Optimization Checklist</h3>- <h4 className="text-xl font-semibold mt-6 mb-3">SEO Essentials</h4>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <h4 className="mt-6 mb-3 font-semibold text-xl">SEO Essentials</h4>+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li>Unique title tag (30-60 characters) on every page</li><li>Compelling meta description (120-160 characters)</li><li>Single, descriptive H1 tag</li>@@ -1141,16 +1143,16 @@ export default function SiteCheckerPage() {<li>Page is indexable (no accidental noindex)</li></ul>- <h4 className="text-xl font-semibold mt-6 mb-3">Performance</h4>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Performance</h4>+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li>TTFB under 200ms</li><li>Use a CDN for global reach</li><li>Enable compression (gzip/brotli)</li><li>Optimize images and enable caching</li></ul>- <h4 className="text-xl font-semibold mt-6 mb-3">Security</h4>- <ul className="list-disc list-inside space-y-2 mb-6 ml-4">+ <h4 className="mt-6 mb-3 font-semibold text-xl">Security</h4>+ <ul className="mb-6 ml-4 list-inside list-disc space-y-2"><li>Valid SSL certificate (not expiring soon)</li><li>All four security headers configured</li><li>HSTS enabled for HTTPS enforcement</li>@@ -1158,7 +1160,7 @@ export default function SiteCheckerPage() {</section><section>- <h3 className="text-2xl font-semibold mb-4">+ <h3 className="mb-4 font-semibold text-2xl">Frequently Asked Questions</h3>@@ -1205,8 +1207,8 @@ export default function SiteCheckerPage() {</Faqs></section>- <section className="border-t pt-8 mt-8">- <h3 className="text-2xl font-semibold mb-4">+ <section className="mt-8 border-t pt-8">+ <h3 className="mb-4 font-semibold text-2xl">Start Checking URLs Now</h3><p className="mb-6">diff --git a/apps/public/src/app/tools/url-checker/social-preview.tsx b/apps/public/src/app/tools/url-checker/social-preview.tsxindex 653b4971a..735ed6c53 100644--- a/apps/public/src/app/tools/url-checker/social-preview.tsx+++ b/apps/public/src/app/tools/url-checker/social-preview.tsx@@ -20,24 +20,23 @@ export function SocialPreview({const hasImage = !!image;return (- <div className="border border-border rounded-lg overflow-hidden bg-card shadow-sm">+ <div className="overflow-hidden rounded-lg border border-border bg-card shadow-sm">{/* Platform header */}- <div className="px-3 py-2 bg-muted border-b border-border flex items-center gap-2">+ <div className="flex items-center gap-2 border-border border-b bg-muted px-3 py-2"><img- src={`https://api.openpanel.dev/misc/favicon?url=${encodeURIComponent(url)}`}alt="Favicon"className="size-4"+ src={`https://api.openpanel.dev/misc/favicon?url=${encodeURIComponent(url)}`}/>- <span className="text-xs font-semibold text-foreground">{domain}</span>+ <span className="font-semibold text-foreground text-xs">{domain}</span></div>{/* Image */}{hasImage ? (- <div className="relative w-full aspect-[1.91/1] bg-muted">+ <div className="relative aspect-[1.91/1] w-full bg-muted"><img- src={image}alt=""- className="w-full h-full object-cover"+ className="h-full w-full object-cover"onError={(e) => {const target = e.target as HTMLImageElement;target.style.display = 'none';@@ -47,26 +46,27 @@ export function SocialPreview({'<div class="w-full h-full flex items-center justify-center text-muted-foreground text-sm">Image failed to load</div>';}}}+ src={image}/></div>) : (- <div className="w-full aspect-[1.91/1] bg-muted flex items-center justify-center">+ <div className="flex aspect-[1.91/1] w-full items-center justify-center bg-muted"><span className="text-muted-foreground text-sm">No image</span></div>)}{/* Content */}- <div className="p-3 space-y-1">- <div className="text-xs text-muted-foreground uppercase tracking-wide">+ <div className="space-y-1 p-3">+ <div className="text-muted-foreground text-xs uppercase tracking-wide">{domain}</div>- <div className="text-base font-semibold text-foreground line-clamp-2">+ <div className="line-clamp-2 font-semibold text-base text-foreground">{displayTitle}</div>- <div className="text-sm text-muted-foreground line-clamp-2">+ <div className="line-clamp-2 text-muted-foreground text-sm">{displayDescription}</div>- <div className="flex items-center gap-1 text-xs text-muted-foreground pt-1">+ <div className="flex items-center gap-1 pt-1 text-muted-foreground text-xs"><ExternalLink className="size-3" /><span className="truncate">{url}</span></div>diff --git a/apps/public/src/components/article-card.tsx b/apps/public/src/components/article-card.tsxindex b936136a3..262111b78 100644--- a/apps/public/src/components/article-card.tsx+++ b/apps/public/src/components/article-card.tsx@@ -18,23 +18,23 @@ export function ArticleCard({}) {return (<Link+ className="col overflow-hidden rounded-lg border bg-background-light transition-all duration-300 hover:scale-105 hover:shadow-background-dark hover:shadow-lg"href={url}key={url}- className="border rounded-lg overflow-hidden bg-background-light col hover:scale-105 transition-all duration-300 hover:shadow-lg hover:shadow-background-dark"><Image- src={cover}alt={title}- width={323}- height={181}className="w-full"+ height={181}+ src={cover}+ width={323}/>- <span className="p-4 col flex-1">- {tag && <span className="font-mono text-xs mb-2">{tag}</span>}- <span className="flex-1 mb-6">- <h2 className="text-xl font-semibold">{title}</h2>+ <span className="col flex-1 p-4">+ {tag && <span className="mb-2 font-mono text-xs">{tag}</span>}+ <span className="mb-6 flex-1">+ <h2 className="font-semibold text-xl">{title}</h2></span>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">{[team, date.toLocaleDateString()].filter(Boolean).join(' · ')}</p></span>diff --git a/apps/public/src/components/competition.tsx b/apps/public/src/components/competition.tsxindex b4ea58882..0ff38c0e7 100644--- a/apps/public/src/components/competition.tsx+++ b/apps/public/src/components/competition.tsx@@ -45,31 +45,31 @@ export function Competition() {if (!mounted) {return (- <span className="block truncate leading-tight -mt-1" style={{ color }}>+ <span className="-mt-1 block truncate leading-tight" style={{ color }}>{word}</span>);}return (- <AnimatePresence mode="wait" initial={false}>+ <AnimatePresence initial={false} mode="wait"><motion.div+ className="-mt-1 block truncate leading-tight"key={word}- className="block truncate leading-tight -mt-1"style={{ color }}>{word?.split('').map((char, index) => (<motion.span- key={`${word}-${char}-${index.toString()}`}- initial={{ y: 10, opacity: 0 }}animate={{ y: 0, opacity: 1 }}exit={{ y: -10, opacity: 0 }}+ initial={{ y: 10, opacity: 0 }}+ key={`${word}-${char}-${index.toString()}`}+ style={{ display: 'inline-block', whiteSpace: 'pre' }}transition={{duration: 0.15,delay: index * 0.015,ease: 'easeOut',}}- style={{ display: 'inline-block', whiteSpace: 'pre' }}>{char}</motion.span>diff --git a/apps/public/src/components/eu-flag.tsx b/apps/public/src/components/eu-flag.tsxindex 85c3da06a..f04282224 100644--- a/apps/public/src/components/eu-flag.tsx+++ b/apps/public/src/components/eu-flag.tsx@@ -27,8 +27,8 @@ export function EuFlag({ className }: { className?: string }) {{STARS.map((s, i) => (<polygon// biome-ignore lint/suspicious/noArrayIndexKey: static data- key={i}fill="#FFCC00"+ key={i}points={star(s.x, s.y, 1.1, 0.45)}/>))}diff --git a/apps/public/src/components/feature-card.tsx b/apps/public/src/components/feature-card.tsxindex c11f424ab..83651f38d 100644--- a/apps/public/src/components/feature-card.tsx+++ b/apps/public/src/components/feature-card.tsx@@ -1,7 +1,7 @@import type { LucideIcon } from 'lucide-react';import Link from 'next/link';-import { cn } from '@/lib/utils';import { FeatureCardHoverTrack } from '@/components/feature-card-hover-track';+import { cn } from '@/lib/utils';interface FeatureCardProps {link?: {diff --git a/apps/public/src/components/figure.tsx b/apps/public/src/components/figure.tsxindex a5e6196f9..8802397a1 100644--- a/apps/public/src/components/figure.tsx+++ b/apps/public/src/components/figure.tsx@@ -1,5 +1,5 @@-import { cn } from '@/lib/utils';import Image from 'next/image';+import { cn } from '@/lib/utils';export function Figure({src,@@ -15,13 +15,13 @@ export function Figure({return (<figure className={cn('-mx-4', className)}><Image- src={src}alt={alt || caption}- width={1200}- height={800}className="rounded-lg"+ height={800}+ src={src}+ width={1200}/>- <figcaption className="text-center text-sm text-muted-foreground mt-2">+ <figcaption className="mt-2 text-center text-muted-foreground text-sm">{caption}</figcaption></figure>diff --git a/apps/public/src/components/flow-step.tsx b/apps/public/src/components/flow-step.tsxindex 60fce38d8..8060ef2bc 100644--- a/apps/public/src/components/flow-step.tsx+++ b/apps/public/src/components/flow-step.tsx@@ -45,15 +45,15 @@ export function FlowStep({const Icon = iconMap[icon];return (- <div className="relative flex gap-4 mb-4 min-w-0">+ <div className="relative mb-4 flex min-w-0 gap-4">{/* Step number and icon */}- <div className="flex flex-col items-center shrink-0">+ <div className="flex shrink-0 flex-col items-center"><div className="relative z-10 bg-background">- <div className="flex items-center justify-center size-10 rounded-full bg-primary text-primary-foreground font-semibold text-sm shadow-sm">+ <div className="flex size-10 items-center justify-center rounded-full bg-primary font-semibold text-primary-foreground text-sm shadow-sm">{step}</div><div- className={`absolute -bottom-2 -right-2 flex items-center justify-center w-6 h-6 rounded-full bg-background border shadow-sm ${iconBorderColorMap[icon] || 'border-primary'}`}+ className={`absolute -right-2 -bottom-2 flex h-6 w-6 items-center justify-center rounded-full border bg-background shadow-sm ${iconBorderColorMap[icon] || 'border-primary'}`}><IconclassName={`size-3.5 ${iconColorMap[icon] || 'text-primary'}`}@@ -62,14 +62,14 @@ export function FlowStep({</div>{/* Connector line - extends from badge through content to next step */}{!isLast && (- <div className="w-0.5 bg-border mt-2 flex-1 min-h-[2rem]" />+ <div className="mt-2 min-h-[2rem] w-0.5 flex-1 bg-border" />)}</div>{/* Content */}- <div className="flex-1 pt-1 min-w-0">+ <div className="min-w-0 flex-1 pt-1"><div className="mb-2">- <span className="font-semibold text-foreground mr-2">{actor}:</span>{' '}+ <span className="mr-2 font-semibold text-foreground">{actor}:</span>{' '}<span className="text-muted-foreground">{description}</span></div>{children && <div className="mt-3 min-w-0">{children}</div>}diff --git a/apps/public/src/components/github-button.tsx b/apps/public/src/components/github-button.tsxindex f9e1a3167..be9b9036d 100644--- a/apps/public/src/components/github-button.tsx+++ b/apps/public/src/components/github-button.tsx@@ -1,7 +1,7 @@-import { getGithubRepoInfo } from '@/lib/github';import Link from 'next/link';import { useEffect, useState } from 'react';import { Button } from './ui/button';+import { getGithubRepoInfo } from '@/lib/github';function formatStars(stars: number) {if (stars >= 1000) {@@ -12,7 +12,7 @@ function formatStars(stars: number) {}export function GithubButton() {- const [stars, setStars] = useState(4_800);+ const [stars, setStars] = useState(4800);useEffect(() => {getGithubRepoInfo().then((res) => {if (res?.stargazers_count) {@@ -21,18 +21,18 @@ export function GithubButton() {});}, []);return (- <Button variant={'secondary'} asChild>- <Link href="https://git.new/openpanel" className="hidden md:flex">+ <Button asChild variant={'secondary'}>+ <Link className="hidden md:flex" href="https://git.new/openpanel"><svg- className="w-5 h-5"+ aria-hidden="true"+ className="h-5 w-5"fill="currentColor"viewBox="0 0 24 24"- aria-hidden="true"><path- fillRule="evenodd"- d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"clipRule="evenodd"+ d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"+ fillRule="evenodd"/></svg>{formatStars(stars)} starsdiff --git a/apps/public/src/components/guide-card.tsx b/apps/public/src/components/guide-card.tsxindex 613a41d19..55946066c 100644--- a/apps/public/src/components/guide-card.tsx+++ b/apps/public/src/components/guide-card.tsx@@ -33,32 +33,32 @@ export function GuideCard({}) {return (<Link+ className="col overflow-hidden rounded-lg border bg-background-light transition-all duration-300 hover:scale-105 hover:shadow-background-dark hover:shadow-lg"href={url}key={url}- className="border rounded-lg overflow-hidden bg-background-light col hover:scale-105 transition-all duration-300 hover:shadow-lg hover:shadow-background-dark"><Image- src={cover}alt={title}- width={323}- height={181}className="w-full"+ height={181}+ src={cover}+ width={323}/>- <span className="p-4 col flex-1">- <div className="flex items-center gap-2 mb-2">+ <span className="col flex-1 p-4">+ <div className="mb-2 flex items-center gap-2"><span- className={`font-mono text-xs px-2 py-1 rounded ${difficultyColors[difficulty]}`}+ className={`rounded px-2 py-1 font-mono text-xs ${difficultyColors[difficulty]}`}>{difficultyLabels[difficulty]}</span>- <span className="text-xs text-muted-foreground">+ <span className="text-muted-foreground text-xs">{timeToComplete} min</span></div>- <span className="flex-1 mb-6">- <h2 className="text-xl font-semibold">{title}</h2>+ <span className="mb-6 flex-1">+ <h2 className="font-semibold text-xl">{title}</h2></span>- <p className="text-sm text-muted-foreground">+ <p className="text-muted-foreground text-sm">{[team, date.toLocaleDateString()].filter(Boolean).join(' · ')}</p></span>diff --git a/apps/public/src/components/illustrations/conversions.tsx b/apps/public/src/components/illustrations/conversions.tsxindex 44db4fab0..e72d385b5 100644--- a/apps/public/src/components/illustrations/conversions.tsx+++ b/apps/public/src/components/illustrations/conversions.tsx@@ -7,7 +7,7 @@ const variantB = [28, 30, 32, 35, 38, 37, 40, 42, 44, 43, 47, 50];export function ConversionsIllustration() {return (- <div className="h-full col gap-3 px-4 pb-3 pt-5">+ <div className="col h-full gap-3 px-4 pt-5 pb-3">{/* A/B variant cards */}<div className="row gap-3"><div className="col flex-1 gap-1 rounded-xl border bg-card p-3 transition-all duration-300 group-hover:-translate-y-0.5">@@ -30,7 +30,7 @@ export function ConversionsIllustration() {Variant B ↑</span></div>- <span className="font-bold font-mono text-xl text-emerald-500">+ <span className="font-bold font-mono text-emerald-500 text-xl">41.2%</span><SimpleChart@@ -44,7 +44,7 @@ export function ConversionsIllustration() {{/* Breakdown label */}<div className="col gap-1 rounded-xl border bg-card/60 px-3 py-2.5">- <span className="text-[9px] uppercase tracking-wider text-muted-foreground">+ <span className="text-[9px] text-muted-foreground uppercase tracking-wider">Breakdown by experiment variant</span><div className="row items-center gap-2">diff --git a/apps/public/src/components/illustrations/data-ownership.tsx b/apps/public/src/components/illustrations/data-ownership.tsxindex 69d16ef9f..8a828167f 100644--- a/apps/public/src/components/illustrations/data-ownership.tsx+++ b/apps/public/src/components/illustrations/data-ownership.tsx@@ -1,5 +1,3 @@-import React from 'react';-type IllustrationProps = {className?: string;};@@ -12,15 +10,8 @@ export function DataOwnershipIllustration({{/* Main layout */}<div className="relative grid aspect-2/1 grid-cols-5 gap-3">{/* Left: your server card */}- <div- className="- col-span-3 rounded-2xl border border-border bg-card/80- p-3 sm:p-4 shadow-xl backdrop-blur- transition-all duration-300- group-hover:-translate-y-1 group-hover:-translate-x-0.5- "- >- <div className="flex items-center justify-between text-xs text-foreground">+ <div className="col-span-3 rounded-2xl border border-border bg-card/80 p-3 shadow-xl backdrop-blur transition-all duration-300 group-hover:-translate-x-0.5 group-hover:-translate-y-1 sm:p-4">+ <div className="flex items-center justify-between text-foreground text-xs"><span>Your server</span><span className="flex items-center gap-1 rounded-full bg-card/80 px-2 py-0.5 text-[10px] text-blue-300"><span className="h-1.5 w-1.5 rounded-full bg-blue-400" />@@ -31,15 +22,15 @@ export function DataOwnershipIllustration({{/* "Server" visual */}<div className="mt-3 space-y-2"><div className="flex gap-1.5">- <div className="flex-1 rounded-xl bg-card/80 border border-border px-3 py-2">+ <div className="flex-1 rounded-xl border border-border bg-card/80 px-3 py-2"><p className="text-[10px] text-muted-foreground">Region</p>- <p className="text-xs font-medium text-foreground">+ <p className="font-medium text-foreground text-xs">EU / Custom</p></div>- <div className="flex-1 rounded-xl bg-card/80 border border-border px-3 py-2">+ <div className="flex-1 rounded-xl border border-border bg-card/80 px-3 py-2"><p className="text-[10px] text-muted-foreground">Retention</p>- <p className="text-xs font-medium text-foreground">+ <p className="font-medium text-foreground text-xs">Configurable</p></div>@@ -74,15 +65,8 @@ export function DataOwnershipIllustration({</div>{/* Right: third-party contrast */}- <div- className="- col-span-2 rounded-2xl border border-border/80 bg-card/40- p-3 text-[11px] text-muted-foreground- transition-all duration-300- group-hover:translate-y-1 group-hover:translate-x-0.5 group-hover:opacity-70- "- >- <p className="text-xs text-muted-foreground mb-2">or use our cloud</p>+ <div className="col-span-2 rounded-2xl border border-border/80 bg-card/40 p-3 text-[11px] text-muted-foreground transition-all duration-300 group-hover:translate-x-0.5 group-hover:translate-y-1 group-hover:opacity-70">+ <p className="mb-2 text-muted-foreground text-xs">or use our cloud</p><ul className="space-y-1.5"><li className="flex items-center gap-1.5">diff --git a/apps/public/src/components/illustrations/mcp.tsx b/apps/public/src/components/illustrations/mcp.tsxindex d870f3a34..68b52865a 100644--- a/apps/public/src/components/illustrations/mcp.tsx+++ b/apps/public/src/components/illustrations/mcp.tsx@@ -34,8 +34,8 @@ function ThinkingDots() {<div className="flex items-center gap-1 px-1 py-0.5">{[0, 1, 2].map((i) => (<span+ className="inline-block size-1.5 animate-bounce rounded-full bg-white/30"key={i}- className="inline-block size-1.5 rounded-full bg-white/30 animate-bounce"style={{ animationDelay: `${i * 150}ms`, animationDuration: '900ms' }}/>))}@@ -63,7 +63,7 @@ function ToolCard({><div className="rounded-xl border border-[#d97757]/25 bg-[#d97757]/8 px-3 py-2.5"><div className="mb-2 flex items-center gap-1.5">- <span className="inline-block size-1.5 rounded-full bg-[#d97757] animate-pulse" />+ <span className="inline-block size-1.5 animate-pulse rounded-full bg-[#d97757]" /><span className="font-mono font-semibold text-[#d97757] text-[9px]">{tool.name}</span>@@ -103,15 +103,17 @@ function StreamingText({ text, done }: { text: string; done: boolean }) {const rendered: ReactNode[] = [];for (const seg of segments) {- if (remaining <= 0) break;+ if (remaining <= 0) {+ break;+ }const visible = seg.content.slice(0, remaining);remaining -= seg.content.length;if (seg.highlight === 'white') {rendered.push(<span- key={seg.content}className={done ? 'font-semibold text-white/90' : 'text-white/70'}+ key={seg.content}>{visible}</span>@@ -119,8 +121,8 @@ function StreamingText({ text, done }: { text: string; done: boolean }) {} else if (seg.highlight === 'emerald') {rendered.push(<span- key={seg.content}className={done ? 'font-semibold text-emerald-400' : 'text-white/70'}+ key={seg.content}>{visible}</span>@@ -134,7 +136,7 @@ function StreamingText({ text, done }: { text: string; done: boolean }) {<p className="text-[10px] text-white/70 leading-relaxed">{rendered}{!done && (- <span className="ml-0.5 inline-block h-3 w-px bg-white/60 animate-pulse align-middle" />+ <span className="ml-0.5 inline-block h-3 w-px animate-pulse bg-white/60 align-middle" />)}</p>);@@ -162,19 +164,27 @@ export function McpIllustration() {setCharCount(0);await sleep(1000);- if (cancelledRef.current) return;+ if (cancelledRef.current) {+ return;+ }setPhase('thinking');await sleep(900);- if (cancelledRef.current) return;+ if (cancelledRef.current) {+ return;+ }setPhase('tool1');await sleep(800);- if (cancelledRef.current) return;+ if (cancelledRef.current) {+ return;+ }setPhase('tool2');await sleep(700);- if (cancelledRef.current) return;+ if (cancelledRef.current) {+ return;+ }setPhase('streaming');// Stream chars two at a time@@ -182,7 +192,9 @@ export function McpIllustration() {setCharCount(Math.min(i, RESPONSE.length));await sleep(22);}- if (cancelledRef.current) return;+ if (cancelledRef.current) {+ return;+ }setCharCount(RESPONSE.length);setPhase('done');@@ -194,7 +206,9 @@ export function McpIllustration() {return () => {cancelledRef.current = true;- if (currentTimer) clearTimeout(currentTimer);+ if (currentTimer) {+ clearTimeout(currentTimer);+ }};}, []);@@ -261,8 +275,8 @@ export function McpIllustration() {{/* Tool calls */}<div className="col gap-2">- <ToolCard tool={toolCalls[0]!} visible={showTool1} dim={false} />- <ToolCard tool={toolCalls[1]!} visible={showTool2} dim={false} />+ <ToolCard dim={false} tool={toolCalls[0]!} visible={showTool1} />+ <ToolCard dim={false} tool={toolCalls[1]!} visible={showTool2} /></div>{/* Streaming response */}@@ -275,8 +289,8 @@ export function McpIllustration() {}}><StreamingText- text={RESPONSE.slice(0, charCount)}done={phase === 'done'}+ text={RESPONSE.slice(0, charCount)}/></div></div>diff --git a/apps/public/src/components/illustrations/privacy.tsx b/apps/public/src/components/illustrations/privacy.tsxindex 6b46d52e0..911f4d2d6 100644--- a/apps/public/src/components/illustrations/privacy.tsx+++ b/apps/public/src/components/illustrations/privacy.tsx@@ -1,5 +1,3 @@-import React from 'react';-type IllustrationProps = {className?: string;};@@ -10,15 +8,8 @@ export function PrivacyIllustration({ className = '' }: IllustrationProps) {{/* Floating cards */}<div className="relative aspect-3/2 md:aspect-2/1">{/* Back card */}- <div- className="- absolute top-0 left-0 right-10 bottom-10 rounded-2xl border border-border/80 bg-card/70- backdrop-blur-sm shadow-lg- transition-all duration-300- group-hover:-translate-y-1 group-hover:-rotate-2- "- >- <div className="flex items-center justify-between px-4 pt-3 text-xs text-muted-foreground">+ <div className="absolute top-0 right-10 bottom-10 left-0 rounded-2xl border border-border/80 bg-card/70 shadow-lg backdrop-blur-sm transition-all duration-300 group-hover:-translate-y-1 group-hover:-rotate-2">+ <div className="flex items-center justify-between px-4 pt-3 text-muted-foreground text-xs"><span>Session duration</span><span className="flex items-center gap-1">3m 12s@@ -29,45 +20,37 @@ export function PrivacyIllustration({ className = '' }: IllustrationProps) {{/* Simple line chart */}<div className="mt-3 px-4"><svg- viewBox="0 0 120 40"className="h-16 w-full text-muted-foreground"+ viewBox="0 0 120 40"><path+ className="opacity-60"d="M2 32 L22 18 L40 24 L60 10 L78 16 L96 8 L118 14"fill="none"stroke="currentColor"- strokeWidth="2"strokeLinecap="round"- className="opacity-60"+ strokeWidth="2"/>- <circle cx="118" cy="14" r="2.5" className="fill-blue-400" />+ <circle className="fill-blue-400" cx="118" cy="14" r="2.5" /></svg></div></div>{/* Front card */}- <div- className="- col- absolute top-10 left-4 right-0 bottom-0 rounded-2xl border border-border/80- bg-card shadow-xl- transition-all duration-300- group-hover:translate-y-1 group-hover:rotate-2- "- >- <div className="flex items-center justify-between px-4 pt-3 text-xs text-foreground">+ <div className="col absolute top-10 right-0 bottom-0 left-4 rounded-2xl border border-border/80 bg-card shadow-xl transition-all duration-300 group-hover:translate-y-1 group-hover:rotate-2">+ <div className="flex items-center justify-between px-4 pt-3 text-foreground text-xs"><span>Anonymous visitors</span>- <span className="text-[10px] rounded-full bg-card px-2 py-0.5 text-muted-foreground">+ <span className="rounded-full bg-card px-2 py-0.5 text-[10px] text-muted-foreground">No cookies</span></div><div className="flex items-end justify-between px-4 pt-4 pb-3"><div>- <p className="text-[11px] text-muted-foreground mb-1">+ <p className="mb-1 text-[11px] text-muted-foreground">Active now</p>- <p className="text-2xl font-semibold text-foreground">128</p>+ <p className="font-semibold text-2xl text-foreground">128</p></div><div className="space-y-1.5 text-[10px] text-muted-foreground"><div className="flex items-center gap-1.5">@@ -82,12 +65,12 @@ export function PrivacyIllustration({ className = '' }: IllustrationProps) {</div>{/* "Sources" row */}- <div className="mt-auto flex gap-2 border-t border-border px-3 py-2.5 text-[11px]">- <div className="flex-1 rounded-xl bg-card/90 px-3 py-1.5 flex items-center justify-between">+ <div className="mt-auto flex gap-2 border-border border-t px-3 py-2.5 text-[11px]">+ <div className="flex flex-1 items-center justify-between rounded-xl bg-card/90 px-3 py-1.5"><span className="text-muted-foreground">Direct</span><span className="text-foreground">42%</span></div>- <div className="flex-1 rounded-xl bg-card/90 px-3 py-1.5 flex items-center justify-between">+ <div className="flex flex-1 items-center justify-between rounded-xl bg-card/90 px-3 py-1.5"><span className="text-muted-foreground">Organic</span><span className="text-foreground">58%</span></div>diff --git a/apps/public/src/components/illustrations/product-analytics.tsx b/apps/public/src/components/illustrations/product-analytics.tsxindex 7ef1efa85..1c9b23f42 100644--- a/apps/public/src/components/illustrations/product-analytics.tsx+++ b/apps/public/src/components/illustrations/product-analytics.tsx@@ -1,10 +1,6 @@'use client';-import { cn } from '@/lib/utils';import { ResponsiveFunnel } from '@nivo/funnel';-import NumberFlow from '@number-flow/react';-import { AnimatePresence, motion, useSpring } from 'framer-motion';import { useTheme } from 'next-themes';-import { useEffect, useState } from 'react';function useFunnelSteps() {const { resolvedTheme } = useTheme();@@ -12,7 +8,7 @@ function useFunnelSteps() {{id: 'Visitors',label: 'Visitors',- value: 10000,+ value: 10_000,percentage: 100,color: resolvedTheme === 'dark' ? '#333' : '#888',},@@ -46,7 +42,6 @@ export const PartLabel = ({ part }: { part: any }) => {return (<g transform={`translate(${part.x}, ${part.y})`}><text- textAnchor="middle"dominantBaseline="central"style={{fill: resolvedTheme === 'dark' ? '#fff' : '#000',@@ -54,6 +49,7 @@ export const PartLabel = ({ part }: { part: any }) => {fontSize: 12,fontWeight: 500,}}+ textAnchor="middle">{part.data.label}</text>@@ -77,24 +73,24 @@ function FunnelVisualization() {}));return (- <div className="w-full h-full">+ <div className="h-full w-full"><ResponsiveFunnel- data={nivoData}- margin={{ top: 20, right: 0, bottom: 20, left: 0 }}- direction="horizontal"- shapeBlending={0.6}- colors={colors}- enableBeforeSeparators={false}- enableAfterSeparators={false}- beforeSeparatorLength={0}afterSeparatorLength={0}afterSeparatorOffset={0}+ beforeSeparatorLength={0}beforeSeparatorOffset={0}- currentPartSizeExtension={5}borderWidth={20}+ colors={colors}currentBorderWidth={15}- tooltip={() => null}+ currentPartSizeExtension={5}+ data={nivoData}+ direction="horizontal"+ enableAfterSeparators={false}+ enableBeforeSeparators={false}layers={['parts', Labels]}+ margin={{ top: 20, right: 0, bottom: 20, left: 0 }}+ shapeBlending={0.6}+ tooltip={() => null}/></div>);diff --git a/apps/public/src/components/illustrations/retention.tsx b/apps/public/src/components/illustrations/retention.tsxindex 47a95916b..8279f236c 100644--- a/apps/public/src/components/illustrations/retention.tsx+++ b/apps/public/src/components/illustrations/retention.tsx@@ -20,36 +20,36 @@ function cellStyle(v: number | null) {const opacity = 0.12 + (v / 100) * 0.7;return {backgroundColor: `rgba(34, 197, 94, ${opacity})`,- borderColor: `rgba(34, 197, 94, 0.3)`,+ borderColor: 'rgba(34, 197, 94, 0.3)',color: v > 55 ? 'rgba(0,0,0,0.75)' : 'var(--foreground)',};}export function RetentionIllustration() {return (- <div className="h-full px-4 pb-3 pt-5">+ <div className="h-full px-4 pt-5 pb-3"><div className="col h-full gap-1.5"><div className="row gap-1"><div className="w-12 shrink-0" />{headers.map((h) => (<div- key={h}className="flex-1 text-center text-[9px] text-muted-foreground"+ key={h}>{h}</div>))}</div>{cohorts.map(({ label, values }) => (- <div key={label} className="row flex-1 gap-1">+ <div className="row flex-1 gap-1" key={label}><div className="flex w-12 shrink-0 items-center text-[9px] text-muted-foreground">{label}</div>{values.map((v, i) => (<div// biome-ignore lint/suspicious/noArrayIndexKey: static data+ className="flex flex-1 items-center justify-center rounded border font-medium text-[9px] transition-all duration-300 group-hover:scale-[1.03]"key={i}- className="flex flex-1 items-center justify-center rounded border text-[9px] font-medium transition-all duration-300 group-hover:scale-[1.03]"style={cellStyle(v)}>{v !== null ? `${v}%` : '—'}diff --git a/apps/public/src/components/illustrations/revenue.tsx b/apps/public/src/components/illustrations/revenue.tsxindex 8b2d37d73..5fe7db3aa 100644--- a/apps/public/src/components/illustrations/revenue.tsx+++ b/apps/public/src/components/illustrations/revenue.tsx@@ -13,14 +13,14 @@ const referrers = [export function RevenueIllustration() {return (- <div className="h-full col gap-3 px-4 pb-3 pt-5">+ <div className="col h-full gap-3 px-4 pt-5 pb-3">{/* MRR stat + chart */}<div className="row gap-3"><div className="col gap-1 rounded-xl border bg-card p-3 transition-all duration-300 group-hover:-translate-y-0.5">- <span className="text-[9px] uppercase tracking-wider text-muted-foreground">+ <span className="text-[9px] text-muted-foreground uppercase tracking-wider">MRR</span>- <span className="font-bold font-mono text-xl text-emerald-500">+ <span className="font-bold font-mono text-emerald-500 text-xl">$8,420</span><span className="text-[9px] text-emerald-500">↑ 12% this month</span>@@ -41,29 +41,29 @@ export function RevenueIllustration() {{/* Revenue by referrer */}<div className="flex-1 overflow-hidden rounded-xl border bg-card">- <div className="row border-b border-border px-3 py-1.5">- <span className="flex-1 text-[8px] uppercase tracking-wider text-muted-foreground">+ <div className="row border-border border-b px-3 py-1.5">+ <span className="flex-1 text-[8px] text-muted-foreground uppercase tracking-wider">Referrer</span>- <span className="text-[8px] uppercase tracking-wider text-muted-foreground">+ <span className="text-[8px] text-muted-foreground uppercase tracking-wider">Revenue</span></div>{referrers.map((r) => (<div- className="row items-center gap-2 border-b border-border/50 px-3 py-1.5 last:border-0"+ className="row items-center gap-2 border-border/50 border-b px-3 py-1.5 last:border-0"key={r.name}>- <span className="text-[9px] text-muted-foreground flex-none w-20 truncate">+ <span className="w-20 flex-none truncate text-[9px] text-muted-foreground">{r.name}</span>- <div className="flex-1 h-1 rounded-full bg-muted overflow-hidden">+ <div className="h-1 flex-1 overflow-hidden rounded-full bg-muted"><divclassName="h-1 rounded-full bg-emerald-500/70"style={{ width: `${r.pct}%` }}/></div>- <span className="font-mono text-[9px] text-emerald-500 flex-none">+ <span className="flex-none font-mono text-[9px] text-emerald-500">{r.amount}</span></div>diff --git a/apps/public/src/components/illustrations/session-replay.tsx b/apps/public/src/components/illustrations/session-replay.tsxindex 1dff9a00f..4745f155a 100644--- a/apps/public/src/components/illustrations/session-replay.tsx+++ b/apps/public/src/components/illustrations/session-replay.tsx@@ -2,10 +2,10 @@ import { PlayIcon } from 'lucide-react';export function SessionReplayIllustration() {return (- <div className="session-replay-illustration h-full px-6 pb-3 pt-4">+ <div className="session-replay-illustration h-full px-6 pt-4 pb-3"><div className="col h-full overflow-hidden rounded-xl border border-border bg-background shadow-lg transition-transform duration-300 group-hover:-translate-y-0.5">{/* Browser chrome */}- <div className="row shrink-0 items-center gap-1.5 border-b border-border bg-muted/30 px-3 py-2">+ <div className="row shrink-0 items-center gap-1.5 border-border border-b bg-muted/30 px-3 py-2"><div className="h-2 w-2 rounded-full bg-red-400" /><div className="h-2 w-2 rounded-full bg-yellow-400" /><div className="h-2 w-2 rounded-full bg-green-400" />@@ -49,7 +49,7 @@ export function SessionReplayIllustration() {{/* Cursor */}<div- className="cursor-animated absolute"+ className="absolute cursor-animated"style={{left: 'calc(18% + 8px)',top: 'calc(22% + 6px)',@@ -81,11 +81,11 @@ export function SessionReplayIllustration() {</div>{/* Playback bar */}- <div className="row shrink-0 items-center gap-2 border-t border-border bg-muted/20 px-3 py-2">+ <div className="row shrink-0 items-center gap-2 border-border border-t bg-muted/20 px-3 py-2"><PlayIcon className="size-3 shrink-0 text-muted-foreground" />- <div className="relative flex-1 h-1 overflow-hidden rounded-full bg-muted">+ <div className="relative h-1 flex-1 overflow-hidden rounded-full bg-muted"><div- className="absolute left-0 top-0 h-1 rounded-full bg-blue-500"+ className="absolute top-0 left-0 h-1 rounded-full bg-blue-500"style={{ width: '42%' }}/></div>diff --git a/apps/public/src/components/illustrations/web-analytics.tsx b/apps/public/src/components/illustrations/web-analytics.tsxindex 328881c6d..7b2aec257 100644--- a/apps/public/src/components/illustrations/web-analytics.tsx+++ b/apps/public/src/components/illustrations/web-analytics.tsx@@ -11,7 +11,7 @@ const STATS = [{ label: 'Visitors', value: 4128, formatted: null, change: 12, up: true },{label: 'Page views',- value: 12438,+ value: 12_438,formatted: '12.4k',change: 8,up: true,@@ -101,7 +101,7 @@ export function WebAnalyticsIllustration() {}, []);return (- <div className="aspect-video col gap-2.5 p-5">+ <div className="col aspect-video gap-2.5 p-5">{/* Header */}<div className="row items-center justify-between"><div className="row items-center gap-1.5">@@ -109,7 +109,7 @@ export function WebAnalyticsIllustration() {<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75" /><span className="relative inline-flex h-1.5 w-1.5 rounded-full bg-emerald-500" /></span>- <span className="text-[10px] font-medium text-muted-foreground">+ <span className="font-medium text-[10px] text-muted-foreground"><NumberFlow value={liveVisitors} /> online now</span></div>@@ -144,7 +144,7 @@ export function WebAnalyticsIllustration() {</div>{/* Area chart */}- <div className="flex-1 col gap-1 overflow-hidden rounded-xl border bg-card px-3 pt-2 pb-1">+ <div className="col flex-1 gap-1 overflow-hidden rounded-xl border bg-card px-3 pt-2 pb-1"><span className="text-[8px] text-muted-foreground">Unique visitors</span>diff --git a/apps/public/src/components/infinite-moving-cards.tsx b/apps/public/src/components/infinite-moving-cards.tsxindex 580c771a6..2dfbc8b6e 100644--- a/apps/public/src/components/infinite-moving-cards.tsx+++ b/apps/public/src/components/infinite-moving-cards.tsx@@ -1,7 +1,7 @@// Thank you: https://ui.aceternity.com/components/infinite-moving-cards-import { cn } from '@/lib/utils';import React, { useEffect, useState } from 'react';+import { cn } from '@/lib/utils';export const InfiniteMovingCards = <T,>({items,@@ -71,23 +71,23 @@ export const InfiniteMovingCards = <T,>({return (<div- ref={containerRef}className={cn(- 'scroller relative z-20 overflow-hidden -ml-4 md:-ml-[1200px] w-screen md:w-[calc(100vw+1400px)]',+ 'scroller relative z-20 -ml-4 w-screen overflow-hidden md:-ml-[1200px] md:w-[calc(100vw+1400px)]',className)}+ ref={containerRef}><ul- ref={scrollerRef}className={cn(- 'flex min-w-full shrink-0 gap-8 py-4 w-max flex-nowrap items-start',+ 'flex w-max min-w-full shrink-0 flex-nowrap items-start gap-8 py-4',start && 'animate-scroll',pauseOnHover && 'hover:[animation-play-state:paused]')}+ ref={scrollerRef}>{items.map((item, idx) => (<li- className="w-[310px] max-w-full relative shrink-0 md:w-[400px]"+ className="relative w-[310px] max-w-full shrink-0 md:w-[400px]"key={idx.toString()}>{renderItem(item, idx)}diff --git a/apps/public/src/components/logo.tsx b/apps/public/src/components/logo.tsxindex 60c1d69c3..6017b0a7f 100644--- a/apps/public/src/components/logo.tsx+++ b/apps/public/src/components/logo.tsx@@ -3,29 +3,29 @@ import { cn } from '@/lib/utils';export function Logo({ className }: { className?: string }) {return (<svg+ className={cn('w-16 text-black dark:text-white', className)}+ fill="currentColor"viewBox="0 0 61 35"xmlns="http://www.w3.org/2000/svg"- fill="currentColor"- className={cn('text-black dark:text-white w-16', className)}><rect- x="34.0269"- y="0.368164"- width="10.3474"height="34.2258"rx="5.17372"+ width="10.3474"+ x="34.0269"+ y="0.368164"/><rect- x="49.9458"- y="0.368164"- width="10.3474"height="17.5109"rx="5.17372"+ width="10.3474"+ x="49.9458"+ y="0.368164"/><path- fillRule="evenodd"clipRule="evenodd"d="M14.212 0C6.36293 0 0 6.36293 0 14.212V20.02C0 27.8691 6.36293 34.232 14.212 34.232C22.0611 34.232 28.424 27.8691 28.424 20.02V14.212C28.424 6.36293 22.0611 0 14.212 0ZM14.2379 8.35999C11.3805 8.35999 9.06419 10.6763 9.06419 13.5337V20.6971C9.06419 23.5545 11.3805 25.8708 14.2379 25.8708C17.0953 25.8708 19.4116 23.5545 19.4116 20.6971V13.5337C19.4116 10.6763 17.0953 8.35999 14.2379 8.35999Z"+ fillRule="evenodd"/></svg>);diff --git a/apps/public/src/components/navbar.tsx b/apps/public/src/components/navbar.tsxindex bf848dfb4..f3a64d55c 100644--- a/apps/public/src/components/navbar.tsx+++ b/apps/public/src/components/navbar.tsx@@ -9,7 +9,7 @@ import { GithubButton } from './github-button';import { Logo } from './logo';import { SignUpButton } from './sign-up-button';import { Button } from './ui/button';-import { baseOptions, siteName } from '@/lib/layout.shared';+import { siteName } from '@/lib/layout.shared';import { cn } from '@/lib/utils';const LINKS = [diff --git a/apps/public/src/components/perks.tsx b/apps/public/src/components/perks.tsxindex 87f8140be..7815e4bc1 100644--- a/apps/public/src/components/perks.tsx+++ b/apps/public/src/components/perks.tsx@@ -1,6 +1,6 @@+import type { LucideIcon } from 'lucide-react';import type React from 'react';import { cn } from '@/lib/utils';-import type { LucideIcon } from 'lucide-react';type PerkIcon = LucideIcon | React.ComponentType<{ className?: string }>;@@ -14,8 +14,8 @@ export function Perks({return (<ul className={cn('grid grid-cols-2 gap-2', className)}>{perks.map((perk) => (- <li key={perk.text} className="text-sm text-muted-foreground">- <perk.icon className="size-4 inline-block mr-2 relative -top-px" />+ <li className="text-muted-foreground text-sm" key={perk.text}>+ <perk.icon className="relative -top-px mr-2 inline-block size-4" />{perk.text}</li>))}diff --git a/apps/public/src/components/pricing-slider.tsx b/apps/public/src/components/pricing-slider.tsxindex 1eb3ca6f7..259a9cf16 100644--- a/apps/public/src/components/pricing-slider.tsx+++ b/apps/public/src/components/pricing-slider.tsx@@ -1,10 +1,9 @@'use client';import NumberFlow from '@number-flow/react';--import { cn } from '@/lib/utils';import { PRICING } from '@openpanel/payments/prices';import { useState } from 'react';import { Slider } from './ui/slider';+import { cn } from '@/lib/utils';export function PricingSlider() {const [index, setIndex] = useState(2);@@ -14,15 +13,15 @@ export function PricingSlider() {return (<><Slider- value={[index]}max={PRICING.length}+ onValueChange={(value) => setIndex(value[0])}step={1}tooltip={match? `${formatNumber(match.events)} events per month`: `More than ${formatNumber(PRICING[PRICING.length - 1].events)} events`}- onValueChange={(value) => setIndex(value[0])}+ value={[index]}/>{match ? (@@ -30,7 +29,6 @@ export function PricingSlider() {<div><NumberFlowclassName="text-5xl"- value={match.price}format={{style: 'currency',currency: 'USD',@@ -38,12 +36,13 @@ export function PricingSlider() {maximumFractionDigits: 1,}}locales={'en-US'}+ value={match.price}/>- <span className="text-sm text-muted-foreground ml-2">/ month</span>+ <span className="ml-2 text-muted-foreground text-sm">/ month</span></div><spanclassName={cn(- 'text-sm text-muted-foreground italic opacity-100',+ 'text-muted-foreground text-sm italic opacity-100',match.price === 0 && 'opacity-0')}>diff --git a/apps/public/src/components/section.tsx b/apps/public/src/components/section.tsxindex aaf5d590a..3aa9965ce 100644--- a/apps/public/src/components/section.tsx+++ b/apps/public/src/components/section.tsx@@ -11,7 +11,7 @@ export function Section({id?: string;}) {return (- <section id={id} className={cn('my-32 col', className)} {...props}>+ <section className={cn('col my-32', className)} id={id} {...props}>{children}</section>);@@ -55,7 +55,7 @@ export function SectionHeader({{title}</Heading>{description && (- <p className={cn('text-muted-foreground max-w-3xl')}>{description}</p>+ <p className={cn('max-w-3xl text-muted-foreground')}>{description}</p>)}</div>);@@ -71,7 +71,7 @@ export function SectionLabel({return (<spanclassName={cn(- 'text-xs uppercase tracking-wider text-muted-foreground font-medium',+ 'font-medium text-muted-foreground text-xs uppercase tracking-wider',className)}>diff --git a/apps/public/src/components/simple-chart.tsx b/apps/public/src/components/simple-chart.tsxindex 3e15ea763..8e88dcb51 100644--- a/apps/public/src/components/simple-chart.tsx+++ b/apps/public/src/components/simple-chart.tsx@@ -1,5 +1,3 @@-import { useMemo } from 'react';-interface SimpleChartProps {width?: number;height?: number;@@ -18,7 +16,9 @@ export function SimpleChart({className,}: SimpleChartProps) {// Skip if no points- if (!points.length) return null;+ if (!points.length) {+ return null;+ }// Calculate scaling factorsconst maxValue = Math.max(...points);@@ -45,8 +45,8 @@ export function SimpleChart({return (<svg- viewBox={`0 0 ${width} ${height}`}className={`w-full ${className ?? ''}`}+ viewBox={`0 0 ${width} ${height}`}><defs><linearGradient id={gradientId} x1="0" x2="0" y1="0" y2="1">diff --git a/apps/public/src/components/tag.tsx b/apps/public/src/components/tag.tsxindex d812f48da..2a22aae02 100644--- a/apps/public/src/components/tag.tsx+++ b/apps/public/src/components/tag.tsx@@ -1,14 +1,14 @@+import { cva, type VariantProps } from 'class-variance-authority';import { cn } from '@/lib/utils';-import { type VariantProps, cva } from 'class-variance-authority';const tagVariants = cva(- 'shadow-sm px-4 gap-2 center-center border self-auto text-xs rounded-full h-7',+ 'center-center h-7 gap-2 self-auto rounded-full border px-4 text-xs shadow-sm',{variants: {variant: {light:- 'bg-background-light dark:bg-background-dark text-muted-foreground',- dark: 'bg-foreground-light dark:bg-foreground-dark text-muted border-background/10 shadow-background/5',+ 'bg-background-light text-muted-foreground dark:bg-background-dark',+ dark: 'border-background/10 bg-foreground-light text-muted shadow-background/5 dark:bg-foreground-dark',},},defaultVariants: {diff --git a/apps/public/src/components/toc.tsx b/apps/public/src/components/toc.tsxindex 99e7502ba..b9dc21608 100644--- a/apps/public/src/components/toc.tsx+++ b/apps/public/src/components/toc.tsx@@ -10,20 +10,20 @@ interface Props {export const Toc: React.FC<Props> = ({ toc }) => {return (<FeatureCardContainer className="gap-2">- <span className="text-lg font-semibold">Table of contents</span>+ <span className="font-semibold text-lg">Table of contents</span><ul>{toc.map((item) => (<li- key={item.url}className="py-1"+ key={item.url}style={{ marginLeft: `${(item.depth - 2) * (4 * 4)}px` }}><Link+ className="row group/toc-item items-center gap-2 hover:underline"href={item.url}- className="hover:underline row gap-2 items-center group/toc-item"title={item.title?.toString() ?? ''}>- <ArrowRightIcon className="shrink-0 w-4 h-4 opacity-30 group-hover/toc-item:opacity-100 transition-opacity" />+ <ArrowRightIcon className="h-4 w-4 shrink-0 opacity-30 transition-opacity group-hover/toc-item:opacity-100" /><span className="truncate text-sm">{item.title}</span></Link></li>diff --git a/apps/public/src/components/twitter-card.tsx b/apps/public/src/components/twitter-card.tsxindex 00b0350f1..58e3b7966 100644--- a/apps/public/src/components/twitter-card.tsx+++ b/apps/public/src/components/twitter-card.tsx@@ -1,6 +1,5 @@import {BadgeIcon,- CheckCheckIcon,CheckIcon,HeartIcon,MessageCircleIcon,@@ -36,7 +35,7 @@ export function TwitterCard({if (Array.isArray(content) && typeof content[0] === 'string') {return content.map((line) => (- <p key={line} className="text-sm">+ <p className="text-sm" key={line}>{line}</p>));@@ -46,11 +45,11 @@ export function TwitterCard({};return (- <div className="border rounded-3xl p-8 col gap-4 bg-background-light">+ <div className="col gap-4 rounded-3xl border bg-background-light p-8"><div className="row gap-4">- <div className="size-12 rounded-full bg-muted overflow-hidden shrink-0">+ <div className="size-12 shrink-0 overflow-hidden rounded-full bg-muted">{avatarUrl && (- <Image src={avatarUrl} alt={name} width={48} height={48} />+ <Image alt={name} height={48} src={avatarUrl} width={48} />)}</div><div className="col gap-4">@@ -58,9 +57,9 @@ export function TwitterCard({<div className=""><span className="font-medium">{name}</span>{verified && (- <div className="relative inline-block top-0.5 ml-1">+ <div className="relative top-0.5 ml-1 inline-block"><BadgeIcon className="size-4 fill-[#1D9BF0] text-[#1D9BF0]" />- <div className="absolute inset-0 center-center">+ <div className="center-center absolute inset-0"><CheckIcon className="size-2 text-white" strokeWidth={3} /></div></div>@@ -73,15 +72,15 @@ export function TwitterCard({{renderContent()}<div className="row gap-4 text-muted-foreground text-sm"><div className="row gap-2">- <MessageCircleIcon className="transition-all size-4 fill-background hover:fill-blue-500 hover:text-blue-500" />+ <MessageCircleIcon className="size-4 fill-background transition-all hover:fill-blue-500 hover:text-blue-500" />{/* <span>{replies}</span> */}</div><div className="row gap-2">- <RefreshCwIcon className="transition-all size-4 fill-background hover:text-blue-500" />+ <RefreshCwIcon className="size-4 fill-background transition-all hover:text-blue-500" />{/* <span>{retweets}</span> */}</div><div className="row gap-2">- <HeartIcon className="transition-all size-4 fill-background hover:fill-rose-500 hover:text-rose-500" />+ <HeartIcon className="size-4 fill-background transition-all hover:fill-rose-500 hover:text-rose-500" />{/* <span>{likes}</span> */}</div></div>diff --git a/apps/public/src/components/ui/accordion.tsx b/apps/public/src/components/ui/accordion.tsxindex bf8888a32..66c044727 100644--- a/apps/public/src/components/ui/accordion.tsx+++ b/apps/public/src/components/ui/accordion.tsx@@ -1,9 +1,8 @@import * as AccordionPrimitive from '@radix-ui/react-accordion';import { ChevronDown } from 'lucide-react';import type * as React from 'react';--import { cn } from '@/lib/utils';import { FeatureCardBackground } from '../feature-card';+import { cn } from '@/lib/utils';const Accordion = AccordionPrimitive.Root;@@ -15,8 +14,8 @@ const AccordionItem = ({ref?: React.RefObject<React.ElementRef<typeof AccordionPrimitive.Item>>;}) => (<AccordionPrimitive.Item- ref={ref}className={cn('border-b last:border-b-0', className)}+ ref={ref}{...props}/>);@@ -30,13 +29,13 @@ const AccordionTrigger = ({}: React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {ref?: React.RefObject<React.ElementRef<typeof AccordionPrimitive.Trigger>>;}) => (- <AccordionPrimitive.Header className="flex not-prose">+ <AccordionPrimitive.Header className="not-prose flex"><AccordionPrimitive.Trigger- ref={ref}className={cn(- 'group relative overflow-hidden flex flex-1 items-center justify-between py-4 font-medium transition-all [&[data-state=open]>svg]:rotate-180 cursor-pointer',+ 'group relative flex flex-1 cursor-pointer items-center justify-between overflow-hidden py-4 font-medium transition-all [&[data-state=open]>svg]:rotate-180',className)}+ ref={ref}{...props}><FeatureCardBackground />@@ -56,13 +55,13 @@ const AccordionContent = ({ref?: React.RefObject<React.ElementRef<typeof AccordionPrimitive.Content>>;}) => (<AccordionPrimitive.Content+ className="overflow-hidden text-muted-foreground transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"ref={ref}- className="overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down text-muted-foreground"{...props}><divclassName={cn(- 'pb-4 pt-0 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0',+ 'pt-0 pb-4 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0',className)}>diff --git a/apps/public/src/components/ui/button.tsx b/apps/public/src/components/ui/button.tsxindex 3744dadfd..40fdf4023 100644--- a/apps/public/src/components/ui/button.tsx+++ b/apps/public/src/components/ui/button.tsx@@ -1,11 +1,10 @@import { Slot } from '@radix-ui/react-slot';-import { type VariantProps, cva } from 'class-variance-authority';+import { cva, type VariantProps } from 'class-variance-authority';import type * as React from 'react';-import { cn } from '@/lib/utils';const buttonVariants = cva(- 'hover:-translate-y-px inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg font-medium text-sm transition-all hover:-translate-y-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',{variants: {variant: {@@ -19,7 +18,7 @@ const buttonVariants = cva(ghost: 'hover:bg-accent hover:text-accent-foreground',link: 'text-primary underline-offset-4 hover:underline',naked:- 'bg-transparent hover:bg-transparent ring-0 border-none !px-0 !py-0 shadow-none',+ '!px-0 !py-0 border-none bg-transparent shadow-none ring-0 hover:bg-transparent',},size: {default: 'h-8 px-4',diff --git a/apps/public/src/components/ui/input.tsx b/apps/public/src/components/ui/input.tsxindex 48b54ac97..f5daa5ed9 100644--- a/apps/public/src/components/ui/input.tsx+++ b/apps/public/src/components/ui/input.tsx@@ -1,10 +1,9 @@-import { type VariantProps, cva } from 'class-variance-authority';+import { cva, type VariantProps } from 'class-variance-authority';import type * as React from 'react';-import { cn } from '@/lib/utils';const inputVariants = cva(- 'flex w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-colors',+ 'flex w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-colors file:border-0 file:bg-transparent file:font-medium file:text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',{variants: {size: {@@ -28,9 +27,9 @@ export interface InputPropsconst Input = ({ className, type, size, ref, ...props }: InputProps) => {return (<input- type={type}className={cn(inputVariants({ size, className }))}ref={ref}+ type={type}{...props}/>);diff --git a/apps/public/src/components/ui/slider.tsx b/apps/public/src/components/ui/slider.tsxindex cb92589ea..aa68da1eb 100644--- a/apps/public/src/components/ui/slider.tsx+++ b/apps/public/src/components/ui/slider.tsx@@ -1,8 +1,7 @@import * as SliderPrimitive from '@radix-ui/react-slider';import * as React from 'react';--import { cn } from '@/lib/utils';import { Tooltip, TooltipContent, TooltipTrigger } from './tooltip';+import { cn } from '@/lib/utils';function useMediaQuery(query: string) {const [matches, setMatches] = React.useState(false);@@ -31,28 +30,28 @@ const Slider = ({return (<>{isMobile && (- <div className="text-sm text-muted-foreground mb-4">{tooltip}</div>+ <div className="mb-4 text-muted-foreground text-sm">{tooltip}</div>)}<SliderPrimitive.Root- ref={ref}className={cn('relative flex w-full touch-none select-none items-center',className)}+ ref={ref}{...props}><SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-white/10"><SliderPrimitive.Range className="absolute h-full bg-white/90" /></SliderPrimitive.Track>{tooltip && !isMobile ? (- <Tooltip open disableHoverableContent>+ <Tooltip disableHoverableContent open><TooltipTrigger asChild><SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-white bg-black ring-offset-black transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" /></TooltipTrigger><TooltipContent+ className="rounded-full border-white/30 bg-black py-1 text-white/70 text-xs"side="top"sideOffset={10}- className="rounded-full bg-black text-white/70 py-1 text-xs border-white/30">{tooltip}</TooltipContent>diff --git a/apps/public/src/components/ui/tooltip.tsx b/apps/public/src/components/ui/tooltip.tsxindex 88742781f..2a0c4e1a7 100644--- a/apps/public/src/components/ui/tooltip.tsx+++ b/apps/public/src/components/ui/tooltip.tsx@@ -1,6 +1,5 @@import * as TooltipPrimitive from '@radix-ui/react-tooltip';import type * as React from 'react';-import { cn } from '@/lib/utils';const TooltipProvider = TooltipPrimitive.Provider;@@ -20,12 +19,12 @@ const TooltipContent = ({ref?: React.RefObject<React.ElementRef<typeof TooltipPrimitive.Content>>;}) => (<TooltipPrimitive.Content- ref={ref}- sideOffset={sideOffset}className={cn(- 'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ 'fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 animate-in overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-popover-foreground text-sm shadow-md data-[state=closed]:animate-out',className)}+ ref={ref}+ sideOffset={sideOffset}{...props}/>);diff --git a/apps/public/src/components/window-image.tsx b/apps/public/src/components/window-image.tsxindex 34ef9fa53..e794c3f7a 100644--- a/apps/public/src/components/window-image.tsx+++ b/apps/public/src/components/window-image.tsx@@ -1,6 +1,6 @@-import { cn } from '@/lib/utils';import Image from 'next/image';import { FeatureCardContainer } from './feature-card';+import { cn } from '@/lib/utils';interface WindowImageProps {src?: string;@@ -24,7 +24,7 @@ export function WindowImage({const darkSrc = srcDark || src;const lightSrc = srcLight || src;- if (!darkSrc || !lightSrc) {+ if (!(darkSrc && lightSrc)) {throw new Error('WindowImage requires either src or both srcDark and srcLight');@@ -33,11 +33,11 @@ export function WindowImage({return (<FeatureCardContainerclassName={cn([- 'overflow-hidden rounded-lg border border-border bg-foreground/10 shadow-lg/5 relative z-10 [@media(min-width:1100px)]:-mx-16 p-4 md:p-16',+ 'relative z-10 overflow-hidden rounded-lg border border-border bg-foreground/10 p-4 shadow-lg/5 md:p-16 [@media(min-width:1100px)]:-mx-16',className,])}>- <div className="rounded-lg overflow-hidden p-2 bg-card/80 border col gap-2 relative">+ <div className="col relative gap-2 overflow-hidden rounded-lg border bg-card/80 p-2">{/* Window controls */}<div className="flex items-center gap-2"><div className="flex gap-1.5">@@ -46,25 +46,25 @@ export function WindowImage({<div className="size-2 rounded-full bg-green-500" /></div></div>- <div className="relative w-full border rounded-md overflow-hidden">+ <div className="relative w-full overflow-hidden rounded-md border"><Image- src={darkSrc}alt={alt}- width={1200}+ className="hidden h-auto w-full dark:block"height={800}- className="hidden dark:block w-full h-auto"+ src={darkSrc}+ width={1200}/><Image- src={lightSrc}alt={alt}- width={1200}+ className="h-auto w-full dark:hidden"height={800}- className="dark:hidden w-full h-auto"+ src={lightSrc}+ width={1200}/></div></div>{caption && (- <figcaption className="text-center text-sm text-muted-foreground max-w-lg mx-auto">+ <figcaption className="mx-auto max-w-lg text-center text-muted-foreground text-sm">{caption}</figcaption>)}diff --git a/apps/public/src/lib/compare.ts b/apps/public/src/lib/compare.tsindex 8c9f2ede0..56c9614d6 100644--- a/apps/public/src/lib/compare.ts+++ b/apps/public/src/lib/compare.ts@@ -1,4 +1,4 @@-import { readFileSync, readdirSync } from 'node:fs';+import { readdirSync, readFileSync } from 'node:fs';import { join } from 'node:path';export interface CompareSeo {diff --git a/apps/public/src/lib/dark-mode.ts b/apps/public/src/lib/dark-mode.tsindex 395908ed2..2939f25dd 100644--- a/apps/public/src/lib/dark-mode.ts+++ b/apps/public/src/lib/dark-mode.ts@@ -2,7 +2,9 @@ import { useEffect, useState } from 'react';export function useIsDarkMode() {const [isDarkMode, setIsDarkMode] = useState(() => {- if (typeof window === 'undefined') return false;+ if (typeof window === 'undefined') {+ return false;+ }// Check localStorage firstconst savedTheme = window.localStorage.getItem('theme');diff --git a/apps/public/src/lib/features.ts b/apps/public/src/lib/features.tsindex f154be6b2..51c2756c1 100644--- a/apps/public/src/lib/features.ts+++ b/apps/public/src/lib/features.ts@@ -1,4 +1,4 @@-import { readFileSync, readdirSync } from 'node:fs';+import { readdirSync, readFileSync } from 'node:fs';import { join } from 'node:path';export interface FeatureSeo {@@ -136,7 +136,9 @@ export async function loadFeatureSource(): Promise<FeatureData[]> {const results: FeatureData[] = [];for (const slug of slugs) {const data = await getFeatureData(slug);- if (data) results.push(data);+ if (data) {+ results.push(data);+ }}return results;}@@ -155,7 +157,9 @@ export function loadFeatureSourceSync(): FeatureData[] {return { ...data, url: `/features/${slug}` };});} catch (error) {- if ((error as NodeJS.ErrnoException).code === 'ENOENT') return [];+ if ((error as NodeJS.ErrnoException).code === 'ENOENT') {+ return [];+ }console.error('Error loading feature source:', error);return [];}diff --git a/apps/public/src/lib/metadata.ts b/apps/public/src/lib/metadata.tsindex 6330178ef..11e546b5f 100644--- a/apps/public/src/lib/metadata.ts+++ b/apps/public/src/lib/metadata.ts@@ -1,6 +1,6 @@import type { Metadata } from 'next';-import { OPENPANEL_DESCRIPTION, OPENPANEL_SITE_NAME } from './openpanel-brand';import { url as baseUrl } from './layout.shared';+import { OPENPANEL_DESCRIPTION, OPENPANEL_SITE_NAME } from './openpanel-brand';const siteName = OPENPANEL_SITE_NAME;const defaultDescription = OPENPANEL_DESCRIPTION;@@ -61,7 +61,7 @@ export function getRawMetadata(openGraph: {title,description,- siteName: siteName,+ siteName,url: baseUrl(url),type: 'website',images: [diff --git a/apps/public/src/lib/openapi.ts b/apps/public/src/lib/openapi.tsindex a9e1b7537..d12ecda40 100644--- a/apps/public/src/lib/openapi.ts+++ b/apps/public/src/lib/openapi.ts@@ -1,12 +1,12 @@+import path from 'node:path';+import { apiRefCollection } from 'collections/server';import { loader } from 'fumadocs-core/source';+import { toFumadocsSource } from 'fumadocs-mdx/runtime/server';import {createOpenAPI,openapiPlugin,openapiSource,} from 'fumadocs-openapi/server';-import { apiRefCollection } from 'collections/server';-import { toFumadocsSource } from 'fumadocs-mdx/runtime/server';-import path from 'node:path';import { cache } from 'react';const API_URL =diff --git a/apps/public/src/lib/source.ts b/apps/public/src/lib/source.tsindex 1f3c874d4..cdeb2b413 100644--- a/apps/public/src/lib/source.ts+++ b/apps/public/src/lib/source.ts@@ -10,10 +10,10 @@ import {import { type InferPageType, loader } from 'fumadocs-core/source';import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';import { toFumadocsSource } from 'fumadocs-mdx/runtime/server';-import { OPENPANEL_BASE_URL } from './openpanel-brand';import type { CompareData } from './compare';import type { FeatureData } from './features';import { loadFeatureSourceSync } from './features';+import { OPENPANEL_BASE_URL } from './openpanel-brand';// See https://fumadocs.dev/docs/headless/source-api for more infoexport const source = loader({diff --git a/apps/public/src/lib/utils.ts b/apps/public/src/lib/utils.tsindex 764260bcc..e5ef23ced 100644--- a/apps/public/src/lib/utils.ts+++ b/apps/public/src/lib/utils.ts@@ -9,8 +9,8 @@ export const formatEventsCount = (value: number) => {if (value >= 1_000_000) {return `${(value / 1_000_000).toFixed(1)}M`;}- if (value >= 1_000) {- return `${(value / 1_000).toFixed(0)}K`;+ if (value >= 1000) {+ return `${(value / 1000).toFixed(0)}K`;}return value.toString();};diff --git a/apps/public/src/mdx-components.tsx b/apps/public/src/mdx-components.tsxindex f104e588f..c6b94e647 100644--- a/apps/public/src/mdx-components.tsx+++ b/apps/public/src/mdx-components.tsx@@ -1,12 +1,12 @@-import { FaqItem, Faqs } from '@/components/faq';-import { Figure } from '@/components/figure';-import { WindowImage } from '@/components/window-image';import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';import * as FilesComponents from 'fumadocs-ui/components/files';import * as TabsComponents from 'fumadocs-ui/components/tabs';import defaultMdxComponents from 'fumadocs-ui/mdx';import * as icons from 'lucide-react';import type { MDXComponents } from 'mdx/types';+import { FaqItem, Faqs } from '@/components/faq';+import { Figure } from '@/components/figure';+import { WindowImage } from '@/components/window-image';export function getMDXComponents(components?: MDXComponents) {return {diff --git a/apps/public/src/middleware.ts b/apps/public/src/middleware.tsindex fb78d6b72..7edfbbe5c 100644--- a/apps/public/src/middleware.ts+++ b/apps/public/src/middleware.ts@@ -1,5 +1,5 @@-import { NextResponse } from 'next/server';import type { NextRequest } from 'next/server';+import { NextResponse } from 'next/server';export function middleware(request: NextRequest) {const { pathname } = request.nextUrl;diff --git a/apps/start/src/components/animate-height.tsx b/apps/start/src/components/animate-height.tsxindex a5674cdc7..cf0bc3b84 100644--- a/apps/start/src/components/animate-height.tsx+++ b/apps/start/src/components/animate-height.tsx@@ -9,9 +9,9 @@ type Props = {const AnimateHeight = ({ children, className, open }: Props) => {return (<ReactAnimateHeight+ className={className}duration={300}height={open ? 'auto' : 0}- className={className}>{children}</ReactAnimateHeight>diff --git a/apps/start/src/components/auth/or.tsx b/apps/start/src/components/auth/or.tsxindex 7463afdc9..6263b26f0 100644--- a/apps/start/src/components/auth/or.tsx+++ b/apps/start/src/components/auth/or.tsx@@ -4,7 +4,7 @@ export function Or({ className }: { className?: string }) {return (<div className={cn('row items-center gap-4', className)}><div className="h-px w-full bg-def-300" />- <span className="text-muted-foreground text-sm font-medium px-2">OR</span>+ <span className="px-2 font-medium text-muted-foreground text-sm">OR</span><div className="h-px w-full bg-def-300" /></div>);diff --git a/apps/start/src/components/auth/sign-in-github.tsx b/apps/start/src/components/auth/sign-in-github.tsxindex cde08decf..c21398385 100644--- a/apps/start/src/components/auth/sign-in-github.tsx+++ b/apps/start/src/components/auth/sign-in-github.tsx@@ -1,6 +1,6 @@-import { useTRPC } from '@/integrations/trpc/react';import { useMutation } from '@tanstack/react-query';import { Button } from '../ui/button';+import { useTRPC } from '@/integrations/trpc/react';export function SignInGithub({type,@@ -22,35 +22,39 @@ export function SignInGithub({}));const title = () => {- if (type === 'sign-in') return 'Sign in with Github';- if (type === 'sign-up') return 'Sign up with Github';+ if (type === 'sign-in') {+ return 'Sign in with Github';+ }+ if (type === 'sign-up') {+ return 'Sign up with Github';+ }};return (<div className="relative"><Button- className="w-full bg-primary hover:bg-primary/90 text-primary-foreground shadow-sm hover:shadow-md transition-all duration-200 [&_svg]:shrink-0"- size="lg"+ className="w-full bg-primary text-primary-foreground shadow-sm transition-all duration-200 hover:bg-primary/90 hover:shadow-md [&_svg]:shrink-0"onClick={() =>mutation.mutate({provider: 'github',inviteId,})}+ size="lg"><svg- className="size-4 mr-2"- xmlns="http://www.w3.org/2000/svg"- width="24"+ className="mr-2 size-4"+ fill="currentColor"height="24"viewBox="0 0 24 24"- fill="currentColor"+ width="24"+ xmlns="http://www.w3.org/2000/svg"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" /></svg>{title()}</Button>{isLastUsed && (- <span className="absolute -top-2 right-3 text-[10px] font-medium bg-highlight text-white px-1.5 py-0.5 rounded-full leading-none">+ <span className="absolute -top-2 right-3 rounded-full bg-highlight px-1.5 py-0.5 font-medium text-[10px] text-white leading-none">Used last time</span>)}diff --git a/apps/start/src/components/card.tsx b/apps/start/src/components/card.tsxindex a476a7c19..d5cbf13fd 100644--- a/apps/start/src/components/card.tsx+++ b/apps/start/src/components/card.tsx@@ -1,3 +1,4 @@+import { MoreHorizontal } from 'lucide-react';import {DropdownMenu,DropdownMenuContent,@@ -7,7 +8,6 @@ import {} from '@/components/ui/dropdown-menu';import type { HtmlProps } from '@/types';import { cn } from '@/utils/cn';-import { MoreHorizontal } from 'lucide-react';type CardProps = HtmlProps<HTMLDivElement> & {hover?: boolean;@@ -32,7 +32,7 @@ interface CardActionsProps {}export function CardActions({ children }: CardActionsProps) {return (- <div className="absolute right-2 top-2 z-10">+ <div className="absolute top-2 right-2 z-10"><DropdownMenu><DropdownMenuTrigger className="flex h-8 w-8 items-center justify-center rounded hover:border"><MoreHorizontal size={16} />diff --git a/apps/start/src/components/charts/area-chart.tsx b/apps/start/src/components/charts/area-chart.tsxindex a25543486..9be5d28df 100644--- a/apps/start/src/components/charts/area-chart.tsx+++ b/apps/start/src/components/charts/area-chart.tsx@@ -9,11 +9,11 @@ import {useMemo,useRef,} from 'react';-import { cn } from '@/lib/utils';import { Area, type AreaProps } from './area';import type { LineConfig, Margin } from './chart-context';import { PatternArea } from './pattern-area';import { TimeSeriesChartInner } from './time-series-chart-shell';+import { cn } from '@/lib/utils';export interface AreaChartProps {/** Data array - each item should have a date field and numeric values */diff --git a/apps/start/src/components/charts/bar-chart.tsx b/apps/start/src/components/charts/bar-chart.tsxindex 087fa5e75..547bfb93b 100644--- a/apps/start/src/components/charts/bar-chart.tsx+++ b/apps/start/src/components/charts/bar-chart.tsx@@ -16,7 +16,6 @@ import {useRef,useState,} from 'react';-import { cn } from '@/lib/utils';import { DEFAULT_ANIMATION_EASING } from './animation';import type { BarProps } from './bar';import {@@ -28,6 +27,7 @@ import {import { isGradientDefComponent, isPatternDefComponent } from './chart-defs';import { shortDateFmt } from './chart-formatters';import { useScheduledTooltip } from './use-scheduled-tooltip';+import { cn } from '@/lib/utils';export type BarOrientation = 'vertical' | 'horizontal';diff --git a/apps/start/src/components/charts/bar-x-axis.tsx b/apps/start/src/components/charts/bar-x-axis.tsxindex 70941bd2a..105c2e473 100644--- a/apps/start/src/components/charts/bar-x-axis.tsx+++ b/apps/start/src/components/charts/bar-x-axis.tsx@@ -3,8 +3,8 @@import { motion } from 'motion/react';import { memo, useEffect, useMemo, useState } from 'react';import { createPortal } from 'react-dom';-import { cn } from '@/lib/utils';import { useChart, useChartStable } from './chart-context';+import { cn } from '@/lib/utils';export interface BarXAxisProps {/** Width of the date ticker box for fade calculation. Default: 50 */diff --git a/apps/start/src/components/charts/bar-y-axis.tsx b/apps/start/src/components/charts/bar-y-axis.tsxindex d6bc975ce..7fb05ca99 100644--- a/apps/start/src/components/charts/bar-y-axis.tsx+++ b/apps/start/src/components/charts/bar-y-axis.tsx@@ -3,8 +3,8 @@import { motion } from 'motion/react';import { memo, useEffect, useMemo, useState } from 'react';import { createPortal } from 'react-dom';-import { cn } from '@/lib/utils';import { useChart, useChartStable } from './chart-context';+import { cn } from '@/lib/utils';export interface BarYAxisProps {/** Whether to show all labels or skip some for dense data. Default: true */diff --git a/apps/start/src/components/charts/chart-tooltip.tsx b/apps/start/src/components/charts/chart-tooltip.tsxindex 250d1deb7..abf61b181 100644--- a/apps/start/src/components/charts/chart-tooltip.tsx+++ b/apps/start/src/components/charts/chart-tooltip.tsx@@ -1,7 +1,6 @@-import { cn } from '@/utils/cn';import { createContext, useContext as useBaseContext } from 'react';-import { Tooltip as RechartsTooltip, type TooltipProps } from 'recharts';+import { cn } from '@/utils/cn';export const ChartTooltipContainer = ({children,@@ -13,7 +12,7 @@ export const ChartTooltipContainer = ({return (<divclassName={cn(- 'min-w-[180px] col gap-2 rounded-xl border bg-background/80 p-3 shadow-xl backdrop-blur-sm',+ 'col min-w-[180px] gap-2 rounded-xl border bg-background/80 p-3 shadow-xl backdrop-blur-sm',className)}>@@ -73,13 +72,13 @@ export function createChartTooltip<const context = useContext();const data = tooltip.payload?.map((p) => p.payload) ?? [];- if (!data || !tooltip.active) {+ if (!(data && tooltip.active)) {return null;}return (<ChartTooltipContainer>- <Tooltip data={data} context={context} {...tooltip} />+ <Tooltip context={context} data={data} {...tooltip} /></ChartTooltipContainer>);};diff --git a/apps/start/src/components/charts/common-bar.tsx b/apps/start/src/components/charts/common-bar.tsxindex 2a9b64f68..6538fa2db 100644--- a/apps/start/src/components/charts/common-bar.tsx+++ b/apps/start/src/components/charts/common-bar.tsx@@ -1,5 +1,4 @@import { getChartColor, getChartTranslucentColor } from '@/utils/theme';-import { Bar } from 'recharts';type Options = {borderHeight: number;@@ -35,23 +34,23 @@ export const BarWithBorder = (options: Options) => {return (<g><rect- x={x}- y={y}- width={width}- height={height}- stroke="none"fill={withActive(fill)}+ height={height}rx={3}+ stroke="none"+ width={width}+ x={x}+ y={y}/>{value > 0 && (<rect- x={x}- y={y - options.borderHeight - 1}- width={width}- height={options.borderHeight}- stroke="none"fill={withActive(border)}+ height={options.borderHeight}rx={2}+ stroke="none"+ width={width}+ x={x}+ y={y - options.borderHeight - 1}/>)}</g>diff --git a/apps/start/src/components/charts/composed-chart.tsx b/apps/start/src/components/charts/composed-chart.tsxindex fba314ce1..7fd777b6f 100644--- a/apps/start/src/components/charts/composed-chart.tsx+++ b/apps/start/src/components/charts/composed-chart.tsx@@ -10,12 +10,12 @@ import {useMemo,useRef,} from 'react';-import { cn } from '@/lib/utils';import { Area, type AreaProps } from './area';import type { LineConfig, Margin } from './chart-context';import { Line, type LineProps } from './line';import { SeriesBar, type SeriesBarProps } from './series-bar';import { TimeSeriesChartInner } from './time-series-chart-shell';+import { cn } from '@/lib/utils';export interface ComposedChartProps {/** Data array — each row typically has a date and multiple numeric series */diff --git a/apps/start/src/components/charts/line-chart.tsx b/apps/start/src/components/charts/line-chart.tsxindex f8d6cf238..edba28501 100644--- a/apps/start/src/components/charts/line-chart.tsx+++ b/apps/start/src/components/charts/line-chart.tsx@@ -10,10 +10,10 @@ import {useMemo,useRef,} from 'react';-import { cn } from '@/lib/utils';import type { LineConfig, Margin } from './chart-context';import { Line, type LineProps } from './line';import { TimeSeriesChartInner } from './time-series-chart-shell';+import { cn } from '@/lib/utils';export interface LineChartProps {/** Data array - each item should have a date field and numeric values */diff --git a/apps/start/src/components/charts/markers/marker-group.tsx b/apps/start/src/components/charts/markers/marker-group.tsxindex b6c1977ba..17b3c2ae4 100644--- a/apps/start/src/components/charts/markers/marker-group.tsx+++ b/apps/start/src/components/charts/markers/marker-group.tsx@@ -4,8 +4,8 @@ import { AnimatePresence, motion } from 'motion/react';import type * as React from 'react';import { useState } from 'react';import { createPortal } from 'react-dom';-import { cn } from '@/lib/utils';import { chartCssVars } from '../chart-context';+import { cn } from '@/lib/utils';// Fan configurationconst FAN_RADIUS = 50;diff --git a/apps/start/src/components/charts/op-references.tsx b/apps/start/src/components/charts/op-references.tsxindex d1579044d..3c8f6e5ad 100644--- a/apps/start/src/components/charts/op-references.tsx+++ b/apps/start/src/components/charts/op-references.tsx@@ -2,9 +2,9 @@ import { FlagIcon } from 'lucide-react';import { useMemo } from 'react';import type { ChartMarker } from './markers/marker-group';import {- OPMarkerLayer,type OPMarkerCluster,type OPMarkerItem,+ OPMarkerLayer,} from './op-marker-layer';export interface OPReferenceItem {@@ -22,7 +22,9 @@ export interface OPReferenceItem {export function toChartMarkers(items: OPReferenceItem[] | null | undefined): ChartMarker[] {- if (!items || items.length === 0) return [];+ if (!items || items.length === 0) {+ return [];+ }return items.map((item) => ({date: typeof item.date === 'string' ? new Date(item.date) : item.date,icon: <FlagIcon className="size-2.5" />,@@ -52,7 +54,9 @@ export function OPReferences({showLines = true,}: OPReferencesProps) {const clusters = useMemo<OPMarkerCluster[]>(() => {- if (!items || items.length === 0) return [];+ if (!items || items.length === 0) {+ return [];+ }return items.map((ref) => {const date = typeof ref.date === 'string' ? new Date(ref.date) : ref.date;const item: OPMarkerItem = {diff --git a/apps/start/src/components/charts/op-referrer-spikes.tsx b/apps/start/src/components/charts/op-referrer-spikes.tsxindex 7edb8ad72..c8a3b1f18 100644--- a/apps/start/src/components/charts/op-referrer-spikes.tsx+++ b/apps/start/src/components/charts/op-referrer-spikes.tsx@@ -1,12 +1,12 @@'use client';import { useMemo } from 'react';-import { SerieIcon } from '@/components/report-chart/common/serie-icon';import {- OPMarkerLayer,type OPMarkerCluster,type OPMarkerItem,+ OPMarkerLayer,} from './op-marker-layer';+import { SerieIcon } from '@/components/report-chart/common/serie-icon';export interface OPReferrerSpikeItem {date: string | Date;@@ -51,7 +51,9 @@ export function OPReferrerSpikes({onSpikeClick,}: OPReferrerSpikesProps) {const clusters = useMemo<OPMarkerCluster[]>(() => {- if (!items || items.length === 0) return [];+ if (!items || items.length === 0) {+ return [];+ }return items.map((cluster) => {const markerItems: OPMarkerItem[] = cluster.spikes.map((spike) => ({date:diff --git a/apps/start/src/components/charts/op-series-dots.tsx b/apps/start/src/components/charts/op-series-dots.tsxindex d13ddfe2f..9e01d4aeb 100644--- a/apps/start/src/components/charts/op-series-dots.tsx+++ b/apps/start/src/components/charts/op-series-dots.tsx@@ -36,29 +36,33 @@ export function OPSeriesDots({ dots }: OPSeriesDotsProps) {setMounted(true);}, []);- if (!mounted || !containerRef.current || !tooltipData) return null;+ if (!(mounted && containerRef.current && tooltipData)) {+ return null;+ }return createPortal(<svgaria-hidden="true"className="pointer-events-none absolute inset-0 z-[51]"- width="100%"height="100%"+ width="100%"><g transform={`translate(${margin.left}, ${margin.top})`}>{dots.map((dot) => {const xPos = tooltipData.xPositions?.[dot.dataKey] ?? tooltipData.x;const yPos = tooltipData.yPositions[dot.dataKey];- if (yPos == null) return null;+ if (yPos == null) {+ return null;+ }const radius = dot.radius ?? (dot.label ? 8 : 5);return (<OPDot- key={dot.dataKey}- x={xPos}- y={yPos}color={dot.color}+ key={dot.dataKey}label={dot.label}radius={radius}+ x={xPos}+ y={yPos}/>);})}@@ -85,18 +89,18 @@ function OPDot({ x, y, color, label, radius }: OPDotProps) {return (<motion.g style={{ x: animatedX, y: animatedY }}><circle- r={radius}fill={color}+ r={radius}stroke="var(--chart-background)"strokeWidth={2}/>{label && (<textdy={radius * 0.35}- textAnchor="middle"fill="white"fontSize={radius * 1.2}fontWeight={700}+ textAnchor="middle">{label}</text>diff --git a/apps/start/src/components/charts/tooltip/tooltip-box.tsx b/apps/start/src/components/charts/tooltip/tooltip-box.tsxindex 0329a3f1c..182631f89 100644--- a/apps/start/src/components/charts/tooltip/tooltip-box.tsx+++ b/apps/start/src/components/charts/tooltip/tooltip-box.tsx@@ -4,8 +4,8 @@ import { motion, useSpring } from 'motion/react';import type { RefObject } from 'react';import { useEffect, useLayoutEffect, useRef, useState } from 'react';import { createPortal } from 'react-dom';-import { cn } from '@/lib/utils';import { type SpringConfig, useChartConfig } from '../chart-config-context';+import { cn } from '@/lib/utils';export interface TooltipBoxProps {/** X position in pixels (relative to container) */diff --git a/apps/start/src/components/charts/use-line-segment-highlight.ts b/apps/start/src/components/charts/use-line-segment-highlight.tsindex 6f169378b..ed39832d8 100644--- a/apps/start/src/components/charts/use-line-segment-highlight.ts+++ b/apps/start/src/components/charts/use-line-segment-highlight.ts@@ -109,7 +109,11 @@ export function useLineSegmentHighlight({}function clampIndex(idx: number, length: number): number {- if (idx < 0) return 0;- if (idx >= length) return length - 1;+ if (idx < 0) {+ return 0;+ }+ if (idx >= length) {+ return length - 1;+ }return idx;}diff --git a/apps/start/src/components/charts/x-axis.tsx b/apps/start/src/components/charts/x-axis.tsxindex af8fa2eed..bb4f3b762 100644--- a/apps/start/src/components/charts/x-axis.tsx+++ b/apps/start/src/components/charts/x-axis.tsx@@ -2,9 +2,9 @@import { memo, useEffect, useMemo, useState } from 'react';import { createPortal } from 'react-dom';-import { cn } from '@/lib/utils';import { useChart, useChartStable } from './chart-context';import { shortDateFmt } from './chart-formatters';+import { cn } from '@/lib/utils';export interface XAxisProps {/** Number of ticks to show (including first and last). Default: 5. Used when `tickMode` is `"domain"`. */diff --git a/apps/start/src/components/chat/chat-drawer-body.tsx b/apps/start/src/components/chat/chat-drawer-body.tsxindex 84bd57e78..7a287c675 100644--- a/apps/start/src/components/chat/chat-drawer-body.tsx+++ b/apps/start/src/components/chat/chat-drawer-body.tsx@@ -1,12 +1,12 @@-import { Button } from '@/components/ui/button';-import { usePageContextValue } from '@/contexts/page-context';-import { cn } from '@/utils/cn';import { AlertCircleIcon, ArrowDownIcon } from 'lucide-react';import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';import { ChatContextWidget } from './chat-context-widget';import { ChatDrawerEmpty } from './chat-drawer-empty';import { ChatMessage } from './chat-message';import { useChatRuntime } from './chat-runtime';+import { Button } from '@/components/ui/button';+import { usePageContextValue } from '@/contexts/page-context';+import { cn } from '@/utils/cn';/*** Message list. Reads `messages`, `status`, `isLoading`, `isStreaming`@@ -31,7 +31,7 @@ export function ChatDrawerBody() {if (messages.length === 0) {return (- <div className="flex-1 flex flex-col">+ <div className="flex flex-1 flex-col"><ChatContextWidget /><ChatDrawerEmpty /></div>@@ -39,12 +39,12 @@ export function ChatDrawerBody() {}return (- <div className="flex-1 flex flex-col min-h-0 relative">- <div className="absolute top-0 left-0 right-0 z-20 backdrop-blur-sm">+ <div className="relative flex min-h-0 flex-1 flex-col">+ <div className="absolute top-0 right-0 left-0 z-20 backdrop-blur-sm"><ChatContextWidget /></div><StickToBottom- className="flex-1 relative overflow-hidden"+ className="relative flex-1 overflow-hidden"initial="instant"resize="smooth">@@ -64,8 +64,8 @@ export function ChatDrawerBody() {</div>)}{status === 'error' && (- <div className="flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive">- <AlertCircleIcon className="size-4 shrink-0 mt-0.5" />+ <div className="flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-destructive text-sm">+ <AlertCircleIcon className="mt-0.5 size-4 shrink-0" /><span className="leading-[1.5]">{error?.message ?? 'Something went wrong. Try again.'}</span>@@ -80,15 +80,17 @@ export function ChatDrawerBody() {function ScrollToBottomButton() {const { isAtBottom, scrollToBottom } = useStickToBottomContext();- if (isAtBottom) return null;+ if (isAtBottom) {+ return null;+ }return (<Button- type="button"+ aria-label="Scroll to bottom"+ className="absolute bottom-3 left-1/2 h-7 -translate-x-1/2 gap-1 px-2 shadow-md"+ onClick={() => scrollToBottom()}size="sm"+ type="button"variant="secondary"- className="absolute bottom-3 left-1/2 -translate-x-1/2 h-7 px-2 shadow-md gap-1"- onClick={() => scrollToBottom()}- aria-label="Scroll to bottom"><ArrowDownIcon className="size-3" /><span className="text-sm">Latest</span>diff --git a/apps/start/src/components/chat/chat-drawer-empty.tsx b/apps/start/src/components/chat/chat-drawer-empty.tsxindex f002d0b2e..a9e537e26 100644--- a/apps/start/src/components/chat/chat-drawer-empty.tsx+++ b/apps/start/src/components/chat/chat-drawer-empty.tsx@@ -1,7 +1,7 @@-import CopyInput from '@/components/forms/copy-input';-import { usePageContextValue } from '@/contexts/page-context';import { ExternalLinkIcon, KeyRoundIcon, SparklesIcon } from 'lucide-react';import { useChatRuntime } from './chat-runtime';+import CopyInput from '@/components/forms/copy-input';+import { usePageContextValue } from '@/contexts/page-context';/*** Empty-state panel shown inside the drawer body when a chat has no@@ -21,18 +21,18 @@ export function ChatDrawerEmpty() {<SparklesIcon className="size-5" /></div><div className="max-w-xs">- <h3 className="font-semibold text-xl mb-2">{suggestions.headline}</h3>+ <h3 className="mb-2 font-semibold text-xl">{suggestions.headline}</h3><p className="mt-1.5 text-muted-foreground leading-[1.5]">{suggestions.description}</p></div>- <div className="flex w-full max-w-xs flex-col gap-2 items-center">+ <div className="flex w-full max-w-xs flex-col items-center gap-2">{suggestions.prompts.map((prompt) => (<button+ className="rounded-md border bg-muted/30 px-3 py-2 text-left text-foreground/80 text-sm transition-colors hover:bg-muted/60 hover:text-foreground"key={prompt}- type="button"onClick={() => send(prompt)}- className="rounded-md border bg-muted/30 px-3 py-2 text-left text-sm text-foreground/80 transition-colors hover:bg-muted/60 hover:text-foreground"+ type="button">{prompt}</button>@@ -49,7 +49,7 @@ export function ChatDrawerNotConfigured() {<KeyRoundIcon className="size-5" /></div><div className="max-w-xs">- <h3 className="font-semibold text-xl mb-2">AI chat isn't configured</h3>+ <h3 className="mb-2 font-semibold text-xl">AI chat isn't configured</h3><p className="mt-1.5 text-muted-foreground leading-[1.5]">Set <code className="font-mono text-sm">OPENAI_API_KEY</code> and/or{' '}<code className="font-mono text-sm">ANTHROPIC_API_KEY</code> on the@@ -62,10 +62,10 @@ export function ChatDrawerNotConfigured() {<CopyInput label="Anthropic" value="ANTHROPIC_API_KEY=sk-ant-..." /></div><a+ className="inline-flex items-center gap-1.5 text-muted-foreground text-sm hover:text-foreground"href="https://openpanel.dev/docs/self-hosting/environment-variables#ai-features"- target="_blank"rel="noopener"- className="inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground"+ target="_blank">View setup docs<ExternalLinkIcon className="size-3.5" />diff --git a/apps/start/src/components/chat/chat-drawer-footer.tsx b/apps/start/src/components/chat/chat-drawer-footer.tsxindex 633e1a31e..ea73a065a 100644--- a/apps/start/src/components/chat/chat-drawer-footer.tsx+++ b/apps/start/src/components/chat/chat-drawer-footer.tsx@@ -1,9 +1,9 @@-import { Button } from '@/components/ui/button';-import { cn } from '@/utils/cn';import { ArrowUpIcon, StopCircleIcon } from 'lucide-react';import { useEffect, useRef, useState } from 'react';import { useChatRuntime } from './chat-runtime';import { ModelPicker } from './model-picker';+import { Button } from '@/components/ui/button';+import { cn } from '@/utils/cn';/*** Composer card.@@ -30,17 +30,19 @@ export function ChatDrawerFooter() {const submit = (e?: React.FormEvent) => {e?.preventDefault();const value = text.trim();- if (!value || isStreaming) return;+ if (!value || isStreaming) {+ return;+ }send(value);setText('');};return (- <form onSubmit={submit} className="px-3 pb-3 pt-2">+ <form className="px-3 pt-2 pb-3" onSubmit={submit}><divclassName={cn('rounded-xl border bg-card transition-shadow',- 'focus-within:ring-1 focus-within:ring-ring focus-within:border-ring'+ 'focus-within:border-ring focus-within:ring-1 focus-within:ring-ring')}>{/*@@ -58,46 +60,46 @@ export function ChatDrawerFooter() {drafted text sends on the next Enter press.*/}<textarea- ref={textareaRef}- value={text}- onChange={(e) => setText(e.target.value)}- placeholder="Ask anything about your data…"- rows={2}className={cn(- 'block w-full bg-transparent text-sm leading-[1.5] text-foreground',+ 'block w-full bg-transparent text-foreground text-sm leading-[1.5]','placeholder:text-muted-foreground/70',- 'resize-none border-0 outline-none ring-0 shadow-none',+ 'resize-none border-0 shadow-none outline-none ring-0','focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0',- 'min-h-[48px] max-h-[200px] px-3 pt-3 pb-1'+ 'max-h-[200px] min-h-[48px] px-3 pt-3 pb-1')}+ onChange={(e) => setText(e.target.value)}onKeyDown={(e) => {if (e.key === 'Enter' && !e.shiftKey) {e.preventDefault();submit();}}}+ placeholder="Ask anything about your data…"+ ref={textareaRef}+ rows={2}+ value={text}/><div className="flex items-center justify-between gap-2 px-2 pb-2"><ModelPicker />{isStreaming ? (<Button- type="button"+ aria-label="Stop generating"+ className="size-7 shrink-0 rounded-md"+ onClick={stop}size="icon"+ type="button"variant="secondary"- className="size-7 rounded-md shrink-0"- onClick={stop}- aria-label="Stop generating"><StopCircleIcon className="size-3.5" /></Button>) : (<Button- type="submit"+ aria-label="Send message"+ className="size-7 shrink-0 rounded-md"+ disabled={!text.trim()}size="icon"+ type="submit"variant="default"- className="size-7 rounded-md shrink-0"- disabled={!text.trim()}- aria-label="Send message"><ArrowUpIcon className="size-3.5" /></Button>diff --git a/apps/start/src/components/chat/chat-drawer-header.tsx b/apps/start/src/components/chat/chat-drawer-header.tsxindex 82dfecd22..3722a24dc 100644--- a/apps/start/src/components/chat/chat-drawer-header.tsx+++ b/apps/start/src/components/chat/chat-drawer-header.tsx@@ -1,3 +1,8 @@+import { CONVERSATION_LIST_LIMIT_DEFAULT } from '@openpanel/core/modules/conversation/conversation.constants';+import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';+import { MessageSquarePlusIcon, Trash2Icon, XIcon } from 'lucide-react';+import { useEffect, useRef, useState } from 'react';+import { useChatState } from './chat-context';import { Button } from '@/components/ui/button';import {DropdownMenu,@@ -8,11 +13,6 @@ import {DropdownMenuTrigger,} from '@/components/ui/dropdown-menu';import { useTRPC } from '@/integrations/trpc/react';-import { CONVERSATION_LIST_LIMIT_DEFAULT } from '@openpanel/core/modules/conversation/conversation.constants';-import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';-import { MessageSquarePlusIcon, Trash2Icon, XIcon } from 'lucide-react';-import { useEffect, useRef, useState } from 'react';-import { useChatState } from './chat-context';/*** Header — conversation picker, model picker, new chat, close.@@ -67,32 +67,32 @@ export function ChatDrawerHeader({return (<header className="flex items-center justify-between gap-2 border-b px-3 py-2">- <div className="flex items-center gap-2 min-w-0 flex-1">+ <div className="flex min-w-0 flex-1 items-center gap-2"><DropdownMenu><DropdownMenuTrigger asChild><Button- variant="ghost"+ className="max-w-[200px] truncate font-medium text-sm"size="sm"- className="font-medium text-sm truncate max-w-[200px]"+ variant="ghost">{activeTitle}</Button></DropdownMenuTrigger><DropdownMenuContentalign="start"- className="w-72 max-h-96 overflow-y-auto"+ className="max-h-96 w-72 overflow-y-auto"><DropdownMenuLabel>Conversations</DropdownMenuLabel><DropdownMenuSeparator />{(!conversations || conversations.length === 0) && (- <div className="px-2 py-3 text-sm text-muted-foreground">+ <div className="px-2 py-3 text-muted-foreground text-sm">No conversations yet. Start typing to create one.</div>)}{conversations?.map((c) => (<DropdownMenuItem- key={c.id}className="flex items-center justify-between gap-2"+ key={c.id}onSelect={() => switchConversation(c.id)}><span className="truncate">{c.title ?? 'Untitled chat'}</span>@@ -104,21 +104,21 @@ export function ChatDrawerHeader({</DropdownMenuContent></DropdownMenu></div>- <div className="flex items-center gap-1 shrink-0">+ <div className="flex shrink-0 items-center gap-1"><Button- variant="ghost"- size="sm"- onClick={() => newConversation()}aria-label="New conversation"+ onClick={() => newConversation()}+ size="sm"title="New conversation"+ variant="ghost"><MessageSquarePlusIcon className="size-4" /></Button><Button- variant="ghost"- size="sm"- onClick={onClose}aria-label="Close chat"+ onClick={onClose}+ size="sm"+ variant="ghost"><XIcon className="size-4" /></Button>@@ -168,15 +168,15 @@ function InlineDeleteButton({ onConfirm }: { onConfirm: () => void }) {return (<button- type="button"- onClick={handleClick}+ aria-label={armed ? 'Confirm delete' : 'Delete conversation'}className={armed- ? 'shrink-0 rounded bg-destructive p-1 text-white hover:bg-destructive/90 transition-colors'- : 'shrink-0 rounded p-0.5 text-muted-foreground hover:text-destructive transition-colors'+ ? 'shrink-0 rounded bg-destructive p-1 text-white transition-colors hover:bg-destructive/90'+ : 'shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-destructive'}- aria-label={armed ? 'Confirm delete' : 'Delete conversation'}+ onClick={handleClick}title={armed ? 'Click again to confirm' : 'Delete'}+ type="button">{armed ? <Trash2Icon className="size-3" /> : <XIcon className="size-3" />}</button>diff --git a/apps/start/src/components/chat/chat-drawer-slot.tsx b/apps/start/src/components/chat/chat-drawer-slot.tsxindex 36ef14528..20df95b63 100644--- a/apps/start/src/components/chat/chat-drawer-slot.tsx+++ b/apps/start/src/components/chat/chat-drawer-slot.tsx@@ -29,7 +29,9 @@ export function ChatDrawerSlot() {setMounted(true);}, []);- if (!mounted) return null;+ if (!mounted) {+ return null;+ }return (<Suspense fallback={null}><ChatDrawer />diff --git a/apps/start/src/components/chat/chat-drawer.tsx b/apps/start/src/components/chat/chat-drawer.tsxindex e1075b4dd..5c7dcc2bb 100644--- a/apps/start/src/components/chat/chat-drawer.tsx+++ b/apps/start/src/components/chat/chat-drawer.tsx@@ -1,5 +1,3 @@-import { useAppParams } from '@/hooks/use-app-params';-import { useResizableDrawer } from '@/hooks/use-resizable-drawer';import { useEffect } from 'react';import { useChatState } from './chat-context';import { ChatDrawerBody } from './chat-drawer-body';@@ -7,6 +5,8 @@ import { ChatDrawerNotConfigured } from './chat-drawer-empty';import { ChatDrawerFooter } from './chat-drawer-footer';import { ChatDrawerHeader } from './chat-drawer-header';import { ChatRuntimeProvider } from './chat-runtime';+import { useAppParams } from '@/hooks/use-app-params';+import { useResizableDrawer } from '@/hooks/use-resizable-drawer';const WIDTH_STORAGE_KEY = 'op-chat-drawer-width';const DEFAULT_WIDTH = 440;@@ -45,7 +45,9 @@ export function ChatDrawer() {// the last conversation for the current context (same page +// same entity); closing just clears `?chat`.useEffect(() => {- if (!projectId) return;+ if (!projectId) {+ return;+ }const handler = (e: KeyboardEvent) => {if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'j') {e.preventDefault();@@ -60,7 +62,9 @@ export function ChatDrawer() {return () => window.removeEventListener('keydown', handler);}, [projectId, isOpen, closeChat, openChatForContext]);- if (!projectId || !isOpen) return null;+ if (!(projectId && isOpen)) {+ return null;+ }return (<>@@ -71,17 +75,17 @@ export function ChatDrawer() {Hidden on mobile where the drawer overlays as a modal-stylepanel (standard behavior for narrow viewports).*/}- <div className="hidden lg:block shrink-0" style={{ width }} aria-hidden />+ <div aria-hidden className="hidden shrink-0 lg:block" style={{ width }} /><aside- className="fixed top-0 right-0 z-40 h-screen flex flex-col bg-background border-l shadow-2xl"+ className="fixed top-0 right-0 z-40 flex h-screen flex-col border-l bg-background shadow-2xl"style={{ width }}><div- className="absolute top-0 left-0 z-10 w-1 h-full cursor-ew-resize hover:bg-border transition-colors"aria-label="Resize chat drawer"+ className="absolute top-0 left-0 z-10 h-full w-1 cursor-ew-resize transition-colors hover:bg-border"{...dragHandleProps}/>- <ChatDrawerHeader projectId={projectId} onClose={closeChat} />+ <ChatDrawerHeader onClose={closeChat} projectId={projectId} />{/*Three states, all derived from the `chat.models` tRPC query(see `ChatStateProvider`). The frontend no longer reads anydiff --git a/apps/start/src/components/chat/chat-markdown.tsx b/apps/start/src/components/chat/chat-markdown.tsxindex 07ad24254..e1cb28643 100644--- a/apps/start/src/components/chat/chat-markdown.tsx+++ b/apps/start/src/components/chat/chat-markdown.tsx@@ -1,7 +1,7 @@-import { cn } from '@/utils/cn';import { memo } from 'react';import ReactMarkdown from 'react-markdown';import remarkGfm from 'remark-gfm';+import { cn } from '@/utils/cn';/*** Markdown renderer used for assistant text parts in the chat. Tight@@ -22,48 +22,48 @@ function ChatMarkdownInner({className={cn(// Reasonable readable defaults for a chat surface: 14px body,// 1.6 line height, list/heading rhythm.- 'leading-[1.6] text-foreground',+ 'text-foreground leading-[1.6]',// Element styling via descendant selectors keeps the API tiny// (no per-element override props for callers).'[&>*+*]:mt-2','[&_p]:my-0','[&_p+p]:mt-2',- '[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:my-2',- '[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:my-2',+ '[&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5',+ '[&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5','[&_li]:my-0.5','[&_li>p]:my-0',- '[&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mb-1',- '[&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1',- '[&_h3]:font-medium [&_h3]:mt-2 [&_h3]:mb-1',+ '[&_h1]:mt-3 [&_h1]:mb-1 [&_h1]:font-semibold',+ '[&_h2]:mt-3 [&_h2]:mb-1 [&_h2]:font-semibold',+ '[&_h3]:mt-2 [&_h3]:mb-1 [&_h3]:font-medium','[&_strong]:font-semibold','[&_em]:italic','[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2 hover:[&_a]:no-underline',- '[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[12.5px] [&_code]:font-mono',- '[&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:text-[12.5px] [&_pre]:overflow-x-auto',+ '[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[12.5px]',+ '[&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:text-[12.5px]','[&_pre>code]:bg-transparent [&_pre>code]:p-0',- '[&_blockquote]:border-l-2 [&_blockquote]:border-muted-foreground/30 [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground',- '[&_table]:w-full [&_table]:text-sm [&_table]:my-2',- '[&_th]:text-left [&_th]:font-medium [&_th]:px-2 [&_th]:py-1 [&_th]:border-b',- '[&_td]:px-2 [&_td]:py-1 [&_td]:border-b [&_td]:border-border/40',+ '[&_blockquote]:border-muted-foreground/30 [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground',+ '[&_table]:my-2 [&_table]:w-full [&_table]:text-sm',+ '[&_th]:border-b [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-medium',+ '[&_td]:border-border/40 [&_td]:border-b [&_td]:px-2 [&_td]:py-1','[&_hr]:my-3 [&_hr]:border-border',className)}><ReactMarkdown- remarkPlugins={[remarkGfm]}components={{// Open external links in a new tab; safe defaults.a: ({ href, children, ...rest }) => (<a{...rest}href={href}- target={href?.startsWith('http') ? '_blank' : undefined}rel={href?.startsWith('http') ? 'noopener noreferrer' : undefined}+ target={href?.startsWith('http') ? '_blank' : undefined}>{children}</a>),}}+ remarkPlugins={[remarkGfm]}>{text}</ReactMarkdown>diff --git a/apps/start/src/components/chat/chat-message.tsx b/apps/start/src/components/chat/chat-message.tsxindex 2f4334f47..15e8e5846 100644--- a/apps/start/src/components/chat/chat-message.tsx+++ b/apps/start/src/components/chat/chat-message.tsx@@ -1,10 +1,10 @@-import { cn } from '@/utils/cn';import type { UIMessage } from '@better-agent/client';import { ChevronRightIcon } from 'lucide-react';import { useState } from 'react';import { ChatMarkdown } from './chat-markdown';import { chatToolRenderers, DefaultToolResult } from './tool-results/registry';import type { ToolResultPart } from './tool-results/types';+import { cn } from '@/utils/cn';/*** Renders a single message by switching over `message.parts[i].type`.@@ -61,8 +61,8 @@ export function ChatMessage({if (isUser) {return (<div+ className="text max-w-[90%] whitespace-pre-wrap break-words rounded-lg bg-primary px-3 py-2 text-primary-foreground leading-[1.5]"key={`${message.localId}-text-${idx}`}- className="rounded-lg px-3 py-2 text leading-[1.5] whitespace-pre-wrap break-words max-w-[90%] bg-primary text-primary-foreground">{part.text}</div>@@ -70,8 +70,8 @@ export function ChatMessage({}return (<div+ className="w-full max-w-full"key={`${message.localId}-text-${idx}`}- className="max-w-full w-full"><ChatMarkdown text={part.text} /></div>@@ -93,9 +93,9 @@ export function ChatMessage({const hasFollowingPart = idx < lastIdx;return (<ReasoningBlock+ complete={stateComplete || hasFollowingPart || !runStillActive}key={`${message.localId}-reasoning-${idx}`}text={part.text}- complete={stateComplete || hasFollowingPart || !runStillActive}/>);}@@ -111,8 +111,8 @@ export function ChatMessage({if (!toolName) {return (<div- key={part.callId}className="flex items-center gap-2 py-1.5 text-sm"+ key={part.callId}><span className="op-shimmer font-medium">Thinking…</span></div>@@ -132,7 +132,7 @@ export function ChatMessage({matched?.status === 'error' ? 'Tool failed' : undefined,};return (- <div key={part.callId} className="w-full max-w-full">+ <div className="w-full max-w-full" key={part.callId}><Renderer part={toolPart} /></div>);@@ -179,7 +179,7 @@ function ReasoningBlock({<span className="op-shimmer font-medium">Thinking…</span></div>{latestLine && (- <div className="mt-1 text-sm text-muted-foreground/80 italic line-clamp-1">+ <div className="mt-1 line-clamp-1 text-muted-foreground/80 text-sm italic">{latestLine}</div>)}@@ -188,11 +188,11 @@ function ReasoningBlock({}return (- <div className="w-full max-w-full mb-2">+ <div className="mb-2 w-full max-w-full"><button- type="button"+ className="flex items-center gap-1 text-muted-foreground text-sm transition-colors hover:text-foreground"onClick={() => setOpen((v) => !v)}- className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors"+ type="button"><ChevronRightIconclassName={cn('size-3 transition-transform', open && 'rotate-90')}@@ -202,8 +202,8 @@ function ReasoningBlock({{open && (<div className="mt-2"><ChatMarkdown+ className="text-muted-foreground text-sm leading-normal"text={trimmed}- className="text-sm text-muted-foreground leading-normal"/></div>)}@@ -215,11 +215,21 @@ function derivePartState(callState: string | undefined,resultStatus: string | undefined): string {- if (resultStatus === 'success') return 'output-available';- if (resultStatus === 'error') return 'output-error';- if (resultStatus === 'pending') return 'input-available';- if (callState === 'input-streaming') return 'input-streaming';- if (callState === 'input-complete') return 'input-available';+ if (resultStatus === 'success') {+ return 'output-available';+ }+ if (resultStatus === 'error') {+ return 'output-error';+ }+ if (resultStatus === 'pending') {+ return 'input-available';+ }+ if (callState === 'input-streaming') {+ return 'input-streaming';+ }+ if (callState === 'input-complete') {+ return 'input-available';+ }return 'input-streaming';}diff --git a/apps/start/src/components/chat/chat-runtime.tsx b/apps/start/src/components/chat/chat-runtime.tsxindex 5afd6ee6f..6abfac2a4 100644--- a/apps/start/src/components/chat/chat-runtime.tsx+++ b/apps/start/src/components/chat/chat-runtime.tsx@@ -1,8 +1,3 @@-import { getChatClient } from '@/agents/client';-import { usePageContextValue } from '@/contexts/page-context';-import { useAppContext } from '@/hooks/use-app-context';-import { useAppParams } from '@/hooks/use-app-params';-import { useTRPC } from '@/integrations/trpc/react';import { useAgent } from '@better-agent/client/react';import { useMutation, useQueryClient } from '@tanstack/react-query';import {@@ -15,8 +10,13 @@ import {useState,} from 'react';import { useChatState } from './chat-context';-import { chatToolHandlers } from './tool-handlers';import { streamTitle } from './title-stream';+import { chatToolHandlers } from './tool-handlers';+import { getChatClient } from '@/agents/client';+import { usePageContextValue } from '@/contexts/page-context';+import { useAppContext } from '@/hooks/use-app-context';+import { useAppParams } from '@/hooks/use-app-params';+import { useTRPC } from '@/integrations/trpc/react';/*** Drawer-scoped runtime that owns the `useAgent()` instance and exposes@@ -102,7 +102,9 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {...agent,send: (text: string) => {const trimmed = text.trim();- if (!trimmed) return;+ if (!trimmed) {+ return;+ }if (agent.status === 'submitted' || agent.status === 'streaming') {return;}@@ -141,12 +143,16 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {client,trimmed,(partial) => {- if (controller.signal.aborted) return;+ if (controller.signal.aborted) {+ return;+ }setStreamingTitle(partial);},controller.signal);- if (controller.signal.aborted || !finalTitle) return;+ if (controller.signal.aborted || !finalTitle) {+ return;+ }try {await renameConversation.mutateAsync({id: idAtSend,@@ -197,8 +203,12 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {useEffect(() => {setHydrationPhase((prev) => {- if (agent.status !== 'ready') return 'hydrating';- if (prev === 'hydrating') return 'settled';+ if (agent.status !== 'ready') {+ return 'hydrating';+ }+ if (prev === 'hydrating') {+ return 'settled';+ }return prev;});}, [agent.status]);@@ -211,9 +221,15 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {}, []);useEffect(() => {- if (hydrationPhase !== 'settled') return;- if (agent.status !== 'ready') return;- if (!pendingMessage) return;+ if (hydrationPhase !== 'settled') {+ return;+ }+ if (agent.status !== 'ready') {+ return;+ }+ if (!pendingMessage) {+ return;+ }const text = pendingMessage;// Clear first to prevent re-entry: the effect re-runs when `value`// rebuilds (it depends on agent state), and without the early nulldiff --git a/apps/start/src/components/chat/model-picker.tsx b/apps/start/src/components/chat/model-picker.tsxindex e207f17d0..68e6ba85d 100644--- a/apps/start/src/components/chat/model-picker.tsx+++ b/apps/start/src/components/chat/model-picker.tsx@@ -1,3 +1,6 @@+import { CheckIcon, ChevronDownIcon } from 'lucide-react';+import { useChatState } from './chat-context';+import { type ChatModelOption, getModelLabel } from '@/agents/models';import { Button } from '@/components/ui/button';import {DropdownMenu,@@ -7,9 +10,6 @@ import {DropdownMenuSeparator,DropdownMenuTrigger,} from '@/components/ui/dropdown-menu';-import { type ChatModelOption, getModelLabel } from '@/agents/models';-import { CheckIcon, ChevronDownIcon } from 'lucide-react';-import { useChatState } from './chat-context';/*** Model (= agent) picker for the chat header. Each entry corresponds@@ -28,13 +28,13 @@ export function ModelPicker() {<DropdownMenu><DropdownMenuTrigger asChild><Button- variant="ghost"- size="sm"- className="h-7 px-2 text-xs gap-1 text-muted-foreground"aria-label="Select model"+ className="h-7 gap-1 px-2 text-muted-foreground text-xs"+ size="sm"title="Select model"+ variant="ghost">- <span className="truncate max-w-[140px]">+ <span className="max-w-[140px] truncate">{getModelLabel(agentName)}</span><ChevronDownIcon className="size-3" />@@ -44,14 +44,14 @@ export function ModelPicker() {{Object.entries(grouped).map(([group, items], idx) => (<div key={group}>{idx > 0 && <DropdownMenuSeparator />}- <DropdownMenuLabel className="text-[11px] uppercase tracking-wide text-muted-foreground">+ <DropdownMenuLabel className="text-[11px] text-muted-foreground uppercase tracking-wide">{group}</DropdownMenuLabel>{items.map((m) => (<DropdownMenuItem+ className="flex items-center justify-between gap-2"key={m.id}onSelect={() => setAgent(m.id)}- className="flex items-center justify-between gap-2"><span className="truncate">{m.label}</span>{agentName === m.id && (diff --git a/apps/start/src/components/chat/sidebar-chat-composer.tsx b/apps/start/src/components/chat/sidebar-chat-composer.tsxindex 026e3d6f0..814d4b662 100644--- a/apps/start/src/components/chat/sidebar-chat-composer.tsx+++ b/apps/start/src/components/chat/sidebar-chat-composer.tsx@@ -1,8 +1,8 @@-import { Button } from '@/components/ui/button';-import { cn } from '@/utils/cn';import { ArrowUpIcon, SparklesIcon } from 'lucide-react';import { useState } from 'react';import { useChatState } from './chat-context';+import { Button } from '@/components/ui/button';+import { cn } from '@/utils/cn';/*** Compact "Ask AI" composer for the sidebar.@@ -24,7 +24,9 @@ export function SidebarChatComposer() {const submit = (e?: React.FormEvent) => {e?.preventDefault();const value = text.trim();- if (!value) return;+ if (!value) {+ return;+ }setPendingMessage(value);openNewChat();setText('');@@ -32,48 +34,48 @@ export function SidebarChatComposer() {return (<form- onSubmit={submit}className={cn(- 'mb-4 flex items-center gap-2 rounded-md border border-border bg-def-100 pl-3 pr-2',+ 'mb-4 flex items-center gap-2 rounded-md border border-border bg-def-100 pr-2 pl-3','transition-all focus-within:border-def-400 focus-within:ring-1 focus-within:ring-ring')}+ onSubmit={submit}><SparklesIcon className="size-5 shrink-0 text-muted-foreground" /><input- type="text"- value={text}- onChange={(e) => setText(e.target.value)}- placeholder="Ask AI anything…"className={cn(- 'min-w-0 flex-1 bg-transparent py-2 text-[13px] font-medium text-foreground',+ 'min-w-0 flex-1 bg-transparent py-2 font-medium text-[13px] text-foreground','placeholder:font-normal placeholder:text-muted-foreground','border-0 shadow-none outline-none ring-0','focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0')}+ onChange={(e) => setText(e.target.value)}onKeyDown={(e) => {if (e.key === 'Enter') {e.preventDefault();submit();}}}+ placeholder="Ask AI anything…"+ type="text"+ value={text}/>{hasText ? (<Button- type="submit"+ aria-label="Send to AI"+ className="size-6 shrink-0 rounded-sm"size="icon"+ type="submit"variant="default"- className="size-6 shrink-0 rounded-sm"- aria-label="Send to AI"><ArrowUpIcon className="size-3.5" /></Button>) : (<kbd+ aria-label="Keyboard shortcut: Cmd+J"className={cn('shrink-0 rounded border border-border bg-def-200 px-1.5 py-0.5 font-mono text-[11px]',- 'text-muted-foreground cursor-pointer'+ 'cursor-pointer text-muted-foreground')}- aria-label="Keyboard shortcut: Cmd+J"onClick={() => openNewChat()}>⌘Jdiff --git a/apps/start/src/components/chat/title-stream.tsx b/apps/start/src/components/chat/title-stream.tsxindex ba5f9d5bc..4fd3df46a 100644--- a/apps/start/src/components/chat/title-stream.tsx+++ b/apps/start/src/components/chat/title-stream.tsx@@ -1,5 +1,5 @@-import type { AppClient } from '@/agents/client';import { CONVERSATION_TITLE_MAX_LENGTH } from '@openpanel/core/modules/conversation/conversation.constants';+import type { AppClient } from '@/agents/client';/*** Stream a conversation title from the backend `__titler` agent.@@ -22,8 +22,12 @@ export async function streamTitle(signal?: AbortSignal): Promise<string | null> {const trimmed = firstUserText.trim().slice(0, 400);- if (!trimmed) return null;- if (signal?.aborted) return null;+ if (!trimmed) {+ return null;+ }+ if (signal?.aborted) {+ return null;+ }let accumulated = '';try {@@ -32,7 +36,9 @@ export async function streamTitle(// biome-ignore lint/suspicious/noExplicitAny: titler agent has no typed context; its run-input shape is generic} as any);for await (const event of iterable) {- if (signal?.aborted) return null;+ if (signal?.aborted) {+ return null;+ }// Better Agent emits `TEXT_MESSAGE_CONTENT` with a `delta` field// for each streamed chunk of assistant text.const maybe = event as { type?: string; delta?: string };@@ -44,7 +50,9 @@ export async function streamTitle(onDelta(accumulated.trim().slice(0, CONVERSATION_TITLE_MAX_LENGTH));}}- if (signal?.aborted) return null;+ if (signal?.aborted) {+ return null;+ }return accumulated.trim().slice(0, CONVERSATION_TITLE_MAX_LENGTH) || null;} catch (err) {console.error('[chat] title stream failed', err);diff --git a/apps/start/src/components/chat/tool-results/chat-metrics-result.tsx b/apps/start/src/components/chat/tool-results/chat-metrics-result.tsxindex 398322b76..7d2717882 100644--- a/apps/start/src/components/chat/tool-results/chat-metrics-result.tsx+++ b/apps/start/src/components/chat/tool-results/chat-metrics-result.tsx@@ -10,8 +10,8 @@ import type { ToolResultProps } from './types';export function ChatMetricsResult({ part }: ToolResultProps) {return (<ToolStateGuard- state={part.state}errorText={part.errorText}+ state={part.state}toolName={part.type.replace(/^tool-/, '')}><ChatMetricsInner output={part.output} />@@ -20,23 +20,27 @@ export function ChatMetricsResult({ part }: ToolResultProps) {}function ChatMetricsInner({ output }: { output: unknown }) {- if (!isMetricsLike(output)) return null;+ if (!isMetricsLike(output)) {+ return null;+ }const entries = Object.entries(output).filter((entry): entry is [string, number | string] =>typeof entry[1] === 'number' || typeof entry[1] === 'string');- if (entries.length === 0) return null;+ if (entries.length === 0) {+ return null;+ }return (<ResultCard>- <div className="grid grid-cols-2 sm:grid-cols-3 divide-x divide-y">+ <div className="grid grid-cols-2 divide-x divide-y sm:grid-cols-3">{entries.slice(0, 6).map(([key, value]) => (- <div key={key} className="p-3">- <div className="text-[11px] uppercase tracking-wide text-muted-foreground">+ <div className="p-3" key={key}>+ <div className="text-[11px] text-muted-foreground uppercase tracking-wide">{humanize(key)}</div>- <div className="text-sm font-semibold font-mono tabular-nums mt-0.5">+ <div className="mt-0.5 font-mono font-semibold text-sm tabular-nums">{formatValue(value)}</div></div>@@ -55,7 +59,9 @@ function humanize(key: string): string {function formatValue(v: number | string): string {if (typeof v === 'number') {- if (Number.isInteger(v)) return v.toLocaleString();+ if (Number.isInteger(v)) {+ return v.toLocaleString();+ }return v.toFixed(2);}return v;diff --git a/apps/start/src/components/chat/tool-results/chat-profile-result.tsx b/apps/start/src/components/chat/tool-results/chat-profile-result.tsxindex eec6acaed..e1b22546d 100644--- a/apps/start/src/components/chat/tool-results/chat-profile-result.tsx+++ b/apps/start/src/components/chat/tool-results/chat-profile-result.tsx@@ -20,8 +20,8 @@ import { useNumber } from '@/hooks/use-numer-formatter';export function ChatProfileFullResult({ part }: ToolResultProps) {return (<ToolStateGuard- state={part.state}errorText={part.errorText}+ state={part.state}toolName={part.type.replace(/^tool-/, '')}><Inner output={part.output} />@@ -34,7 +34,7 @@ function Inner({ output }: { output: unknown }) {if (!value) {return (<ResultCard>- <div className="px-3 py-2 text-sm text-muted-foreground">+ <div className="px-3 py-2 text-muted-foreground text-sm">No profile</div></ResultCard>@@ -44,7 +44,7 @@ function Inner({ output }: { output: unknown }) {if (isProfileFullError(value)) {return (<ResultCard>- <div className="px-3 py-2 text-sm text-muted-foreground">+ <div className="px-3 py-2 text-muted-foreground text-sm">{value.error}</div></ResultCard>@@ -107,10 +107,10 @@ function SuccessCard({ value }: { value: ProfileFullSuccess }) {)}{dashboard_url && (<a+ className="block px-3 py-1.5 text-muted-foreground text-sm hover:underline"href={dashboard_url}- target="_blank"rel="noopener noreferrer"- className="block px-3 py-1.5 text-sm text-muted-foreground hover:underline"+ target="_blank">Open profile →</a>diff --git a/apps/start/src/components/chat/tool-results/chat-table-result.tsx b/apps/start/src/components/chat/tool-results/chat-table-result.tsxindex 2895c1036..7e057227f 100644--- a/apps/start/src/components/chat/tool-results/chat-table-result.tsx+++ b/apps/start/src/components/chat/tool-results/chat-table-result.tsx@@ -26,8 +26,8 @@ export function ChatTableResult(props: ToolResultProps) {return (<ToolStateGuard- state={part.state}errorText={part.errorText}+ state={part.state}toolName={part.type.replace(/^tool-/, '')}><ChatTableInner output={part.output} />@@ -39,7 +39,9 @@ function ChatTableInner({ output }: { output: unknown }) {const { rows, total, truncated } = normalizeTableOutput(output);// Empty case is handled at the wrapper level (falls through to// DefaultToolResult) — this function only runs with rows present.- if (rows.length === 0) return null;+ if (rows.length === 0) {+ return null;+ }const { labelKey, valueKeys } = inferColumns(rows[0]!);return (@@ -47,13 +49,13 @@ function ChatTableInner({ output }: { output: unknown }) {<table className="w-full text-sm"><thead className="bg-muted/30"><tr>- <th className="text-left px-3 py-1.5 font-medium text-muted-foreground">+ <th className="px-3 py-1.5 text-left font-medium text-muted-foreground">{humanize(labelKey)}</th>{valueKeys.map((k) => (<th+ className="px-3 py-1.5 text-right font-medium text-muted-foreground"key={k}- className="text-right px-3 py-1.5 font-medium text-muted-foreground">{humanize(k)}</th>@@ -63,19 +65,19 @@ function ChatTableInner({ output }: { output: unknown }) {<tbody>{rows.slice(0, 15).map((row, idx) => (<tr- key={typeof row.id === 'string' ? row.id : idx}className="border-t"+ key={typeof row.id === 'string' ? row.id : idx}><td- className="px-3 py-1.5 truncate max-w-[200px]"+ className="max-w-[200px] truncate px-3 py-1.5"title={String(row[labelKey] ?? '')}>{String(row[labelKey] ?? '')}</td>{valueKeys.map((k) => (<td+ className="px-3 py-1.5 text-right font-mono tabular-nums"key={k}- className="text-right px-3 py-1.5 font-mono tabular-nums">{formatValue(row[k])}</td>@@ -172,7 +174,9 @@ function humanize(key: string): string {function formatValue(v: unknown): string {if (typeof v === 'number') {- if (Number.isInteger(v)) return v.toLocaleString();+ if (Number.isInteger(v)) {+ return v.toLocaleString();+ }return v.toFixed(2);}return v != null ? String(v) : '—';diff --git a/apps/start/src/components/chat/tool-results/default-tool-result.tsx b/apps/start/src/components/chat/tool-results/default-tool-result.tsxindex df79311c0..12b065015 100644--- a/apps/start/src/components/chat/tool-results/default-tool-result.tsx+++ b/apps/start/src/components/chat/tool-results/default-tool-result.tsx@@ -13,11 +13,11 @@ export function DefaultToolResult({ part }: ToolResultProps) {return (<ToolStateGuard- state={part.state}errorText={part.errorText}+ state={part.state}toolName={toolName}>- <DefaultInner toolName={toolName} output={part.output} />+ <DefaultInner output={part.output} toolName={toolName} /></ToolStateGuard>);}@@ -34,7 +34,7 @@ function DefaultInner({if (output == null) {return (<ResultCard title={getToolPhrase(toolName, 'done')}>- <div className="px-3 py-2 text-sm text-muted-foreground">+ <div className="px-3 py-2 text-muted-foreground text-sm">No result.</div></ResultCard>@@ -44,7 +44,7 @@ function DefaultInner({if (typeof output === 'string') {return (<ResultCard title={getToolPhrase(toolName, 'done')}>- <div className="px-3 py-2 text-sm whitespace-pre-wrap">{output}</div>+ <div className="whitespace-pre-wrap px-3 py-2 text-sm">{output}</div></ResultCard>);}@@ -55,9 +55,9 @@ function DefaultInner({return (<ToolDoneBadge toolName={toolName}><button- type="button"+ className="-mx-2.5 -my-2 flex w-[calc(100%+1.25rem)] items-center gap-1 px-2.5 py-1.5 text-left text-muted-foreground text-sm hover:bg-muted/40"onClick={() => setExpanded((e) => !e)}- className="flex items-center gap-1 -mx-2.5 -my-2 px-2.5 py-1.5 text-sm text-muted-foreground hover:bg-muted/40 w-[calc(100%+1.25rem)] text-left"+ type="button"><ChevronRightIconclassName={`size-3 transition-transform ${expanded ? 'rotate-90' : ''}`}@@ -69,7 +69,7 @@ function DefaultInner({</span></button>{expanded && (- <pre className="mt-2 -mx-2.5 -mb-2 px-2.5 py-2 border-t text-[11px] font-mono whitespace-pre-wrap break-all max-h-64 overflow-y-auto bg-muted/20">+ <pre className="-mx-2.5 mt-2 -mb-2 max-h-64 overflow-y-auto whitespace-pre-wrap break-all border-t bg-muted/20 px-2.5 py-2 font-mono text-[11px]">{JSON.stringify(output, null, 2)}</pre>)}diff --git a/apps/start/src/components/chat/tool-results/output-types.ts b/apps/start/src/components/chat/tool-results/output-types.tsindex bce77cf97..37dd8d49d 100644--- a/apps/start/src/components/chat/tool-results/output-types.ts+++ b/apps/start/src/components/chat/tool-results/output-types.ts@@ -59,7 +59,9 @@ export function isProfileFullError(}export function asProfileFullOutput(value: unknown): ProfileFullOutput | null {- if (!value || typeof value !== 'object') return null;+ if (!value || typeof value !== 'object') {+ return null;+ }return value as ProfileFullOutput;}@@ -80,7 +82,9 @@ export type ReportOutput = {};export function asReportOutput(value: unknown): ReportOutput | null {- if (!value || typeof value !== 'object') return null;+ if (!value || typeof value !== 'object') {+ return null;+ }return value as ReportOutput;}diff --git a/apps/start/src/components/chat/tool-results/registry.tsx b/apps/start/src/components/chat/tool-results/registry.tsxindex becb556d1..c5a8da07e 100644--- a/apps/start/src/components/chat/tool-results/registry.tsx+++ b/apps/start/src/components/chat/tool-results/registry.tsx@@ -8,7 +8,6 @@ import {SetEventNamesFilterResult,SetPropertyFiltersResult,} from './chat-ui-apply-result';-import { DefaultToolResult } from './default-tool-result';import type { ToolResultProps } from './types';/**diff --git a/apps/start/src/components/chat/tool-results/shared.tsx b/apps/start/src/components/chat/tool-results/shared.tsxindex 2e3ea09cd..8a67baac2 100644--- a/apps/start/src/components/chat/tool-results/shared.tsx+++ b/apps/start/src/components/chat/tool-results/shared.tsx@@ -1,8 +1,8 @@-import { Skeleton } from '@/components/skeleton';-import { cn } from '@/utils/cn';import { AlertCircleIcon, CheckIcon, SparklesIcon } from 'lucide-react';import type { ReactNode } from 'react';import { getToolPhrase } from './tool-labels';+import { Skeleton } from '@/components/skeleton';+import { cn } from '@/utils/cn';/*** Wrapper that handles the tool-part state machine. Shows a shimmer@@ -28,8 +28,8 @@ export function ToolStateGuard({}if (state === 'output-error') {return (- <div className="flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive">- <AlertCircleIcon className="size-3.5 mt-0.5 shrink-0" />+ <div className="flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-destructive text-sm">+ <AlertCircleIcon className="mt-0.5 size-3.5 shrink-0" /><span>{errorText ?? 'Tool failed'}</span></div>);@@ -48,7 +48,7 @@ export function ToolActivityBadge({ toolName }: { toolName?: string }) {const label = toolName ? getToolPhrase(toolName, 'active') : 'Working';return (<div className="flex items-center gap-2 py-1.5 text-sm">- <SparklesIcon className="size-3.5 text-muted-foreground shrink-0" />+ <SparklesIcon className="size-3.5 shrink-0 text-muted-foreground" /><span className="op-shimmer font-medium">{label}…</span></div>);@@ -68,8 +68,8 @@ export function ToolDoneBadge({}) {return (<details className="group rounded-md border bg-card text-sm">- <summary className="flex cursor-pointer items-center gap-2 px-2.5 py-1.5 list-none [&::-webkit-details-marker]:hidden">- <CheckIcon className="size-3 text-emerald-500 shrink-0" />+ <summary className="flex cursor-pointer list-none items-center gap-2 px-2.5 py-1.5 [&::-webkit-details-marker]:hidden">+ <CheckIcon className="size-3 shrink-0 text-emerald-500" /><span className="font-medium text-foreground/80">{getToolPhrase(toolName, 'done')}</span>@@ -89,9 +89,9 @@ export function ResultCard({className?: string;}) {return (- <div className={cn('rounded-md border bg-card overflow-hidden', className)}>+ <div className={cn('overflow-hidden rounded-md border bg-card', className)}>{title && (- <div className="border-b px-3 py-1.5 text-sm font-medium text-muted-foreground">+ <div className="border-b px-3 py-1.5 font-medium text-muted-foreground text-sm">{title}</div>)}@@ -120,7 +120,7 @@ export function ResultRow({}export function ResultLabel({ children }: { children: ReactNode }) {- return <span className="text-muted-foreground truncate">{children}</span>;+ return <span className="truncate text-muted-foreground">{children}</span>;}export function ResultValue({@@ -132,7 +132,7 @@ export function ResultValue({}) {return (<span- className={cn('font-medium tabular-nums shrink-0', mono && 'font-mono')}+ className={cn('shrink-0 font-medium tabular-nums', mono && 'font-mono')}>{children}</span>diff --git a/apps/start/src/components/chat/tool-results/tool-labels.ts b/apps/start/src/components/chat/tool-results/tool-labels.tsindex ff618cdac..0f6868a64 100644--- a/apps/start/src/components/chat/tool-results/tool-labels.ts+++ b/apps/start/src/components/chat/tool-results/tool-labels.ts@@ -263,7 +263,9 @@ export function getToolPhrase(phase: ToolPhrasePhase): string {const explicit = PHRASES[toolName];- if (explicit) return explicit[phase];+ if (explicit) {+ return explicit[phase];+ }const matchedPrefix = VERB_PREFIXES.find(([p]) => toolName.startsWith(p));const verb = matchedPrefix?.[0] ?? '';diff --git a/apps/start/src/components/click-to-copy.tsx b/apps/start/src/components/click-to-copy.tsxindex 0d912918f..b1f4e6f8a 100644--- a/apps/start/src/components/click-to-copy.tsx+++ b/apps/start/src/components/click-to-copy.tsx@@ -1,7 +1,6 @@-import { clipboard } from '@/utils/clipboard';import { toast } from 'sonner';-import { Tooltiper } from './ui/tooltip';+import { clipboard } from '@/utils/clipboard';type Props = {children: React.ReactNode;@@ -12,9 +11,9 @@ type Props = {const ClickToCopy = ({ children, value }: Props) => {return (<Tooltiper- content="Click to copy"asChildclassName="cursor-pointer"+ content="Click to copy"onClick={() => {clipboard(value);toast('Copied to clipboard');diff --git a/apps/start/src/components/cohort/cohort-events-chart.tsx b/apps/start/src/components/cohort/cohort-events-chart.tsxindex 77c89326f..9cd56557e 100644--- a/apps/start/src/components/cohort/cohort-events-chart.tsx+++ b/apps/start/src/components/cohort/cohort-events-chart.tsx@@ -8,6 +8,7 @@ import {XAxis,YAxis,} from 'recharts';+import { WidgetHead, WidgetTitle } from '../overview/overview-widget';import {useXAxisProps,useYAxisProps,@@ -16,7 +17,6 @@ import { Widget, WidgetBody } from '@/components/widget';import { useFormatDateInterval } from '@/hooks/use-format-date-interval';import { useNumber } from '@/hooks/use-numer-formatter';import { getChartColor } from '@/utils/theme';-import { WidgetHead, WidgetTitle } from '../overview/overview-widget';type Props = {data: { date: string; count: number }[];@@ -27,7 +27,9 @@ function Tooltip(props: any) {const formatDate = useFormatDateInterval({ interval: 'day', short: false });const payload = props.payload?.[0]?.payload;- if (!payload) return null;+ if (!payload) {+ return null;+ }return (<div className="flex min-w-[160px] flex-col gap-2 rounded-xl border bg-card p-3 shadow-xl">diff --git a/apps/start/src/components/color-square.tsx b/apps/start/src/components/color-square.tsxindex e4b0e783e..6d7198390 100644--- a/apps/start/src/components/color-square.tsx+++ b/apps/start/src/components/color-square.tsx@@ -7,7 +7,7 @@ export function ColorSquare({ children, className, color }: ColorSquareProps) {return (<divclassName={cn(- 'flex h-5 w-5 flex-shrink-0 items-center justify-center rounded bg-blue-600 text-sm font-medium text-white [.mini_&]:h-4 [.mini_&]:w-4 [.mini_&]:text-[0.6rem] font-mono',+ 'flex h-5 w-5 flex-shrink-0 items-center justify-center rounded bg-blue-600 font-medium font-mono text-sm text-white [.mini_&]:h-4 [.mini_&]:w-4 [.mini_&]:text-[0.6rem]',className)}style={{ backgroundColor: color }}diff --git a/apps/start/src/components/column-created-at.tsx b/apps/start/src/components/column-created-at.tsxindex 2c6f95d8d..5dc6af2ce 100644--- a/apps/start/src/components/column-created-at.tsx+++ b/apps/start/src/components/column-created-at.tsx@@ -3,12 +3,12 @@ import { formatDateTime, timeAgo } from '@/utils/date';export function ColumnCreatedAt({ children }: { children: Date | string }) {return (<div className="relative">- <div className="absolute inset-0 opacity-0 group-hover/row:opacity-100 transition-opacity duration-100">+ <div className="absolute inset-0 opacity-0 transition-opacity duration-100 group-hover/row:opacity-100">{formatDateTime(typeof children === 'string' ? new Date(children) : children)}</div>- <div className="text-muted-foreground group-hover/row:opacity-0 transition-opacity duration-100">+ <div className="text-muted-foreground transition-opacity duration-100 group-hover/row:opacity-0">{timeAgo(typeof children === 'string' ? new Date(children) : children)}</div></div>diff --git a/apps/start/src/components/dashboards/select-dashboard.tsx b/apps/start/src/components/dashboards/select-dashboard.tsxindex 862be4874..9da647db0 100644--- a/apps/start/src/components/dashboards/select-dashboard.tsx+++ b/apps/start/src/components/dashboards/select-dashboard.tsx@@ -1,10 +1,10 @@+import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';+import { ArrowLeftIcon, PlusIcon, SaveIcon } from 'lucide-react';+import { useId, useState } from 'react';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';import { handleError, useTRPC } from '@/integrations/trpc/react';-import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';-import { ArrowLeftIcon, PlusIcon, SaveIcon } from 'lucide-react';-import { useId, useState } from 'react';export function SelectDashboard({value,@@ -65,50 +65,22 @@ export function SelectDashboard({Dashboard</Label>- {!isCreatingNew ? (- <div className="row gap-2 flex-wrap">- {dashboards.map((dashboard) => (- <Button- type="button"- key={dashboard.id}- variant={value === dashboard.id ? 'default' : 'outline'}- aria-pressed={value === dashboard.id}- onClick={() => onChange(dashboard.id)}- >- {dashboard.name}- </Button>- ))}- <Button- type="button"- variant="outline"- onClick={() => {- setPreviousValue(value);- setIsCreatingNew(true);- onChange('');- }}- icon={PlusIcon}- >- Create new dashboard- </Button>- </div>- ) : (+ {isCreatingNew ? (<div className="flex gap-2"><Button- type="button"- variant="outline"- size="icon"- icon={ArrowLeftIcon}aria-label="Back to dashboard selection"+ icon={ArrowLeftIcon}onClick={() => {setIsCreatingNew(false);setNewDashboardName('');onChange(previousValue);}}+ size="icon"+ type="button"+ variant="outline"/><Inputid={newDashboardNameId}- placeholder="Enter dashboard name"- value={newDashboardName}onChange={(e) => setNewDashboardName(e.target.value)}onKeyDown={(e) => {if (e.key !== 'Enter') {@@ -121,17 +93,45 @@ export function SelectDashboard({e.preventDefault();handleCreateDashboard();}}+ placeholder="Enter dashboard name"+ value={newDashboardName}/><Button- type="button"- onClick={handleCreateDashboard}disabled={!newDashboardName.trim() || dashboardMutation.isPending}- variant="outline"icon={SaveIcon}+ onClick={handleCreateDashboard}+ type="button"+ variant="outline">{dashboardMutation.isPending ? 'Creating...' : 'Create'}</Button></div>+ ) : (+ <div className="row flex-wrap gap-2">+ {dashboards.map((dashboard) => (+ <Button+ aria-pressed={value === dashboard.id}+ key={dashboard.id}+ onClick={() => onChange(dashboard.id)}+ type="button"+ variant={value === dashboard.id ? 'default' : 'outline'}+ >+ {dashboard.name}+ </Button>+ ))}+ <Button+ icon={PlusIcon}+ onClick={() => {+ setPreviousValue(value);+ setIsCreatingNew(true);+ onChange('');+ }}+ type="button"+ variant="outline"+ >+ Create new dashboard+ </Button>+ </div>)}</div>);diff --git a/apps/start/src/components/delta-chip.tsx b/apps/start/src/components/delta-chip.tsxindex c358faeb4..fe4d8e5b7 100644--- a/apps/start/src/components/delta-chip.tsx+++ b/apps/start/src/components/delta-chip.tsx@@ -1,6 +1,6 @@-import { cn } from '@/utils/cn';-import { type VariantProps, cva } from 'class-variance-authority';+import { cva, type VariantProps } from 'class-variance-authority';import { ArrowDownIcon, ArrowUpIcon } from 'lucide-react';+import { cn } from '@/utils/cn';const deltaChipVariants = cva('flex items-center justify-center gap-1 rounded-full font-semibold',@@ -12,7 +12,7 @@ const deltaChipVariants = cva(default: 'bg-muted text-muted-foreground',},size: {- xs: 'px-1.5 py-0 leading-none text-[10px]',+ xs: 'px-1.5 py-0 text-[10px] leading-none',sm: 'px-2 py-1 text-xs',md: 'px-2 py-1 text-sm',lg: 'px-2 py-1 text-base',@@ -57,9 +57,9 @@ export function DeltaChip({)}>{variant === 'inc' ? (- <ArrowUpIcon size={iconVariants[size || 'md']} className="shrink-0" />+ <ArrowUpIcon className="shrink-0" size={iconVariants[size || 'md']} />) : variant === 'dec' ? (- <ArrowDownIcon size={iconVariants[size || 'md']} className="shrink-0" />+ <ArrowDownIcon className="shrink-0" size={iconVariants[size || 'md']} />) : null}<span>{children}</span></div>diff --git a/apps/start/src/components/dot.tsx b/apps/start/src/components/dot.tsxindex 6dd67aec2..727a1261d 100644--- a/apps/start/src/components/dot.tsx+++ b/apps/start/src/components/dot.tsx@@ -28,7 +28,7 @@ export function Dot({ className, size = 8, animated }: DotProps) {><divclassName={cn(- 'absolute !m-0 rounded-full',+ '!m-0 absolute rounded-full',animated !== false && 'animate-ping',className)}@@ -36,7 +36,7 @@ export function Dot({ className, size = 8, animated }: DotProps) {/><divclassName={cn(- 'absolute !m-0 rounded-full',+ '!m-0 absolute rounded-full',filterCn(['animate-', 'group-hover/row'], className))}style={style}diff --git a/apps/start/src/components/events/event-icon.tsx b/apps/start/src/components/events/event-icon.tsxindex db469103b..4330edc11 100644--- a/apps/start/src/components/events/event-icon.tsx+++ b/apps/start/src/components/events/event-icon.tsx@@ -1,10 +1,9 @@-import { cn } from '@/utils/cn';+import type { EventMeta } from '@openpanel/db';import type { VariantProps } from 'class-variance-authority';import { cva } from 'class-variance-authority';import type { LucideIcon } from 'lucide-react';import * as Icons from 'lucide-react';--import type { EventMeta } from '@openpanel/db';+import { cn } from '@/utils/cn';const variants = cva('flex shrink-0 items-center justify-center rounded-full', {variants: {@@ -237,8 +236,8 @@ export function EventIcon({ className, name, size, meta }: EventIconProps) {return (<div className={cn(`bg-${color}-200`, variants({ size }), className)}><Icon- size={size === 'xs' ? 12 : size === 'sm' ? 14 : 20}className={`text-${color}-700`}+ size={size === 'xs' ? 12 : size === 'sm' ? 14 : 20}/></div>);diff --git a/apps/start/src/components/events/table/columns.tsx b/apps/start/src/components/events/table/columns.tsxindex 2d7649864..11690bd54 100644--- a/apps/start/src/components/events/table/columns.tsx+++ b/apps/start/src/components/events/table/columns.tsx@@ -102,8 +102,8 @@ export function useColumns() {return (<ProjectLinkclassName="group row items-center gap-2 whitespace-nowrap font-medium hover:underline"- to="/profiles/$profileId"params={{ profileId: profile.id }}+ to="/profiles/$profileId"><ProfileAvatar size="sm" {...profile} />{getProfileName(profile)}@@ -115,8 +115,8 @@ export function useColumns() {return (<ProjectLinkclassName="whitespace-nowrap font-medium hover:underline"- to="/profiles/$profileId"params={{ profileId }}+ to="/profiles/$profileId">Unknown</ProjectLink>@@ -127,8 +127,8 @@ export function useColumns() {return (<ProjectLinkclassName="whitespace-nowrap font-medium hover:underline"- to="/profiles/$profileId"params={{ profileId: deviceId }}+ to="/profiles/$profileId">Anonymous</ProjectLink>@@ -150,8 +150,8 @@ export function useColumns() {return (<ProjectLinkclassName="whitespace-nowrap font-medium hover:underline"- to="/sessions/$sessionId"params={{ sessionId }}+ to="/sessions/$sessionId">{sessionId.slice(0, 6)}</ProjectLink>diff --git a/apps/start/src/components/events/table/item.tsx b/apps/start/src/components/events/table/item.tsxindex 29a8df6e2..d5b9a32e7 100644--- a/apps/start/src/components/events/table/item.tsx+++ b/apps/start/src/components/events/table/item.tsx@@ -1,3 +1,7 @@+import type { IServiceEvent } from '@openpanel/core';+import { memo } from 'react';+import { Skeleton } from '../../skeleton';+import { EventIcon } from '../event-icon';import { ProfileAvatar } from '@/components/profiles/profile-avatar';import { SerieIcon } from '@/components/report-chart/common/serie-icon';import { Tooltiper } from '@/components/ui/tooltip';@@ -5,10 +9,6 @@ import { pushModal } from '@/modals';import { cn } from '@/utils/cn';import { formatTimeAgoOrDateTime } from '@/utils/date';import { getProfileName } from '@/utils/getters';-import type { IServiceEvent } from '@openpanel/core';-import { memo } from 'react';-import { Skeleton } from '../../skeleton';-import { EventIcon } from '../event-icon';interface EventItemProps {event: IServiceEvent | Record<string, never>;@@ -37,6 +37,16 @@ export const EventItem = memo<EventItemProps>(return (<div className={cn('group card @container overflow-hidden', className)}><div+ className={cn(+ 'col flex-1 gap-1 p-2',+ // Desktop+ '@lg:row @lg:items-center',+ 'cursor-pointer',+ event.meta?.color+ ? `hover:bg-${event.meta.color}-50 dark:hover:bg-${event.meta.color}-900`+ : 'hover:bg-def-200'+ )}+ data-slot="inner"onClick={() => {pushModal('EventDetails', {id: event.id,@@ -53,20 +63,9 @@ export const EventItem = memo<EventItemProps>(});}}}- data-slot="inner"- className={cn(- 'col gap-1 flex-1 p-2',- // Desktop- '@lg:row @lg:items-center',- 'cursor-pointer',- event.meta?.color- ? `hover:bg-${event.meta.color}-50 dark:hover:bg-${event.meta.color}-900`- : 'hover:bg-def-200'- )}>- <div className="min-w-0 flex-1 row items-center gap-2">+ <div className="row min-w-0 flex-1 items-center gap-2"><button- type="button"className="transition-transform hover:scale-105"onClick={(e) => {e.stopPropagation();@@ -75,14 +74,15 @@ export const EventItem = memo<EventItemProps>(id: event.id,});}}+ type="button">- <EventIcon name={event.name} size="sm" meta={event.meta} />+ <EventIcon meta={event.meta} name={event.name} size="sm" /></button>- <span className="min-w-0 whitespace-break-spaces wrap-break-word break-all text-sm leading-normal">+ <span className="wrap-break-word min-w-0 whitespace-break-spaces break-all text-sm leading-normal">{event.name === 'screen_view' ? (<>- <span className="text-muted-foreground mr-2">Visit:</span>- <span className="font-medium min-w-0">+ <span className="mr-2 text-muted-foreground">Visit:</span>+ <span className="min-w-0 font-medium">{url ? url : event.path}</span></>@@ -93,7 +93,7 @@ export const EventItem = memo<EventItemProps>()}</span></div>- <div className="row gap-2 items-center @max-lg:pl-8">+ <div className="row items-center gap-2 @max-lg:pl-8">{event.referrerName && viewOptions.referrerName !== false && (<Pillicon={<SerieIcon className="mr-2" name={event.referrerName} />}@@ -123,7 +123,7 @@ export const EventItem = memo<EventItemProps>(</Pill>)}{viewOptions.createdAt !== false && (- <span className="text-sm text-neutral-500">+ <span className="text-neutral-500 text-sm">{formatTimeAgoOrDateTime(event.createdAt)}</span>)}@@ -131,8 +131,8 @@ export const EventItem = memo<EventItemProps>(</div>{viewOptions.properties !== false && (<div+ className="border-neutral-200 border-t bg-def-100 p-4 py-2"data-slot="extra"- className="border-t border-neutral-200 p-4 py-2 bg-def-100"><pre className="text-sm leading-tight">{JSON.stringify(event.properties, null, 2)}@@ -146,10 +146,10 @@ export const EventItem = memo<EventItemProps>(export const EventItemSkeleton = () => {return (- <div className="card h-10 p-2 gap-4 row items-center">+ <div className="card row h-10 items-center gap-4 p-2"><Skeleton className="size-6 rounded-full" />- <Skeleton className="w-1/2 h-3" />- <div className="row gap-2 ml-auto">+ <Skeleton className="h-3 w-1/2" />+ <div className="row ml-auto gap-2"><Skeleton className="size-4 rounded-full" /><Skeleton className="size-4 rounded-full" /><Skeleton className="size-4 rounded-full" />@@ -170,14 +170,14 @@ function Pill({}) {return (<Tooltiper- content={children}className={cn(- 'shrink-0 whitespace-nowrap inline-flex gap-2 items-center rounded-full @3xl:text-muted-foreground h-6 text-xs font-mono',+ 'inline-flex h-6 shrink-0 items-center gap-2 whitespace-nowrap rounded-full font-mono @3xl:text-muted-foreground text-xs',className)}+ content={children}>- {icon && <div className="size-4 center-center">{icon}</div>}- <div className="hidden @3xl:inline">{children}</div>+ {icon && <div className="center-center size-4">{icon}</div>}+ <div className="@3xl:inline hidden">{children}</div></Tooltiper>);}diff --git a/apps/start/src/components/facehash/avatar-fallback.tsx b/apps/start/src/components/facehash/avatar-fallback.tsxindex 7a5cc8a6c..61b982991 100644--- a/apps/start/src/components/facehash/avatar-fallback.tsx+++ b/apps/start/src/components/facehash/avatar-fallback.tsx@@ -108,10 +108,10 @@ export const AvatarFallback = React.forwardRef<if (children) {return (<span- ref={ref}className={className}- style={style}data-avatar-fallback=""+ ref={ref}+ style={style}{...props}>{children}@@ -123,10 +123,10 @@ export const AvatarFallback = React.forwardRef<if (facehash) {return (<Facehash- ref={ref as React.Ref<HTMLDivElement>}+ groupHover={groupHover}name={name || '?'}+ ref={ref as React.Ref<HTMLDivElement>}size="100%"- groupHover={groupHover}{...facehashProps}style={{...style,@@ -139,8 +139,9 @@ export const AvatarFallback = React.forwardRef<// Initials modereturn (<span- ref={ref}className={className}+ data-avatar-fallback=""+ ref={ref}style={{display: 'flex',alignItems: 'center',@@ -149,7 +150,6 @@ export const AvatarFallback = React.forwardRef<height: '100%',...style,}}- data-avatar-fallback=""{...props}>{initials}diff --git a/apps/start/src/components/facehash/avatar-image.tsx b/apps/start/src/components/facehash/avatar-image.tsxindex 1bda724c6..1c15800e0 100644--- a/apps/start/src/components/facehash/avatar-image.tsx+++ b/apps/start/src/components/facehash/avatar-image.tsx@@ -74,17 +74,17 @@ export const AvatarImage = React.forwardRef<HTMLImageElement, AvatarImageProps>(return (<img- ref={imageRef}- src={src || undefined}alt={alt}className={className}+ data-avatar-image=""+ ref={imageRef}+ src={src || undefined}style={{width: '100%',height: '100%',objectFit: 'cover',...style,}}- data-avatar-image=""{...props}/>);diff --git a/apps/start/src/components/facehash/facehash.tsx b/apps/start/src/components/facehash/facehash.tsxindex 42b1bff58..139e76257 100644--- a/apps/start/src/components/facehash/facehash.tsx+++ b/apps/start/src/components/facehash/facehash.tsx@@ -184,7 +184,9 @@ const DEFAULT_GRADIENT_STYLE: React.CSSProperties = {function useColorScheme(colorScheme: ColorScheme): 'light' | 'dark' {const [systemScheme, setSystemScheme] = React.useState<'light' | 'dark'>(() => {- if (typeof window === 'undefined') return 'light';+ if (typeof window === 'undefined') {+ return 'light';+ }return window.matchMedia('(prefers-color-scheme: dark)').matches? 'dark': 'light';@@ -192,7 +194,9 @@ function useColorScheme(colorScheme: ColorScheme): 'light' | 'dark' {);React.useEffect(() => {- if (colorScheme !== 'auto') return;+ if (colorScheme !== 'auto') {+ return;+ }const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');const handler = (e: MediaQueryListEvent) => {@@ -242,9 +246,13 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(// Determine which colors to use based on schemeconst effectiveColors = React.useMemo(() => {// If explicit colors prop is provided, use it- if (colors) return colors;+ if (colors) {+ return colors;+ }// If colorClasses is provided, don't use inline colors- if (colorClasses) return undefined;+ if (colorClasses) {+ return undefined;+ }// Use scheme-specific colors or defaultsconst lightColors = colorsLight ?? DEFAULT_COLORS_LIGHT;@@ -328,11 +336,13 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(return (<div- ref={ref}- role="img"aria-label={`Avatar for ${name}`}- data-facehash-avatar=""className={`${bgColorClass ?? ''} ${className ?? ''}`}+ data-facehash-avatar=""+ onMouseEnter={handleMouseEnter}+ onMouseLeave={handleMouseLeave}+ ref={ref}+ role="img"style={{position: 'relative',display: 'flex',@@ -345,13 +355,12 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(...(bgColorHex && { backgroundColor: bgColorHex }),...style,}}- onMouseEnter={handleMouseEnter}- onMouseLeave={handleMouseLeave}{...props}>{/* Gradient overlay */}{variant === 'gradient' && (<div+ aria-hidden="true"className={gradientOverlayClass}style={{position: 'absolute',@@ -359,18 +368,17 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(pointerEvents: 'none',...(gradientOverlayClass ? {} : DEFAULT_GRADIENT_STYLE),}}- aria-hidden="true"/>)}{/* Face container with 3D transform */}<div- data-facehash-avatar-face=""className={usesCssHover && interactive? 'group-hover:[transform:var(--facehash-hover-transform)]': undefined}+ data-facehash-avatar-face=""style={{position: 'absolute',diff --git a/apps/start/src/components/facehash/faces.tsx b/apps/start/src/components/facehash/faces.tsxindex b0b981d46..cb519c53b 100644--- a/apps/start/src/components/facehash/faces.tsx+++ b/apps/start/src/components/facehash/faces.tsx@@ -10,14 +10,14 @@ export type FaceProps = {*/export const RoundFace: React.FC<FaceProps> = ({ className, style }) => (<svg- viewBox="0 0 100 100"+ aria-hidden="true"className={className}style={style}- aria-hidden="true"+ viewBox="0 0 100 100"><title>Round Eyes</title>- <circle cx="35" cy="45" r="8" fill="currentColor" />- <circle cx="65" cy="45" r="8" fill="currentColor" />+ <circle cx="35" cy="45" fill="currentColor" r="8" />+ <circle cx="65" cy="45" fill="currentColor" r="8" /></svg>);@@ -26,23 +26,23 @@ export const RoundFace: React.FC<FaceProps> = ({ className, style }) => (*/export const CrossFace: React.FC<FaceProps> = ({ className, style }) => (<svg- viewBox="0 0 100 100"+ aria-hidden="true"className={className}style={style}- aria-hidden="true"+ viewBox="0 0 100 100"><title>Cross Eyes</title><pathd="M27 37 L43 53 M43 37 L27 53"stroke="currentColor"- strokeWidth="4"strokeLinecap="round"+ strokeWidth="4"/><pathd="M57 37 L73 53 M73 37 L57 53"stroke="currentColor"- strokeWidth="4"strokeLinecap="round"+ strokeWidth="4"/></svg>);@@ -52,29 +52,29 @@ export const CrossFace: React.FC<FaceProps> = ({ className, style }) => (*/export const LineFace: React.FC<FaceProps> = ({ className, style }) => (<svg- viewBox="0 0 100 100"+ aria-hidden="true"className={className}style={style}- aria-hidden="true"+ viewBox="0 0 100 100"><title>Line Eyes</title><line+ stroke="currentColor"+ strokeLinecap="round"+ strokeWidth="4"x1="27"- y1="45"x2="43"+ y1="45"y2="45"- stroke="currentColor"- strokeWidth="4"- strokeLinecap="round"/><line+ stroke="currentColor"+ strokeLinecap="round"+ strokeWidth="4"x1="57"- y1="45"x2="73"+ y1="45"y2="45"- stroke="currentColor"- strokeWidth="4"- strokeLinecap="round"/></svg>);@@ -84,25 +84,25 @@ export const LineFace: React.FC<FaceProps> = ({ className, style }) => (*/export const CurvedFace: React.FC<FaceProps> = ({ className, style }) => (<svg- viewBox="0 0 100 100"+ aria-hidden="true"className={className}style={style}- aria-hidden="true"+ viewBox="0 0 100 100"><title>Curved Eyes</title><pathd="M27 50 Q35 38 43 50"+ fill="none"stroke="currentColor"- strokeWidth="4"strokeLinecap="round"- fill="none"+ strokeWidth="4"/><pathd="M57 50 Q65 38 73 50"+ fill="none"stroke="currentColor"- strokeWidth="4"strokeLinecap="round"- fill="none"+ strokeWidth="4"/></svg>);diff --git a/apps/start/src/components/facehash/index.ts b/apps/start/src/components/facehash/index.tsindex e66cabcaa..af356e8bd 100644--- a/apps/start/src/components/facehash/index.ts+++ b/apps/start/src/components/facehash/index.ts@@ -3,16 +3,16 @@// ============================================================================export type {+ ColorScheme,FacehashProps,Intensity3D,Variant,- ColorScheme,} from './facehash';export {- Facehash,DEFAULT_COLORS,- DEFAULT_COLORS_LIGHT,DEFAULT_COLORS_DARK,+ DEFAULT_COLORS_LIGHT,+ Facehash,} from './facehash';// ============================================================================diff --git a/apps/start/src/components/fade-in.tsx b/apps/start/src/components/fade-in.tsxindex a5d1c1fb0..77f328be6 100644--- a/apps/start/src/components/fade-in.tsx+++ b/apps/start/src/components/fade-in.tsx@@ -1,5 +1,5 @@-import { cn } from '@/utils/cn';import { useEffect, useRef } from 'react';+import { cn } from '@/utils/cn';type Props = {className?: string;diff --git a/apps/start/src/components/forms/checkbox-item.tsx b/apps/start/src/components/forms/checkbox-item.tsxindex 54c514aa7..649165d02 100644--- a/apps/start/src/components/forms/checkbox-item.tsx+++ b/apps/start/src/components/forms/checkbox-item.tsx@@ -1,10 +1,9 @@-import { cn } from '@/utils/cn';import { slug } from '@openpanel/shared';import type { LucideIcon } from 'lucide-react';import { forwardRef } from 'react';import type { ControllerRenderProps } from 'react-hook-form';-import { Switch } from '../ui/switch';+import { cn } from '@/utils/cn';type Props = {label: string;@@ -32,16 +31,16 @@ export const CheckboxItem = forwardRef<HTMLButtonElement, Props>({Icon && <div className="w-6 shrink-0">{<Icon />}</div>}<div className="flex-1"><div className="font-medium">{label}</div>- <div className=" text-muted-foreground">{description}</div>- {error && <div className="text-sm text-red-600">{error}</div>}+ <div className="text-muted-foreground">{description}</div>+ {error && <div className="text-red-600 text-sm">{error}</div>}</div><div><Switch- ref={ref}- disabled={disabled}checked={!!value}- onCheckedChange={onChange}+ disabled={disabled}id={id}+ onCheckedChange={onChange}+ ref={ref}/></div></label>diff --git a/apps/start/src/components/forms/copy-input.tsx b/apps/start/src/components/forms/copy-input.tsxindex ba3e694b6..672c61077 100644--- a/apps/start/src/components/forms/copy-input.tsx+++ b/apps/start/src/components/forms/copy-input.tsx@@ -1,8 +1,7 @@-import { clipboard } from '@/utils/clipboard';-import { cn } from '@/utils/cn';import { CopyIcon } from 'lucide-react';-import { Label } from '../ui/label';+import { clipboard } from '@/utils/clipboard';+import { cn } from '@/utils/cn';type Props = {label: React.ReactNode;@@ -13,14 +12,14 @@ type Props = {const CopyInput = ({ label, value, className }: Props) => {return (<button- type="button"className={cn('w-full min-w-0 text-left', className)}onClick={() => clipboard(value)}+ type="button">{!!label && <Label>{label}</Label>}- <div className="font-mono flex items-center justify-between gap-2 rounded bg-muted p-2 px-3">+ <div className="flex items-center justify-between gap-2 rounded bg-muted p-2 px-3 font-mono"><span className="min-w-0 flex-1 truncate">{value}</span>- <CopyIcon size={16} className="shrink-0" />+ <CopyIcon className="shrink-0" size={16} /></div></button>);diff --git a/apps/start/src/components/full-page-empty-state.tsx b/apps/start/src/components/full-page-empty-state.tsxindex 36299d9d8..ce2da1622 100644--- a/apps/start/src/components/full-page-empty-state.tsx+++ b/apps/start/src/components/full-page-empty-state.tsx@@ -1,7 +1,7 @@-import { cn } from '@/utils/cn';-import { BoxSelectIcon } from 'lucide-react';import type { LucideIcon } from 'lucide-react';+import { BoxSelectIcon } from 'lucide-react';import { PageHeader } from './page-header';+import { cn } from '@/utils/cn';interface FullPageEmptyStateProps {icon?: LucideIcon;@@ -30,7 +30,7 @@ export function FullPageEmptyState({<Icon size={60} strokeWidth={1} /></div>- <PageHeader title={title} description={description} className="mb-4" />+ <PageHeader className="mb-4" description={description} title={title} />{children}</div>diff --git a/apps/start/src/components/full-page-error-state.tsx b/apps/start/src/components/full-page-error-state.tsxindex edba659e2..19f0c1f5e 100644--- a/apps/start/src/components/full-page-error-state.tsx+++ b/apps/start/src/components/full-page-error-state.tsx@@ -1,5 +1,4 @@import { ServerCrashIcon } from 'lucide-react';-import { FullPageEmptyState } from './full-page-empty-state';export const FullPageErrorState = ({@@ -14,8 +13,8 @@ export const FullPageErrorState = ({return (<FullPageEmptyStateclassName="min-h-[calc(100vh-theme(spacing.16))]"- title={title}icon={ServerCrashIcon}+ title={title}>{description}{children && <div className="mt-4">{children}</div>}diff --git a/apps/start/src/components/full-page-loading-state.tsx b/apps/start/src/components/full-page-loading-state.tsxindex 359a1e9e2..cd9c75762 100644--- a/apps/start/src/components/full-page-loading-state.tsx+++ b/apps/start/src/components/full-page-loading-state.tsx@@ -1,6 +1,5 @@import type { LucideIcon } from 'lucide-react';import { Loader2Icon } from 'lucide-react';-import { FullPageEmptyState } from './full-page-empty-state';const FullPageLoadingState = ({@@ -13,13 +12,13 @@ const FullPageLoadingState = ({return (<FullPageEmptyStateclassName="min-h-[calc(100vh-theme(spacing.16))]"- title={title}description={description}icon={((props) => (<Loader2Icon {...props} className="animate-spin" />)) as LucideIcon}+ title={title}/>);};diff --git a/apps/start/src/components/full-width-navbar.tsx b/apps/start/src/components/full-width-navbar.tsxindex 44edbae39..82dae32dc 100644--- a/apps/start/src/components/full-width-navbar.tsx+++ b/apps/start/src/components/full-width-navbar.tsx@@ -1,6 +1,5 @@-import { cn } from '@/utils/cn';-import { LogoSquare } from './logo';+import { cn } from '@/utils/cn';type Props = {children: React.ReactNode;@@ -9,8 +8,8 @@ type Props = {const FullWidthNavbar = ({ children, className }: Props) => {return (- <div className={cn('border-b border-border bg-card', className)}>- <div className="mx-auto flex h-14 w-full items-center justify-between px-4 md:w-[95vw] lg:w-[80vw] max-w-screen-2xl">+ <div className={cn('border-border border-b bg-card', className)}>+ <div className="mx-auto flex h-14 w-full max-w-screen-2xl items-center justify-between px-4 md:w-[95vw] lg:w-[80vw]"><LogoSquare className="size-8" />{children}</div>diff --git a/apps/start/src/components/fullscreen-toggle.tsx b/apps/start/src/components/fullscreen-toggle.tsxindex 32fbf8fd0..0f4014091 100644--- a/apps/start/src/components/fullscreen-toggle.tsx+++ b/apps/start/src/components/fullscreen-toggle.tsx@@ -1,12 +1,11 @@-import { cn } from '@/utils/cn';import { bind } from 'bind-event-listener';import { ChevronLeftIcon, FullscreenIcon } from 'lucide-react';import { parseAsBoolean, useQueryState } from 'nuqs';import { useEffect, useRef, useState } from 'react';import { useDebounce } from 'usehooks-ts';-import { Button } from './ui/button';import { Tooltiper } from './ui/tooltip';+import { cn } from '@/utils/cn';type Props = {children: React.ReactNode;@@ -28,7 +27,7 @@ export const Fullscreen = (props: Props) => {className={cn(isFullscreen? 'fixed inset-0 z-50 overflow-auto bg-def-200'- : 'w-full min-h-full col'+ : 'col min-h-full w-full')}>{props.children}@@ -42,13 +41,13 @@ export const FullscreenOpen = () => {return null;}return (- <Tooltiper content="Toggle fullscreen" asChild>+ <Tooltiper asChild content="Toggle fullscreen"><Button- variant="outline"- size="icon"onClick={() => {setIsFullscreen((p) => !p);}}+ size="icon"+ variant="outline"><FullscreenIcon className="size-4" /></Button>@@ -88,11 +87,9 @@ export const FullscreenClose = () => {}return (- <div className="fixed bottom-0 top-0 z-50 flex items-center">- <Tooltiper content="Exit full screen" asChild>+ <div className="fixed top-0 bottom-0 z-50 flex items-center">+ <Tooltiper asChild content="Exit full screen"><button- type="button"- ref={ref}className={cn('flex h-20 w-20 -translate-x-20 items-center justify-center rounded-full bg-foreground transition-transform',visible && isFullscreenDebounced && '-translate-x-10'@@ -100,6 +97,8 @@ export const FullscreenClose = () => {onClick={() => {setIsFullscreen(false);}}+ ref={ref}+ type="button"><ChevronLeftIcon className="ml-6 text-background" /></button>diff --git a/apps/start/src/components/grafana-grid.tsx b/apps/start/src/components/grafana-grid.tsxindex b18c39be5..03cb10bbf 100644--- a/apps/start/src/components/grafana-grid.tsx+++ b/apps/start/src/components/grafana-grid.tsx@@ -70,22 +70,22 @@ export function GrafanaGrid({`}</style><div className="-m-4"><ResponsiveGridLayout- className="layout"- layouts={layouts}breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }}+ className="layout"cols={{ lg: 12, md: 12, sm: 6, xs: 4, xxs: 2 }}- rowHeight={100}- draggableHandle=".drag-handle"compactType="vertical"- preventCollision={false}+ draggableHandle=".drag-handle"+ isDraggable={isDraggable}+ isResizable={isResizable}+ layouts={layouts}margin={[16, 16]}- transformScale={1}- useCSSTransforms={true}- onLayoutChange={onLayoutChange}onDragStop={onDragStop}+ onLayoutChange={onLayoutChange}onResizeStop={onResizeStop}- isDraggable={isDraggable}- isResizable={isResizable}+ preventCollision={false}+ rowHeight={100}+ transformScale={1}+ useCSSTransforms={true}>{children}</ResponsiveGridLayout>diff --git a/apps/start/src/components/grid-table.tsx b/apps/start/src/components/grid-table.tsxindex 79a35847e..26c3bc41f 100644--- a/apps/start/src/components/grid-table.tsx+++ b/apps/start/src/components/grid-table.tsx@@ -66,7 +66,7 @@ export const GridCell: React.FC<)}{...props}>- <div className="truncate w-full">{children}</div>+ <div className="w-full truncate">{children}</div></Component>);diff --git a/apps/start/src/components/groups/table/columns.tsx b/apps/start/src/components/groups/table/columns.tsxindex 2ce7808b6..cfce07915 100644--- a/apps/start/src/components/groups/table/columns.tsx+++ b/apps/start/src/components/groups/table/columns.tsx@@ -1,9 +1,9 @@-import { useAppParams } from '@/hooks/use-app-params';-import { ColumnCreatedAt } from '@/components/column-created-at';-import { Badge } from '@/components/ui/badge';+import type { IServiceGroup } from '@openpanel/core';import { Link } from '@tanstack/react-router';import type { ColumnDef } from '@tanstack/react-table';-import type { IServiceGroup } from '@openpanel/core';+import { ColumnCreatedAt } from '@/components/column-created-at';+import { Badge } from '@/components/ui/badge';+import { useAppParams } from '@/hooks/use-app-params';export type IServiceGroupWithStats = IServiceGroup & {memberCount: number;diff --git a/apps/start/src/components/groups/table/index.tsx b/apps/start/src/components/groups/table/index.tsxindex 0db80c731..b38e0481a 100644--- a/apps/start/src/components/groups/table/index.tsx+++ b/apps/start/src/components/groups/table/index.tsx@@ -1,4 +1,3 @@-import type { IServiceGroup } from '@openpanel/core';import type { UseQueryResult } from '@tanstack/react-query';import type { PaginationState, Table, Updater } from '@tanstack/react-table';import { getCoreRowModel, useReactTable } from '@tanstack/react-table';diff --git a/apps/start/src/components/integrations/active-integrations.tsx b/apps/start/src/components/integrations/active-integrations.tsxindex 7d9631b6f..a37c0032d 100644--- a/apps/start/src/components/integrations/active-integrations.tsx+++ b/apps/start/src/components/integrations/active-integrations.tsx@@ -1,8 +1,4 @@-import { useAppParams } from '@/hooks/use-app-params';-import { useTRPC } from '@/integrations/trpc/react';-import { pushModal, showConfirm } from '@/modals';import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';-import { AnimatePresence, motion } from 'framer-motion';import { BoxSelectIcon } from 'lucide-react';import { useMemo } from 'react';@@ -15,6 +11,9 @@ import {IntegrationCardSkeleton,} from './integration-card';import { INTEGRATIONS } from './integrations';+import { useAppParams } from '@/hooks/use-app-params';+import { useTRPC } from '@/integrations/trpc/react';+import { pushModal, showConfirm } from '@/modals';export function ActiveIntegrations() {const { projectId } = useAppParams();@@ -54,7 +53,7 @@ export function ActiveIntegrations() {const isLoading = query.isLoading;return (- <div className="grid grid-cols-1 gap-4 md:grid-cols-2 auto-rows-auto">+ <div className="grid auto-rows-auto grid-cols-1 gap-4 md:grid-cols-2">{isLoading && (<><IntegrationCardSkeleton />@@ -64,13 +63,13 @@ export function ActiveIntegrations() {)}{!isLoading && data.length === 0 && (<IntegrationCard+ description="Integrations allow you to connect your systems to OpenPanel. You can add them in the available integrations section."icon={<IntegrationCardLogo className="bg-def-200 text-foreground"><BoxSelectIcon className="size-10" strokeWidth={1} /></IntegrationCardLogo>}name="No integrations yet"- description="Integrations allow you to connect your systems to OpenPanel. You can add them in the available integrations section."/>)}<AnimatePresence mode="popLayout">@@ -78,11 +77,10 @@ export function ActiveIntegrations() {return (<motion.div key={item.id} layout="position"><IntegrationCard {...item.integration} name={item.name}>- <IntegrationCardFooter className="row justify-between items-center">+ <IntegrationCardFooter className="row items-center justify-between"><PingBadge>Connected</PingBadge><div className="row gap-2"><Button- variant="ghost"className="text-destructive"onClick={() => {showConfirm({@@ -95,17 +93,18 @@ export function ActiveIntegrations() {},});}}+ variant="ghost">Delete</Button><Button- variant="ghost"onClick={() => {pushModal('AddIntegration', {id: item.id,type: item.config.type,});}}+ variant="ghost">Edit</Button>diff --git a/apps/start/src/components/integrations/all-integrations.tsx b/apps/start/src/components/integrations/all-integrations.tsxindex b0db0cab0..4f353a606 100644--- a/apps/start/src/components/integrations/all-integrations.tsx+++ b/apps/start/src/components/integrations/all-integrations.tsx@@ -1,29 +1,29 @@-import { Button } from '@/components/ui/button';-import { pushModal } from '@/modals';import { PlugIcon } from 'lucide-react';import { IntegrationCard, IntegrationCardFooter } from './integration-card';import { INTEGRATIONS } from './integrations';+import { Button } from '@/components/ui/button';+import { pushModal } from '@/modals';export function AllIntegrations() {return (<div className="grid grid-cols-1 gap-4 md:grid-cols-2">{INTEGRATIONS.map((integration) => (<IntegrationCard- key={integration.name}+ description={integration.description}icon={integration.icon}+ key={integration.name}name={integration.name}- description={integration.description}><IntegrationCardFooter className="row justify-end"><Button- variant="outline"onClick={() => {pushModal('AddIntegration', {type: integration.type,});}}+ variant="outline">- <PlugIcon className="size-4 mr-2" />+ <PlugIcon className="mr-2 size-4" />Connect</Button></IntegrationCardFooter>diff --git a/apps/start/src/components/integrations/integration-card.tsx b/apps/start/src/components/integrations/integration-card.tsxindex 53b731da4..e8cab322a 100644--- a/apps/start/src/components/integrations/integration-card.tsx+++ b/apps/start/src/components/integrations/integration-card.tsx@@ -8,7 +8,7 @@ export function IntegrationCardFooter({className?: string;}) {return (- <div className={cn('row p-4 border-t rounded-b', className)}>+ <div className={cn('row rounded-b border-t p-4', className)}>{children}</div>);@@ -22,7 +22,7 @@ export function IntegrationCardHeader({className?: string;}) {return (- <div className={cn('relative row p-4 border-b rounded-t', className)}>+ <div className={cn('row relative rounded-t border-b p-4', className)}>{children}</div>);@@ -38,7 +38,7 @@ export function IntegrationCardHeaderButtons({return (<divclassName={cn(- 'absolute right-4 top-0 bottom-0 row items-center gap-2',+ 'row absolute top-0 right-4 bottom-0 items-center gap-2',className)}>@@ -63,7 +63,7 @@ export function IntegrationCardLogoImage({backgroundColor,}}>- <img src={src} alt="Integration Logo" />+ <img alt="Integration Logo" src={src} /></IntegrationCardLogo>);}@@ -78,7 +78,7 @@ export function IntegrationCardLogo({return (<divclassName={cn(- 'size-14 rounded overflow-hidden shrink-0 center-center',+ 'center-center size-14 shrink-0 overflow-hidden rounded',className)}{...props}@@ -102,9 +102,9 @@ export function IntegrationCard({return (<div className="card self-start"><IntegrationCardContent+ description={description}icon={icon}name={name}- description={description}/>{children}</div>@@ -135,9 +135,9 @@ export function IntegrationCardSkeleton() {return (<div className="card self-start"><div className="row gap-4 p-4">- <Skeleton className="size-14 rounded shrink-0" />- <div className="col gap-1 flex-grow">- <Skeleton className="h-5 w-1/2 mb-2" />+ <Skeleton className="size-14 shrink-0 rounded" />+ <div className="col flex-grow gap-1">+ <Skeleton className="mb-2 h-5 w-1/2" /><Skeleton className="h-3 w-full" /><Skeleton className="h-3 w-3/4" /></div>diff --git a/apps/start/src/components/json-editor.tsx b/apps/start/src/components/json-editor.tsxindex 7831d9511..d0bbaa769 100644--- a/apps/start/src/components/json-editor.tsx+++ b/apps/start/src/components/json-editor.tsx@@ -1,11 +1,11 @@'use client';-import { basicSetup } from 'codemirror';import { javascript } from '@codemirror/lang-javascript';import { json } from '@codemirror/lang-json';-import { oneDark } from '@codemirror/theme-one-dark';import { Compartment, EditorState, type Extension } from '@codemirror/state';-import { EditorView, keymap } from '@codemirror/view';+import { oneDark } from '@codemirror/theme-one-dark';+import { EditorView } from '@codemirror/view';+import { basicSetup } from 'codemirror';import { useEffect, useRef, useState } from 'react';import { useTheme } from './theme-provider';@@ -67,7 +67,9 @@ export function JsonEditor({// Create editor once on mountuseEffect(() => {- if (!editorRef.current || viewRef.current) return;+ if (!editorRef.current || viewRef.current) {+ return;+ }const themeCompartment = new Compartment();themeCompartmentRef.current = themeCompartment;@@ -159,7 +161,9 @@ export function JsonEditor({// Update theme using compartmentuseEffect(() => {- if (!viewRef.current || !themeCompartmentRef.current) return;+ if (!(viewRef.current && themeCompartmentRef.current)) {+ return;+ }viewRef.current.dispatch({effects: themeCompartmentRef.current.reconfigure(@@ -170,7 +174,9 @@ export function JsonEditor({// Update language using compartmentuseEffect(() => {- if (!viewRef.current || !languageCompartmentRef.current) return;+ if (!(viewRef.current && languageCompartmentRef.current)) {+ return;+ }viewRef.current.dispatch({effects: languageCompartmentRef.current.reconfigure(@@ -182,7 +188,9 @@ export function JsonEditor({// Update editor content when value changes externallyuseEffect(() => {- if (!viewRef.current || isUpdatingRef.current) return;+ if (!viewRef.current || isUpdatingRef.current) {+ return;+ }const currentContent = viewRef.current.state.doc.toString();if (currentContent !== value) {@@ -202,11 +210,11 @@ export function JsonEditor({return (<div className={className}><div+ className={`rounded-md ${isValid ? '' : 'ring-1 ring-destructive'}`}ref={editorRef}- className={`rounded-md ${!isValid ? 'ring-1 ring-destructive' : ''}`}/>{!isValid && (- <p className="mt-1 text-sm text-destructive">+ <p className="mt-1 text-destructive text-sm">{error ||`Invalid ${language === 'javascript' ? 'JavaScript' : 'JSON'}. Please check your syntax.`}</p>diff --git a/apps/start/src/components/lazy-component.tsx b/apps/start/src/components/lazy-component.tsxindex 3b479250a..c901037be 100644--- a/apps/start/src/components/lazy-component.tsx+++ b/apps/start/src/components/lazy-component.tsx@@ -72,7 +72,7 @@ export const LazyComponent = ({const shouldRender = lazy ? once.current || inViewport : true;return (- <div ref={ref} className={className}>+ <div className={className} ref={ref}>{shouldRender ? children : (fallback ?? <div />)}</div>);diff --git a/apps/start/src/components/links.tsx b/apps/start/src/components/links.tsxindex 1437879a6..77747f5cc 100644--- a/apps/start/src/components/links.tsx+++ b/apps/start/src/components/links.tsx@@ -1,5 +1,5 @@-import { useAppParams } from '@/hooks/use-app-params';import { Link, type LinkComponentProps } from '@tanstack/react-router';+import { useAppParams } from '@/hooks/use-app-params';type ProjectLinkBaseProps = Omit<LinkComponentProps,@@ -47,9 +47,9 @@ export function ProjectLink({return (<Link{...rest}- to={`/$organizationId/$projectId/${path.replace(/^\//, '')}` as any}- params={{ organizationId, projectId, ...params } as any}activeOptions={{ exact: exact ?? true }}+ params={{ organizationId, projectId, ...params } as any}+ to={`/$organizationId/$projectId/${path.replace(/^\//, '')}` as any}>{children}</Link>diff --git a/apps/start/src/components/login-left-panel.tsx b/apps/start/src/components/login-left-panel.tsxindex ccc4288d7..fe68090ea 100644--- a/apps/start/src/components/login-left-panel.tsx+++ b/apps/start/src/components/login-left-panel.tsx@@ -1,3 +1,4 @@+import { SellingPoint } from './selling-points';import {Carousel,CarouselContent,@@ -5,7 +6,6 @@ import {CarouselNext,CarouselPrevious,} from '@/components/ui/carousel';-import { SellingPoint } from './selling-points';const sellingPoints = [{@@ -13,8 +13,8 @@ const sellingPoints = [render: () => (<SellingPointbgImage="/img-1.webp"- title="Best open-source alternative"description="Mixpanel too expensive, Google Analytics has no privacy, Amplitude old and boring"+ title="Best open-source alternative"/>),},@@ -23,8 +23,8 @@ const sellingPoints = [render: () => (<SellingPointbgImage="/img-2.webp"- title="Fast and reliable"description="Never miss a beat with our real-time analytics"+ title="Fast and reliable"/>),},@@ -33,8 +33,8 @@ const sellingPoints = [render: () => (<SellingPointbgImage="/img-3.webp"- title="Easy to use"description="Compared to other tools we have kept it simple"+ title="Easy to use"/>),},@@ -43,8 +43,8 @@ const sellingPoints = [render: () => (<SellingPointbgImage="/img-4.webp"- title="Privacy by default"description="We have built our platform with privacy at its heart"+ title="Privacy by default"/>),},@@ -53,8 +53,8 @@ const sellingPoints = [render: () => (<SellingPointbgImage="/img-5.webp"- title="Open source"description="You can inspect the code and self-host if you choose"+ title="Open source"/>),},@@ -64,9 +64,9 @@ export function LoginLeftPanel() {return (<div className="relative h-screen overflow-hidden">{/* Carousel */}- <div className="flex items-center justify-center h-full mt-24">+ <div className="mt-24 flex h-full items-center justify-center"><Carousel- className="w-full h-full [&>div]:h-full [&>div]:min-h-full"+ className="h-full w-full [&>div]:h-full [&>div]:min-h-full"opts={{loop: true,align: 'center',@@ -75,17 +75,17 @@ export function LoginLeftPanel() {<CarouselContent className="h-full">{sellingPoints.map((point, index) => (<CarouselItem+ className="p-8 pt-0 pb-32"key={`selling-point-${point.key}`}- className="p-8 pb-32 pt-0">- <div className="rounded-xl min-h-full h-full overflow-hidden bg-card border border-border shadow-lg">+ <div className="h-full min-h-full overflow-hidden rounded-xl border border-border bg-card shadow-lg">{point.render()}</div></CarouselItem>))}</CarouselContent>- <CarouselPrevious className="left-12 bottom-30 top-auto" />- <CarouselNext className="right-12 bottom-30 top-auto" />+ <CarouselPrevious className="top-auto bottom-30 left-12" />+ <CarouselNext className="top-auto right-12 bottom-30" /></Carousel></div></div>diff --git a/apps/start/src/components/logo.tsx b/apps/start/src/components/logo.tsxindex 71a70b149..c4a647efc 100644--- a/apps/start/src/components/logo.tsx+++ b/apps/start/src/components/logo.tsx@@ -7,9 +7,9 @@ interface LogoProps {export function LogoSquare({ className }: LogoProps) {return (<img- src="/logo.svg"- className={cn('rounded-md', className)}alt="Openpanel logo"+ className={cn('rounded-md', className)}+ src="/logo.svg"/>);}@@ -17,7 +17,7 @@ export function LogoSquare({ className }: LogoProps) {export function Logo({ className }: LogoProps) {return (<div- className={cn('flex items-center gap-2 text-xl font-medium', className)}+ className={cn('flex items-center gap-2 font-medium text-xl', className)}><LogoSquare className="max-h-8" /><span>openpanel.dev</span>diff --git a/apps/start/src/components/markdown.tsx b/apps/start/src/components/markdown.tsxindex 084aea7a3..d72ce69da 100644--- a/apps/start/src/components/markdown.tsx+++ b/apps/start/src/components/markdown.tsx@@ -12,8 +12,8 @@ export const Markdown = memo<Options>((props) => (<ReactMarkdown{...props}- remarkPlugins={[remarkParse, remarkHighlight, remarkMath, remarkGfm]}rehypePlugins={[rehypeKatex, remarkRehype]}+ remarkPlugins={[remarkParse, remarkHighlight, remarkMath, remarkGfm]}/>),(prevProps, nextProps) =>diff --git a/apps/start/src/components/mock-event-list.tsx b/apps/start/src/components/mock-event-list.tsxindex adab5ad43..6c73ae841 100644--- a/apps/start/src/components/mock-event-list.tsx+++ b/apps/start/src/components/mock-event-list.tsx@@ -1,8 +1,7 @@-import { EventListItem } from '@/components/events/event-list-item';+import type { IServiceEventMinimal } from '@openpanel/core';import { AnimatePresence, motion } from 'framer-motion';import { useEffect, useState } from 'react';--import type { IServiceEventMinimal } from '@openpanel/core';+import { EventListItem } from '@/components/events/event-list-item';const useWebEventGenerator = () => {const [events, setEvents] = useState<IServiceEventMinimal[]>([]);@@ -116,20 +115,20 @@ export const MockEventList = () => {return (<div className="hide-scrollbar h-screen overflow-y-auto">- <div className="text-background-foreground py-16 text-center text-2xl font-bold">+ <div className="py-16 text-center font-bold text-2xl text-background-foreground">Real time data<br />at your fingertips</div>- <AnimatePresence mode="popLayout" initial>+ <AnimatePresence initial mode="popLayout"><div className="flex flex-col gap-4 p-4">{state.map((event) => (<motion.div- key={event.id}- layout- initial={{ opacity: 0, x: -400, scale: 0.5 }}animate={{ opacity: 1, x: 0, scale: 1 }}exit={{ opacity: 0, x: 200, scale: 1.2 }}+ initial={{ opacity: 0, x: -400, scale: 0.5 }}+ key={event.id}+ layouttransition={{ duration: 0.6, type: 'spring' }}><EventListItem {...event} minimal />diff --git a/apps/start/src/components/notifications/notification-provider.tsx b/apps/start/src/components/notifications/notification-provider.tsxindex 93c4debc7..df506cc19 100644--- a/apps/start/src/components/notifications/notification-provider.tsx+++ b/apps/start/src/components/notifications/notification-provider.tsx@@ -1,13 +1,15 @@-import { useAppParams } from '@/hooks/use-app-params';-import useWS from '@/hooks/use-ws';import type { Notification } from '@openpanel/db';import { BellIcon } from 'lucide-react';import { toast } from 'sonner';+import { useAppParams } from '@/hooks/use-app-params';+import useWS from '@/hooks/use-ws';export function NotificationProvider() {const { projectId } = useAppParams();- if (!projectId) return null;+ if (!projectId) {+ return null;+ }return <InnerNotificationProvider projectId={projectId} />;}diff --git a/apps/start/src/components/notifications/notification-rules.tsx b/apps/start/src/components/notifications/notification-rules.tsxindex ca83f0e73..0c3849099 100644--- a/apps/start/src/components/notifications/notification-rules.tsx+++ b/apps/start/src/components/notifications/notification-rules.tsx@@ -1,6 +1,3 @@-import { useAppParams } from '@/hooks/use-app-params';-import { useTRPC } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';import { useQuery } from '@tanstack/react-query';import { AnimatePresence, motion } from 'framer-motion';import { PencilRulerIcon, PlusIcon } from 'lucide-react';@@ -9,6 +6,9 @@ import { FullPageEmptyState } from '../full-page-empty-state';import { IntegrationCardSkeleton } from '../integrations/integration-card';import { Button } from '../ui/button';import { RuleCard } from './rule-card';+import { useAppParams } from '@/hooks/use-app-params';+import { useTRPC } from '@/integrations/trpc/react';+import { pushModal } from '@/modals';export function NotificationRules() {const { projectId } = useAppParams();@@ -26,19 +26,19 @@ export function NotificationRules() {if (!isLoading && data.length === 0) {return (- <FullPageEmptyState title="No rules yet" icon={PencilRulerIcon}>+ <FullPageEmptyState icon={PencilRulerIcon} title="No rules yet"><p>You have not created any rules yet. Create a rule to start gettingnotifications.</p><ButtonclassName="mt-8"- variant="outline"onClick={() =>pushModal('AddNotificationRule', {rule: undefined,})}+ variant="outline">Add Rule</Button>@@ -51,17 +51,17 @@ export function NotificationRules() {<div className="mb-2"><Buttonicon={PlusIcon}- variant="outline"onClick={() =>pushModal('AddNotificationRule', {rule: undefined,})}+ variant="outline">Add Rule</Button></div>- <div className="col gap-4 w-full grid md:grid-cols-2">+ <div className="col grid w-full gap-4 md:grid-cols-2">{isLoading && (<><IntegrationCardSkeleton />diff --git a/apps/start/src/components/notifications/notifications.tsx b/apps/start/src/components/notifications/notifications.tsxindex 413f43455..32a9bebc8 100644--- a/apps/start/src/components/notifications/notifications.tsx+++ b/apps/start/src/components/notifications/notifications.tsx@@ -1,7 +1,7 @@-import { useAppParams } from '@/hooks/use-app-params';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { NotificationsTable } from './table';+import { useAppParams } from '@/hooks/use-app-params';+import { useTRPC } from '@/integrations/trpc/react';export function Notifications() {const { projectId } = useAppParams();diff --git a/apps/start/src/components/notifications/rule-card.tsx b/apps/start/src/components/notifications/rule-card.tsxindex ffda25d70..726b26251 100644--- a/apps/start/src/components/notifications/rule-card.tsx+++ b/apps/start/src/components/notifications/rule-card.tsx@@ -1,9 +1,5 @@-import { useTRPC } from '@/integrations/trpc/react';-import { pushModal, showConfirm } from '@/modals';-import type { RouterOutputs } from '@/trpc/client';import type { NotificationRule } from '@openpanel/db';import { useMutation, useQueryClient } from '@tanstack/react-query';-import { FilterIcon } from 'lucide-react';import { toast } from 'sonner';import { ColorSquare } from '../color-square';@@ -15,6 +11,9 @@ import { PingBadge } from '../ping';import { Badge } from '../ui/badge';import { Button } from '../ui/button';import { Tooltiper } from '../ui/tooltip';+import { useTRPC } from '@/integrations/trpc/react';+import { pushModal, showConfirm } from '@/modals';+import type { RouterOutputs } from '@/trpc/client';function EventBadge({event,@@ -23,7 +22,6 @@ function EventBadge({}) {return (<Tooltiper- disabled={!event.filters.length}content={<div className="col gap-2 font-mono">{event.filters.map((filter) => (@@ -33,11 +31,12 @@ function EventBadge({))}</div>}+ disabled={!event.filters.length}>- <Badge variant="outline" className="inline-flex">+ <Badge className="inline-flex" variant="outline">{event.name === '*' ? 'Any event' : event.name}{Boolean(event.filters.length) && (- <FilterIcon className="size-2 ml-1" />+ <FilterIcon className="ml-1 size-2" />)}</Badge></Tooltiper>@@ -67,10 +66,10 @@ export function RuleCard({switch (rule.config.type) {case 'events':return (- <div className="row gap-2 items-baseline flex-wrap">+ <div className="row flex-wrap items-baseline gap-2"><div>Get notified when</div>{rule.config.events.map((event) => (- <EventBadge key={event.id} event={event} />+ <EventBadge event={event} key={event.id} />))}<div>occurs</div></div>@@ -82,11 +81,11 @@ export function RuleCard({<div className="col gap-2">{rule.config.events.map((event, index) => (<div+ className="row items-center gap-2 font-mono"key={event.id}- className="row gap-2 items-center font-mono"><ColorSquare>{index + 1}</ColorSquare>- <EventBadge key={event.id} event={event} />+ <EventBadge event={event} key={event.id} /></div>))}</div>@@ -99,16 +98,15 @@ export function RuleCard({<IntegrationCardHeader><div className="title">{rule.name}</div></IntegrationCardHeader>- <div className="p-4 col gap-2">{renderConfig()}</div>- <IntegrationCardFooter className="row gap-2 justify-between items-center">- <div className="row gap-2 flex-wrap">+ <div className="col gap-2 p-4">{renderConfig()}</div>+ <IntegrationCardFooter className="row items-center justify-between gap-2">+ <div className="row flex-wrap gap-2">{rule.integrations.map((integration) => (<PingBadge key={integration.id}>{integration.name}</PingBadge>))}</div><div className="row gap-2"><Button- variant="ghost"className="text-destructive"onClick={() => {showConfirm({@@ -121,16 +119,17 @@ export function RuleCard({},});}}+ variant="ghost">Delete</Button><Button- variant="ghost"onClick={() => {pushModal('AddNotificationRule', {rule,});}}+ variant="ghost">Edit</Button>diff --git a/apps/start/src/components/notifications/table/columns.tsx b/apps/start/src/components/notifications/table/columns.tsxindex d2ca48047..3a162e410 100644--- a/apps/start/src/components/notifications/table/columns.tsx+++ b/apps/start/src/components/notifications/table/columns.tsx@@ -1,13 +1,10 @@-import { formatDateTime, formatTime } from '@/utils/date';+import type { INotificationPayload } from '@openpanel/core';import type { ColumnDef } from '@tanstack/react-table';-import { isToday } from 'date-fns';-import { ColumnCreatedAt } from '@/components/column-created-at';import { ProjectLink } from '@/components/links';import { SerieIcon } from '@/components/report-chart/common/serie-icon';import { createHeaderColumn } from '@/components/ui/data-table/data-table-helpers';import type { RouterOutputs } from '@/trpc/client';-import type { INotificationPayload } from '@openpanel/core';function getEventFromPayload(payload: INotificationPayload | null) {if (payload?.type === 'event') {@@ -27,7 +24,7 @@ export function useColumns() {cell({ row }) {const { title } = row.original;return (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2">{/* {isReadAt === null && <PingBadge>Unread</PingBadge>} */}<span className="max-w-md truncate font-medium">{title}</span></div>@@ -149,9 +146,9 @@ export function useColumns() {}return (<ProjectLink- to="/profiles/$profileId"- params={{ profileId: event.profileId }}className="inline-flex min-w-full flex-none items-center gap-2"+ params={{ profileId: event.profileId }}+ to="/profiles/$profileId">{event.profileId}</ProjectLink>diff --git a/apps/start/src/components/notifications/table/index.tsx b/apps/start/src/components/notifications/table/index.tsxindex f658cda56..34cfe383f 100644--- a/apps/start/src/components/notifications/table/index.tsx+++ b/apps/start/src/components/notifications/table/index.tsx@@ -1,10 +1,9 @@import type { UseQueryResult } from '@tanstack/react-query';-+import { useColumns } from './columns';import { DataTable } from '@/components/ui/data-table/data-table';import { DataTableToolbar } from '@/components/ui/data-table/data-table-toolbar';import { useTable } from '@/components/ui/data-table/use-table';import type { RouterOutputs } from '@/trpc/client';-import { useColumns } from './columns';type Props = {query: UseQueryResult<@@ -27,7 +26,7 @@ export const NotificationsTable = ({ query }: Props) => {return (<><DataTableToolbar table={table} />- <DataTable table={table} loading={isLoading} />+ <DataTable loading={isLoading} table={table} /></>);};diff --git a/apps/start/src/components/onboarding-left-panel.tsx b/apps/start/src/components/onboarding-left-panel.tsxindex 99d668cfa..c66c09170 100644--- a/apps/start/src/components/onboarding-left-panel.tsx+++ b/apps/start/src/components/onboarding-left-panel.tsx@@ -1,10 +1,10 @@+import Autoplay from 'embla-carousel-autoplay';+import { QuoteIcon } from 'lucide-react';import {Carousel,CarouselContent,CarouselItem,} from '@/components/ui/carousel';-import Autoplay from 'embla-carousel-autoplay';-import { QuoteIcon } from 'lucide-react';const testimonials = [{@@ -53,19 +53,19 @@ function TestimonialSlide({site?: string;}) {return (- <div className="relative flex flex-col justify-end h-full p-10 select-none">+ <div className="relative flex h-full select-none flex-col justify-end p-10"><img- src={bgImage}- className="absolute inset-0 w-full h-full object-cover"alt=""+ className="absolute inset-0 h-full w-full object-cover"+ src={bgImage}/><div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-black/10" /><div className="relative z-10 flex flex-col gap-4">- <QuoteIcon className="size-10 text-white/40 stroke-1" />- <blockquote className="text-3xl font-medium text-white leading-relaxed">+ <QuoteIcon className="size-10 stroke-1 text-white/40" />+ <blockquote className="font-medium text-3xl text-white leading-relaxed">{quote}</blockquote>- <figcaption className="text-white/60 text-sm">+ <figcaption className="text-sm text-white/60">— {author}{site && <span className="ml-1 text-white/40">· {site}</span>}</figcaption>@@ -77,20 +77,20 @@ function TestimonialSlide({export function OnboardingLeftPanel() {return (<div className="sticky top-0 h-screen overflow-hidden">- <div className="flex items-center justify-center h-full mt-24">+ <div className="mt-24 flex h-full items-center justify-center"><Carousel- className="w-full h-full [&>div]:h-full [&>div]:min-h-full"+ className="h-full w-full [&>div]:h-full [&>div]:min-h-full"opts={{ loop: true, align: 'center' }}plugins={[Autoplay({ delay: 6000, stopOnInteraction: false })]}><CarouselContent className="h-full">{testimonials.map((t) => (- <CarouselItem key={t.key} className="p-8 pb-32 pt-0">- <div className="rounded-xl min-h-full h-full overflow-hidden bg-card border border-border shadow-lg">+ <CarouselItem className="p-8 pt-0 pb-32" key={t.key}>+ <div className="h-full min-h-full overflow-hidden rounded-xl border border-border bg-card shadow-lg"><TestimonialSlide+ author={t.author}bgImage={t.bgImage}quote={t.quote}- author={t.author}site={t.site}/></div>diff --git a/apps/start/src/components/onboarding/skip-onboarding.tsx b/apps/start/src/components/onboarding/skip-onboarding.tsxindex 5fc506cd1..9d591ae42 100644--- a/apps/start/src/components/onboarding/skip-onboarding.tsx+++ b/apps/start/src/components/onboarding/skip-onboarding.tsx@@ -1,11 +1,10 @@-import { useLogout } from '@/hooks/use-logout';-import { useTRPC } from '@/integrations/trpc/react';-import { showConfirm } from '@/modals';import { useQuery } from '@tanstack/react-query';-import { Link } from '@tanstack/react-router';-import { useLocation, useNavigate } from '@tanstack/react-router';+import { Link, useLocation, useNavigate } from '@tanstack/react-router';import { ChevronLastIcon, LogInIcon } from 'lucide-react';import { useEffect } from 'react';+import { useLogout } from '@/hooks/use-logout';+import { useTRPC } from '@/integrations/trpc/react';+import { showConfirm } from '@/modals';const PUBLIC_SEGMENTS = [['onboarding']];@@ -33,8 +32,8 @@ export const SkipOnboarding = () => {if (isPublic) {return (<Link+ className="flex items-center gap-2 text-muted-foreground"to="/login"- className="flex items-center gap-2 text-muted-foreground">Login<LogInIcon size={16} />@@ -48,7 +47,7 @@ export const SkipOnboarding = () => {return (<button- type="button"+ className="flex items-center gap-2 text-muted-foreground"onClick={() => {if (res.data?.canSkip) {navigate({ to: '/' });@@ -62,7 +61,7 @@ export const SkipOnboarding = () => {});}}}- className="flex items-center gap-2 text-muted-foreground"+ type="button">Skip onboarding<ChevronLastIcon size={16} />diff --git a/apps/start/src/components/onboarding/steps.tsx b/apps/start/src/components/onboarding/steps.tsxindex 8066c241b..3c5d1051b 100644--- a/apps/start/src/components/onboarding/steps.tsx+++ b/apps/start/src/components/onboarding/steps.tsx@@ -1,6 +1,6 @@-import { cn } from '@/lib/utils';import { useLocation } from '@tanstack/react-router';import { CheckCheckIcon } from 'lucide-react';+import { cn } from '@/lib/utils';type Step = {name: string;@@ -36,7 +36,7 @@ function useSteps(path: string) {},];- // @ts-ignore+ // @ts-expect-errorconst matchIndex = steps.findLastIndex((step) =>path.match(new RegExp(step.match)));@@ -59,9 +59,9 @@ export const OnboardingSteps = ({ className }: Props) => {const currentIndex = steps.findIndex((i) => i.status === 'current');return (<div className="relative">- <div className="absolute bottom-4 left-4 top-4 w-px bg-def-200" />+ <div className="absolute top-4 bottom-4 left-4 w-px bg-def-200" /><div- className="absolute left-4 top-4 w-px bg-highlight"+ className="absolute top-4 left-4 w-px bg-highlight"style={{height: `calc(${((currentIndex + 1) / steps.length) * 100}% - 3.5rem)`,}}@@ -86,7 +86,7 @@ export const OnboardingSteps = ({ className }: Props) => {><divclassName={cn(- 'relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-white'+ 'relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-white')}><divdiff --git a/apps/start/src/components/organization/billing-prompt.tsx b/apps/start/src/components/organization/billing-prompt.tsxindex c4e7f5e08..2b70b158b 100644--- a/apps/start/src/components/organization/billing-prompt.tsx+++ b/apps/start/src/components/organization/billing-prompt.tsx@@ -263,7 +263,7 @@ export default function BillingPrompt({<div className="mx-auto w-full max-w-xl px-4 py-12 md:py-20"><div className="relative overflow-hidden rounded-lg border bg-card"><div- className="-top-16 -right-16 pointer-events-none absolute h-64 w-64 rounded-full opacity-20 blur-3xl"+ className="pointer-events-none absolute -top-16 -right-16 h-64 w-64 rounded-full opacity-20 blur-3xl"style={{background: `radial-gradient(circle, ${copy.gradient} 0%, transparent 70%)`,}}diff --git a/apps/start/src/components/organization/organization.tsx b/apps/start/src/components/organization/organization.tsxindex b6303fb51..7b9b330cd 100644--- a/apps/start/src/components/organization/organization.tsx+++ b/apps/start/src/components/organization/organization.tsx@@ -6,7 +6,7 @@ interface OrganizationProps {}export default function Organization({ organization }: OrganizationProps) {return (- <section className="max-w-screen-sm col gap-8">+ <section className="col max-w-screen-sm gap-8"><EditOrganization organization={organization} /></section>);diff --git a/apps/start/src/components/organization/prompt-card.tsx b/apps/start/src/components/organization/prompt-card.tsxindex 8c9111a02..10c769762 100644--- a/apps/start/src/components/organization/prompt-card.tsx+++ b/apps/start/src/components/organization/prompt-card.tsx@@ -1,6 +1,6 @@-import { Button } from '@/components/ui/button';import { AnimatePresence, motion } from 'framer-motion';import { XIcon } from 'lucide-react';+import { Button } from '@/components/ui/button';interface PromptCardProps {title: string;@@ -23,38 +23,38 @@ export function PromptCard({<AnimatePresence>{show && (<motion.div- initial={{ opacity: 0, x: 100, scale: 0.95 }}animate={{ opacity: 1, x: 0, scale: 1 }}+ className="fixed right-0 bottom-0 z-50 max-w-sm p-4"exit={{ opacity: 0, x: 100, scale: 0.95 }}+ initial={{ opacity: 0, x: 100, scale: 0.95 }}transition={{type: 'spring',stiffness: 300,damping: 30,}}- className="fixed bottom-0 right-0 z-50 p-4 max-w-sm">- <div className="bg-card border rounded-lg shadow-[0_0_100px_50px_var(--color-background)] col gap-6 py-6 overflow-hidden">- <div className="relative px-6 col gap-1">+ <div className="col gap-6 overflow-hidden rounded-lg border bg-card py-6 shadow-[0_0_100px_50px_var(--color-background)]">+ <div className="col relative gap-1 px-6"><div- className="absolute -bottom-10 -right-10 h-64 w-64 rounded-full opacity-30 blur-3xl pointer-events-none"+ className="pointer-events-none absolute -right-10 -bottom-10 h-64 w-64 rounded-full opacity-30 blur-3xl"style={{background: `radial-gradient(circle, ${gradientColor} 0%, transparent 70%)`,}}/><div className="row items-center justify-between">- <h2 className="text-xl font-semibold max-w-[200px] leading-snug">+ <h2 className="max-w-[200px] font-semibold text-xl leading-snug">{title}</h2><Button- variant="ghost"- size="icon"className="rounded-full"onClick={onClose}+ size="icon"+ variant="ghost"><XIcon className="size-4" /></Button></div>- <p className="text-sm text-muted-foreground">{subtitle}</p>+ <p className="text-muted-foreground text-sm">{subtitle}</p></div>{children}diff --git a/apps/start/src/components/overview/filters/origin-filter.tsx b/apps/start/src/components/overview/filters/origin-filter.tsxindex 3b551bfe9..8b0e1a3c5 100644--- a/apps/start/src/components/overview/filters/origin-filter.tsx+++ b/apps/start/src/components/overview/filters/origin-filter.tsx@@ -1,8 +1,8 @@+import { useQuery } from '@tanstack/react-query';import { useAppParams } from '@/hooks/use-app-params';import { useEventQueryFilters } from '@/hooks/use-event-query-filters';import { useTRPC } from '@/integrations/trpc/react';import { cn } from '@/utils/cn';-import { useQuery } from '@tanstack/react-query';export function OriginFilter() {const { projectId } = useAppParams();@@ -24,15 +24,15 @@ export function OriginFilter() {const active = originFilter?.value.includes(item.origin);return (<button- key={item.origin}- type="button"- onClick={() => setFilter('origin', [item.origin], 'is')}className={cn(- 'rounded-md border px-2.5 py-1 text-sm transition-colors cursor-pointer truncate max-w-56',+ 'max-w-56 cursor-pointer truncate rounded-md border px-2.5 py-1 text-sm transition-colors',active- ? 'bg-foreground text-background border-foreground font-medium'- : 'text-muted-foreground hover:text-foreground hover:border-foreground/30'+ ? 'border-foreground bg-foreground font-medium text-background'+ : 'text-muted-foreground hover:border-foreground/30 hover:text-foreground')}+ key={item.origin}+ onClick={() => setFilter('origin', [item.origin], 'is')}+ type="button">{item.origin}</button>diff --git a/apps/start/src/components/overview/overview-details-button.tsx b/apps/start/src/components/overview/overview-details-button.tsxindex 319b1fe87..dd5630cce 100644--- a/apps/start/src/components/overview/overview-details-button.tsx+++ b/apps/start/src/components/overview/overview-details-button.tsx@@ -1,5 +1,4 @@import { ScanEyeIcon } from 'lucide-react';-import { Button, type ButtonProps } from '../ui/button';type Props = Omit<ButtonProps, 'children'>;diff --git a/apps/start/src/components/overview/overview-insights.tsx b/apps/start/src/components/overview/overview-insights.tsxindex fd779dc4d..bba70e9dc 100644--- a/apps/start/src/components/overview/overview-insights.tsx+++ b/apps/start/src/components/overview/overview-insights.tsx@@ -1,5 +1,3 @@-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { InsightCard } from '../insights/insight-card';import { Skeleton } from '../skeleton';@@ -10,6 +8,8 @@ import {CarouselNext,CarouselPrevious,} from '../ui/carousel';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useTRPC } from '@/integrations/trpc/react';interface OverviewInsightsProps {projectId: string;@@ -29,12 +29,12 @@ export default function OverviewInsights({ projectId }: OverviewInsightsProps) {const keys = Array.from({ length: 4 }, (_, i) => `insight-skeleton-${i}`);return (<div className="col-span-6">- <Carousel opts={{ align: 'start' }} className="w-full">+ <Carousel className="w-full" opts={{ align: 'start' }}><CarouselContent className="-ml-4">{keys.map((key) => (<CarouselItem+ className="basis-full pl-4 sm:basis-1/2 lg:basis-1/4"key={key}- className="pl-4 basis-full sm:basis-1/2 lg:basis-1/4"><Skeleton className="h-36 w-full" /></CarouselItem>@@ -45,16 +45,18 @@ export default function OverviewInsights({ projectId }: OverviewInsightsProps) {);}- if (!insights || insights.length === 0) return null;+ if (!insights || insights.length === 0) {+ return null;+ }return (<div className="col-span-6 -mx-4">- <Carousel opts={{ align: 'start' }} className="w-full group">+ <Carousel className="group w-full" opts={{ align: 'start' }}><CarouselContent className="mr-4">{insights.map((insight) => (<CarouselItem+ className="basis-full pl-4 sm:basis-1/2 lg:basis-1/4"key={insight.id}- className="pl-4 basis-full sm:basis-1/2 lg:basis-1/4"><InsightCardinsight={insight}@@ -67,8 +69,8 @@ export default function OverviewInsights({ projectId }: OverviewInsightsProps) {</CarouselItem>))}</CarouselContent>- <CarouselPrevious className="!opacity-0 pointer-events-none transition-opacity group-hover:!opacity-100 group-hover:pointer-events-auto group-focus:opacity-100 group-focus:pointer-events-auto" />- <CarouselNext className="!opacity-0 pointer-events-none transition-opacity group-hover:!opacity-100 group-hover:pointer-events-auto group-focus:opacity-100 group-focus:pointer-events-auto" />+ <CarouselPrevious className="!opacity-0 group-hover:!opacity-100 pointer-events-none transition-opacity group-hover:pointer-events-auto group-focus:pointer-events-auto group-focus:opacity-100" />+ <CarouselNext className="!opacity-0 group-hover:!opacity-100 pointer-events-none transition-opacity group-hover:pointer-events-auto group-focus:pointer-events-auto group-focus:opacity-100" /></Carousel></div>);diff --git a/apps/start/src/components/overview/overview-list-modal.tsx b/apps/start/src/components/overview/overview-list-modal.tsxindex 56011c147..f3dead5b4 100644--- a/apps/start/src/components/overview/overview-list-modal.tsx+++ b/apps/start/src/components/overview/overview-list-modal.tsx@@ -1,12 +1,11 @@-import { useNumber } from '@/hooks/use-numer-formatter';-import { ModalContent } from '@/modals/Modal/Container';-import { cn } from '@/utils/cn';import { DialogTitle } from '@radix-ui/react-dialog';import { useVirtualizer } from '@tanstack/react-virtual';import { SearchIcon } from 'lucide-react';import type React from 'react';import { useMemo, useRef, useState } from 'react';import { Input } from '../ui/input';+import { useNumber } from '@/hooks/use-numer-formatter';+import { ModalContent } from '@/modals/Modal/Container';const ROW_HEIGHT = 36;@@ -19,28 +18,28 @@ function RevenuePieChart({ percentage }: { percentage: number }) {const offset = circumference - percentage * circumference;return (- <svg width={size} height={size} className="flex-shrink-0">+ <svg className="flex-shrink-0" height={size} width={size}><circle+ className="text-def-200"cx={size / 2}cy={size / 2}- r={radius}fill="none"+ r={radius}stroke="currentColor"strokeWidth={strokeWidth}- className="text-def-200"/><circle+ className="transition-all"cx={size / 2}cy={size / 2}- r={radius}fill="none"+ r={radius}stroke="#3ba974"- strokeWidth={strokeWidth}strokeDasharray={circumference}strokeDashoffset={offset}strokeLinecap="round"+ strokeWidth={strokeWidth}transform={`rotate(-90 ${size / 2} ${size / 2})`}- className="transition-all"/></svg>);@@ -131,21 +130,21 @@ export function OverviewListModal<T extends OverviewListItem>({const virtualItems = virtualizer.getVirtualItems();return (- <ModalContent className="flex !max-h-[90vh] flex-col p-0 gap-0 sm:max-w-2xl">+ <ModalContent className="!max-h-[90vh] flex flex-col gap-0 p-0 sm:max-w-2xl">{/* Sticky Header */}- <div className="flex-shrink-0 border-b border-border">+ <div className="flex-shrink-0 border-border border-b"><div className="p-6 pb-4">- <DialogTitle className="text-lg font-semibold mb-4">+ <DialogTitle className="mb-4 font-semibold text-lg">{title}</DialogTitle><div className="relative">- <SearchIcon className="absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />+ <SearchIcon className="absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" /><Input- type="search"+ className="pl-9"+ onChange={(e) => setSearchQuery(e.target.value)}placeholder={searchPlaceholder}+ type="search"value={searchQuery}- onChange={(e) => setSearchQuery(e.target.value)}- className="pl-9"/></div>{headerContent}@@ -153,13 +152,13 @@ export function OverviewListModal<T extends OverviewListItem>({{/* Column Headers */}<div- className="grid px-4 py-2 text-sm font-medium text-muted-foreground bg-def-100"+ className="grid bg-def-100 px-4 py-2 font-medium text-muted-foreground text-sm"style={{gridTemplateColumns:`1fr ${hasRevenue ? '100px' : ''} ${hasPageviews ? '80px' : ''} ${showSessions ? '80px' : ''}`.trim(),}}>- <div className="text-left truncate">{columnName}</div>+ <div className="truncate text-left">{columnName}</div>{hasRevenue && <div className="text-right">Revenue</div>}{hasPageviews && <div className="text-right">Views</div>}{showSessions && <div className="text-right">Sessions</div>}@@ -168,8 +167,8 @@ export function OverviewListModal<T extends OverviewListItem>({{/* Virtualized Scrollable Body */}<div+ className="min-h-0 flex-1 overflow-y-auto"ref={scrollAreaRef}- className="flex-1 min-h-0 overflow-y-auto"style={{ maxHeight: '60vh' }}><div@@ -181,7 +180,9 @@ export function OverviewListModal<T extends OverviewListItem>({>{virtualItems.map((virtualRow) => {const item = filteredData[virtualRow.index];- if (!item) return null;+ if (!item) {+ return null;+ }const percentage = item.sessions / maxSessions;const revenuePercentage =@@ -189,8 +190,8 @@ export function OverviewListModal<T extends OverviewListItem>({return (<div+ className="group/row absolute top-0 left-0 w-full"key={keyExtractor(item)}- className="absolute top-0 left-0 w-full group/row"style={{height: `${virtualRow.size}px`,transform: `translateY(${virtualRow.start}px)`,@@ -199,14 +200,14 @@ export function OverviewListModal<T extends OverviewListItem>({{/* Background bar */}<div className="absolute inset-0 overflow-hidden"><div- className="h-full bg-def-200 group-hover/row:bg-blue-200 dark:group-hover/row:bg-blue-900 transition-colors"+ className="h-full bg-def-200 transition-colors group-hover/row:bg-blue-200 dark:group-hover/row:bg-blue-900"style={{ width: `${percentage * 100}%` }}/></div>{/* Row content */}<div- className="relative grid h-full items-center px-4 border-b border-border"+ className="relative grid h-full items-center border-border border-b px-4"style={{gridTemplateColumns:`1fr ${hasRevenue ? '100px' : ''} ${hasPageviews ? '80px' : ''} ${showSessions ? '80px' : ''}`.trim(),@@ -221,7 +222,7 @@ export function OverviewListModal<T extends OverviewListItem>({{hasRevenue && (<div className="flex items-center justify-end gap-2"><span- className="font-semibold font-mono text-sm"+ className="font-mono font-semibold text-sm"style={{ color: '#3ba974' }}>{(item.revenue ?? 0) > 0@@ -236,14 +237,14 @@ export function OverviewListModal<T extends OverviewListItem>({{/* Pageviews cell */}{hasPageviews && (- <div className="text-right font-semibold font-mono text-sm">+ <div className="text-right font-mono font-semibold text-sm">{number.short(item.pageviews)}</div>)}{/* Sessions cell */}{showSessions && (- <div className="text-right font-semibold font-mono text-sm">+ <div className="text-right font-mono font-semibold text-sm">{number.short(item.sessions)}</div>)}@@ -255,7 +256,7 @@ export function OverviewListModal<T extends OverviewListItem>({{/* Empty state */}{filteredData.length === 0 && (- <div className="flex items-center justify-center h-32 text-muted-foreground">+ <div className="flex h-32 items-center justify-center text-muted-foreground">{searchQuery ? 'No results found' : 'No data available'}</div>)}@@ -263,7 +264,7 @@ export function OverviewListModal<T extends OverviewListItem>({{/* Fixed Footer */}{footer && (- <div className="flex-shrink-0 border-t border-border p-4">{footer}</div>+ <div className="flex-shrink-0 border-border border-t p-4">{footer}</div>)}</ModalContent>);diff --git a/apps/start/src/components/overview/overview-live-histogram.tsx b/apps/start/src/components/overview/overview-live-histogram.tsxindex 80874be9a..c03492e12 100644--- a/apps/start/src/components/overview/overview-live-histogram.tsx+++ b/apps/start/src/components/overview/overview-live-histogram.tsx@@ -1,6 +1,3 @@-import { useTRPC } from '@/integrations/trpc/react';-import { useNumber } from '@/hooks/use-numer-formatter';-import { cn } from '@/utils/cn';import { useQuery } from '@tanstack/react-query';import { useState } from 'react';import { Bar } from '../charts/bar';@@ -12,6 +9,9 @@ import {import { SerieIcon } from '../report-chart/common/serie-icon';import { Skeleton } from '../skeleton';import { MetricCardShell } from './overview-metric-card';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';+import { cn } from '@/utils/cn';interface OverviewLiveHistogramProps {projectId: string;@@ -76,7 +76,7 @@ export function OverviewLiveHistogram({<MetricCardShell><div className="px-3 pt-2.5"><div className="flex items-start justify-between gap-2">- <span className="truncate text-[10px] font-medium uppercase tracking-wider text-muted-foreground">+ <span className="truncate font-medium text-[10px] text-muted-foreground uppercase tracking-wider">Live · 30 min</span><span className="relative flex h-2 w-2 items-center justify-center">@@ -84,7 +84,7 @@ export function OverviewLiveHistogram({className={cn('absolute inline-flex h-full w-full rounded-full opacity-75',totalSessions > 0- ? 'bg-emerald-500 animate-ping'+ ? 'animate-ping bg-emerald-500': 'bg-destructive')}/>@@ -97,18 +97,18 @@ export function OverviewLiveHistogram({</span></div><div className="mt-1 flex items-baseline gap-0.5 leading-none">- <span className="truncate font-mono font-semibold text-xl text-foreground tracking-tight tabular-nums">+ <span className="truncate font-mono font-semibold text-foreground text-xl tabular-nums tracking-tight">{number.short(displayCount)}</span></div>- <div className="mt-0.5 flex items-center justify-between gap-2 truncate text-[11px] leading-none text-muted-foreground">+ <div className="mt-0.5 flex items-center justify-between gap-2 truncate text-[11px] text-muted-foreground leading-none"><span className="truncate">{displayLabel}</span>{referrers.length > 0 && (<div className="flex shrink-0 items-center gap-1.5">{referrers.slice(0, 3).map((ref, index) => (<div- key={`${ref.referrer}-${ref.count}-${index}`}className="flex items-center gap-0.5"+ key={`${ref.referrer}-${ref.count}-${index}`}title={`${ref.referrer} · ${ref.count}`}><SerieIcon name={ref.referrer} />@@ -123,19 +123,19 @@ export function OverviewLiveHistogram({<div className="mt-1.5 h-[40px]">{chartData.length > 0 && (<BarChart- data={chartData}- xDataKey="time"+ animationDuration={0}aspectRatio="auto"+ barGap={0.25}className="h-full"+ data={chartData}margin={{ top: 6, right: 0, bottom: 4, left: 0 }}- animationDuration={0}- barGap={0.25}+ xDataKey="time"><OPStatHoverBridge onHoverChange={setHover} /><Bar+ animate={false}dataKey="sessionCount"fill={PRIMARY_COLOR}- animate={false}lineCap={2}/></BarChart>diff --git a/apps/start/src/components/overview/overview-map.tsx b/apps/start/src/components/overview/overview-map.tsxindex 6cf94dbef..012c5924b 100644--- a/apps/start/src/components/overview/overview-map.tsx+++ b/apps/start/src/components/overview/overview-map.tsx@@ -1,10 +1,10 @@-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { useMemo } from 'react';import WorldMap from 'react-svg-worldmap';import AutoSizer from 'react-virtualized-auto-sizer';import { useOverviewOptions } from './useOverviewOptions';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useTRPC } from '@/integrations/trpc/react';interface OverviewMapProps {projectId: string;@@ -28,7 +28,9 @@ export function OverviewMap({ projectId, shareId }: OverviewMapProps) {);const mapData = useMemo(() => {- if (!query.data) return [];+ if (!query.data) {+ return [];+ }// Aggregate by country (sum counts for same country)const countryMap = new Map<string, number>();@@ -46,7 +48,7 @@ export function OverviewMap({ projectId, shareId }: OverviewMapProps) {if (query.isLoading) {return (- <div className="h-full w-full flex items-center justify-center">+ <div className="flex h-full w-full items-center justify-center"><div className="text-muted-foreground">Loading map...</div></div>);@@ -54,7 +56,7 @@ export function OverviewMap({ projectId, shareId }: OverviewMapProps) {if (query.isError) {return (- <div className="h-full w-full flex items-center justify-center">+ <div className="flex h-full w-full items-center justify-center"><div className="text-muted-foreground">Error loading map</div></div>);@@ -62,7 +64,7 @@ export function OverviewMap({ projectId, shareId }: OverviewMapProps) {if (!query.data || mapData.length === 0) {return (- <div className="h-full w-full flex items-center justify-center">+ <div className="flex h-full w-full items-center justify-center"><div className="text-muted-foreground">No data available</div></div>);@@ -73,15 +75,15 @@ export function OverviewMap({ projectId, shareId }: OverviewMapProps) {<AutoSizer disableHeight>{({ width }) => (<WorldMap+ borderColor={'var(--foreground)'}+ color={'var(--chart-0)'}+ data={mapData}onClickFunction={(event) => {if (event.countryCode) {setFilter('country', event.countryCode);}}}size={width}- data={mapData}- color={'var(--chart-0)'}- borderColor={'var(--foreground)'}/>)}</AutoSizer>diff --git a/apps/start/src/components/overview/overview-share.tsx b/apps/start/src/components/overview/overview-share.tsxindex 58bc838da..347bbb6be 100644--- a/apps/start/src/components/overview/overview-share.tsx+++ b/apps/start/src/components/overview/overview-share.tsx@@ -1,3 +1,6 @@+import { useMutation, useQuery } from '@tanstack/react-query';+import { Link } from '@tanstack/react-router';+import { EyeIcon, Globe2Icon, LockIcon } from 'lucide-react';import { Button } from '@/components/ui/button';import {DropdownMenu,@@ -9,9 +12,6 @@ import {import { useAppParams } from '@/hooks/use-app-params';import { useTRPC } from '@/integrations/trpc/react';import { pushModal } from '@/modals';-import { useMutation, useQuery } from '@tanstack/react-query';-import { Link } from '@tanstack/react-router';-import { EyeIcon, Globe2Icon, LockIcon } from 'lucide-react';interface OverviewShareProps {projectId: string;@@ -44,8 +44,8 @@ export function OverviewShare({ projectId }: OverviewShareProps) {<DropdownMenuTrigger asChild><Buttonicon={data?.public ? Globe2Icon : LockIcon}- responsiveloading={query.isLoading}+ responsive>{data?.public ? 'Public' : 'Private'}</Button>@@ -54,17 +54,17 @@ export function OverviewShare({ projectId }: OverviewShareProps) {<DropdownMenuGroup>{(!data || data.public === false) && (<DropdownMenuItem onClick={() => pushModal('ShareOverviewModal')}>- <Globe2Icon size={16} className="mr-2" />+ <Globe2Icon className="mr-2" size={16} />Make public</DropdownMenuItem>)}{data?.public && (<DropdownMenuItem asChild><Link- to={'/share/overview/$shareId'}params={{ shareId: data.id }}+ to={'/share/overview/$shareId'}>- <EyeIcon size={16} className="mr-2" />+ <EyeIcon className="mr-2" size={16} />View</Link></DropdownMenuItem>@@ -80,7 +80,7 @@ export function OverviewShare({ projectId }: OverviewShareProps) {});}}>- <LockIcon size={16} className="mr-2" />+ <LockIcon className="mr-2" size={16} />Make private</DropdownMenuItem>)}diff --git a/apps/start/src/components/overview/overview-top-events.tsx b/apps/start/src/components/overview/overview-top-events.tsxindex 2b7e50660..157d56583 100644--- a/apps/start/src/components/overview/overview-top-events.tsx+++ b/apps/start/src/components/overview/overview-top-events.tsx@@ -1,11 +1,6 @@-import { useAppParams } from '@/hooks/use-app-params';-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';-import { eventQueryFiltersParser } from '@/hooks/use-event-query-filters';-import { useMemo, useState } from 'react';--import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { useNavigate } from '@tanstack/react-router';+import { useMemo, useState } from 'react';import { Widget, WidgetBody } from '../widget';import { WidgetFooter, WidgetHeadSearchable } from './overview-widget';import {@@ -15,6 +10,12 @@ import {} from './overview-widget-table';import { useOverviewOptions } from './useOverviewOptions';import { useOverviewWidgetV2 } from './useOverviewWidget';+import { useAppParams } from '@/hooks/use-app-params';+import {+ eventQueryFiltersParser,+ useEventQueryFilters,+} from '@/hooks/use-event-query-filters';+import { useTRPC } from '@/integrations/trpc/react';export interface OverviewTopEventsProps {projectId: string;@@ -90,7 +91,9 @@ export default function OverviewTopEvents({const tableData: EventTableItem[] = useMemo(() => {// For link out, use href as nameif (widget.meta?.type === 'linkOut') {- if (!linkOutQuery.data) return [];+ if (!linkOutQuery.data) {+ return [];+ }return linkOutQuery.data.map((item) => ({id: item.href,name: item.href,@@ -99,7 +102,9 @@ export default function OverviewTopEvents({}// For events and conversions- if (!eventsQuery.data) return [];+ if (!eventsQuery.data) {+ return [];+ }// For conversions, filter events by conversion names (client-side filtering)if (widget.meta?.type === 'conversions' && conversions) {@@ -152,13 +157,13 @@ export default function OverviewTopEvents({<><Widget className="col-span-6 md:col-span-3"><WidgetHeadSearchable- tabs={tabs}activeTab={widget.key}- onTabChange={setWidget}- searchValue={searchQuery}+ className="border-b-0 pb-2"onSearchChange={setSearchQuery}+ onTabChange={setWidget}searchPlaceholder={`Search ${widget.btn.toLowerCase()}`}- className="border-b-0 pb-2"+ searchValue={searchQuery}+ tabs={tabs}/><WidgetBody className="p-0">{isLoading ? (diff --git a/apps/start/src/components/overview/overview-top-generic-modal.tsx b/apps/start/src/components/overview/overview-top-generic-modal.tsxindex d18835a72..65e15c5fd 100644--- a/apps/start/src/components/overview/overview-top-generic-modal.tsx+++ b/apps/start/src/components/overview/overview-top-generic-modal.tsx@@ -1,6 +1,3 @@-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';--import { useTRPC } from '@/integrations/trpc/react';import type { IGetTopGenericInput } from '@openpanel/core';import { useQuery } from '@tanstack/react-query';import { ChevronRightIcon } from 'lucide-react';@@ -11,6 +8,8 @@ import {} from './overview-constants';import { OverviewListModal } from './overview-list-modal';import { useOverviewOptions } from './useOverviewOptions';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useTRPC } from '@/integrations/trpc/react';interface OverviewTopGenericModalProps {projectId: string;@@ -40,25 +39,18 @@ export default function OverviewTopGenericModal({return (<OverviewListModal- title={`Top ${columnNamePlural}`}- searchPlaceholder={`Search ${columnNamePlural.toLowerCase()}...`}+ columnName={columnName}data={query.data ?? []}keyExtractor={(item) => (item.prefix ?? '') + item.name}- searchFilter={(item, query) =>- item.name?.toLowerCase().includes(query) ||- item.prefix?.toLowerCase().includes(query) ||- false- }- columnName={columnName}renderItem={(item) => (- <div className="flex items-center gap-2 min-w-0">+ <div className="flex min-w-0 items-center gap-2"><SerieIcon name={item.prefix || item.name} /><button- type="button"className="truncate hover:underline"onClick={() => {setFilter(column, item.name);}}+ type="button">{item.prefix && (<span className="mr-1 inline-flex items-center gap-1">@@ -70,6 +62,14 @@ export default function OverviewTopGenericModal({</button></div>)}+ searchFilter={(item, query) =>+ Boolean(+ item.name?.toLowerCase().includes(query) ||+ item.prefix?.toLowerCase().includes(query)+ )+ }+ searchPlaceholder={`Search ${columnNamePlural.toLowerCase()}...`}+ title={`Top ${columnNamePlural}`}/>);}diff --git a/apps/start/src/components/overview/overview-top-pages-modal.tsx b/apps/start/src/components/overview/overview-top-pages-modal.tsxindex 9f75c9f04..08424150f 100644--- a/apps/start/src/components/overview/overview-top-pages-modal.tsx+++ b/apps/start/src/components/overview/overview-top-pages-modal.tsx@@ -1,12 +1,11 @@-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';--import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { ExternalLinkIcon } from 'lucide-react';import { SerieIcon } from '../report-chart/common/serie-icon';import { Tooltiper } from '../ui/tooltip';import { OverviewListModal } from './overview-list-modal';import { useOverviewOptions } from './useOverviewOptions';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useTRPC } from '@/integrations/trpc/react';interface OverviewTopPagesProps {projectId: string;@@ -31,41 +30,41 @@ export default function OverviewTopPagesModal({return (<OverviewListModal- title="Top Pages"- searchPlaceholder="Search pages..."+ columnName="Path"data={query.data ?? []}keyExtractor={(item) => item.path + item.origin}- searchFilter={(item, query) =>- item.path.toLowerCase().includes(query) ||- item.origin.toLowerCase().includes(query)- }- columnName="Path"renderItem={(item) => (<Tooltiper asChild content={item.origin + item.path} side="left">- <div className="flex items-center gap-2 min-w-0">+ <div className="flex min-w-0 items-center gap-2"><SerieIcon name={item.origin} /><button- type="button"className="truncate hover:underline"onClick={() => {setFilter('path', item.path);setFilter('origin', item.origin);}}+ type="button">{item.path || <span className="opacity-40">Not set</span>}</button><a+ className="flex-shrink-0"href={item.origin + item.path}- target="_blank"- rel="noreferrer"onClick={(e) => e.stopPropagation()}- className="flex-shrink-0"+ rel="noreferrer"+ target="_blank">- <ExternalLinkIcon className="size-3 opacity-0 group-hover/row:opacity-100 transition-opacity" />+ <ExternalLinkIcon className="size-3 opacity-0 transition-opacity group-hover/row:opacity-100" /></a></div></Tooltiper>)}+ searchFilter={(item, query) =>+ item.path.toLowerCase().includes(query) ||+ item.origin.toLowerCase().includes(query)+ }+ searchPlaceholder="Search pages..."+ title="Top Pages"/>);}diff --git a/apps/start/src/components/overview/overview-top-pages.tsx b/apps/start/src/components/overview/overview-top-pages.tsxindex 4fb10d566..690f563c0 100644--- a/apps/start/src/components/overview/overview-top-pages.tsx+++ b/apps/start/src/components/overview/overview-top-pages.tsx@@ -1,11 +1,7 @@-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useQuery } from '@tanstack/react-query';import { Globe2Icon } from 'lucide-react';import { parseAsBoolean, useQueryState } from 'nuqs';import { useMemo, useState } from 'react';--import { useTRPC } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';-import { useQuery } from '@tanstack/react-query';import { Button } from '../ui/button';import { Widget, WidgetBody } from '../widget';import OverviewDetailsButton from './overview-details-button';@@ -17,6 +13,9 @@ import {} from './overview-widget-table';import { useOverviewOptions } from './useOverviewOptions';import { useOverviewWidgetV2 } from './useOverviewWidget';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useTRPC } from '@/integrations/trpc/react';+import { pushModal } from '@/modals';interface OverviewTopPagesProps {projectId: string;@@ -91,13 +90,13 @@ export default function OverviewTopPages({<><Widget className="col-span-6 md:col-span-3"><WidgetHeadSearchable- tabs={tabs}activeTab={widget.key}- onTabChange={setWidget}- searchValue={searchQuery}+ className="border-b-0 pb-2"onSearchChange={setSearchQuery}+ onTabChange={setWidget}searchPlaceholder={`Search ${widget.btn.toLowerCase()}`}- className="border-b-0 pb-2"+ searchValue={searchQuery}+ tabs={tabs}/><WidgetBody className="p-0">{query.isLoading ? (@@ -125,11 +124,11 @@ export default function OverviewTopPages({/><div className="flex-1" /><Button- variant={'ghost'}+ icon={Globe2Icon}onClick={() => {setDomain((p) => !p);}}- icon={Globe2Icon}+ variant={'ghost'}>{domain ? 'Hide domain' : 'Show domain'}</Button>diff --git a/apps/start/src/components/overview/overview-user-journey.tsx b/apps/start/src/components/overview/overview-user-journey.tsxindex 7674efdb4..98b005aeb 100644--- a/apps/start/src/components/overview/overview-user-journey.tsx+++ b/apps/start/src/components/overview/overview-user-journey.tsx@@ -1,13 +1,7 @@-import {- ChartTooltipContainer,- ChartTooltipHeader,- ChartTooltipItem,-} from '@/components/charts/chart-tooltip';-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';-import { useNumber } from '@/hooks/use-numer-formatter';-import { cn } from '@/utils/cn';-import { round } from '@openpanel/shared';import { ResponsiveSankey } from '@nivo/sankey';+import { round } from '@openpanel/shared';+import { useQuery } from '@tanstack/react-query';+import { ArrowRightIcon } from 'lucide-react';import { parseAsInteger, useQueryState } from 'nuqs';import {type ReactNode,@@ -17,15 +11,20 @@ import {useState,} from 'react';import { createPortal } from 'react-dom';--import { useTRPC } from '@/integrations/trpc/react';-import { truncate } from '@/utils/truncate';-import { useQuery } from '@tanstack/react-query';-import { ArrowRightIcon } from 'lucide-react';import { useTheme } from '../theme-provider';import { Widget, WidgetBody } from '../widget';import { WidgetButtons, WidgetFooter, WidgetHead } from './overview-widget';import { useOverviewOptions } from './useOverviewOptions';+import {+ ChartTooltipContainer,+ ChartTooltipHeader,+ ChartTooltipItem,+} from '@/components/charts/chart-tooltip';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';+import { cn } from '@/utils/cn';+import { truncate } from '@/utils/truncate';interface OverviewUserJourneyProps {projectId: string;@@ -77,12 +76,16 @@ function SankeyPortalTooltip({useLayoutEffect(() => {const el = anchorRef.current;- if (!el) return;+ if (!el) {+ return;+ }// Nivo renders the tooltip content inside an absolutely-positioned wrapper <div>.// The wrapper is the immediate parent of our rendered content.const wrapper = el.parentElement;- if (!wrapper) return;+ if (!wrapper) {+ return;+ }const update = () => {setAnchorRect(wrapper.getBoundingClientRect());@@ -104,10 +107,16 @@ function SankeyPortalTooltip({}, []);useLayoutEffect(() => {- if (!mounted) return;- if (!anchorRect) return;+ if (!mounted) {+ return;+ }+ if (!anchorRect) {+ return;+ }const tooltipEl = tooltipRef.current;- if (!tooltipEl) return;+ if (!tooltipEl) {+ return;+ }const rect = tooltipEl.getBoundingClientRect();const vw = window.innerWidth;@@ -138,12 +147,12 @@ function SankeyPortalTooltip({return (<>{/* Render a tiny (screen-reader-only) anchor inside Nivo's tooltip wrapper. */}- <span ref={anchorRef} className="sr-only" />+ <span className="sr-only" ref={anchorRef} />{mounted &&createPortal(<div- ref={tooltipRef}className="pointer-events-none fixed z-[9999]"+ ref={tooltipRef}style={{left: pos.left,top: pos.top,@@ -188,7 +197,9 @@ export default function OverviewUserJourney({// Process data for Sankey - nodes are already sorted by step then value from backendconst sankeyData = useMemo(() => {- if (!data) return { nodes: [], links: [] };+ if (!data) {+ return { nodes: [], links: [] };+ }return {nodes: data.nodes.map((node: any) => ({@@ -207,7 +218,9 @@ export default function OverviewUserJourney({}, [data]);const totalSessions = useMemo(() => {- if (!sankeyData.nodes || sankeyData.nodes.length === 0) return 0;+ if (!sankeyData.nodes || sankeyData.nodes.length === 0) {+ return 0;+ }// Total sessions used by backend for percentages is the sum of entry nodes (step 1).// Fall back to summing all nodes if step is missing for some reason.const step1 = sankeyData.nodes.filter((n: any) => n.data?.step === 1);@@ -226,10 +239,10 @@ export default function OverviewUserJourney({<WidgetButtons>{stepOptions.map((option) => (<button- type="button"+ className={cn((steps ?? 5) === option && 'active')}key={option}onClick={() => setSteps(option)}- className={cn((steps ?? 5) === option && 'active')}+ type="button">{option} Steps</button>@@ -238,78 +251,34 @@ export default function OverviewUserJourney({</WidgetHead><WidgetBody>{query.isLoading ? (- <div className="flex items-center justify-center h-96">- <div className="text-sm text-muted-foreground">Loading...</div>+ <div className="flex h-96 items-center justify-center">+ <div className="text-muted-foreground text-sm">Loading...</div></div>) : sankeyData.nodes.length === 0 ? (- <div className="flex items-center justify-center h-96">- <div className="text-sm text-muted-foreground">+ <div className="flex h-96 items-center justify-center">+ <div className="text-muted-foreground text-sm">No journey data available</div></div>) : (<div+ className="relative aspect-square w-full md:aspect-[2]"ref={containerRef}- className="w-full relative aspect-square md:aspect-[2]"><ResponsiveSankey- margin={{ top: 20, right: 20, bottom: 20, left: 20 }}- data={sankeyData}- colors={(node: any) => node.nodeColor}- nodeBorderRadius={2}animate={false}- nodeBorderWidth={0}- nodeOpacity={0.8}- linkContract={1}- linkOpacity={0.3}- linkBlendMode={'normal'}- nodeTooltip={({ node }: any) => {- const label = node?.data?.label ?? node?.label ?? node?.id;- const value = node?.data?.value ?? node?.value ?? 0;- const step = node?.data?.step;- const pct =- typeof node?.data?.percentage === 'number'- ? node.data.percentage- : totalSessions > 0- ? (value / totalSessions) * 100- : 0;- const color =- node?.color ??- node?.data?.nodeColor ??- node?.data?.color ??- node?.nodeColor ??- '#64748b';-- return (- <SankeyPortalTooltip>- <ChartTooltipContainer className="min-w-[250px]">- <ChartTooltipHeader>- <div className="min-w-0 flex-1 font-medium break-words">- <span className="opacity-40 mr-1">- {showDomain(label)}- </span>- {showPath(label)}- </div>- {typeof step === 'number' && (- <div className="shrink-0 text-muted-foreground">- Step {step}- </div>- )}- </ChartTooltipHeader>- <ChartTooltipItem color={color} innerClassName="gap-2">- <div className="flex items-center justify-between gap-8 font-mono font-medium">- <div className="text-muted-foreground">Sessions</div>- <div>{number.format(value)}</div>- </div>- <div className="flex items-center justify-between gap-8 font-mono font-medium">- <div className="text-muted-foreground">Share</div>- <div>{number.format(round(pct, 1))} %</div>- </div>- </ChartTooltipItem>- </ChartTooltipContainer>- </SankeyPortalTooltip>+ colors={(node: any) => node.nodeColor}+ data={sankeyData}+ label={(node: any) => {+ const label = showPath(+ node.data?.label || node.label || node.id);+ return truncate(label, 30, 'middle');}}+ labelTextColor={appTheme === 'dark' ? '#e2e8f0' : '#0f172a'}+ linkBlendMode={'normal'}+ linkContract={1}+ linkOpacity={0.3}linkTooltip={({ link }: any) => {const sourceLabel =link?.source?.data?.label ??@@ -346,14 +315,14 @@ export default function OverviewUserJourney({<SankeyPortalTooltip><ChartTooltipContainer><ChartTooltipHeader>- <div className="min-w-0 flex-1 font-medium break-words">- <span className="opacity-40 mr-1">+ <div className="min-w-0 flex-1 break-words font-medium">+ <span className="mr-1 opacity-40">{showDomain(sourceLabel)}</span>{showPath(sourceLabel)}- <ArrowRightIcon className="size-2 inline-block mx-3" />+ <ArrowRightIcon className="mx-3 inline-block size-2" />{!isSameDomain && (- <span className="opacity-40 mr-1">+ <span className="mr-1 opacity-40">{showDomain(targetLabel)}</span>)}@@ -368,7 +337,7 @@ export default function OverviewUserJourney({</ChartTooltipHeader><ChartTooltipItem color={color} innerClassName="gap-2">- <div className="flex items-center justify-between gap-8 font-mono font-medium">+ <div className="flex items-center justify-between gap-8 font-medium font-mono"><div className="text-muted-foreground">Sessions</div><div>{number.format(value)}</div></div>@@ -389,20 +358,64 @@ export default function OverviewUserJourney({</SankeyPortalTooltip>);}}- label={(node: any) => {- const label = showPath(- node.data?.label || node.label || node.id+ margin={{ top: 20, right: 20, bottom: 20, left: 20 }}+ nodeBorderRadius={2}+ nodeBorderWidth={0}+ nodeOpacity={0.8}+ nodeSpacing={10}+ nodeTooltip={({ node }: any) => {+ const label = node?.data?.label ?? node?.label ?? node?.id;+ const value = node?.data?.value ?? node?.value ?? 0;+ const step = node?.data?.step;+ const pct =+ typeof node?.data?.percentage === 'number'+ ? node.data.percentage+ : totalSessions > 0+ ? (value / totalSessions) * 100+ : 0;+ const color =+ node?.color ??+ node?.data?.nodeColor ??+ node?.data?.color ??+ node?.nodeColor ??+ '#64748b';++ return (+ <SankeyPortalTooltip>+ <ChartTooltipContainer className="min-w-[250px]">+ <ChartTooltipHeader>+ <div className="min-w-0 flex-1 break-words font-medium">+ <span className="mr-1 opacity-40">+ {showDomain(label)}+ </span>+ {showPath(label)}+ </div>+ {typeof step === 'number' && (+ <div className="shrink-0 text-muted-foreground">+ Step {step}+ </div>+ )}+ </ChartTooltipHeader>+ <ChartTooltipItem color={color} innerClassName="gap-2">+ <div className="flex items-center justify-between gap-8 font-medium font-mono">+ <div className="text-muted-foreground">Sessions</div>+ <div>{number.format(value)}</div>+ </div>+ <div className="flex items-center justify-between gap-8 font-medium font-mono">+ <div className="text-muted-foreground">Share</div>+ <div>{number.format(round(pct, 1))} %</div>+ </div>+ </ChartTooltipItem>+ </ChartTooltipContainer>+ </SankeyPortalTooltip>);- return truncate(label, 30, 'middle');}}- labelTextColor={appTheme === 'dark' ? '#e2e8f0' : '#0f172a'}- nodeSpacing={10}/></div>)}</WidgetBody><WidgetFooter>- <div className="text-xs text-muted-foreground">+ <div className="text-muted-foreground text-xs">Shows the most common paths users take through your application</div></WidgetFooter>diff --git a/apps/start/src/components/overview/overview-view-toggle.tsx b/apps/start/src/components/overview/overview-view-toggle.tsxindex fb35f0f22..cc125254d 100644--- a/apps/start/src/components/overview/overview-view-toggle.tsx+++ b/apps/start/src/components/overview/overview-view-toggle.tsx@@ -1,6 +1,5 @@import { LineChartIcon, TableIcon } from 'lucide-react';import { parseAsStringEnum, useQueryState } from 'nuqs';-import { Button } from '../ui/button';type ViewType = 'table' | 'chart';@@ -24,14 +23,14 @@ export function OverviewViewToggle({return (<div className={className}><Button- size="icon"- variant="ghost"onClick={() => {setView(view === 'table' ? 'chart' : 'table');}}+ size="icon"title={view === 'table' ? 'Switch to chart view' : 'Switch to table view'}+ variant="ghost">{view === 'table' ? (<LineChartIcon size={16} />diff --git a/apps/start/src/components/overview/overview-weekly-trends.tsx b/apps/start/src/components/overview/overview-weekly-trends.tsxindex 7d6bae982..09f5131b0 100644--- a/apps/start/src/components/overview/overview-weekly-trends.tsx+++ b/apps/start/src/components/overview/overview-weekly-trends.tsx@@ -1,12 +1,3 @@-import {- ChartTooltipContainer,- ChartTooltipHeader,- ChartTooltipItem,-} from '@/components/charts/chart-tooltip';-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';-import { useNumber } from '@/hooks/use-numer-formatter';-import { useTRPC } from '@/integrations/trpc/react';-import { cn } from '@/utils/cn';import { useQuery } from '@tanstack/react-query';import { useMemo, useState } from 'react';import {@@ -18,6 +9,15 @@ import {import { Widget, WidgetBody } from '../widget';import { WidgetHeadSearchable } from './overview-widget';import { useOverviewOptions } from './useOverviewOptions';+import {+ ChartTooltipContainer,+ ChartTooltipHeader,+ ChartTooltipItem,+} from '@/components/charts/chart-tooltip';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';+import { cn } from '@/utils/cn';interface OverviewWeeklyTrendsProps {projectId: string;@@ -58,16 +58,36 @@ function formatHourRange(hour: number) {}function getColorClass(ratio: number) {- if (ratio === 0) return 'bg-transparent';- if (ratio < 0.1) return 'bg-chart-0/5';- if (ratio < 0.2) return 'bg-chart-0/10';- if (ratio < 0.3) return 'bg-chart-0/20';- if (ratio < 0.4) return 'bg-chart-0/30';- if (ratio < 0.5) return 'bg-chart-0/40';- if (ratio < 0.6) return 'bg-chart-0/50';- if (ratio < 0.7) return 'bg-chart-0/60';- if (ratio < 0.8) return 'bg-chart-0/70';- if (ratio < 0.9) return 'bg-chart-0/90';+ if (ratio === 0) {+ return 'bg-transparent';+ }+ if (ratio < 0.1) {+ return 'bg-chart-0/5';+ }+ if (ratio < 0.2) {+ return 'bg-chart-0/10';+ }+ if (ratio < 0.3) {+ return 'bg-chart-0/20';+ }+ if (ratio < 0.4) {+ return 'bg-chart-0/30';+ }+ if (ratio < 0.5) {+ return 'bg-chart-0/40';+ }+ if (ratio < 0.6) {+ return 'bg-chart-0/50';+ }+ if (ratio < 0.7) {+ return 'bg-chart-0/60';+ }+ if (ratio < 0.8) {+ return 'bg-chart-0/70';+ }+ if (ratio < 0.9) {+ return 'bg-chart-0/90';+ }return 'bg-chart-0';}@@ -96,7 +116,9 @@ export default function OverviewWeeklyTrends({// Build a 7×24 heatmap: aggregated[dayOfWeek][hour] averaged over all weeksconst heatmap = useMemo(() => {const series = query.data?.series;- if (!series?.length) return null;+ if (!series?.length) {+ return null;+ }// aggregated[day 0=Mon..6=Sun][hour]const sums: number[][] = Array.from({ length: 7 }, () => Array(24).fill(0));@@ -106,7 +128,9 @@ export default function OverviewWeeklyTrends({for (const item of series) {const value = item[metric];- if (typeof value !== 'number' || !Number.isFinite(value)) continue;+ if (typeof value !== 'number' || !Number.isFinite(value)) {+ continue;+ }const d = new Date(item.date);// JS getDay(): 0=Sun,1=Mon,...,6=Sat → remap to 0=Mon..6=Sun@@ -128,7 +152,9 @@ export default function OverviewWeeklyTrends({let max = 0;for (const row of averages) {for (const v of row) {- if (v > max) max = v;+ if (v > max) {+ max = v;+ }}}@@ -140,20 +166,16 @@ export default function OverviewWeeklyTrends({return (<Widget className="col-span-6"><WidgetHeadSearchable- tabs={METRICS.map((m) => ({ key: m.key, label: m.label }))}activeTab={metric}onTabChange={setMetric}+ tabs={METRICS.map((m) => ({ key: m.key, label: m.label }))}/><WidgetBody>{query.isLoading ? (- <div className="flex h-48 items-center justify-center text-sm text-muted-foreground">+ <div className="flex h-48 items-center justify-center text-muted-foreground text-sm">Loading...</div>- ) : !heatmap ? (- <div className="flex h-48 items-center justify-center text-sm text-muted-foreground">- No data available- </div>- ) : (+ ) : heatmap ? (<div className="flex">{/* Hour labels */}<div className="w-14 shrink-0 pr-2">@@ -161,8 +183,8 @@ export default function OverviewWeeklyTrends({<div className="h-6" />{Array.from({ length: 24 }, (_, hour) => (<div- key={hour}className="flex h-4 items-center justify-end text-[10px] text-muted-foreground"+ key={hour}>{hour % 3 === 0 ? `${String(hour).padStart(2, '0')}:00` : ''}</div>@@ -170,23 +192,23 @@ export default function OverviewWeeklyTrends({</div>{/* Grid */}- <div className="flex-1 min-w-0">+ <div className="min-w-0 flex-1">{/* Day labels */}<div className="flex h-6">{SHORT_DAY_NAMES.map((day) => (<div- key={day}className="flex-1 text-center text-[11px] text-muted-foreground"+ key={day}>{day}</div>))}</div>- <TooltipProvider disableHoverableContent delayDuration={0}>+ <TooltipProvider delayDuration={0} disableHoverableContent>{/* Rows = hours, columns = days */}{Array.from({ length: 24 }, (_, hour) => (- <div key={hour} className="flex h-4">+ <div className="flex h-4" key={hour}>{Array.from({ length: 7 }, (_, day) => {const value = heatmap.averages[day]![hour]!;const ratio =@@ -196,7 +218,7 @@ export default function OverviewWeeklyTrends({return (<Tooltip key={day}><TooltipTrigger asChild>- <div className={cn('flex-1 p-0.5 group')}>+ <div className={cn('group flex-1 p-0.5')}><divclassName={cn('size-full rounded-sm transition-all group-hover:ring-1 group-hover:ring-emerald-400',@@ -206,17 +228,17 @@ export default function OverviewWeeklyTrends({</div></TooltipTrigger><TooltipContent- side="top"className="border-0 bg-transparent p-0 shadow-none"+ side="top"><ChartTooltipContainer><ChartTooltipHeader>- <div className="text-sm font-medium">+ <div className="font-medium text-sm">{LONG_DAY_NAMES[day]}, {formatHourRange(hour)}</div></ChartTooltipHeader><ChartTooltipItem color="#10b981">- <div className="flex items-center justify-between gap-6 font-mono font-medium text-sm">+ <div className="flex items-center justify-between gap-6 font-medium font-mono text-sm"><div className="text-muted-foreground">{activeMetric.label}</div>@@ -240,6 +262,10 @@ export default function OverviewWeeklyTrends({</TooltipProvider></div></div>+ ) : (+ <div className="flex h-48 items-center justify-center text-muted-foreground text-sm">+ No data available+ </div>)}</WidgetBody></Widget>diff --git a/apps/start/src/components/overview/overview-widget-table.tsx b/apps/start/src/components/overview/overview-widget-table.tsxindex 1c665463b..400ee27fa 100644--- a/apps/start/src/components/overview/overview-widget-table.tsx+++ b/apps/start/src/components/overview/overview-widget-table.tsx@@ -1,13 +1,13 @@-import { useEventQueryFilters } from '@/hooks/use-event-query-filters';-import { useNumber } from '@/hooks/use-numer-formatter';-import type { RouterOutputs } from '@/trpc/client';-import { cn } from '@/utils/cn';import { ChevronDown, ChevronUp, ExternalLinkIcon } from 'lucide-react';import { useMemo, useState } from 'react';import { SerieIcon } from '../report-chart/common/serie-icon';import { Skeleton } from '../skeleton';import { Tooltiper } from '../ui/tooltip';import { WidgetTable, type Props as WidgetTableProps } from '../widget-table';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useNumber } from '@/hooks/use-numer-formatter';+import type { RouterOutputs } from '@/trpc/client';+import { cn } from '@/utils/cn';function RevenuePieChart({ percentage }: { percentage: number }) {const size = 16;@@ -17,30 +17,30 @@ function RevenuePieChart({ percentage }: { percentage: number }) {const offset = circumference - percentage * circumference;return (- <svg width={size} height={size} className="flex-shrink-0">+ <svg className="flex-shrink-0" height={size} width={size}>{/* Background circle */}<circle+ className="text-def-200"cx={size / 2}cy={size / 2}- r={radius}fill="none"+ r={radius}stroke="currentColor"strokeWidth={strokeWidth}- className="text-def-200"/>{/* Revenue arc */}<circle+ className="transition-all"cx={size / 2}cy={size / 2}- r={radius}fill="none"+ r={radius}stroke="#3ba974"- strokeWidth={strokeWidth}strokeDasharray={circumference}strokeDashoffset={offset}strokeLinecap="round"+ strokeWidth={strokeWidth}transform={`rotate(-90 ${size / 2} ${size / 2})`}- className="transition-all"/></svg>);@@ -61,12 +61,12 @@ function SortableHeader({}) {return (<button- type="button"- onClick={onClick}className={cn(- 'row items-center gap-1 hover:opacity-80 transition-opacity',- isRightAligned && 'justify-end ml-auto'+ 'row items-center gap-1 transition-opacity hover:opacity-80',+ isRightAligned && 'ml-auto justify-end')}+ onClick={onClick}+ type="button"><span>{name}</span>{isSorted ? (@@ -120,7 +120,7 @@ export const OverviewWidgetTable = <T,>({const sortedData = useMemo(() => {const allData = data ?? [];- if (!sortColumn || !sortDirection) {+ if (!(sortColumn && sortDirection)) {// When not sorting, return top 15 (maintain original behavior)return allData;}@@ -142,9 +142,15 @@ export const OverviewWidgetTable = <T,>({const bValue = column.getSortValue!(b);// Handle null values- if (aValue === null && bValue === null) return 0;- if (aValue === null) return 1;- if (bValue === null) return -1;+ if (aValue === null && bValue === null) {+ return 0;+ }+ if (aValue === null) {+ return 1;+ }+ if (bValue === null) {+ return -1;+ }// Compare valueslet comparison = 0;@@ -176,18 +182,18 @@ export const OverviewWidgetTable = <T,>({key: columnName,name: isSortable ? (<SortableHeader- name={columnName}+ isRightAligned={isRightAligned}isSorted={isSorted}- sortDirection={currentSortDirection}+ name={columnName}onClick={() => handleSort(columnName)}- isRightAligned={isRightAligned}+ sortDirection={currentSortDirection}/>) : (column.name),className: cn(index === 0- ? 'text-left w-full font-medium min-w-0'+ ? 'w-full min-w-0 text-left font-medium': 'text-right font-mono',// Remove old responsive logic - now handled by responsive propcolumn.className@@ -199,15 +205,15 @@ export const OverviewWidgetTable = <T,>({return (<div className={cn(className)}><WidgetTable- data={sortedData}- keyExtractor={keyExtractor}- className={'text-sm min-h-[358px] @container'}+ className={'@container min-h-[358px] text-sm'}columnClassName="[&_.cell:first-child]:pl-4 [&_.cell:last-child]:pr-4"+ columns={columnsWithSortableHeaders}+ data={sortedData}eachRow={(item) => {return (- <div className="absolute top-0 left-0 !p-0 w-full h-full">+ <div className="!p-0 absolute top-0 left-0 h-full w-full"><div- className="h-full bg-def-200 group-hover/row:bg-blue-200 dark:group-hover/row:bg-blue-900 transition-colors relative"+ className="relative h-full bg-def-200 transition-colors group-hover/row:bg-blue-200 dark:group-hover/row:bg-blue-900"style={{width: `${getColumnPercentage(item) * 100}%`,}}@@ -215,7 +221,7 @@ export const OverviewWidgetTable = <T,>({</div>);}}- columns={columnsWithSortableHeaders}+ keyExtractor={keyExtractor}/></div>);@@ -229,9 +235,6 @@ export function OverviewWidgetTableLoading({return (<OverviewWidgetTableclassName={className}- data={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}- keyExtractor={(item) => item.toString()}- getColumnPercentage={() => 0}columns={[{name: 'Path',@@ -244,6 +247,9 @@ export function OverviewWidgetTableLoading({width: '84px',},]}+ data={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}+ getColumnPercentage={() => 0}+ keyExtractor={(item) => item.toString()}/>);}@@ -283,9 +289,6 @@ export function OverviewWidgetTablePages({return (<OverviewWidgetTableclassName={className}- data={data ?? []}- keyExtractor={(item) => item.path + item.origin}- getColumnPercentage={(item) => item.sessions / maxSessions}columns={[{name: 'Path',@@ -294,15 +297,15 @@ export function OverviewWidgetTablePages({render(item) {return (<Tooltiper asChild content={item.origin + item.path} side="left">- <div className="row items-center gap-2 min-w-0 relative">+ <div className="row relative min-w-0 items-center gap-2"><SerieIcon name={item.origin} /><button- type="button"className="truncate"onClick={() => {setFilter('path', item.path);setFilter('origin', item.origin);}}+ type="button">{item.path ? (<>@@ -321,10 +324,10 @@ export function OverviewWidgetTablePages({</button><ahref={item.origin + item.path}- target="_blank"rel="noreferrer"+ target="_blank">- <ExternalLinkIcon className="size-3 group-hover/row:opacity-100 opacity-0 transition-opacity" />+ <ExternalLinkIcon className="size-3 opacity-0 transition-opacity group-hover/row:opacity-100" /></a></div></Tooltiper>@@ -344,7 +347,7 @@ export function OverviewWidgetTablePages({const revenuePercentage =totalRevenue > 0 ? revenue / totalRevenue : 0;return (- <div className="row gap-2 items-center justify-end">+ <div className="row items-center justify-end gap-2"><spanclassName="font-semibold"style={{ color: '#3ba974' }}@@ -365,7 +368,7 @@ export function OverviewWidgetTablePages({getSortValue: (item: (typeof data)[number]) => item.pageviews,render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.pageviews)}</span>@@ -380,7 +383,7 @@ export function OverviewWidgetTablePages({getSortValue: (item: (typeof data)[number]) => item.sessions,render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.sessions)}</span>@@ -389,6 +392,9 @@ export function OverviewWidgetTablePages({},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.sessions / maxSessions}+ keyExtractor={(item) => item.path + item.origin}/>);}@@ -418,9 +424,6 @@ export function OverviewWidgetTableEntries({return (<OverviewWidgetTableclassName={className}- data={data ?? []}- keyExtractor={(item) => item.path + item.origin}- getColumnPercentage={(item) => item.sessions / maxSessions}columns={[{name: 'Path',@@ -429,15 +432,15 @@ export function OverviewWidgetTableEntries({render(item) {return (<Tooltiper asChild content={item.origin + item.path} side="left">- <div className="row items-center gap-2 min-w-0 relative">+ <div className="row relative min-w-0 items-center gap-2"><SerieIcon name={item.origin} /><button- type="button"className="truncate"onClick={() => {setFilter('path', item.path);setFilter('origin', item.origin);}}+ type="button">{item.path ? (<>@@ -456,10 +459,10 @@ export function OverviewWidgetTableEntries({</button><ahref={item.origin + item.path}- target="_blank"rel="noreferrer"+ target="_blank">- <ExternalLinkIcon className="size-3 group-hover/row:opacity-100 opacity-0 transition-opacity" />+ <ExternalLinkIcon className="size-3 opacity-0 transition-opacity group-hover/row:opacity-100" /></a></div></Tooltiper>@@ -479,7 +482,7 @@ export function OverviewWidgetTableEntries({const revenuePercentage =totalRevenue > 0 ? revenue / totalRevenue : 0;return (- <div className="row gap-2 items-center justify-end">+ <div className="row items-center justify-end gap-2"><spanclassName="font-semibold"style={{ color: '#3ba974' }}@@ -500,7 +503,7 @@ export function OverviewWidgetTableEntries({getSortValue: (item: (typeof data)[number]) => item.sessions,render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.sessions)}</span>@@ -509,6 +512,9 @@ export function OverviewWidgetTableEntries({},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.sessions / maxSessions}+ keyExtractor={(item) => item.path + item.origin}/>);}@@ -533,9 +539,6 @@ export function OverviewWidgetTableBots({return (<OverviewWidgetTableclassName={className}- data={data ?? []}- keyExtractor={(item) => item.path + item.origin}- getColumnPercentage={(item) => item.sessions / maxSessions}columns={[{name: 'Path',@@ -543,23 +546,23 @@ export function OverviewWidgetTableBots({render(item) {return (<Tooltiper asChild content={item.origin + item.path} side="left">- <div className="row items-center gap-2 min-w-0 relative">+ <div className="row relative min-w-0 items-center gap-2"><SerieIcon name={item.origin} /><button- type="button"className="truncate"onClick={() => {setFilter('path', item.path);}}+ type="button">{getPath(item.path)}</button><ahref={item.origin + item.path}- target="_blank"rel="noreferrer"+ target="_blank">- <ExternalLinkIcon className="size-3 group-hover/row:opacity-100 opacity-0 transition-opacity" />+ <ExternalLinkIcon className="size-3 opacity-0 transition-opacity group-hover/row:opacity-100" /></a></div></Tooltiper>@@ -571,7 +574,7 @@ export function OverviewWidgetTableBots({width: '60px',render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">Google bot</span></div>);@@ -582,13 +585,16 @@ export function OverviewWidgetTableBots({width: '60px',render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">Google bot</span></div>);},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.sessions / maxSessions}+ keyExtractor={(item) => item.path + item.origin}/>);}@@ -615,9 +621,6 @@ export function OverviewWidgetTableGeneric({return (<OverviewWidgetTableclassName={className}- data={data ?? []}- keyExtractor={(item) => item.prefix + item.name}- getColumnPercentage={(item) => item.sessions / maxSessions}columns={[{...column,@@ -638,7 +641,7 @@ export function OverviewWidgetTableGeneric({const revenuePercentage =totalRevenue > 0 ? revenue / totalRevenue : 0;return (- <div className="row gap-2 items-center justify-end">+ <div className="row items-center justify-end gap-2"><spanclassName="font-semibold"style={{ color: '#3ba974' }}@@ -665,7 +668,7 @@ export function OverviewWidgetTableGeneric({) => item.pageviews,render(item: RouterOutputs['overview']['topGeneric'][number]) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.pageviews)}</span>@@ -684,7 +687,7 @@ export function OverviewWidgetTableGeneric({) => item.sessions,render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.sessions)}</span>@@ -693,6 +696,9 @@ export function OverviewWidgetTableGeneric({},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.sessions / maxSessions}+ keyExtractor={(item) => item.prefix + item.name}/>);}@@ -717,9 +723,6 @@ export function OverviewWidgetTableEvents({return (<OverviewWidgetTableclassName={className}- data={data ?? []}- keyExtractor={(item) => item.id}- getColumnPercentage={(item) => item.count / maxCount}columns={[{name: 'Event',@@ -727,12 +730,12 @@ export function OverviewWidgetTableEvents({responsive: { priority: 1 },render(item) {return (- <div className="row items-center gap-2 min-w-0 relative">+ <div className="row relative min-w-0 items-center gap-2"><SerieIcon name={item.name} /><button- type="button"className="truncate"onClick={() => onItemClick?.(item.name)}+ type="button">{item.name || 'Not set'}</button>@@ -747,7 +750,7 @@ export function OverviewWidgetTableEvents({getSortValue: (item: EventTableItem) => item.count,render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.count)}</span>@@ -756,6 +759,9 @@ export function OverviewWidgetTableEvents({},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.count / maxCount}+ keyExtractor={(item) => item.id}/>);}diff --git a/apps/start/src/components/overview/overview-widget.tsx b/apps/start/src/components/overview/overview-widget.tsxindex ae4f5cad7..37efa8336 100644--- a/apps/start/src/components/overview/overview-widget.tsx+++ b/apps/start/src/components/overview/overview-widget.tsx@@ -1,9 +1,6 @@-import { useThrottle } from '@/hooks/use-throttle';-import { cn } from '@/utils/cn';import { ChevronsUpDownIcon, type LucideIcon, SearchIcon } from 'lucide-react';import { last } from 'ramda';import { Children, useCallback, useEffect, useRef, useState } from 'react';-import {DropdownMenu,DropdownMenuContent,@@ -14,6 +11,8 @@ import {import { Input } from '../ui/input';import type { WidgetHeadProps, WidgetTitleProps } from '../widget';import { WidgetHead as WidgetHeadBase } from '../widget';+import { useThrottle } from '@/hooks/use-throttle';+import { cn } from '@/utils/cn';export function WidgetHead({ className, ...props }: WidgetHeadProps) {return (@@ -37,11 +36,11 @@ export function WidgetTitle({}) {return (<div- className={cn('title text-left row justify-start', className)}+ className={cn('title row justify-start text-left', className)}{...props}>{Icon && (- <div className="rounded-lg bg-def-200 p-1 mr-2">+ <div className="mr-2 rounded-lg bg-def-200 p-1"><Icon size={16} /></div>)}@@ -58,7 +57,7 @@ export function WidgetAbsoluteButtons({return (<divclassName={cn(- 'row gap-1 absolute right-4 top-1/2 -translate-y-1/2',+ 'row absolute top-1/2 right-4 -translate-y-1/2 gap-1',className)}{...props}@@ -123,11 +122,11 @@ export function WidgetButtons({return (<div- ref={container}className={cn(- '-mb-px -mt-2 flex flex-wrap justify-start self-stretch px-4 transition-opacity [&_button.active]:border-b-2 [&_button.active]:border-black [&_button.active]:opacity-100 dark:[&_button.active]:border-white [&_button]:whitespace-nowrap [&_button]:py-1 [&_button]:text-sm [&_button]:opacity-50',+ '-mt-2 -mb-px flex flex-wrap justify-start self-stretch px-4 transition-opacity [&_button.active]:border-black [&_button.active]:border-b-2 [&_button.active]:opacity-100 dark:[&_button.active]:border-white [&_button]:whitespace-nowrap [&_button]:py-1 [&_button]:text-sm [&_button]:opacity-50',className)}+ ref={container}style={{ gap }}{...props}>@@ -146,11 +145,11 @@ export function WidgetButtons({<DropdownMenu><DropdownMenuTrigger asChild><button- type="button"className={cn('flex select-none items-center gap-1',sizes.current.length - 1 === slice ? hidden : 'opacity-50')}+ type="button">More <ChevronsUpDownIcon size={12} /></button>@@ -200,7 +199,9 @@ export function WidgetHeadSearchable<T extends string>({const updateGradients = useCallback(() => {const el = scrollRef.current;- if (!el) return;+ if (!el) {+ return;+ }const { scrollLeft, scrollWidth, clientWidth } = el;const hasOverflow = scrollWidth > clientWidth;@@ -213,7 +214,9 @@ export function WidgetHeadSearchable<T extends string>({useEffect(() => {const el = scrollRef.current;- if (!el) return;+ if (!el) {+ return;+ }updateGradients();@@ -233,33 +236,33 @@ export function WidgetHeadSearchable<T extends string>({}, [tabs, updateGradients]);return (- <div className={cn('border-b border-border', className)}>+ <div className={cn('border-border border-b', className)}>{/* Scrollable tabs container */}<div className="relative">{/* Left gradient */}<divclassName={cn(- 'pointer-events-none absolute left-0 top-0 z-10 h-full w-8 bg-gradient-to-r from-card to-transparent transition-opacity duration-200',+ 'pointer-events-none absolute top-0 left-0 z-10 h-full w-8 bg-gradient-to-r from-card to-transparent transition-opacity duration-200',showLeftGradient ? 'opacity-100' : 'opacity-0')}/>{/* Scrollable tabs */}<div+ className="hide-scrollbar flex gap-1 overflow-x-auto px-2 py-3"ref={scrollRef}- className="flex gap-1 overflow-x-auto px-2 py-3 hide-scrollbar">{tabs.map((tab) => (<button- key={tab.key}- type="button"- onClick={() => onTabChange(tab.key)}className={cn(- 'shrink-0 rounded-md py-1.5 text-sm font-medium transition-colors px-2',+ 'shrink-0 rounded-md px-2 py-1.5 font-medium text-sm transition-colors',activeTab === tab.key? 'text-foreground': 'text-muted-foreground hover:bg-def-100 hover:text-foreground')}+ key={tab.key}+ onClick={() => onTabChange(tab.key)}+ type="button">{tab.label}</button>@@ -269,7 +272,7 @@ export function WidgetHeadSearchable<T extends string>({{/* Right gradient */}<divclassName={cn(- 'pointer-events-none absolute right-0 top-0 z-10 bottom-px w-8 bg-gradient-to-l from-card to-transparent transition-opacity duration-200',+ 'pointer-events-none absolute top-0 right-0 bottom-px z-10 w-8 bg-gradient-to-l from-card to-transparent transition-opacity duration-200',showRightGradient ? 'opacity-100' : 'opacity-0')}/>@@ -278,13 +281,13 @@ export function WidgetHeadSearchable<T extends string>({{/* Search input */}{onSearchChange && (<div className="relative">- <SearchIcon className="absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />+ <SearchIcon className="absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" /><Input- type="search"+ className="rounded-none border-0 border-y bg-transparent pl-9 text-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground focus-visible:ring-offset-0"+ onChange={(e) => onSearchChange(e.target.value)}placeholder={searchPlaceholder}+ type="search"value={searchValue ?? ''}- onChange={(e) => onSearchChange(e.target.value)}- className="pl-9 bg-transparent border-0 text-sm rounded-none focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground focus-visible:ring-offset-0 border-y"/></div>)}@@ -300,7 +303,7 @@ export function WidgetFooter({return (<divclassName={cn(- 'flex rounded-b-md border-t bg-def-100 p-2 py-1',+ 'flex rounded-b-md border-t bg-def-100 p-2 py-1',className)}{...props}diff --git a/apps/start/src/components/overview/useOverviewWidget.tsx b/apps/start/src/components/overview/useOverviewWidget.tsxindex 0c9149bd5..53f569ca4 100644--- a/apps/start/src/components/overview/useOverviewWidget.tsx+++ b/apps/start/src/components/overview/useOverviewWidget.tsx@@ -1,8 +1,6 @@import { parseAsStringEnum, useQueryState } from 'nuqs';--import { mapKeys } from '@/utils/object-to-zod-enums';-import type { ReportChartProps } from '../report-chart/context';+import { mapKeys } from '@/utils/object-to-zod-enums';export function useOverviewWidget<T extends string>(key: string,diff --git a/apps/start/src/components/page-header.tsx b/apps/start/src/components/page-header.tsxindex 49ea5f094..241ebf415 100644--- a/apps/start/src/components/page-header.tsx+++ b/apps/start/src/components/page-header.tsx@@ -17,10 +17,10 @@ export function PageHeader({}: PageHeaderProps) {return (<div className={cn('col md:row gap-2', className)}>- <div className={'space-y-1 flex-1'}>- <h1 className="text-2xl font-semibold">{title}</h1>+ <div className={'flex-1 space-y-1'}>+ <h1 className="font-semibold text-2xl">{title}</h1>{description && (- <p className="text-muted-foreground font-medium">{description}</p>+ <p className="font-medium text-muted-foreground">{description}</p>)}{children}</div>diff --git a/apps/start/src/components/page/gsc-breakdown-table.tsx b/apps/start/src/components/page/gsc-breakdown-table.tsxindex 2acfef170..531052382 100644--- a/apps/start/src/components/page/gsc-breakdown-table.tsx+++ b/apps/start/src/components/page/gsc-breakdown-table.tsx@@ -1,8 +1,8 @@-import { useOverviewOptions } from '@/components/overview/useOverviewOptions';+import { useQuery } from '@tanstack/react-query';import { OverviewWidgetTable } from '@/components/overview/overview-widget-table';+import { useOverviewOptions } from '@/components/overview/useOverviewOptions';import { Skeleton } from '@/components/skeleton';import { useTRPC } from '@/integrations/trpc/react';-import { useQuery } from '@tanstack/react-query';interface GscBreakdownTableProps {projectId: string;@@ -64,9 +64,6 @@ export function GscBreakdownTable({</div>{isLoading ? (<OverviewWidgetTable- data={[1, 2, 3, 4, 5]}- keyExtractor={(i) => String(i)}- getColumnPercentage={() => 0}columns={[{name: breakdownLabel,@@ -94,12 +91,12 @@ export function GscBreakdownTable({render: () => <Skeleton className="h-4 w-8" />,},]}+ data={[1, 2, 3, 4, 5]}+ getColumnPercentage={() => 0}+ keyExtractor={(i) => String(i)}/>) : (<OverviewWidgetTable- data={breakdownRows}- keyExtractor={(item) => String(item[breakdownKey])}- getColumnPercentage={(item) => (item.clicks as number) / maxClicks}columns={[{name: breakdownLabel,@@ -163,6 +160,9 @@ export function GscBreakdownTable({},},]}+ data={breakdownRows}+ getColumnPercentage={(item) => (item.clicks as number) / maxClicks}+ keyExtractor={(item) => String(item[breakdownKey])}/>)}</div>diff --git a/apps/start/src/components/page/gsc-position-chart.tsx b/apps/start/src/components/page/gsc-position-chart.tsxindex 6479be2f7..c98c32706 100644--- a/apps/start/src/components/page/gsc-position-chart.tsx+++ b/apps/start/src/components/page/gsc-position-chart.tsx@@ -28,7 +28,9 @@ const { TooltipProvider, Tooltip } = createChartTooltip<Record<string, unknown>>(({ data }) => {const item = data[0];- if (!item) return null;+ if (!item) {+ return null;+ }return (<><ChartTooltipHeader>diff --git a/apps/start/src/components/page/page-views-chart.tsx b/apps/start/src/components/page/page-views-chart.tsxindex 0f767a6ce..4f66241de 100644--- a/apps/start/src/components/page/page-views-chart.tsx+++ b/apps/start/src/components/page/page-views-chart.tsx@@ -13,12 +13,12 @@ import {createChartTooltip,} from '@/components/charts/chart-tooltip';import { useOverviewOptions } from '@/components/overview/useOverviewOptions';-import { useFormatDateInterval } from '@/hooks/use-format-date-interval';import {useYAxisProps,X_AXIS_STYLE_PROPS,} from '@/components/report-chart/common/axis';import { Skeleton } from '@/components/skeleton';+import { useFormatDateInterval } from '@/hooks/use-format-date-interval';import { useTRPC } from '@/integrations/trpc/react';import { getChartColor } from '@/utils/theme';diff --git a/apps/start/src/components/pages/table/index.tsx b/apps/start/src/components/pages/table/index.tsxindex ddbbe89c0..63e3045f3 100644--- a/apps/start/src/components/pages/table/index.tsx+++ b/apps/start/src/components/pages/table/index.tsx@@ -1,3 +1,6 @@+import { keepPreviousData, useQuery } from '@tanstack/react-query';+import { useMemo } from 'react';+import { type PageRow, useColumns } from './columns';import { OverviewInterval } from '@/components/overview/overview-interval';import { OverviewRange } from '@/components/overview/overview-range';import { useOverviewOptions } from '@/components/overview/useOverviewOptions';@@ -11,9 +14,6 @@ import { useTable } from '@/components/ui/data-table/use-table';import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTRPC } from '@/integrations/trpc/react';import { pushModal } from '@/modals';-import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { useMemo } from 'react';-import { type PageRow, useColumns } from './columns';interface PagesTableProps {projectId: string;@@ -107,9 +107,9 @@ export function PagesTable({ projectId }: PagesTableProps) {<><DataTableToolbarContainer><AnimatedSearchInput+ onChange={setSearch}placeholder="Search pages"value={search ?? ''}- onChange={setSearch}/><div className="flex items-center gap-2"><OverviewRange />@@ -118,14 +118,13 @@ export function PagesTable({ projectId }: PagesTableProps) {</div></DataTableToolbarContainer><DataTable- table={table}- loading={pagesQuery.isLoading}empty={{title: 'No pages',description: debouncedSearch? `No pages found matching "${debouncedSearch}"`: 'Integrate our web SDK to your site to get pages here.',}}+ loading={pagesQuery.isLoading}onRowClick={(row) => {if (!isGscConnected) {return;@@ -137,6 +136,7 @@ export function PagesTable({ projectId }: PagesTableProps) {value: page.origin + page.path,});}}+ table={table}/></>);diff --git a/apps/start/src/components/pagination-floating.tsx b/apps/start/src/components/pagination-floating.tsxindex abcb63652..cc9cfae5d 100644--- a/apps/start/src/components/pagination-floating.tsx+++ b/apps/start/src/components/pagination-floating.tsx@@ -2,8 +2,8 @@ import { Pagination, type Props } from './pagination';export function FloatingPagination(props: Props) {return (- <div className="fixed bottom-8 left-0 lg:left-72 right-0 row justify-center">- <div className="card p-8 py-4 backdrop-blur-sm bg-background/50 shadow-lg">+ <div className="row fixed right-0 bottom-8 left-0 justify-center lg:left-72">+ <div className="card bg-background/50 p-8 py-4 shadow-lg backdrop-blur-sm"><Pagination {...props} /></div></div>diff --git a/apps/start/src/components/pagination.tsx b/apps/start/src/components/pagination.tsxindex 130a500bf..89eee1476 100644--- a/apps/start/src/components/pagination.tsx+++ b/apps/start/src/components/pagination.tsx@@ -1,4 +1,4 @@-import { cn } from '@/utils/cn';+import { useIsFetching } from '@tanstack/react-query';import {ChevronLeftIcon,ChevronRightIcon,@@ -6,9 +6,8 @@ import {ChevronsRightIcon,} from 'lucide-react';import { useState } from 'react';--import { useIsFetching } from '@tanstack/react-query';import { Button } from './ui/button';+import { cn } from '@/utils/cn';export function usePagination(take: number) {const [page, setPage] = useState(0);@@ -55,50 +54,50 @@ export function Pagination({>{typeof firstPage === 'function' && (<Button- variant="outline"- size="icon"- onClick={() => firstPage?.()}- disabled={!canPreviousPage}className="max-sm:hidden"+ disabled={!canPreviousPage}icon={ChevronsLeftIcon}+ onClick={() => firstPage?.()}+ size="icon"+ variant="outline"/>)}<Button- variant="outline"- size="icon"- onClick={() => previousPage()}disabled={!canPreviousPage}icon={ChevronLeftIcon}+ onClick={() => previousPage()}+ size="icon"+ variant="outline"/><Button+ className={cn(typeof pageIndex === 'string' && 'w-auto min-w-8 px-2')}+ disabledloading={isLoading}loadingAbsoluteloadingType="ring"- disabled- variant="outline"size="icon"- className={cn(typeof pageIndex === 'string' && 'min-w-8 w-auto px-2')}+ variant="outline">{typeof pageIndex === 'number' ? pageIndex + 1 : pageIndex}</Button><Button- variant="outline"- size="icon"- onClick={() => nextPage()}disabled={!canNextPage}icon={ChevronRightIcon}+ onClick={() => nextPage()}+ size="icon"+ variant="outline"/>{typeof lastPage === 'function' && (<Button- variant="outline"- size="icon"- onClick={() => lastPage?.()}- disabled={!canNextPage}className="max-sm:hidden"+ disabled={!canNextPage}icon={ChevronsRightIcon}+ onClick={() => lastPage?.()}+ size="icon"+ variant="outline"/>)}</div>diff --git a/apps/start/src/components/ping.tsx b/apps/start/src/components/ping.tsxindex a3571ae8d..a55214b5f 100644--- a/apps/start/src/components/ping.tsx+++ b/apps/start/src/components/ping.tsx@@ -1,13 +1,13 @@-import { cn } from '@/utils/cn';import { Badge } from './ui/badge';+import { cn } from '@/utils/cn';export function Ping({ className }: { className?: string }) {return (<div className="relative">- <div className={cn('size-2 bg-emerald-500 rounded-full', className)} />+ <div className={cn('size-2 rounded-full bg-emerald-500', className)} /><divclassName={cn(- 'size-2 bg-emerald-500 rounded-full absolute inset-0 animate-ping',+ 'absolute inset-0 size-2 animate-ping rounded-full bg-emerald-500',className)}/>@@ -23,7 +23,7 @@ export function PingBadge({className?: string;}) {return (- <Badge variant={'outline'} className={cn('flex gap-1', className)}>+ <Badge className={cn('flex gap-1', className)} variant={'outline'}><Ping />{children}</Badge>diff --git a/apps/start/src/components/profiles/latest-events.tsx b/apps/start/src/components/profiles/latest-events.tsxindex 321874515..a07494394 100644--- a/apps/start/src/components/profiles/latest-events.tsx+++ b/apps/start/src/components/profiles/latest-events.tsx@@ -1,6 +1,3 @@-import { Button } from '@/components/ui/button';-import { Widget } from '@/components/widget';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { useRouter } from '@tanstack/react-router';import { ActivityIcon } from 'lucide-react';@@ -12,6 +9,9 @@ import {WidgetTitle,} from '../overview/overview-widget';import { ScrollArea } from '../ui/scroll-area';+import { Button } from '@/components/ui/button';+import { Widget } from '@/components/widget';+import { useTRPC } from '@/integrations/trpc/react';type Props = {profileId: string;@@ -53,19 +53,19 @@ export const LatestEvents = ({}, [query.data?.data?.length]);return (- <Widget className="w-full overflow-hidden h-full" ref={ref}>+ <Widget className="h-full w-full overflow-hidden" ref={ref}><WidgetHead><WidgetTitle icon={ActivityIcon}>Latest Events</WidgetTitle><WidgetAbsoluteButtons>- <Button variant="outline" size="sm" onClick={handleShowMore}>+ <Button onClick={handleShowMore} size="sm" variant="outline">All</Button></WidgetAbsoluteButtons></WidgetHead>- <ScrollArea ref={scrollRef} className="h-0 p-4">+ <ScrollArea className="h-0 p-4" ref={scrollRef}>{query.data?.data?.map((event) => (- <div key={event.id} className="mb-4">+ <div className="mb-4" key={event.id}><EventListItem {...event} /></div>))}diff --git a/apps/start/src/components/profiles/most-events.tsx b/apps/start/src/components/profiles/most-events.tsxindex 9ab868693..f1c894057 100644--- a/apps/start/src/components/profiles/most-events.tsx+++ b/apps/start/src/components/profiles/most-events.tsx@@ -1,6 +1,6 @@import { ZapIcon } from 'lucide-react';-import { Widget, WidgetEmptyState } from '@/components/widget';import { WidgetHead, WidgetTitle } from '../overview/overview-widget';+import { Widget, WidgetEmptyState } from '@/components/widget';type Props = {data: { count: number; name: string }[];@@ -18,14 +18,14 @@ export const MostEvents = ({ data }: Props) => {) : (<div className="flex flex-col gap-1 p-1">{data.slice(0, 5).map((item) => (- <div key={item.name} className="relative px-3 py-2">+ <div className="relative px-3 py-2" key={item.name}><div- className="absolute bottom-0 left-0 top-0 rounded bg-def-200"+ className="absolute top-0 bottom-0 left-0 rounded bg-def-200"style={{width: `${(item.count / max) * 100}%`,}}/>- <div className="relative flex justify-between ">+ <div className="relative flex justify-between"><div>{item.name}</div><div>{item.count}</div></div>diff --git a/apps/start/src/components/profiles/popular-routes.tsx b/apps/start/src/components/profiles/popular-routes.tsxindex c89b1d60b..1edff4765 100644--- a/apps/start/src/components/profiles/popular-routes.tsx+++ b/apps/start/src/components/profiles/popular-routes.tsx@@ -1,6 +1,6 @@import { RouteIcon } from 'lucide-react';-import { Widget, WidgetEmptyState } from '@/components/widget';import { WidgetHead, WidgetTitle } from '../overview/overview-widget';+import { Widget, WidgetEmptyState } from '@/components/widget';type Props = {data: { count: number; path: string }[];@@ -18,14 +18,14 @@ export const PopularRoutes = ({ data }: Props) => {) : (<div className="flex flex-col gap-1 p-1">{data.slice(0, 5).map((item) => (- <div key={item.path} className="relative px-3 py-2">+ <div className="relative px-3 py-2" key={item.path}><div- className="absolute bottom-0 left-0 top-0 rounded bg-def-200"+ className="absolute top-0 bottom-0 left-0 rounded bg-def-200"style={{width: `${(item.count / max) * 100}%`,}}/>- <div className="relative flex justify-between ">+ <div className="relative flex justify-between"><div>{item.path}</div><div>{item.count}</div></div>diff --git a/apps/start/src/components/profiles/profile-activity.tsx b/apps/start/src/components/profiles/profile-activity.tsxindex 2b6e000af..2bcef9db0 100644--- a/apps/start/src/components/profiles/profile-activity.tsx+++ b/apps/start/src/components/profiles/profile-activity.tsx@@ -1,5 +1,3 @@-import { Widget, WidgetBody } from '@/components/widget';-import { cn } from '@/utils/cn';import {addMonths,eachDayOfInterval,@@ -20,17 +18,27 @@ import {} from '../overview/overview-widget';import { Button } from '../ui/button';import { Tooltiper } from '../ui/tooltip';+import { Widget, WidgetBody } from '@/components/widget';+import { cn } from '@/utils/cn';type Props = {data: { count: number; date: string }[];};function getOpacityLevel(count: number, maxCount: number): number {- if (count === 0 || maxCount === 0) return 0;+ if (count === 0 || maxCount === 0) {+ return 0;+ }const ratio = count / maxCount;- if (ratio <= 0.25) return 0.25;- if (ratio <= 0.5) return 0.5;- if (ratio <= 0.75) return 0.75;+ if (ratio <= 0.25) {+ return 0.25;+ }+ if (ratio <= 0.5) {+ return 0.5;+ }+ if (ratio <= 0.75) {+ return 0.75;+ }return 1;}@@ -56,10 +64,9 @@ const MonthCalendar = ({const opacity = hit ? getOpacityLevel(hit.count, maxCount) : 0;return (<Tooltiper- key={date.toISOString()}asChildcontent={- <div className="text-sm col gap-1">+ <div className="col gap-1 text-sm"><div className="font-medium">{format(date, 'EEEE, MMM d')}</div>{hit ? (<div className="text-muted-foreground">@@ -70,15 +77,16 @@ const MonthCalendar = ({)}</div>}+ key={date.toISOString()}><divclassName={cn(- 'aspect-square w-full rounded cursor-default group hover:ring-1 hover:ring-foreground overflow-hidden'+ 'group aspect-square w-full cursor-default overflow-hidden rounded hover:ring-1 hover:ring-foreground')}><divclassName={cn(- 'size-full group-hover:shadow-[inset_0_0_0_2px_var(--background)] rounded',+ 'size-full rounded group-hover:shadow-[inset_0_0_0_2px_var(--background)]',isToday(date)? 'bg-highlight': hit@@ -101,21 +109,21 @@ export const ProfileActivity = ({ data }: Props) => {return (<Widget className="w-full">- <WidgetHead className="row justify-between relative">+ <WidgetHead className="row relative justify-between"><WidgetTitle icon={ActivityIcon}>Activity</WidgetTitle><WidgetAbsoluteButtons><Button- variant="outline"- size="icon"onClick={() => setStartDate(subMonths(startDate, 1))}+ size="icon"+ variant="outline"><ChevronLeftIcon size={14} /></Button><Button- variant="outline"- size="icon"disabled={isSameMonth(startDate, new Date())}onClick={() => setStartDate(addMonths(startDate, 1))}+ size="icon"+ variant="outline"><ChevronRightIcon size={14} /></Button>@@ -125,10 +133,10 @@ export const ProfileActivity = ({ data }: Props) => {<div className="grid grid-cols-1 gap-4 md:grid-cols-2">{[3, 2, 1, 0].map((offset) => (<MonthCalendar- key={offset}- month={subMonths(startDate, offset)}data={data}+ key={offset}maxCount={maxCount}+ month={subMonths(startDate, offset)}/>))}</div>diff --git a/apps/start/src/components/profiles/profile-avatar.tsx b/apps/start/src/components/profiles/profile-avatar.tsxindex 26d206786..47af31be5 100644--- a/apps/start/src/components/profiles/profile-avatar.tsx+++ b/apps/start/src/components/profiles/profile-avatar.tsx@@ -1,8 +1,8 @@+import type { VariantProps } from 'class-variance-authority';+import { cva } from 'class-variance-authority';import { Avatar, AvatarFallback, AvatarImage } from '@/components/facehash';import { cn } from '@/utils/cn';import { type GetProfileNameProps, getProfileName } from '@/utils/getters';-import type { VariantProps } from 'class-variance-authority';-import { cva } from 'class-variance-authority';interface ProfileAvatarPropsextends VariantProps<typeof variants>,@@ -36,11 +36,11 @@ export function ProfileAvatar({return (<Avatar className={cn(variants({ className, size }), className)}>- {isValidAvatar && <AvatarImage src={avatar} className="rounded-full" />}+ {isValidAvatar && <AvatarImage className="rounded-full" src={avatar} />}<AvatarFallback- name={name ?? 'Unknown'}- facehashclassName="rounded-full"+ facehash+ name={name ?? 'Unknown'}/></Avatar>);diff --git a/apps/start/src/components/profiles/profile-groups.tsx b/apps/start/src/components/profiles/profile-groups.tsxindex 2512bf1d1..67ce7a7a9 100644--- a/apps/start/src/components/profiles/profile-groups.tsx+++ b/apps/start/src/components/profiles/profile-groups.tsx@@ -1,7 +1,7 @@-import { ProjectLink } from '@/components/links';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { UsersIcon } from 'lucide-react';+import { ProjectLink } from '@/components/links';+import { useTRPC } from '@/integrations/trpc/react';interface Props {profileId: string;@@ -30,10 +30,10 @@ export const ProfileGroups = ({ projectId, groups }: Props) => {</span>{query.data.map((group) => (<ProjectLink+ className="inline-flex items-center gap-1.5 rounded-full border bg-muted/50 px-2.5 py-1 text-xs transition-colors hover:bg-muted"key={group.id}- to="/groups/$groupId"params={{ groupId: group.id }}- className="inline-flex items-center gap-1.5 rounded-full border bg-muted/50 px-2.5 py-1 text-xs transition-colors hover:bg-muted"+ to="/groups/$groupId"><span className="font-medium">{group.name}</span><span className="text-muted-foreground">{group.type}</span>diff --git a/apps/start/src/components/profiles/profile-properties.tsx b/apps/start/src/components/profiles/profile-properties.tsxindex 5384eae3c..cf54fb784 100644--- a/apps/start/src/components/profiles/profile-properties.tsx+++ b/apps/start/src/components/profiles/profile-properties.tsx@@ -1,12 +1,11 @@+import type { IServiceEvent, IServiceProfile } from '@openpanel/core';+import { parseAsStringEnum, useQueryState } from 'nuqs';+import { FullPageEmptyState } from '../full-page-empty-state';+import { WidgetButtons, WidgetHead } from '../overview/overview-widget';import { KeyValueGrid } from '@/components/ui/key-value-grid';import { Widget } from '@/components/widget';import { cn } from '@/utils/cn';import { formatDateTime } from '@/utils/date';-import { parseAsStringEnum, useQueryState } from 'nuqs';--import type { IServiceEvent, IServiceProfile } from '@openpanel/core';-import { FullPageEmptyState } from '../full-page-empty-state';-import { WidgetButtons, WidgetHead } from '../overview/overview-widget';type Props = {profile: IServiceProfile;@@ -34,10 +33,10 @@ export const ProfileProperties = ({ profile }: Props) => {},].map((w) => (<button- type="button"+ className={cn(w.key === tab && 'active')}key={w.key}onClick={() => setTab(w.key as 'profile' | 'properties')}- className={cn(w.key === tab && 'active')}+ type="button">{w.btn}</button>@@ -47,9 +46,9 @@ export const ProfileProperties = ({ profile }: Props) => {{tab === 'profile' && profile && (<KeyValueGrid- copyableclassName="border-0"columns={3}+ copyabledata={[{ name: 'id', value: profile.id },{ name: 'firstName', value: profile.firstName },@@ -99,14 +98,14 @@ export const ProfileProperties = ({ profile }: Props) => {{tab === 'properties' && profile && (<KeyValueGrid- copyableclassName="border-0"columns={3}+ copyabledata={Object.entries(profile.properties).filter(([, value]) => value !== undefined && value !== '').map(([key, value]) => ({name: key,- value: value,+ value,event: {...profile,...profile.properties,@@ -114,7 +113,7 @@ export const ProfileProperties = ({ profile }: Props) => {}))}/>)}- {(!profile || !profile.properties) && (+ {!(profile && profile.properties) && (<FullPageEmptyState title="No properties found" />)}</Widget>diff --git a/apps/start/src/components/profiles/table/columns.tsx b/apps/start/src/components/profiles/table/columns.tsxindex a6f1e59f6..c5e1da6a1 100644--- a/apps/start/src/components/profiles/table/columns.tsx+++ b/apps/start/src/components/profiles/table/columns.tsx@@ -16,9 +16,9 @@ export function useColumns(type: 'profiles' | 'power-users') {return (<ProjectLinkclassName="flex items-center gap-2 font-medium"- to="/profiles/$profileId"params={{ profileId: profile.id }}title={getProfileName(profile, false)}+ to="/profiles/$profileId"><ProfileAvatar size="sm" {...profile} />{getProfileName(profile)}@@ -129,9 +129,9 @@ export function useColumns(type: 'profiles' | 'power-users') {{groups.map((g) => (<ProjectLinkclassName="rounded bg-muted px-1.5 py-0.5 font-mono text-xs hover:underline"- to="/groups/$groupId"- params={{ groupId: g }}key={g}+ params={{ groupId: g }}+ to="/groups/$groupId">{g}</ProjectLink>diff --git a/apps/start/src/components/profiles/table/index.tsx b/apps/start/src/components/profiles/table/index.tsxindex 4882ecb11..7e3c5c2af 100644--- a/apps/start/src/components/profiles/table/index.tsx+++ b/apps/start/src/components/profiles/table/index.tsx@@ -121,9 +121,9 @@ function ProfileTableToolbar({ table }: { table: Table<IServiceProfile> }) {value={search}/><TableFilterPills- urlKey="f"categories={['profile', 'group', 'cohort']}title="Profile filters"+ urlKey="f"/></div><DataTableViewOptions table={table} />diff --git a/apps/start/src/components/project-mapper.tsx b/apps/start/src/components/project-mapper.tsxindex 2d5476fa3..0758a4f2f 100644--- a/apps/start/src/components/project-mapper.tsx+++ b/apps/start/src/components/project-mapper.tsx@@ -1,17 +1,6 @@-import { Button } from '@/components/ui/button';-import { Input } from '@/components/ui/input';-import { Label } from '@/components/ui/label';-import {- Select,- SelectContent,- SelectItem,- SelectTrigger,- SelectValue,-} from '@/components/ui/select';import type { IServiceProject } from '@openpanel/core';import { PlusIcon, XIcon } from 'lucide-react';import type {- Control,FieldArrayWithId,UseFieldArrayAppend,UseFieldArrayRemove,@@ -19,6 +8,16 @@ import type {UseFormSetValue,UseFormWatch,} from 'react-hook-form';+import { Button } from '@/components/ui/button';+import { Input } from '@/components/ui/input';+import { Label } from '@/components/ui/label';+import {+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+} from '@/components/ui/select';interface ProjectMapperProps {fields: FieldArrayWithId<any, 'projectMapper', 'id'>[];@@ -44,17 +43,17 @@ export function ProjectMapper({<div className="flex items-center justify-between"><Label className="mb-0">Project Mapper (Optional)</Label><Button+ onClick={() => append({ from: '', to: '' })}+ size="sm"type="button"variant="outline"- size="sm"- onClick={() => append({ from: '', to: '' })}><PlusIcon className="mr-1 h-4 w-4" />Add Mapping</Button></div>{fields.length === 0 && (- <p className="text-sm text-muted-foreground leading-normal">+ <p className="text-muted-foreground text-sm leading-normal">Map source project IDs to your OpenPanel projects. If you skip mappingall data will be imported to your current project.</p>@@ -63,10 +62,10 @@ export function ProjectMapper({{fields.length > 0 && (<div className="space-y-2">{fields.map((field, index) => (- <div key={field.id} className="gap-2 rounded-md border p-3 row">+ <div className="row gap-2 rounded-md border p-3" key={field.id}><div className="grid grid-cols-2 gap-2"><div className="flex-1">- <Label className="text-xs text-muted-foreground">+ <Label className="text-muted-foreground text-xs">From (Source Project ID)</Label><Input@@ -76,14 +75,14 @@ export function ProjectMapper({/></div><div className="flex-1">- <Label className="text-xs text-muted-foreground">+ <Label className="text-muted-foreground text-xs">To (OpenPanel Project)</Label><Select- value={watch(`projectMapper.${index}.to`)}onValueChange={(value) =>setValue(`projectMapper.${index}.to`, value)}+ value={watch(`projectMapper.${index}.to`)}><SelectTrigger className="mt-1 w-full" size="sm"><SelectValue placeholder="Select project" />@@ -99,11 +98,11 @@ export function ProjectMapper({</div></div><Button+ className="mt-5"+ onClick={() => remove(index)}+ size="icon"type="button"variant="ghost"- size="icon"- onClick={() => remove(index)}- className="mt-5"><XIcon className="h-4 w-4" /></Button>diff --git a/apps/start/src/components/projects/project-card.tsx b/apps/start/src/components/projects/project-card.tsxindex 4c68fbe4a..bbf362b07 100644--- a/apps/start/src/components/projects/project-card.tsx+++ b/apps/start/src/components/projects/project-card.tsx@@ -1,17 +1,15 @@-import { useNumber } from '@/hooks/use-numer-formatter';-import { useTRPC } from '@/integrations/trpc/react';+import type { IServiceProject } from '@openpanel/core';import { useQuery } from '@tanstack/react-query';import { Link } from '@tanstack/react-router';--import type { IServiceProject } from '@openpanel/core';--import { cn } from '@/utils/cn';import { SettingsIcon, TrendingDownIcon, TrendingUpIcon } from 'lucide-react';import { FadeIn } from '../fade-in';import { SerieIcon } from '../report-chart/common/serie-icon';import { Skeleton } from '../skeleton';import { LinkButton } from '../ui/button';import { ProjectChart } from './project-chart';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';+import { cn } from '@/utils/cn';export function ProjectCardRoot({children,@@ -23,7 +21,7 @@ export function ProjectCardRoot({return (<divclassName={cn(- 'relative card hover:-translate-y-px hover:shadow-sm',+ 'card relative hover:-translate-y-px hover:shadow-sm',className)}>@@ -34,9 +32,9 @@ export function ProjectCardRoot({export function ProjectCardSkeleton() {return (- <ProjectCardRoot className="aspect-[340/116.25] p-4 col">+ <ProjectCardRoot className="col aspect-[340/116.25] p-4"><Skeleton className="h-5 w-full" />- <div className="row mt-auto gap-4 w-1/2 ml-auto">+ <div className="row mt-auto ml-auto w-1/2 gap-4"><Skeleton className="h-3 w-full" /><Skeleton className="h-3 w-full" /><Skeleton className="h-3 w-full" />@@ -49,30 +47,30 @@ function ProjectCard({ id, domain, name, organizationId }: IServiceProject) {return (<ProjectCardRoot><Link- to="/$organizationId/$projectId"+ className="col p-4 transition-transform"params={{organizationId,projectId: id,}}- className="col p-4 transition-transform"+ to="/$organizationId/$projectId">- <div className="font-medium flex items-center gap-2 text-lg pb-2">- <div className="row gap-2 flex-1">+ <div className="flex items-center gap-2 pb-2 font-medium text-lg">+ <div className="row flex-1 gap-2">{domain && <SerieIcon name={domain ?? ''} />}{name}</div></div>- <div className="-mx-4 aspect-[8/1] mb-4">+ <div className="-mx-4 mb-4 aspect-[8/1]"><ProjectChartOuter id={id} /></div>- <div className="flex flex-1 gap-4 h-9 md:h-4">+ <div className="flex h-9 flex-1 gap-4 md:h-4"><ProjectMetrics id={id} /></div></Link><LinkButton- variant="ghost"+ className="absolute top-2 right-2 text-muted-foreground"href={`/${organizationId}/${id}/settings`}- className="text-muted-foreground absolute top-2 right-2"+ variant="ghost"><SettingsIcon size={16} /></LinkButton>@@ -90,7 +88,7 @@ function ProjectChartOuter({ id }: { id: string }) {return (<FadeIn className="h-full w-full">- <ProjectChart data={data?.chart || []} color={'blue'} />+ <ProjectChart color={'blue'} data={data?.chart || []} /></FadeIn>);}@@ -107,12 +105,12 @@ function Metric({return (<divclassName={cn(- 'flex flex-col gap-1 md:flex-row items-center text-sm',+ 'flex flex-col items-center gap-1 text-sm md:flex-row',className)}><div className="text-muted-foreground">{label}</div>- <span className="font-medium whitespace-nowrap">{value}</span>+ <span className="whitespace-nowrap font-medium">{value}</span></div>);}@@ -127,7 +125,7 @@ function ProjectMetrics({ id }: { id: string }) {);return (- <FadeIn className="row flex-wrap gap-3 flex-1">+ <FadeIn className="row flex-1 flex-wrap gap-3">{typeof data?.trend?.percentage === 'number' && (<Metriclabel="3M DIFF"@@ -135,7 +133,7 @@ function ProjectMetrics({ id }: { id: string }) {<spanclassName={cn('font-semibold',- 'row gap-1 items-center',+ 'row items-center gap-1',data?.trend?.direction === 'up'? 'text-emerald-300': data?.trend?.direction === 'down'@@ -163,9 +161,9 @@ function ProjectMetrics({ id }: { id: string }) {/>)}<Metric+ className="ml-auto"label="3M"value={number.short(data?.metrics?.months_3 ?? 0)}- className="ml-auto"/><Metric label="30D" value={number.short(data?.metrics?.month ?? 0)} /><Metric label="24H" value={number.short(data?.metrics?.day ?? 0)} />diff --git a/apps/start/src/components/projects/project-chart.tsx b/apps/start/src/components/projects/project-chart.tsxindex b2554e889..3bd5750f0 100644--- a/apps/start/src/components/projects/project-chart.tsx+++ b/apps/start/src/components/projects/project-chart.tsx@@ -1,11 +1,3 @@-import {- ChartTooltipHeader,- ChartTooltipItem,- createChartTooltip,-} from '@/components/charts/chart-tooltip';-import { useNumber } from '@/hooks/use-numer-formatter';-import { cn } from '@/utils/cn';-import { getChartColor } from '@/utils/theme';import { useState } from 'react';import {Bar,@@ -17,6 +9,14 @@ import {YAxis,} from 'recharts';import { useYAxisProps } from '../report-chart/common/axis';+import {+ ChartTooltipHeader,+ ChartTooltipItem,+ createChartTooltip,+} from '@/components/charts/chart-tooltip';+import { useNumber } from '@/hooks/use-numer-formatter';+import { cn } from '@/utils/cn';+import { getChartColor } from '@/utils/theme';type ChartDataItem = {value: number;@@ -47,8 +47,12 @@ const { Tooltip, TooltipProvider } = createChartTooltip<}const getColorValue = () => {- if (color === 'green') return '#16a34a';- if (color === 'red') return '#dc2626';+ if (color === 'green') {+ return '#16a34a';+ }+ if (color === 'red') {+ return '#dc2626';+ }return getChartColor(0);};@@ -70,12 +74,12 @@ const { Tooltip, TooltipProvider } = createChartTooltip<innerClassName="row justify-between"><div className="flex items-center gap-1">Sessions</div>- <div className="font-mono font-bold">{number.format(data.value)}</div>+ <div className="font-bold font-mono">{number.format(data.value)}</div></ChartTooltipItem>{data.revenue > 0 && (<ChartTooltipItem color="#3ba974"><div className="flex items-center gap-1">Revenue</div>- <div className="font-mono font-medium">+ <div className="font-medium font-mono">{number.currency(data.revenue / 100)}</div></ChartTooltipItem>@@ -113,8 +117,12 @@ export function ProjectChart({const maxRevenue = Math.max(...data.map((d) => d.revenue), 0);const getColorValue = () => {- if (color === 'green') return '#16a34a';- if (color === 'red') return '#dc2626';+ if (color === 'green') {+ return '#16a34a';+ }+ if (color === 'red') {+ return '#dc2626';+ }return getChartColor(0);};@@ -128,8 +136,8 @@ export function ProjectChart({28, 42, 35, 50, 40, 56, 45, 60, 49, 32, 98, 29, 49, 69, 49, 20,].map((height, index) => (<div- key={index}className="flex-1 rounded-full bg-foreground/20"+ key={index}style={{ height: `${height}%` }}/>))}@@ -137,10 +145,10 @@ export function ProjectChart({</div><div className="absolute inset-0 flex flex-col items-center justify-center gap-1 px-4 text-center">- <p className="text-sm font-medium text-foreground/85">+ <p className="font-medium text-foreground/85 text-sm">No activity yet</p>- <p className="text-xs text-muted-foreground">+ <p className="text-muted-foreground text-xs">Sessions will show up here once tracking starts.</p></div>@@ -151,7 +159,7 @@ export function ProjectChart({return (<div className="relative h-full w-full pl-3"><TooltipProvider color={color}>- <ResponsiveContainer width="100%" height="100%">+ <ResponsiveContainer height="100%" width="100%"><ComposedChartdata={chartData}margin={{ top: 10, right: 10, bottom: 10, left: 0 }}@@ -161,37 +169,37 @@ export function ProjectChart({><XAxisdataKey="timestamp"- type="number"- scale="time"domain={['dataMin', 'dataMax']}hide+ scale="time"+ type="number"/><YAxis{...yAxisProps}- domain={[0, maxValue || 'dataMax']}allowDecimals={false}+ domain={[0, maxValue || 'dataMax']}/><YAxis- yAxisId="right"- orientation="right"domain={[0, maxRevenue * 2 || 'dataMax']}hide+ orientation="right"width={0}+ yAxisId="right"/><Tooltip /><defs><filter+ height="140%"id="rainbow-line-glow"+ width="140%"x="-20%"y="-20%"- width="140%"- height="140%">- <feGaussianBlur stdDeviation="5" result="blur" />+ <feGaussianBlur result="blur" stdDeviation="5" /><feComponentTransfer in="blur" result="dimmedBlur">- <feFuncA type="linear" slope="0.5" />+ <feFuncA slope="0.5" type="linear" /></feComponentTransfer><feCompositein="SourceGraphic"@@ -202,11 +210,13 @@ export function ProjectChart({</defs><Line- type="monotone"+ activeDot={{+ stroke: getColorValue(),+ fill: 'var(--def-100)',+ strokeWidth: 2,+ r: 4,+ }}dataKey="value"- stroke={getColorValue()}- strokeWidth={2}- isAnimationActive={false}dot={dots && data.length <= 90? {@@ -217,31 +227,29 @@ export function ProjectChart({}: false}- activeDot={{- stroke: getColorValue(),- fill: 'var(--def-100)',- strokeWidth: 2,- r: 4,- }}filter="url(#rainbow-line-glow)"+ isAnimationActive={false}+ stroke={getColorValue()}+ strokeWidth={2}+ type="monotone"/><BardataKey="revenue"- yAxisId="right"- stackId="revenue"isAnimationActive={false}- radius={5}maxBarSize={20}+ radius={5}+ stackId="revenue"+ yAxisId="right">{chartData.map((item, index) => (<Cell- key={item.timestamp}className={cn(index === activeBar? 'fill-emerald-700/100': 'fill-emerald-700/80')}+ key={item.timestamp}/>))}</Bar>diff --git a/apps/start/src/components/providers.tsx b/apps/start/src/components/providers.tsxindex d75cf1cfd..ca7fe4a7a 100644--- a/apps/start/src/components/providers.tsx+++ b/apps/start/src/components/providers.tsx@@ -1,3 +1,8 @@+import { NuqsAdapter } from 'nuqs/adapters/tanstack-router';+import { useRef } from 'react';+import { Provider as ReduxProvider } from 'react-redux';+import { Toaster } from 'sonner';+import { ThemeProvider } from './theme-provider';import { ChatStateProvider } from '@/components/chat/chat-context';import { NotificationProvider } from '@/components/notifications/notification-provider';import { TooltipProvider } from '@/components/ui/tooltip';@@ -5,11 +10,6 @@ import { PageContextProvider } from '@/contexts/page-context';import { ModalProvider } from '@/modals';import type { AppStore } from '@/redux';import makeStore from '@/redux';-import { NuqsAdapter } from 'nuqs/adapters/tanstack-router';-import { useRef } from 'react';-import { Provider as ReduxProvider } from 'react-redux';-import { Toaster } from 'sonner';-import { ThemeProvider } from './theme-provider';export function Providers({ children }: { children: React.ReactNode }) {const storeRef = useRef<AppStore>(undefined);diff --git a/apps/start/src/components/public-page-card.tsx b/apps/start/src/components/public-page-card.tsxindex 400513ec0..af2da39e8 100644--- a/apps/start/src/components/public-page-card.tsx+++ b/apps/start/src/components/public-page-card.tsx@@ -18,11 +18,11 @@ export function PublicPageCard({return (<div><LoginNavbar />- <div className="center-center h-screen w-screen p-4 col">- <div className="bg-background p-6 rounded-lg max-w-md w-full text-left">+ <div className="center-center col h-screen w-screen p-4">+ <div className="w-full max-w-md rounded-lg bg-background p-6 text-left"><div className="col mt-1 flex-1 gap-2">- <LogoSquare className="size-12 mb-4" />- <div className="text-xl font-semibold">{title}</div>+ <LogoSquare className="mb-4 size-12" />+ <div className="font-semibold text-xl">{title}</div>{description && (<div className="text-lg text-muted-foreground leading-normal">{description}@@ -32,10 +32,10 @@ export function PublicPageCard({{!!children && <div className="mt-6">{children}</div>}</div>{showFooter && (- <div className="p-6 text-sm max-w-sm col gap-1 text-muted-foreground">+ <div className="col max-w-sm gap-1 p-6 text-muted-foreground text-sm"><p>Powered by{' '}- <a href="https://openpanel.dev" className="font-medium">+ <a className="font-medium" href="https://openpanel.dev">OpenPanel.dev</a>{' · '}diff --git a/apps/start/src/components/realtime/realtime-active-sessions.tsx b/apps/start/src/components/realtime/realtime-active-sessions.tsxindex e83522331..a54aaa76d 100644--- a/apps/start/src/components/realtime/realtime-active-sessions.tsx+++ b/apps/start/src/components/realtime/realtime-active-sessions.tsx@@ -40,8 +40,8 @@ export function RealtimeActiveSessions({><ProjectLinkclassName="relative block p-4 py-3 pr-14"- to="/sessions/$sessionId"params={{ sessionId: session.sessionId }}+ to="/sessions/$sessionId"><div className="col flex-1 gap-1">{session.name === 'screen_view' && (diff --git a/apps/start/src/components/realtime/realtime-geo.tsx b/apps/start/src/components/realtime/realtime-geo.tsxindex f257df8e9..47ead7bcb 100644--- a/apps/start/src/components/realtime/realtime-geo.tsx+++ b/apps/start/src/components/realtime/realtime-geo.tsx@@ -1,11 +1,11 @@-import { useNumber } from '@/hooks/use-numer-formatter';-import { useTRPC } from '@/integrations/trpc/react';-import { countries } from '@/translations/countries';import { useQuery } from '@tanstack/react-query';import { prop, uniqBy } from 'ramda';import { OverviewWidgetTable } from '../overview/overview-widget-table';import { SerieIcon } from '../report-chart/common/serie-icon';import { Tooltiper } from '../ui/tooltip';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';+import { countries } from '@/translations/countries';interface RealtimeGeoProps {projectId: string;@@ -29,14 +29,14 @@ export function RealtimeGeo({ projectId }: RealtimeGeoProps) {.slice(0, 8);return (- <div className="col h-full card">- <div className="row justify-between items-center p-4 pb-0">+ <div className="col card h-full">+ <div className="row items-center justify-between p-4 pb-0"><div className="font-medium text-muted-foreground">Geo</div><div className="row gap-1">{unique.map((item) => (<Tooltiper- key={item.country}content={countries[item.country as keyof typeof countries]}+ key={item.country}><SerieIcon key={item.country} name={item.country} /></Tooltiper>@@ -44,9 +44,6 @@ export function RealtimeGeo({ projectId }: RealtimeGeoProps) {</div></div><OverviewWidgetTable- data={data ?? []}- keyExtractor={(item) => item.country + item.city}- getColumnPercentage={(item) => item.count / maxCount}columns={[{name: 'Country / City',@@ -59,7 +56,7 @@ export function RealtimeGeo({ projectId }: RealtimeGeoProps) {content={`${item.country} / ${item.city}`}side="left">- <div className="row items-center gap-2 min-w-0 relative">+ <div className="row relative min-w-0 items-center gap-2"><SerieIcon name={item.country} />{item.city || '(Not set)'}</div>@@ -81,7 +78,7 @@ export function RealtimeGeo({ projectId }: RealtimeGeoProps) {responsive: { priority: 4 },render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.count)}</span>@@ -95,7 +92,7 @@ export function RealtimeGeo({ projectId }: RealtimeGeoProps) {responsive: { priority: 2 },render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.unique_sessions)}</span>@@ -104,6 +101,9 @@ export function RealtimeGeo({ projectId }: RealtimeGeoProps) {},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.count / maxCount}+ keyExtractor={(item) => item.country + item.city}/></div>);diff --git a/apps/start/src/components/realtime/realtime-paths.tsx b/apps/start/src/components/realtime/realtime-paths.tsxindex 34632e4da..3032646fa 100644--- a/apps/start/src/components/realtime/realtime-paths.tsx+++ b/apps/start/src/components/realtime/realtime-paths.tsx@@ -1,11 +1,11 @@-import { useNumber } from '@/hooks/use-numer-formatter';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { ExternalLinkIcon } from 'lucide-react';import { prop, uniqBy } from 'ramda';import { OverviewWidgetTable } from '../overview/overview-widget-table';import { SerieIcon } from '../report-chart/common/serie-icon';import { Tooltiper } from '../ui/tooltip';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';interface RealtimePathsProps {projectId: string;@@ -29,21 +29,18 @@ export function RealtimePaths({ projectId }: RealtimePathsProps) {.slice(0, 5);return (- <div className="col h-full card">- <div className="row justify-between items-center p-4 pb-0">+ <div className="col card h-full">+ <div className="row items-center justify-between p-4 pb-0"><div className="font-medium text-muted-foreground">Paths</div><div className="row gap-1">{unique.map((item) => (- <Tooltiper key={item.origin} content={item.origin}>+ <Tooltiper content={item.origin} key={item.origin}><SerieIcon key={item.origin} name={item.origin} /></Tooltiper>))}</div></div><OverviewWidgetTable- data={data ?? []}- keyExtractor={(item) => item.path + item.origin}- getColumnPercentage={(item) => item.count / maxCount}columns={[{name: 'Path',@@ -54,19 +51,19 @@ export function RealtimePaths({ projectId }: RealtimePathsProps) {<TooltiperasChildcontent={item.origin + item.path}- side="left"disabled={item.origin === ''}+ side="left">- <div className="row items-center gap-2 min-w-0 relative">+ <div className="row relative min-w-0 items-center gap-2"><SerieIcon name={item.origin} /><span className="truncate">{item.path || '(Not set)'}</span>{item.origin && (<ahref={item.origin + item.path}- target="_blank"rel="noreferrer"+ target="_blank">- <ExternalLinkIcon className="size-3 group-hover/row:opacity-100 opacity-0 transition-opacity" />+ <ExternalLinkIcon className="size-3 opacity-0 transition-opacity group-hover/row:opacity-100" /></a>)}</div>@@ -88,7 +85,7 @@ export function RealtimePaths({ projectId }: RealtimePathsProps) {responsive: { priority: 4 },render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.count)}</span>@@ -102,7 +99,7 @@ export function RealtimePaths({ projectId }: RealtimePathsProps) {responsive: { priority: 2 },render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.unique_sessions)}</span>@@ -111,6 +108,9 @@ export function RealtimePaths({ projectId }: RealtimePathsProps) {},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.count / maxCount}+ keyExtractor={(item) => item.path + item.origin}/></div>);diff --git a/apps/start/src/components/realtime/realtime-referrals.tsx b/apps/start/src/components/realtime/realtime-referrals.tsxindex a19790772..6871a0b3e 100644--- a/apps/start/src/components/realtime/realtime-referrals.tsx+++ b/apps/start/src/components/realtime/realtime-referrals.tsx@@ -1,10 +1,10 @@-import { useNumber } from '@/hooks/use-numer-formatter';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { prop, uniqBy } from 'ramda';import { OverviewWidgetTable } from '../overview/overview-widget-table';import { SerieIcon } from '../report-chart/common/serie-icon';import { Tooltiper } from '../ui/tooltip';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';interface RealtimeReferralsProps {projectId: string;@@ -26,21 +26,18 @@ export function RealtimeReferrals({ projectId }: RealtimeReferralsProps) {.slice(0, 8);return (- <div className="col h-full card">- <div className="row justify-between items-center p-4 pb-0">+ <div className="col card h-full">+ <div className="row items-center justify-between p-4 pb-0"><div className="font-medium text-muted-foreground">Referrals</div><div className="row gap-1">{unique.map((item) => (- <Tooltiper key={item.referrer_name} content={item.referrer_name}>+ <Tooltiper content={item.referrer_name} key={item.referrer_name}><SerieIcon key={item.referrer_name} name={item.referrer_name} /></Tooltiper>))}</div></div><OverviewWidgetTable- data={data ?? []}- keyExtractor={(item) => item.referrer_name}- getColumnPercentage={(item) => item.count / maxCount}columns={[{name: 'Referrer',@@ -49,7 +46,7 @@ export function RealtimeReferrals({ projectId }: RealtimeReferralsProps) {render(item) {return (<Tooltiper asChild content={item.referrer_name} side="left">- <div className="row items-center gap-2 min-w-0 relative">+ <div className="row relative min-w-0 items-center gap-2"><SerieIcon name={item.referrer_name} />{item.referrer_name || '(Not set)'}</div>@@ -71,7 +68,7 @@ export function RealtimeReferrals({ projectId }: RealtimeReferralsProps) {responsive: { priority: 4 },render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.count)}</span>@@ -85,7 +82,7 @@ export function RealtimeReferrals({ projectId }: RealtimeReferralsProps) {responsive: { priority: 2 },render(item) {return (- <div className="row gap-2 justify-end">+ <div className="row justify-end gap-2"><span className="font-semibold">{number.short(item.unique_sessions)}</span>@@ -94,6 +91,9 @@ export function RealtimeReferrals({ projectId }: RealtimeReferralsProps) {},},]}+ data={data ?? []}+ getColumnPercentage={(item) => item.count / maxCount}+ keyExtractor={(item) => item.referrer_name}/></div>);diff --git a/apps/start/src/components/realtime/realtime-reloader.tsx b/apps/start/src/components/realtime/realtime-reloader.tsxindex a6f21f50e..1abefb8e1 100644--- a/apps/start/src/components/realtime/realtime-reloader.tsx+++ b/apps/start/src/components/realtime/realtime-reloader.tsx@@ -1,6 +1,6 @@+import { useQueryClient } from '@tanstack/react-query';import useWS from '@/hooks/use-ws';import { useTRPC } from '@/integrations/trpc/react';-import { useQueryClient } from '@tanstack/react-query';type Props = {projectId: string;@@ -24,7 +24,7 @@ const RealtimeReloader = ({ projectId }: Props) => {{debounce: {delay: 1000,- maxWait: 60000,+ maxWait: 60_000,},});diff --git a/apps/start/src/components/report-chart/area/chart.tsx b/apps/start/src/components/report-chart/area/chart.tsxindex 880597d13..3fe4db4c6 100644--- a/apps/start/src/components/report-chart/area/chart.tsx+++ b/apps/start/src/components/report-chart/area/chart.tsx@@ -1,11 +1,3 @@-import { useRechartDataModel } from '@/hooks/use-rechart-data-model';-import { useVisibleSeries } from '@/hooks/use-visible-series';-import { useTRPC } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';-import { useDispatch } from '@/redux';-import type { IChartData } from '@/trpc/client';-import { cn } from '@/utils/cn';-import { getChartColor } from '@/utils/theme';import { useQuery } from '@tanstack/react-query';import { isSameDay, isSameHour, isSameMonth, isSameWeek } from 'date-fns';import { BookmarkIcon, UsersIcon } from 'lucide-react';@@ -24,9 +16,6 @@ import {XAxis,YAxis,} from 'recharts';--import { changeVisibleSeries } from '@/components/report/reportSlice';-import { useDashedStroke } from '@/hooks/use-dashed-stroke';import { useXAxisProps, useYAxisProps } from '../common/axis';import {ChartClickMenu,@@ -37,6 +26,16 @@ import { ReportTable } from '../common/report-table';import { SerieIcon } from '../common/serie-icon';import { SerieName } from '../common/serie-name';import { useReportChartContext } from '../context';+import { changeVisibleSeries } from '@/components/report/reportSlice';+import { useDashedStroke } from '@/hooks/use-dashed-stroke';+import { useRechartDataModel } from '@/hooks/use-rechart-data-model';+import { useVisibleSeries } from '@/hooks/use-visible-series';+import { useTRPC } from '@/integrations/trpc/react';+import { pushModal } from '@/modals';+import { useDispatch } from '@/redux';+import type { IChartData } from '@/trpc/client';+import { cn } from '@/utils/cn';+import { getChartColor } from '@/utils/theme';interface Props {data: IChartData;@@ -77,7 +76,7 @@ export function Chart({ data }: Props) {});const rechartData = useRechartDataModel(series);- let dotIndex = undefined;+ let dotIndex;if (range === 'today') {// Find closest index based on timesdotIndex = rechartData.findIndex((item) => {@@ -112,7 +111,7 @@ export function Chart({ data }: Props) {const CustomLegend = useCallback(() => {return (- <div className="flex flex-wrap justify-center gap-x-4 gap-y-1 text-xs mt-4 -mb-2">+ <div className="mt-4 -mb-2 flex flex-wrap justify-center gap-x-4 gap-y-1 text-xs">{series.map((serie) => (<divclassName="flex items-center gap-1"@@ -211,30 +210,30 @@ export function Chart({ data }: Props) {<ComposedChart data={rechartData}><Customized component={calcStrokeDasharray} /><Line+ animationDuration={0}dataKey="calcStrokeDasharray"legendType="none"- animationDuration={0}onAnimationEnd={handleAnimationEnd}/><CartesianGrid- strokeDasharray="3 3"+ className="stroke-border"horizontal={true}+ strokeDasharray="3 3"vertical={false}- className="stroke-border"/>{references.data?.map((ref) => (<ReferenceLine+ fontSize={10}key={ref.id}- x={ref.date.getTime()}- stroke={'oklch(from var(--foreground) l c h / 0.1)'}- strokeDasharray={'3 3'}label={{value: ref.title,position: 'centerTop',fill: '#334155',fontSize: 12,}}- fontSize={10}+ stroke={'oklch(from var(--foreground) l c h / 0.1)'}+ strokeDasharray={'3 3'}+ x={ref.date.getTime()}/>))}<YAxis {...yAxisProps} />@@ -248,8 +247,8 @@ export function Chart({ data }: Props) {<linearGradientid={`color${color}`}x1="0"- y1="0"x2="0"+ y1="0"y2="1"><stop offset="0%" stopColor={color} stopOpacity={0.8} />@@ -266,21 +265,21 @@ export function Chart({ data }: Props) {const color = getChartColor(serie.index);return (<Area+ dataKey={`${serie.id}:count`}+ fill={`url(#color${color})`}+ fillOpacity={0.7}+ isAnimationActive={false}key={serie.id}- stackId="1"- type={lineType}name={serie.id}- dataKey={`${serie.id}:count`}+ stackId="1"+ stroke={color}strokeDasharray={useDashedLastLine? getStrokeDasharray(`${serie.id}:count`): undefined}- fill={`url(#color${color})`}- stroke={color}strokeWidth={2}- isAnimationActive={false}- fillOpacity={0.7}+ type={lineType}/>);})}@@ -289,16 +288,16 @@ export function Chart({ data }: Props) {const color = getChartColor(serie.index);return (<Area- key={`${serie.id}:prev`}- stackId="2"- type={lineType}- name={`${serie.id}:prev`}dataKey={`${serie.id}:prev:count`}- stroke={color}fill={color}fillOpacity={0.3}- strokeOpacity={0.3}isAnimationActive={false}+ key={`${serie.id}:prev`}+ name={`${serie.id}:prev`}+ stackId="2"+ stroke={color}+ strokeOpacity={0.3}+ type={lineType}/>);})}@@ -308,8 +307,8 @@ export function Chart({ data }: Props) {{isEditMode && (<ReportTabledata={data}- visibleSeries={series}setVisibleSeries={setVisibleSeries}+ visibleSeries={series}/>)}</ChartClickMenu>diff --git a/apps/start/src/components/report-chart/area/index.tsx b/apps/start/src/components/report-chart/area/index.tsxindex 65c9e4e48..fac448240 100644--- a/apps/start/src/components/report-chart/area/index.tsx+++ b/apps/start/src/components/report-chart/area/index.tsx@@ -1,12 +1,11 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { ReportChartLoading } from '../common/loading';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';+import { useTRPC } from '@/integrations/trpc/react';export function ReportAreaChart() {const { isLazyLoading, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/bar/index.tsx b/apps/start/src/components/report-chart/bar/index.tsxindex f23a64f47..6656952e7 100644--- a/apps/start/src/components/report-chart/bar/index.tsx+++ b/apps/start/src/components/report-chart/bar/index.tsx@@ -1,12 +1,11 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';--import { cn } from '@/utils/cn';import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';+import { useTRPC } from '@/integrations/trpc/react';+import { cn } from '@/utils/cn';export function ReportBarChart() {const { isLazyLoading, shareId } = useReportChartContext();@@ -52,8 +51,8 @@ function Loading() {<div className="divide-y divide-def-200 dark:divide-def-800">{Array.from({ length: 10 }).map((_, index) => (<div+ className="relative animate-pulse px-4 py-3"key={index as number}- className="relative px-4 py-3 animate-pulse"><div className="relative z-10 flex flex-col gap-2"><div className="flex items-center justify-between gap-4">diff --git a/apps/start/src/components/report-chart/common/chart-click-menu.tsx b/apps/start/src/components/report-chart/common/chart-click-menu.tsxindex 12d3009a5..f343bb67f 100644--- a/apps/start/src/components/report-chart/common/chart-click-menu.tsx+++ b/apps/start/src/components/report-chart/common/chart-click-menu.tsx@@ -1,9 +1,3 @@-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuTrigger,-} from '@/components/ui/dropdown-menu';import React, {forwardRef,useCallback,@@ -11,6 +5,12 @@ import React, {useRef,useState,} from 'react';+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger,+} from '@/components/ui/dropdown-menu';export interface ChartClickMenuItem {label: string;@@ -227,10 +227,10 @@ export const ChartClickMenu = forwardRef<}, [children, handleChartClick]);return (- <div ref={containerRef} className="relative h-full w-full">+ <div className="relative h-full w-full" ref={containerRef}><DropdownMenu- open={clickPosition !== null}onOpenChange={handleOpenChange}+ open={clickPosition !== null}><DropdownMenuTrigger asChild><div@@ -245,9 +245,9 @@ export const ChartClickMenu = forwardRef<<DropdownMenuContent align="start" side="bottom" sideOffset={5}>{menuItems.map((item) => (<DropdownMenuItem+ disabled={item.disabled}key={item.label}onClick={() => handleItemClick(item)}- disabled={item.disabled}>{item.icon && <span className="mr-2">{item.icon}</span>}{item.label}diff --git a/apps/start/src/components/report-chart/common/empty.tsx b/apps/start/src/components/report-chart/common/empty.tsxindex c41d4ff18..758097c0c 100644--- a/apps/start/src/components/report-chart/common/empty.tsx+++ b/apps/start/src/components/report-chart/common/empty.tsx@@ -1,12 +1,6 @@-import { cn } from '@/utils/cn';-import {- ArrowUpLeftIcon,- BirdIcon,- CornerLeftUpIcon,- Forklift,- ForkliftIcon,-} from 'lucide-react';+import { BirdIcon, CornerLeftUpIcon, ForkliftIcon } from 'lucide-react';import { useReportChartContext } from '../context';+import { cn } from '@/utils/cn';export function ReportChartEmpty({title = 'No data',@@ -22,22 +16,22 @@ export function ReportChartEmpty({if (!series || series.length === 0) {return (- <div className="card p-4 center-center h-full w-full flex-col relative">- <div className="row gap-2 items-end absolute top-4 left-4">+ <div className="card center-center relative h-full w-full flex-col p-4">+ <div className="row absolute top-4 left-4 items-end gap-2"><CornerLeftUpIcon- strokeWidth={1.2}className="size-8 animate-pulse text-muted-foreground"+ strokeWidth={1.2}/><div className="text-muted-foreground">Start here</div></div><ForkliftIcon- strokeWidth={1.2}className="mb-4 size-1/3 max-w-40 animate-pulse text-muted-foreground"+ strokeWidth={1.2}/><div className="font-medium text-muted-foreground">Ready when you're</div>- <div className="text-muted-foreground mt-2">+ <div className="mt-2 text-muted-foreground">Pick atleast one event to start visualize</div></div>@@ -52,11 +46,11 @@ export function ReportChartEmpty({)}><BirdIcon- strokeWidth={1.2}className="mb-4 size-1/3 animate-pulse text-muted-foreground"+ strokeWidth={1.2}/><div className="font-medium text-muted-foreground">{title}</div>- <div className="text-muted-foreground mt-2">{children}</div>+ <div className="mt-2 text-muted-foreground">{children}</div></div>);}diff --git a/apps/start/src/components/report-chart/common/error.tsx b/apps/start/src/components/report-chart/common/error.tsxindex c18430277..e2634db0f 100644--- a/apps/start/src/components/report-chart/common/error.tsx+++ b/apps/start/src/components/report-chart/common/error.tsx@@ -1,6 +1,6 @@-import { cn } from '@/utils/cn';import { ServerCrashIcon } from 'lucide-react';import { useReportChartContext } from '../context';+import { cn } from '@/utils/cn';export function ReportChartError() {const { isEditMode } = useReportChartContext();@@ -12,10 +12,10 @@ export function ReportChartError() {)}><ServerCrashIcon- strokeWidth={1.2}className="mb-4 size-10 animate-pulse text-muted-foreground"+ strokeWidth={1.2}/>- <div className="text-sm font-medium text-muted-foreground">+ <div className="font-medium text-muted-foreground text-sm">There was an error loading this chart.</div></div>diff --git a/apps/start/src/components/report-chart/common/linear-gradient.tsx b/apps/start/src/components/report-chart/common/linear-gradient.tsxindex edeb9a6b2..e8bb74aec 100644--- a/apps/start/src/components/report-chart/common/linear-gradient.tsx+++ b/apps/start/src/components/report-chart/common/linear-gradient.tsx@@ -12,7 +12,7 @@ export const SolidToDashedGradient: React.FC<GradientProps> = ({const stops = generateSolidToDashedLinearGradient(percentage, baseColor);return (- <linearGradient id={id} x1="0" y1="0" x2="1" y2="0">+ <linearGradient id={id} x1="0" x2="1" y1="0" y2="0">{stops.map((stop, index) => (<stopkey={index as any}diff --git a/apps/start/src/components/report-chart/common/loading.tsx b/apps/start/src/components/report-chart/common/loading.tsxindex b3539d23b..f8568bbe9 100644--- a/apps/start/src/components/report-chart/common/loading.tsx+++ b/apps/start/src/components/report-chart/common/loading.tsx@@ -1,4 +1,3 @@-import { cn } from '@/utils/cn';import { AnimatePresence, motion } from 'framer-motion';import {ActivityIcon,@@ -14,6 +13,7 @@ import {} from 'lucide-react';import React, { useEffect, useState } from 'react';import { useReportChartContext } from '../context';+import { cn } from '@/utils/cn';const icons = [{ Icon: ActivityIcon, color: 'text-chart-6' },@@ -53,30 +53,30 @@ export function ReportChartLoading({ things }: { things?: boolean }) {<div className={cn('h-full w-full', isEditMode && 'card p-4')}><divclassName={- 'relative h-full w-full rounded bg-def-100 overflow-hidden center-center flex'+ 'center-center relative flex h-full w-full overflow-hidden rounded bg-def-100'}><AnimatePresence initial={false} mode="wait"><motion.div- key={currentIconIndex}- initial={{ x: '100%', opacity: 0 }}animate={{ x: 0, opacity: 1 }}+ className={cn('absolute size-1/3', color)}exit={{ x: '-100%', opacity: 0 }}+ initial={{ x: '100%', opacity: 0 }}+ key={currentIconIndex}transition={{type: 'spring',stiffness: 500,damping: 30,duration: 0.5,}}- className={cn('absolute size-1/3', color)}>- <Icon className="w-full h-full" />+ <Icon className="h-full w-full" /></motion.div></AnimatePresence><divclassName={cn(- 'absolute top-3/4 opacity-0 transition-opacity text-muted-foreground',+ 'absolute top-3/4 text-muted-foreground opacity-0 transition-opacity',isSlow && 'opacity-100')}>diff --git a/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx b/apps/start/src/components/report-chart/common/previous-diff-indicator.tsxindex 9b9857627..5308af5b6 100644--- a/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx+++ b/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx@@ -1,9 +1,8 @@-import { useNumber } from '@/hooks/use-numer-formatter';-import { cn } from '@/utils/cn';import { ArrowDownIcon, ArrowUpIcon } from 'lucide-react';--import { DeltaChip } from '@/components/delta-chip';import { useReportChartContext } from '../context';+import { DeltaChip } from '@/components/delta-chip';+import { useNumber } from '@/hooks/use-numer-formatter';+import { cn } from '@/utils/cn';export function getDiffIndicator<A, B, C>(inverted: boolean | undefined,@@ -59,10 +58,10 @@ export function PreviousDiffIndicator({const renderIcon = () => {if (state === 'positive') {- return <ArrowUpIcon strokeWidth={3} size={10} color="#000" />;+ return <ArrowUpIcon color="#000" size={10} strokeWidth={3} />;}if (state === 'negative') {- return <ArrowDownIcon strokeWidth={3} size={10} color="#000" />;+ return <ArrowDownIcon color="#000" size={10} strokeWidth={3} />;}return null;};@@ -71,7 +70,7 @@ export function PreviousDiffIndicator({<><divclassName={cn(- 'flex items-center gap-1 font-mono font-medium',+ 'flex items-center gap-1 font-medium font-mono',size === 'lg' && 'gap-2',className)}@@ -124,19 +123,19 @@ export function PreviousDiffIndicatorPure({const renderIcon = () => {if (state === 'positive') {- return <ArrowUpIcon strokeWidth={3} size={10} color="#000" />;+ return <ArrowUpIcon color="#000" size={10} strokeWidth={3} />;}if (state === 'negative') {- return <ArrowDownIcon strokeWidth={3} size={10} color="#000" />;+ return <ArrowDownIcon color="#000" size={10} strokeWidth={3} />;}return null;};return (<DeltaChip- variant={state === 'positive' ? 'inc' : 'dec'}- size={size}inverted={inverted}+ size={size}+ variant={state === 'positive' ? 'inc' : 'dec'}>{diff.toFixed(1)}%</DeltaChip>diff --git a/apps/start/src/components/report-chart/common/report-table-toolbar.tsx b/apps/start/src/components/report-chart/common/report-table-toolbar.tsxindex 005368766..311ccedd9 100644--- a/apps/start/src/components/report-chart/common/report-table-toolbar.tsx+++ b/apps/start/src/components/report-chart/common/report-table-toolbar.tsx@@ -1,6 +1,6 @@+import { List, Rows3, Search, X } from 'lucide-react';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';-import { List, Rows3, Search, X } from 'lucide-react';interface ReportTableToolbarProps {grouped?: boolean;@@ -18,31 +18,31 @@ export function ReportTableToolbar({onUnselectAll,}: ReportTableToolbarProps) {return (- <div className="col md:row md:items-center gap-2 p-2 border-b md:justify-between">+ <div className="col md:row gap-2 border-b p-2 md:items-center md:justify-between">{onSearchChange && (- <div className="relative flex-1 w-full md:max-w-sm">- <Search className="absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground" />+ <div className="relative w-full flex-1 md:max-w-sm">+ <Search className="absolute top-1/2 left-2 size-4 -translate-y-1/2 text-muted-foreground" /><Input+ className="pl-8"+ onChange={(e) => onSearchChange(e.target.value)}placeholder="Search..."value={search}- onChange={(e) => onSearchChange(e.target.value)}- className="pl-8"/></div>)}<div className="flex items-center gap-2">{onToggleGrouped && (<Button- variant={'outline'}- size="sm"- onClick={onToggleGrouped}icon={grouped ? Rows3 : List}+ onClick={onToggleGrouped}+ size="sm"+ variant={'outline'}>{grouped ? 'Grouped' : 'Flat'}</Button>)}{onUnselectAll && (- <Button variant="outline" size="sm" onClick={onUnselectAll} icon={X}>+ <Button icon={X} onClick={onUnselectAll} size="sm" variant="outline">Unselect All</Button>)}diff --git a/apps/start/src/components/report-chart/common/report-table-utils.ts b/apps/start/src/components/report-chart/common/report-table-utils.tsindex 8c50d2182..04bd70772 100644--- a/apps/start/src/components/report-chart/common/report-table-utils.ts+++ b/apps/start/src/components/report-chart/common/report-table-utils.ts@@ -57,7 +57,9 @@ export function groupByNames<T extends { names: string[] }>(for (const item of items) {const names = item.names;- if (names.length === 0) continue;+ if (names.length === 0) {+ continue;+ }// Start with the first level (serie name, level -1)const firstLevel = names[0]!;@@ -156,7 +158,9 @@ export function findGroup<T>(for (const item of group.items) {if (item && typeof item === 'object' && 'items' in item) {const found = findGroup([item], groupKey);- if (found) return found;+ if (found) {+ return found;+ }}}}@@ -401,7 +405,9 @@ function getBreakdownPropertyNames(// Otherwise, infer from series names// All series should have the same number of breakdown values- if (series.length === 0) return [];+ if (series.length === 0) {+ return [];+ }const firstSerie = series[0];const breakdownCount = firstSerie.names.length - 1;return Array.from({ length: breakdownCount }, (_, i) => `Breakdown ${i + 1}`);diff --git a/apps/start/src/components/report-chart/common/report-table.tsx b/apps/start/src/components/report-chart/common/report-table.tsxindex 6d8c35c74..8e172ab84 100644--- a/apps/start/src/components/report-chart/common/report-table.tsx+++ b/apps/start/src/components/report-chart/common/report-table.tsx@@ -1,40 +1,39 @@-import { Checkbox } from '@/components/ui/checkbox';-import { useFormatDateInterval } from '@/hooks/use-format-date-interval';-import { useNumber } from '@/hooks/use-numer-formatter';-import { useSelector } from '@/redux';-import type { IChartData } from '@/trpc/client';-import { cn } from '@/utils/cn';-import { getChartColor } from '@/utils/theme';import type { ColumnDef, Header, Row } from '@tanstack/react-table';import {type ExpandedState,- type SortingState,flexRender,getCoreRowModel,getExpandedRowModel,getFilteredRowModel,+ type SortingState,useReactTable,} from '@tanstack/react-table';import {- type VirtualItem,useVirtualizer,useWindowVirtualizer,+ type VirtualItem,} from '@tanstack/react-virtual';import throttle from 'lodash.throttle';import { ChevronDown, ChevronRight } from 'lucide-react';import type * as React from 'react';import { useEffect, useMemo, useRef, useState } from 'react';-import { ReportTableToolbar } from './report-table-toolbar';import {type ExpandableTableRow,type GroupedTableRow,- type TableRow,groupsToExpandableRows,+ type TableRow,transformToHierarchicalGroups,transformToTableData,} from './report-table-utils';import { SerieName } from './serie-name';+import { Checkbox } from '@/components/ui/checkbox';+import { useFormatDateInterval } from '@/hooks/use-format-date-interval';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useSelector } from '@/redux';+import type { IChartData } from '@/trpc/client';+import { cn } from '@/utils/cn';+import { getChartColor } from '@/utils/theme';declare module '@tanstack/react-table' {interface ColumnMeta<TData, TValue> {@@ -94,7 +93,9 @@ const VirtualRow = function VirtualRow({header: Header<TableRow | GroupedTableRow, unknown> | undefined) => {const cell = cells.find((c) => c.column.id === column.id);- if (!cell || !header) return null;+ if (!(cell && header)) {+ return null;+ }const isBreakdown = column.columnDef.meta?.isBreakdown ?? false;const pinningStyles = pinningStylesMap.get(column.id) ?? {};@@ -104,6 +105,7 @@ const VirtualRow = function VirtualRow({return (<div+ className={cn('relative overflow-hidden border-r')}key={cell.id}style={{width: `${header.getSize()}px`,@@ -111,11 +113,14 @@ const VirtualRow = function VirtualRow({maxWidth: column.columnDef.maxSize,...pinningStyles,}}- className={cn('relative overflow-hidden border-r')}>{flexRender(cell.column.columnDef.cell, cell.getContext())}{canResize && isPinned && (<div+ className={cn(+ 'absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none bg-transparent transition-colors hover:bg-primary/50',+ isResizing && 'bg-primary'+ )}data-resize-handleonMouseDown={(e) => {e.stopPropagation();@@ -129,22 +134,18 @@ const VirtualRow = function VirtualRow({setResizingColumnId(null);}, 0);}}- onTouchStart={(e) => {- e.stopPropagation();- isResizingRef.current = true;- setResizingColumnId(column.id);- header.getResizeHandler()(e);- }}onTouchEnd={() => {setTimeout(() => {isResizingRef.current = false;setResizingColumnId(null);}, 0);}}- className={cn(- 'absolute right-0 top-0 h-full w-1 cursor-col-resize touch-none select-none bg-transparent hover:bg-primary/50 transition-colors',- isResizing && 'bg-primary'- )}+ onTouchStart={(e) => {+ e.stopPropagation();+ isResizingRef.current = true;+ setResizingColumnId(column.id);+ header.getResizeHandler()(e);+ }}/>)}</div>@@ -153,6 +154,7 @@ const VirtualRow = function VirtualRow({return (<div+ className="border-b transition-colors hover:bg-muted/30"key={virtualRow.key}style={{position: 'absolute',@@ -164,7 +166,6 @@ const VirtualRow = function VirtualRow({display: 'flex',minWidth: 'fit-content',}}- className="border-b hover:bg-muted/30 transition-colors">{/* Left Pinned Columns */}{leftPinnedColumns.map((column) => {@@ -182,13 +183,18 @@ const VirtualRow = function VirtualRow({>{virtualColumns.map((virtualCol) => {const column = scrollableColumns[virtualCol.index];- if (!column) return null;+ if (!column) {+ return null;+ }const header = headers.find((h) => h.column.id === column.id);const cell = cells.find((c) => c.column.id === column.id);- if (!cell || !header) return null;+ if (!(cell && header)) {+ return null;+ }return (<div+ className={cn('relative overflow-hidden')}key={cell.id}style={{position: 'absolute',@@ -196,7 +202,6 @@ const VirtualRow = function VirtualRow({width: `${virtualCol.size}px`,height: `${virtualRow.size}px`,}}- className={cn('relative overflow-hidden')}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</div>@@ -263,7 +268,7 @@ export function ReportTable({// Convert hierarchical groups to expandable rows (for TanStack Table's expanding feature)const expandableRows = useMemo(() => {- if (!grouped || !hierarchicalGroups || hierarchicalGroups.length === 0) {+ if (!(grouped && hierarchicalGroups) || hierarchicalGroups.length === 0) {return null;}@@ -285,7 +290,9 @@ export function ReportTable({const searchLower = globalFilter.toLowerCase();result = rows.filter((row) => {// Search in serie name- if (row.serieName.toLowerCase().includes(searchLower)) return true;+ if (row.serieName.toLowerCase().includes(searchLower)) {+ return true;+ }// Search in breakdown valuesif (@@ -329,7 +336,9 @@ export function ReportTable({b: ExpandableTableRow | GroupedTableRow | TableRow) => {// If no sorting is selected, return 0 (no change)- if (sorting.length === 0) return 0;+ if (sorting.length === 0) {+ return 0;+ }for (const sort of sorting) {const { id, desc } = sort;@@ -364,17 +373,29 @@ export function ReportTable({}// Handle null/undefined values- if (aValue == null && bValue == null) continue;- if (aValue == null) return 1;- if (bValue == null) return -1;+ if (aValue == null && bValue == null) {+ continue;+ }+ if (aValue == null) {+ return 1;+ }+ if (bValue == null) {+ return -1;+ }// Compare valuesif (typeof aValue === 'string' && typeof bValue === 'string') {const comparison = aValue.localeCompare(bValue);- if (comparison !== 0) return desc ? -comparison : comparison;+ if (comparison !== 0) {+ return desc ? -comparison : comparison;+ }} else {- if (aValue < bValue) return desc ? 1 : -1;- if (aValue > bValue) return desc ? -1 : 1;+ if (aValue < bValue) {+ return desc ? 1 : -1;+ }+ if (aValue > bValue) {+ return desc ? -1 : 1;+ }}}return 0;@@ -455,17 +476,29 @@ export function ReportTable({}// Handle null/undefined values- if (aValue == null && bValue == null) continue;- if (aValue == null) return 1;- if (bValue == null) return -1;+ if (aValue == null && bValue == null) {+ continue;+ }+ if (aValue == null) {+ return 1;+ }+ if (bValue == null) {+ return -1;+ }// Compare valuesif (typeof aValue === 'string' && typeof bValue === 'string') {const comparison = aValue.localeCompare(bValue);- if (comparison !== 0) return desc ? -comparison : comparison;+ if (comparison !== 0) {+ return desc ? -comparison : comparison;+ }} else {- if (aValue < bValue) return desc ? 1 : -1;- if (aValue > bValue) return desc ? -1 : 1;+ if (aValue < bValue) {+ return desc ? 1 : -1;+ }+ if (aValue > bValue) {+ return desc ? -1 : 1;+ }}}return 0;@@ -509,7 +542,7 @@ export function ReportTable({'isGroupHeader' in row && row.isGroupHeader === true;const isSummary = 'isSummaryRow' in row && row.isSummaryRow === true;- if (!isGroupHeader && !isSummary) {+ if (!(isGroupHeader || isSummary)) {// It's an individual row - add itindividualRows.push(row as TableRow);}@@ -621,7 +654,9 @@ export function ReportTable({// Normalize visibleSeries to string arrayconst visibleSeriesIds = useMemo(() => {- if (visibleSeries.length === 0) return [];+ if (visibleSeries.length === 0) {+ return [];+ }if (typeof visibleSeries[0] === 'string') {return visibleSeries as string[];}@@ -722,27 +757,27 @@ export function ReportTable({const isExpandable = grouped && isSerieGroupHeader && hasSubRows;return (- <div className="flex items-center gap-2 px-4 h-12">+ <div className="flex h-12 items-center gap-2 px-4"><Checkboxchecked={isVisible}+ className="h-4 w-4 shrink-0"onCheckedChange={() => toggleSerieVisibility(serieId)}style={{borderColor: color,backgroundColor: isVisible ? color : 'transparent',}}- className="h-4 w-4 shrink-0"/><SerieName- name={serieName}className={cn('truncate',!isExpandable && grouped && 'text-muted-foreground/40',isExpandable && 'font-semibold')}+ name={serieName}/>{isExpandable && (<button- type="button"+ className="cursor-pointer hover:opacity-70"onClick={(e) => {e.stopPropagation();e.preventDefault();@@ -755,7 +790,7 @@ export function ReportTable({return newExpanded;});}}- className="cursor-pointer hover:opacity-70"+ type="button">{isExpanded ? (<ChevronDown className="h-4 w-4" />@@ -830,9 +865,11 @@ export function ReportTable({return (<div- className="flex items-center gap-2 cursor-pointer hover:opacity-70"+ className="flex cursor-pointer items-center gap-2 hover:opacity-70"onClick={() => {- if (!grouped) return;+ if (!grouped) {+ return;+ }// Toggle all groups at this breakdown levelsetExpanded((prev) => {const newExpanded: ExpandedState =@@ -847,7 +884,9 @@ export function ReportTable({onKeyDown={(e) => {if (e.key === 'Enter' || e.key === ' ') {e.preventDefault();- if (!grouped) return;+ if (!grouped) {+ return;+ }setExpanded((prev) => {const newExpanded: ExpandedState =typeof prev === 'object' ? { ...prev } : {};@@ -880,21 +919,22 @@ export function ReportTable({const value: string | number | null =original.breakdownValues[index] ?? null;const isLastBreakdown = index === breakdownPropertyNames.length - 1;- const isMuted = (!isLastBreakdown && !canExpand && grouped) || !value;+ const isMuted =+ (!(isLastBreakdown || canExpand) && grouped) || !value;// For group headers, only show value at the group level, hide deeper breakdownsif (isGroupHeader && 'groupLevel' in original) {const groupLevel = original.groupLevel ?? 0;if (index !== groupLevel) {- return <div className="flex items-center gap-2 px-4 h-12" />;+ return <div className="flex h-12 items-center gap-2 px-4" />;}}return (- <div className="flex items-center gap-2 px-4 h-12">+ <div className="flex h-12 items-center gap-2 px-4"><spanclassName={cn(- 'truncate block leading-[48px]',+ 'block truncate leading-[48px]',isMuted && 'text-muted-foreground/50',isGroupHeader && 'font-semibold')}@@ -906,13 +946,15 @@ export function ReportTable({('groupLevel' in original ? (original.groupLevel ?? 0) : 0) &&index < breakdownPropertyNames.length - 1 && (<button- type="button"+ className="cursor-pointer hover:opacity-70"onClick={(e) => {e.stopPropagation();const handler = row.getToggleExpandedHandler();- if (handler) handler();+ if (handler) {+ handler();+ }}}- className="cursor-pointer hover:opacity-70"+ type="button">{isExpanded ? (<ChevronDown className="h-4 w-4" />@@ -951,7 +993,7 @@ export function ReportTable({const isSummary = hasIsSummaryRow && original.isSummaryRow === true;const isGroupHeader =hasIsGroupHeader && original.isGroupHeader === true;- const isIndividualRow = !isSummary && !isGroupHeader;+ const isIndividualRow = !(isSummary || isGroupHeader);const range = metricRanges[metric.key];// Only apply colors to individual rows, not summary or group header rows@@ -969,8 +1011,8 @@ export function ReportTable({return (<divclassName={cn(- 'h-12 w-full text-right font-mono text-sm px-4 flex items-center justify-end',- '[text-shadow:_0_0_3px_rgb(0_0_0_/_20%)] shadow-[inset_-1px_-1px_0_var(--border)]',+ 'flex h-12 w-full items-center justify-end px-4 text-right font-mono text-sm',+ 'shadow-[inset_-1px_-1px_0_var(--border)] [text-shadow:_0_0_3px_rgb(0_0_0_/_20%)]',(isSummary || isGroupHeader) && 'font-semibold')}style={backgroundStyle}@@ -996,7 +1038,7 @@ export function ReportTable({const isGroupHeader ='isGroupHeader' in row.original &&row.original.isGroupHeader === true;- const isIndividualRow = !isSummary && !isGroupHeader;+ const isIndividualRow = !(isSummary || isGroupHeader);const range = dateRanges[date];// Only apply colors to individual rows, not summary or group header rows// Also check that range is valid (not still at initial values)@@ -1014,8 +1056,8 @@ export function ReportTable({return (<divclassName={cn(- 'h-12 w-full text-right font-mono text-sm px-4 flex items-center justify-end',- '[text-shadow:_0_0_3px_rgb(0_0_0_/_20%)] shadow-[inset_-1px_-1px_0_var(--border)]',+ 'flex h-12 w-full items-center justify-end px-4 text-right font-mono text-sm',+ 'shadow-[inset_-1px_-1px_0_var(--border)] [text-shadow:_0_0_3px_rgb(0_0_0_/_20%)]',(isSummary || isGroupHeader) && 'font-semibold')}style={backgroundStyle}@@ -1070,7 +1112,9 @@ export function ReportTable({getRowCanExpand: grouped? (row: any) => {const r = row.original as ExpandableTableRow;- if (!('isGroupHeader' in r) || !r.isGroupHeader) return false;+ if (!('isGroupHeader' in r && r.isGroupHeader)) {+ return false;+ }// Don't allow expansion for the last breakdown levelconst groupLevel = r.groupLevel ?? -1;const isLastBreakdown =@@ -1279,7 +1323,9 @@ export function ReportTable({const getPinningStyles = (column: ReturnType<typeof table.getColumn> | undefined) => {- if (!column) return {};+ if (!column) {+ return {};+ }return pinningStylesMap.get(column.id) ?? {};};@@ -1288,21 +1334,21 @@ export function ReportTable({}return (- <div className="flex flex-col border rounded-lg overflow-hidden bg-card mt-8">+ <div className="mt-8 flex flex-col overflow-hidden rounded-lg border bg-card"><ReportTableToolbargrouped={grouped}+ onSearchChange={setGlobalFilter}onToggleGrouped={!breakdowns || breakdowns.length === 0? undefined: () => setGrouped(!grouped)}- search={globalFilter}- onSearchChange={setGlobalFilter}onUnselectAll={() => setVisibleSeries([])}+ search={globalFilter}/><div- ref={parentRef}className="overflow-x-auto"+ ref={parentRef}style={{width: '100%',}}@@ -1317,7 +1363,7 @@ export function ReportTable({>{/* Header */}<div- className="sticky top-0 z-20 bg-card border-b"+ className="sticky top-0 z-20 border-b bg-card"style={{display: 'flex',width:@@ -1330,7 +1376,9 @@ export function ReportTable({{/* Left Pinned Columns */}{leftPinnedColumns.map((column) => {const header = headers.find((h) => h.column.id === column.id);- if (!header) return null;+ if (!header) {+ return null;+ }const headerContent = column.columnDef.header;const isBreakdown = column.columnDef.meta?.isBreakdown ?? false;const pinningStyles = getPinningStyles(column);@@ -1345,18 +1393,12 @@ export function ReportTable({return (<div- key={header.id}- style={{- width: `${header.getSize()}px`,- minWidth: column.columnDef.minSize,- maxWidth: column.columnDef.maxSize,- ...pinningStyles,- }}className={cn(- 'h-10 px-4 flex items-center text-[10px] uppercase font-semibold bg-muted/30 border-r border-border whitespace-nowrap relative',+ 'relative flex h-10 items-center whitespace-nowrap border-border border-r bg-muted/30 px-4 font-semibold text-[10px] uppercase',isMetricOrDate && 'text-right',- canSort && 'cursor-pointer hover:bg-muted/50 select-none'+ canSort && 'cursor-pointer select-none hover:bg-muted/50')}+ key={header.id}onClick={canSort? (e) => {@@ -1385,9 +1427,15 @@ export function ReportTable({: undefined}role={canSort ? 'button' : undefined}+ style={{+ width: `${header.getSize()}px`,+ minWidth: column.columnDef.minSize,+ maxWidth: column.columnDef.maxSize,+ ...pinningStyles,+ }}tabIndex={canSort ? 0 : undefined}>- <div className="flex items-center gap-1.5 flex-1">+ <div className="flex flex-1 items-center gap-1.5">{header.isPlaceholder? null: typeof headerContent === 'function'@@ -1405,6 +1453,10 @@ export function ReportTable({</div>{canResize && isPinned && (<div+ className={cn(+ 'absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none bg-transparent transition-colors hover:bg-primary/50',+ header.column.getIsResizing() && 'bg-primary'+ )}data-resize-handleonMouseDown={(e) => {e.stopPropagation();@@ -1419,22 +1471,18 @@ export function ReportTable({setResizingColumnId(null);}, 0);}}- onTouchStart={(e) => {- e.stopPropagation();- isResizingRef.current = true;- setResizingColumnId(column.id);- header.getResizeHandler()(e);- }}onTouchEnd={() => {setTimeout(() => {isResizingRef.current = false;setResizingColumnId(null);}, 0);}}- className={cn(- 'absolute right-0 top-0 h-full w-1 cursor-col-resize touch-none select-none bg-transparent hover:bg-primary/50 transition-colors',- header.column.getIsResizing() && 'bg-primary'- )}+ onTouchStart={(e) => {+ e.stopPropagation();+ isResizingRef.current = true;+ setResizingColumnId(column.id);+ header.getResizeHandler()(e);+ }}/>)}</div>@@ -1451,9 +1499,13 @@ export function ReportTable({>{virtualColumns.map((virtualCol) => {const column = scrollableColumns[virtualCol.index];- if (!column) return null;+ if (!column) {+ return null;+ }const header = headers.find((h) => h.column.id === column.id);- if (!header) return null;+ if (!header) {+ return null;+ }const headerContent = header.column.columnDef.header;const isBreakdown =@@ -1466,18 +1518,12 @@ export function ReportTable({return (<div- key={header.id}- style={{- position: 'absolute',- left: `${virtualCol.start}px`,- width: `${virtualCol.size}px`,- height: '40px',- }}className={cn(- 'px-4 flex items-center text-[10px] uppercase font-semibold bg-muted/30 border-r border-border whitespace-nowrap',+ 'flex items-center whitespace-nowrap border-border border-r bg-muted/30 px-4 font-semibold text-[10px] uppercase',isMetricOrDate && 'text-right',- canSort && 'cursor-pointer hover:bg-muted/50 select-none'+ canSort && 'cursor-pointer select-none hover:bg-muted/50')}+ key={header.id}onClick={canSort? (e) => {@@ -1505,9 +1551,15 @@ export function ReportTable({: undefined}role={canSort ? 'button' : undefined}+ style={{+ position: 'absolute',+ left: `${virtualCol.start}px`,+ width: `${virtualCol.size}px`,+ height: '40px',+ }}tabIndex={canSort ? 0 : undefined}>- <div className="flex items-center gap-1.5 flex-1">+ <div className="flex flex-1 items-center gap-1.5">{header.isPlaceholder? null: typeof headerContent === 'function'@@ -1531,7 +1583,9 @@ export function ReportTable({{/* Right Pinned Columns */}{rightPinnedColumns.map((column) => {const header = headers.find((h) => h.column.id === column.id);- if (!header) return null;+ if (!header) {+ return null;+ }const headerContent = header.column.columnDef.header;const isBreakdown =@@ -1546,18 +1600,12 @@ export function ReportTable({return (<div- key={header.id}- style={{- width: `${header.getSize()}px`,- minWidth: header.column.columnDef.minSize,- maxWidth: header.column.columnDef.maxSize,- ...pinningStyles,- }}className={cn(- 'h-10 px-4 flex items-center text-[10px] uppercase font-semibold bg-muted/30 border-r border-border whitespace-nowrap relative',+ 'relative flex h-10 items-center whitespace-nowrap border-border border-r bg-muted/30 px-4 font-semibold text-[10px] uppercase',isMetricOrDate && 'text-right',- canSort && 'cursor-pointer hover:bg-muted/50 select-none'+ canSort && 'cursor-pointer select-none hover:bg-muted/50')}+ key={header.id}onClick={canSort? (e) => {@@ -1585,9 +1633,15 @@ export function ReportTable({: undefined}role={canSort ? 'button' : undefined}+ style={{+ width: `${header.getSize()}px`,+ minWidth: header.column.columnDef.minSize,+ maxWidth: header.column.columnDef.maxSize,+ ...pinningStyles,+ }}tabIndex={canSort ? 0 : undefined}>- <div className="flex items-center gap-1.5 flex-1">+ <div className="flex flex-1 items-center gap-1.5">{header.isPlaceholder? null: typeof headerContent === 'function'@@ -1617,7 +1671,9 @@ export function ReportTable({>{virtualRows.map((virtualRow) => {const tableRow = rowModelToUse.rows[virtualRow.index];- if (!tableRow) return null;+ if (!tableRow) {+ return null;+ }// Include serie name in key to force re-render when name changesconst serieId = tableRow.original.serieId;@@ -1627,24 +1683,24 @@ export function ReportTable({return (<VirtualRow+ headers={headers}+ isResizingRef={isResizingRef}key={`${virtualRow.key}-${serieName}-${gridTemplateColumns}`}+ leftPinnedColumns={leftPinnedColumns}+ leftPinnedWidth={leftPinnedWidth}+ pinningStylesMap={pinningStylesMap}+ resizingColumnId={resizingColumnId}+ rightPinnedColumns={rightPinnedColumns}+ rightPinnedWidth={rightPinnedWidth}row={tableRow}+ scrollableColumns={scrollableColumns}+ scrollableColumnsTotalWidth={scrollableColumnsTotalWidth}+ setResizingColumnId={setResizingColumnId}+ virtualColumns={virtualColumns}virtualRow={{...virtualRow,start: virtualRow.start - virtualizer.options.scrollMargin,}}- pinningStylesMap={pinningStylesMap}- headers={headers}- isResizingRef={isResizingRef}- resizingColumnId={resizingColumnId}- setResizingColumnId={setResizingColumnId}- leftPinnedColumns={leftPinnedColumns}- scrollableColumns={scrollableColumns}- rightPinnedColumns={rightPinnedColumns}- virtualColumns={virtualColumns}- leftPinnedWidth={leftPinnedWidth}- scrollableColumnsTotalWidth={scrollableColumnsTotalWidth}- rightPinnedWidth={rightPinnedWidth}/>);})}diff --git a/apps/start/src/components/report-chart/conversion/index.tsx b/apps/start/src/components/report-chart/conversion/index.tsxindex 462cc5323..0b236844f 100644--- a/apps/start/src/components/report-chart/conversion/index.tsx+++ b/apps/start/src/components/report-chart/conversion/index.tsx@@ -1,7 +1,4 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';--import { cn } from '@/utils/cn';import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';@@ -9,6 +6,7 @@ import { ReportChartLoading } from '../common/loading';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';import { Summary } from './summary';+import { useTRPC } from '@/integrations/trpc/react';export function ReportConversionChart() {const { isLazyLoading, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/funnel/index.tsx b/apps/start/src/components/report-chart/funnel/index.tsxindex 0081e05a3..fac2b3c2e 100644--- a/apps/start/src/components/report-chart/funnel/index.tsx+++ b/apps/start/src/components/report-chart/funnel/index.tsx@@ -1,17 +1,15 @@-import { changeVisibleSeries } from '@/components/report/reportSlice';-import { useTRPC } from '@/integrations/trpc/react';-import { useDispatch } from '@/redux';-import type { RouterOutputs } from '@/trpc/client';import { useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { ReportChartLoading } from '../common/loading';import { useChartInput, useReportChartContext } from '../context';-import { useVisibleFunnelBreakdowns } from '@/hooks/use-visible-funnel-breakdowns';-import { Chart, Summary } from './chart';import { BreakdownList } from './breakdown-list';+import { Chart, Summary } from './chart';+import { changeVisibleSeries } from '@/components/report/reportSlice';+import { useVisibleFunnelBreakdowns } from '@/hooks/use-visible-funnel-breakdowns';+import { useTRPC } from '@/integrations/trpc/react';+import { useDispatch } from '@/redux';export function ReportFunnelChart() {const { isLazyLoading, report, shareId, isEditMode } =@@ -61,8 +59,8 @@ export function ReportFunnelChart() {<Chart data={res.data} visibleBreakdowns={visibleBreakdowns} /><BreakdownListdata={res.data}- visibleSeriesIds={visibleBreakdowns.map((b) => b.id)}setVisibleSeries={setVisibleSeries}+ visibleSeriesIds={visibleBreakdowns.map((b) => b.id)}/></div>);diff --git a/apps/start/src/components/report-chart/histogram/chart.tsx b/apps/start/src/components/report-chart/histogram/chart.tsxindex 12e96e207..13eaeaf8d 100644--- a/apps/start/src/components/report-chart/histogram/chart.tsx+++ b/apps/start/src/components/report-chart/histogram/chart.tsx@@ -1,15 +1,6 @@-import { useRechartDataModel } from '@/hooks/use-rechart-data-model';-import { useTheme } from '@/hooks/use-theme';-import { useVisibleSeries } from '@/hooks/use-visible-series';-import { useTRPC } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';-import { useDispatch } from '@/redux';-import type { IChartData } from '@/trpc/client';-import { cn } from '@/utils/cn';-import { getChartColor } from '@/utils/theme';import { useQuery } from '@tanstack/react-query';import { BookmarkIcon, UsersIcon } from 'lucide-react';-import React, { useCallback } from 'react';+import { useCallback } from 'react';import {Bar,BarChart,@@ -20,8 +11,6 @@ import {XAxis,YAxis,} from 'recharts';--import { changeVisibleSeries } from '@/components/report/reportSlice';import { useXAxisProps, useYAxisProps } from '../common/axis';import {ChartClickMenu,@@ -30,6 +19,16 @@ import {import { ReportChartTooltip } from '../common/report-chart-tooltip';import { ReportTable } from '../common/report-table';import { useReportChartContext } from '../context';+import { changeVisibleSeries } from '@/components/report/reportSlice';+import { useRechartDataModel } from '@/hooks/use-rechart-data-model';+import { useTheme } from '@/hooks/use-theme';+import { useVisibleSeries } from '@/hooks/use-visible-series';+import { useTRPC } from '@/integrations/trpc/react';+import { pushModal } from '@/modals';+import { useDispatch } from '@/redux';+import type { IChartData } from '@/trpc/client';+import { cn } from '@/utils/cn';+import { getChartColor } from '@/utils/theme';interface Props {data: IChartData;@@ -44,9 +43,9 @@ function BarHover({ x, y, width, height, top, left, right, bottom }: any) {return (<rect{...{ x, y, width, height, top, left, right, bottom }}- rx="3"fill={bg}fillOpacity={0.5}+ rx="3"/>);}@@ -165,9 +164,9 @@ export function Chart({ data }: Props) {<ResponsiveContainer><BarChart data={rechartData}><CartesianGrid+ className="stroke-def-200"strokeDasharray="3 3"vertical={false}- className="stroke-def-200"/><Tooltipcontent={<ReportChartTooltip.Tooltip />}@@ -179,11 +178,11 @@ export function Chart({ data }: Props) {? series.map((serie) => {return (<Bar- key={`${serie.id}:prev`}- name={`${serie.id}:prev`}dataKey={`${serie.id}:prev:count`}fill={getChartColor(serie.index)}fillOpacity={0.3}+ key={`${serie.id}:prev`}+ name={`${serie.id}:prev`}radius={5}stackId={isStacked ? 'prev' : undefined}/>@@ -193,29 +192,29 @@ export function Chart({ data }: Props) {{series.map((serie) => {return (<Bar- key={serie.id}- name={serie.id}dataKey={`${serie.id}:count`}fill={getChartColor(serie.index)}- radius={isStacked ? 0 : 4}fillOpacity={1}+ key={serie.id}+ name={serie.id}+ radius={isStacked ? 0 : 4}stackId={isStacked ? 'current' : undefined}/>);})}{references.data?.map((ref) => (<ReferenceLine+ fontSize={10}key={ref.id}- x={ref.date.getTime()}- stroke={'oklch(from var(--foreground) l c h / 0.1)'}- strokeDasharray={'3 3'}label={{value: ref.title,position: 'centerTop',fill: '#334155',fontSize: 12,}}- fontSize={10}+ stroke={'oklch(from var(--foreground) l c h / 0.1)'}+ strokeDasharray={'3 3'}+ x={ref.date.getTime()}/>))}</BarChart>@@ -224,8 +223,8 @@ export function Chart({ data }: Props) {{isEditMode && (<ReportTabledata={data}- visibleSeries={series}setVisibleSeries={setVisibleSeries}+ visibleSeries={series}/>)}</ChartClickMenu>diff --git a/apps/start/src/components/report-chart/histogram/index.tsx b/apps/start/src/components/report-chart/histogram/index.tsxindex 1c039446e..01186f128 100644--- a/apps/start/src/components/report-chart/histogram/index.tsx+++ b/apps/start/src/components/report-chart/histogram/index.tsx@@ -1,12 +1,11 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { ReportChartLoading } from '../common/loading';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';+import { useTRPC } from '@/integrations/trpc/react';export function ReportHistogramChart() {const { isLazyLoading, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/index.tsx b/apps/start/src/components/report-chart/index.tsxindex 2a8fea226..f5f7090a3 100644--- a/apps/start/src/components/report-chart/index.tsx+++ b/apps/start/src/components/report-chart/index.tsx@@ -1,8 +1,6 @@import { mergeDeepRight } from 'ramda';-import React, { memo, type RefObject, useEffect, useRef } from 'react';+import { type RefObject, useEffect, useRef } from 'react';import { useInViewport } from 'react-in-viewport';--import { shallowEqual } from 'react-redux';import { ReportAreaChart } from './area';import { ReportBarChart } from './bar';import type { ReportChartProps } from './context';diff --git a/apps/start/src/components/report-chart/line/chart.tsx b/apps/start/src/components/report-chart/line/chart.tsxindex fd1da95a9..9064e10b1 100644--- a/apps/start/src/components/report-chart/line/chart.tsx+++ b/apps/start/src/components/report-chart/line/chart.tsx@@ -1,11 +1,3 @@-import { useRechartDataModel } from '@/hooks/use-rechart-data-model';-import { useVisibleSeries } from '@/hooks/use-visible-series';-import { useTRPC } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';-import { useDispatch } from '@/redux';-import type { IChartData } from '@/trpc/client';-import { cn } from '@/utils/cn';-import { getChartColor } from '@/utils/theme';import { useQuery } from '@tanstack/react-query';import { isSameDay, isSameHour, isSameMonth, isSameWeek } from 'date-fns';import { BookmarkIcon, UsersIcon } from 'lucide-react';@@ -23,9 +15,6 @@ import {XAxis,YAxis,} from 'recharts';--import { changeVisibleSeries } from '@/components/report/reportSlice';-import { useDashedStroke } from '@/hooks/use-dashed-stroke';import { useXAxisProps, useYAxisProps } from '../common/axis';import {ChartClickMenu,@@ -36,6 +25,16 @@ import { ReportTable } from '../common/report-table';import { SerieIcon } from '../common/serie-icon';import { SerieName } from '../common/serie-name';import { useReportChartContext } from '../context';+import { changeVisibleSeries } from '@/components/report/reportSlice';+import { useDashedStroke } from '@/hooks/use-dashed-stroke';+import { useRechartDataModel } from '@/hooks/use-rechart-data-model';+import { useVisibleSeries } from '@/hooks/use-visible-series';+import { useTRPC } from '@/integrations/trpc/react';+import { pushModal } from '@/modals';+import { useDispatch } from '@/redux';+import type { IChartData } from '@/trpc/client';+import { cn } from '@/utils/cn';+import { getChartColor } from '@/utils/theme';interface Props {data: IChartData;@@ -77,7 +76,7 @@ export function Chart({ data }: Props) {});const rechartData = useRechartDataModel(series);- let dotIndex = undefined;+ let dotIndex;if (range === 'today') {// Find closest index based on timesdotIndex = rechartData.findIndex((item) => {@@ -117,7 +116,7 @@ export function Chart({ data }: Props) {const CustomLegend = useCallback(() => {return (- <div className="flex flex-wrap justify-center gap-x-4 gap-y-1 text-xs mt-4 -mb-2">+ <div className="mt-4 -mb-2 flex flex-wrap justify-center gap-x-4 gap-y-1 text-xs">{series.map((serie) => (<divclassName="flex items-center gap-1"@@ -127,7 +126,7 @@ export function Chart({ data }: Props) {}}><SerieIcon name={serie.names} />- <SerieName name={serie.names} className="font-semibold" />+ <SerieName className="font-semibold" name={serie.names} /></div>))}</div>@@ -219,30 +218,30 @@ export function Chart({ data }: Props) {<ComposedChart data={rechartData}><Customized component={calcStrokeDasharray} /><Line+ animationDuration={0}dataKey="calcStrokeDasharray"legendType="none"- animationDuration={0}onAnimationEnd={handleAnimationEnd}/><CartesianGrid- strokeDasharray="3 3"+ className="stroke-border"horizontal={true}+ strokeDasharray="3 3"vertical={false}- className="stroke-border"/>{references.data?.map((ref) => (<ReferenceLine+ fontSize={10}key={ref.id}- x={ref.date.getTime()}- stroke={'oklch(from var(--foreground) l c h / 0.1)'}- strokeDasharray={'3 3'}label={{value: ref.title,position: 'centerTop',fill: '#334155',fontSize: 12,}}- fontSize={10}+ stroke={'oklch(from var(--foreground) l c h / 0.1)'}+ strokeDasharray={'3 3'}+ x={ref.date.getTime()}/>))}<YAxis@@ -255,15 +254,15 @@ export function Chart({ data }: Props) {<defs><filter+ height="140%"id="rainbow-line-glow"+ width="140%"x="-20%"y="-20%"- width="140%"- height="140%">- <feGaussianBlur stdDeviation="5" result="blur" />+ <feGaussianBlur result="blur" stdDeviation="5" /><feComponentTransfer in="blur" result="dimmedBlur">- <feFuncA type="linear" slope="0.5" />+ <feFuncA slope="0.5" type="linear" /></feComponentTransfer><feCompositein="SourceGraphic"@@ -277,13 +276,17 @@ export function Chart({ data }: Props) {const color = getChartColor(serie.index);return (<Line- key={serie.id}+ dataKey={`${serie.id}:count`}dot={dataLength <= 8}- type={lineType}- name={serie.id}+ fill={color}+ filter={+ series.length === 1+ ? 'url(#rainbow-line-glow)'+ : undefined+ }isAnimationActive={false}- strokeWidth={2}- dataKey={`${serie.id}:count`}+ key={serie.id}+ name={serie.id}stroke={color}strokeDasharray={useDashedLastLine@@ -291,12 +294,8 @@ export function Chart({ data }: Props) {: undefined}// Use for legend- fill={color}- filter={- series.length === 1- ? 'url(#rainbow-line-glow)'- : undefined- }+ strokeWidth={2}+ type={lineType}/>);})}@@ -307,16 +306,16 @@ export function Chart({ data }: Props) {const color = getChartColor(serie.index);return (<Line+ dataKey={`${serie.id}:prev:count`}+ dot={false}+ fill={color}+ isAnimationActivekey={`${serie.id}:prev`}- type={lineType}name={`${serie.id}:prev`}- isAnimationActive- dot={false}- strokeOpacity={0.3}- dataKey={`${serie.id}:prev:count`}stroke={color}+ strokeOpacity={0.3}// Use for legend- fill={color}+ type={lineType}/>);})@@ -327,8 +326,8 @@ export function Chart({ data }: Props) {{isEditMode && (<ReportTabledata={data}- visibleSeries={series}setVisibleSeries={setVisibleSeries}+ visibleSeries={series}/>)}</ChartClickMenu>diff --git a/apps/start/src/components/report-chart/line/index.tsx b/apps/start/src/components/report-chart/line/index.tsxindex ee1d15091..52a027e87 100644--- a/apps/start/src/components/report-chart/line/index.tsx+++ b/apps/start/src/components/report-chart/line/index.tsx@@ -1,12 +1,11 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { ReportChartLoading } from '../common/loading';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';+import { useTRPC } from '@/integrations/trpc/react';export function ReportLineChart() {const { isLazyLoading, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/map/chart.tsx b/apps/start/src/components/report-chart/map/chart.tsxindex d3f502727..f7ed67424 100644--- a/apps/start/src/components/report-chart/map/chart.tsx+++ b/apps/start/src/components/report-chart/map/chart.tsx@@ -1,11 +1,10 @@-import { useVisibleSeries } from '@/hooks/use-visible-series';-import type { IChartData } from '@/trpc/client';import { useMemo } from 'react';import WorldMap from 'react-svg-worldmap';import AutoSizer from 'react-virtualized-auto-sizer';--import { useEventQueryFilters } from '@/hooks/use-event-query-filters';import { useReportChartContext } from '../context';+import { useEventQueryFilters } from '@/hooks/use-event-query-filters';+import { useVisibleSeries } from '@/hooks/use-visible-series';+import type { IChartData } from '@/trpc/client';interface Props {data: IChartData;@@ -15,7 +14,7 @@ export function Chart({ data }: Props) {const {report: { metric, unit },} = useReportChartContext();- const { series } = useVisibleSeries(data, { limit: 99999 });+ const { series } = useVisibleSeries(data, { limit: 99_999 });const [_, setFilter] = useEventQueryFilters();const mapData = useMemo(() =>@@ -30,15 +29,15 @@ export function Chart({ data }: Props) {<AutoSizer disableHeight>{({ width }) => (<WorldMap+ borderColor={'var(--foreground)'}+ color={'var(--chart-0)'}+ data={mapData}onClickFunction={(event) => {if (event.countryCode) {setFilter('country', event.countryCode);}}}size={width}- data={mapData}- color={'var(--chart-0)'}- borderColor={'var(--foreground)'}value-suffix={unit}/>)}diff --git a/apps/start/src/components/report-chart/map/index.tsx b/apps/start/src/components/report-chart/map/index.tsxindex ae6c6eb86..f80bfa6e4 100644--- a/apps/start/src/components/report-chart/map/index.tsx+++ b/apps/start/src/components/report-chart/map/index.tsx@@ -1,12 +1,11 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { ReportChartLoading } from '../common/loading';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';+import { useTRPC } from '@/integrations/trpc/react';export function ReportMapChart() {const { isLazyLoading, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/metric/chart.tsx b/apps/start/src/components/report-chart/metric/chart.tsxindex 2aa07cbf2..557304218 100644--- a/apps/start/src/components/report-chart/metric/chart.tsx+++ b/apps/start/src/components/report-chart/metric/chart.tsx@@ -1,10 +1,9 @@+import { useReportChartContext } from '../context';+import { MetricCard } from './metric-card';import { useVisibleSeries } from '@/hooks/use-visible-series';import type { IChartData } from '@/trpc/client';import { cn } from '@/utils/cn';-import { useReportChartContext } from '../context';-import { MetricCard } from './metric-card';-interface Props {data: IChartData;}@@ -26,8 +25,8 @@ export function Chart({ data }: Props) {return (<MetricCardkey={serie.id}- serie={serie}metric={metric}+ serie={serie}unit={unit}/>);diff --git a/apps/start/src/components/report-chart/metric/index.tsx b/apps/start/src/components/report-chart/metric/index.tsxindex 2329f0c3f..9ba5aa753 100644--- a/apps/start/src/components/report-chart/metric/index.tsx+++ b/apps/start/src/components/report-chart/metric/index.tsx@@ -1,11 +1,10 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';+import { useTRPC } from '@/integrations/trpc/react';export function ReportMetricChart() {const { isLazyLoading, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/pie/chart.tsx b/apps/start/src/components/report-chart/pie/chart.tsxindex e5bce7802..bc1a99873 100644--- a/apps/start/src/components/report-chart/pie/chart.tsx+++ b/apps/start/src/components/report-chart/pie/chart.tsx@@ -1,28 +1,26 @@-import { changeVisibleSeries } from '@/components/report/reportSlice';-import { useVisibleSeries } from '@/hooks/use-visible-series';-import { useDispatch } from '@/redux';-import type { IChartData } from '@/trpc/client';-import { cn } from '@/utils/cn';import { round } from '@openpanel/shared';-import { getChartColor } from '@/utils/theme';-import { truncate } from '@/utils/truncate';import { Fragment } from 'react';import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts';-+import { AXIS_FONT_PROPS } from '../common/axis';+import { PreviousDiffIndicator } from '../common/previous-diff-indicator';+import { ReportTable } from '../common/report-table';+import { SerieIcon } from '../common/serie-icon';+import { SerieName } from '../common/serie-name';+import { useReportChartContext } from '../context';import {ChartTooltipContainer,ChartTooltipHeader,ChartTooltipItem,} from '@/components/charts/chart-tooltip';+import { changeVisibleSeries } from '@/components/report/reportSlice';import { useNumber } from '@/hooks/use-numer-formatter';+import { useVisibleSeries } from '@/hooks/use-visible-series';+import { useDispatch } from '@/redux';+import type { IChartData } from '@/trpc/client';+import { cn } from '@/utils/cn';import { formatDate } from '@/utils/date';-import { AXIS_FONT_PROPS } from '../common/axis';-import { PreviousDiffIndicator } from '../common/previous-diff-indicator';-import { ReportChartTooltip } from '../common/report-chart-tooltip';-import { ReportTable } from '../common/report-table';-import { SerieIcon } from '../common/serie-icon';-import { SerieName } from '../common/serie-name';-import { useReportChartContext } from '../context';+import { getChartColor } from '@/utils/theme';+import { truncate } from '@/utils/truncate';interface Props {data: IChartData;@@ -44,9 +42,9 @@ const PieTooltip = (props: { payload?: any[] }) => {<ChartTooltipItem color={item.color}><div className="flex items-center gap-1"><SerieIcon name={item.name} />- <SerieName name={item.names} className="font-medium" />+ <SerieName className="font-medium" name={item.names} /></div>- <div className="flex justify-between gap-8 font-mono font-medium">+ <div className="flex justify-between gap-8 font-medium font-mono"><div className="row gap-1">{number.formatWithUnit(item.count)}{!!item.previous && (@@ -99,20 +97,20 @@ export function Chart({ data }: Props) {<PieChart><Tooltip content={<PieTooltip />} /><Pie- dataKey={'count'}data={pieData}+ dataKey={'count'}innerRadius={'30%'}- outerRadius={'80%'}isAnimationActive={false}label={renderLabel}+ outerRadius={'80%'}>{pieData.map((item) => {return (<Cell- key={item.id}- strokeWidth={4}className="stroke-background"fill={item.color}+ key={item.id}+ strokeWidth={4}/>);})}@@ -123,8 +121,8 @@ export function Chart({ data }: Props) {{isEditMode && (<ReportTabledata={data}- visibleSeries={series}setVisibleSeries={setVisibleSeries}+ visibleSeries={series}/>)}</>@@ -161,12 +159,12 @@ const renderLabel = ({return (<><text- x={xProcent}- y={yProcent}- fill="white"- textAnchor="middle"dominantBaseline="central"+ fill="white"pointerEvents={'none'}+ textAnchor="middle"+ x={xProcent}+ y={yProcent}{...AXIS_FONT_PROPS}fontSize={12}fontWeight={700}@@ -174,11 +172,11 @@ const renderLabel = ({{percent}%</text><text- x={x}- y={y}+ dominantBaseline="central"fill={fill}textAnchor={x > cx ? 'start' : 'end'}- dominantBaseline="central"+ x={x}+ y={y}{...AXIS_FONT_PROPS}fontSize={10}fontWeight={700}diff --git a/apps/start/src/components/report-chart/pie/index.tsx b/apps/start/src/components/report-chart/pie/index.tsxindex 2fc609e68..97a426c34 100644--- a/apps/start/src/components/report-chart/pie/index.tsx+++ b/apps/start/src/components/report-chart/pie/index.tsx@@ -1,12 +1,11 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';import { ReportChartLoading } from '../common/loading';import { useChartInput, useReportChartContext } from '../context';import { Chart } from './chart';+import { useTRPC } from '@/integrations/trpc/react';export function ReportPieChart() {const { isLazyLoading, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/retention/index.tsx b/apps/start/src/components/report-chart/retention/index.tsxindex e41215137..ba28f58b6 100644--- a/apps/start/src/components/report-chart/retention/index.tsx+++ b/apps/start/src/components/report-chart/retention/index.tsx@@ -1,6 +1,4 @@-import { useTRPC } from '@/integrations/trpc/react';import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { AspectContainer } from '../aspect-container';import { ReportChartEmpty } from '../common/empty';import { ReportChartError } from '../common/error';@@ -8,6 +6,7 @@ import { ReportChartLoading } from '../common/loading';import { useReportChartContext } from '../context';import { Chart } from './chart';import CohortTable from './table';+import { useTRPC } from '@/integrations/trpc/react';export function ReportRetentionChart() {const { isLazyLoading, report, shareId } = useReportChartContext();diff --git a/apps/start/src/components/report-chart/retention/tooltip.tsx b/apps/start/src/components/report-chart/retention/tooltip.tsxindex 25ef298aa..bf162923a 100644--- a/apps/start/src/components/report-chart/retention/tooltip.tsx+++ b/apps/start/src/components/report-chart/retention/tooltip.tsx@@ -1,6 +1,5 @@-import { useNumber } from '@/hooks/use-numer-formatter';-import type { RouterOutputs } from '@/trpc/client';import { useReportChartContext } from '../context';+import { useNumber } from '@/hooks/use-numer-formatter';type Props = {active?: boolean;diff --git a/apps/start/src/components/report-chart/sankey/chart.tsx b/apps/start/src/components/report-chart/sankey/chart.tsxindex 74a19c3f8..4792313b0 100644--- a/apps/start/src/components/report-chart/sankey/chart.tsx+++ b/apps/start/src/components/report-chart/sankey/chart.tsx@@ -1,11 +1,6 @@-import {- ChartTooltipContainer,- ChartTooltipHeader,- ChartTooltipItem,-} from '@/components/charts/chart-tooltip';-import { useNumber } from '@/hooks/use-numer-formatter';-import { round } from '@openpanel/shared';import { ResponsiveSankey } from '@nivo/sankey';+import { round } from '@openpanel/shared';+import { ArrowRightIcon } from 'lucide-react';import {type ReactNode,useLayoutEffect,@@ -14,11 +9,15 @@ import {useState,} from 'react';import { createPortal } from 'react-dom';-+import { AspectContainer } from '../aspect-container';+import {+ ChartTooltipContainer,+ ChartTooltipHeader,+ ChartTooltipItem,+} from '@/components/charts/chart-tooltip';import { useTheme } from '@/components/theme-provider';+import { useNumber } from '@/hooks/use-numer-formatter';import { truncate } from '@/utils/truncate';-import { ArrowRightIcon } from 'lucide-react';-import { AspectContainer } from '../aspect-container';type PortalTooltipPosition = { left: number; top: number; ready: boolean };@@ -47,10 +46,14 @@ function SankeyPortalTooltip({useLayoutEffect(() => {const el = anchorRef.current;- if (!el) return;+ if (!el) {+ return;+ }const wrapper = el.parentElement;- if (!wrapper) return;+ if (!wrapper) {+ return;+ }const update = () => {setAnchorRect(wrapper.getBoundingClientRect());@@ -72,10 +75,16 @@ function SankeyPortalTooltip({}, []);useLayoutEffect(() => {- if (!mounted) return;- if (!anchorRect) return;+ if (!mounted) {+ return;+ }+ if (!anchorRect) {+ return;+ }const tooltipEl = tooltipRef.current;- if (!tooltipEl) return;+ if (!tooltipEl) {+ return;+ }const rect = tooltipEl.getBoundingClientRect();const vw = window.innerWidth;@@ -102,12 +111,12 @@ function SankeyPortalTooltip({return (<>- <span ref={anchorRef} className="sr-only" />+ <span className="sr-only" ref={anchorRef} />{mounted &&createPortal(<div- ref={tooltipRef}className="pointer-events-none fixed z-[9999]"+ ref={tooltipRef}style={{left: pos.left,top: pos.top,@@ -141,7 +150,9 @@ export function Chart({ data }: { data: SankeyData }) {// Process data for Sankeyconst sankeyData = useMemo(() => {- if (!data) return { nodes: [], links: [] };+ if (!data) {+ return { nodes: [], links: [] };+ }return {nodes: data.nodes.map((node) => ({@@ -159,7 +170,9 @@ export function Chart({ data }: { data: SankeyData }) {}, [data]);const totalSessions = useMemo(() => {- if (!sankeyData.nodes || sankeyData.nodes.length === 0) return 0;+ if (!sankeyData.nodes || sankeyData.nodes.length === 0) {+ return 0;+ }const step1 = sankeyData.nodes.filter((n: any) => n.data?.step === 1);const base = step1.length > 0 ? step1 : sankeyData.nodes;return base.reduce((sum: number, n: any) => sum + (n.data?.value ?? 0), 0);@@ -168,64 +181,21 @@ export function Chart({ data }: { data: SankeyData }) {return (<AspectContainer><div+ className="relative aspect-square w-full md:aspect-[2]"ref={containerRef}- className="w-full relative aspect-square md:aspect-[2]"><ResponsiveSankey- margin={{ top: 20, right: 20, bottom: 20, left: 20 }}- data={sankeyData}- colors={(node: any) => node.nodeColor}- nodeBorderRadius={2}animate={false}- nodeBorderWidth={0}- nodeOpacity={0.8}+ colors={(node: any) => node.nodeColor}+ data={sankeyData}+ label={(node: any) => {+ const label = node.data?.label || node.label || node.id;+ return truncate(label, 30, 'middle');+ }}+ labelTextColor={appTheme === 'dark' ? '#e2e8f0' : '#0f172a'}+ linkBlendMode={'normal'}linkContract={1}linkOpacity={0.3}- linkBlendMode={'normal'}- nodeTooltip={({ node }: any) => {- const label = node?.data?.label ?? node?.label ?? node?.id;- const value = node?.data?.value ?? node?.value ?? 0;- const step = node?.data?.step;- const pct =- typeof node?.data?.percentage === 'number'- ? node.data.percentage- : totalSessions > 0- ? (value / totalSessions) * 100- : 0;- const color =- node?.color ??- node?.data?.nodeColor ??- node?.data?.color ??- node?.nodeColor ??- '#64748b';-- return (- <SankeyPortalTooltip>- <ChartTooltipContainer className="min-w-[250px]">- <ChartTooltipHeader>- <div className="min-w-0 flex-1 font-medium break-words">- {label}- </div>- {typeof step === 'number' && (- <div className="shrink-0 text-muted-foreground">- Step {step}- </div>- )}- </ChartTooltipHeader>- <ChartTooltipItem color={color} innerClassName="gap-2">- <div className="flex items-center justify-between gap-8 font-mono font-medium">- <div className="text-muted-foreground">Sessions</div>- <div>{number.format(value)}</div>- </div>- <div className="flex items-center justify-between gap-8 font-mono font-medium">- <div className="text-muted-foreground">Share</div>- <div>{number.format(round(pct, 1))} %</div>- </div>- </ChartTooltipItem>- </ChartTooltipContainer>- </SankeyPortalTooltip>- );- }}linkTooltip={({ link }: any) => {const sourceLabel =link?.source?.data?.label ??@@ -258,9 +228,9 @@ export function Chart({ data }: { data: SankeyData }) {<SankeyPortalTooltip><ChartTooltipContainer><ChartTooltipHeader>- <div className="min-w-0 flex-1 font-medium break-words">+ <div className="min-w-0 flex-1 break-words font-medium">{sourceLabel}- <ArrowRightIcon className="size-2 inline-block mx-3" />+ <ArrowRightIcon className="mx-3 inline-block size-2" />{targetLabel}</div>{typeof sourceStep === 'number' &&@@ -272,7 +242,7 @@ export function Chart({ data }: { data: SankeyData }) {</ChartTooltipHeader><ChartTooltipItem color={color} innerClassName="gap-2">- <div className="flex items-center justify-between gap-8 font-mono font-medium">+ <div className="flex items-center justify-between gap-8 font-medium font-mono"><div className="text-muted-foreground">Sessions</div><div>{number.format(value)}</div></div>@@ -289,12 +259,55 @@ export function Chart({ data }: { data: SankeyData }) {</SankeyPortalTooltip>);}}- label={(node: any) => {- const label = node.data?.label || node.label || node.id;- return truncate(label, 30, 'middle');- }}- labelTextColor={appTheme === 'dark' ? '#e2e8f0' : '#0f172a'}+ margin={{ top: 20, right: 20, bottom: 20, left: 20 }}+ nodeBorderRadius={2}+ nodeBorderWidth={0}+ nodeOpacity={0.8}nodeSpacing={10}+ nodeTooltip={({ node }: any) => {+ const label = node?.data?.label ?? node?.label ?? node?.id;+ const value = node?.data?.value ?? node?.value ?? 0;+ const step = node?.data?.step;+ const pct =+ typeof node?.data?.percentage === 'number'+ ? node.data.percentage+ : totalSessions > 0+ ? (value / totalSessions) * 100+ : 0;+ const color =+ node?.color ??+ node?.data?.nodeColor ??+ node?.data?.color ??+ node?.nodeColor ??+ '#64748b';++ return (+ <SankeyPortalTooltip>+ <ChartTooltipContainer className="min-w-[250px]">+ <ChartTooltipHeader>+ <div className="min-w-0 flex-1 break-words font-medium">+ {label}+ </div>+ {typeof step === 'number' && (+ <div className="shrink-0 text-muted-foreground">+ Step {step}+ </div>+ )}+ </ChartTooltipHeader>+ <ChartTooltipItem color={color} innerClassName="gap-2">+ <div className="flex items-center justify-between gap-8 font-medium font-mono">+ <div className="text-muted-foreground">Sessions</div>+ <div>{number.format(value)}</div>+ </div>+ <div className="flex items-center justify-between gap-8 font-medium font-mono">+ <div className="text-muted-foreground">Share</div>+ <div>{number.format(round(pct, 1))} %</div>+ </div>+ </ChartTooltipItem>+ </ChartTooltipContainer>+ </SankeyPortalTooltip>+ );+ }}/></div></AspectContainer>diff --git a/apps/start/src/components/report-chart/shortcut.tsx b/apps/start/src/components/report-chart/shortcut.tsxindex f53ddf711..cdf95ffe4 100644--- a/apps/start/src/components/report-chart/shortcut.tsx+++ b/apps/start/src/components/report-chart/shortcut.tsx@@ -25,6 +25,7 @@ export const ReportChartShortcut = ({}: ChartRootShortcutProps) => {return (<ReportChart+ options={options ?? {}}report={{projectId,range,@@ -36,7 +37,6 @@ export const ReportChartShortcut = ({lineType,metric: 'sum',}}- options={options ?? {}}/>);};diff --git a/apps/start/src/components/report/ReportSaveButton.tsx b/apps/start/src/components/report/ReportSaveButton.tsxindex 313881934..66471088e 100644--- a/apps/start/src/components/report/ReportSaveButton.tsx+++ b/apps/start/src/components/report/ReportSaveButton.tsx@@ -1,19 +1,16 @@-import { Button } from '@/components/ui/button';-import { handleError } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';-import { useDispatch, useSelector } from '@/redux';-import { SaveIcon } from 'lucide-react';-import { toast } from 'sonner';--import { useTRPC } from '@/integrations/trpc/react';import {useIsFetching,useMutation,useQueryClient,} from '@tanstack/react-query';-import { useParams } from '@tanstack/react-router';+import { SaveIcon } from 'lucide-react';+import { toast } from 'sonner';import { resetDirty } from './reportSlice';+import { Button } from '@/components/ui/button';+import { handleError, useTRPC } from '@/integrations/trpc/react';+import { pushModal } from '@/modals';+import { useDispatch, useSelector } from '@/redux';interface ReportSaveButtonProps {className?: string;@@ -52,14 +49,14 @@ export function ReportSaveButton({ className }: ReportSaveButtonProps) {<ButtonclassName={className}disabled={!report.dirty}+ icon={SaveIcon}loading={update.isPending || isLoading}onClick={() => {update.mutate({- reportId: reportId,+ reportId,report,});}}- icon={SaveIcon}>Update</Button>@@ -69,13 +66,13 @@ export function ReportSaveButton({ className }: ReportSaveButtonProps) {<ButtonclassName={className}disabled={!report.dirty}+ icon={SaveIcon}+ loading={isLoading}onClick={() => {pushModal('SaveReport', {report,});}}- icon={SaveIcon}- loading={isLoading}>Save</Button>diff --git a/apps/start/src/components/report/edit-report-name.tsx b/apps/start/src/components/report/edit-report-name.tsxindex b0c767b15..7263963e0 100644--- a/apps/start/src/components/report/edit-report-name.tsx+++ b/apps/start/src/components/report/edit-report-name.tsx@@ -1,8 +1,8 @@-import { useDispatch, useSelector } from '@/redux';import { PencilIcon } from 'lucide-react';import { useEffect, useRef, useState } from 'react';import { Input } from '../ui/input';import { setName } from './reportSlice';+import { useDispatch, useSelector } from '@/redux';type Props = {name?: string;@@ -42,9 +42,8 @@ const EditReportName = ({ name }: Props) => {return (<div className="flex h-8"><Input- ref={inputRef}- type="text"- value={newName}+ onBlur={() => onSubmit()}+ onChange={(e) => setNewName(e.target.value)}onKeyDown={(e) => {if (e.key === 'Enter') {e.preventDefault();@@ -52,8 +51,9 @@ const EditReportName = ({ name }: Props) => {onSubmit();}}}- onChange={(e) => setNewName(e.target.value)}- onBlur={() => onSubmit()}+ ref={inputRef}+ type="text"+ value={newName}/></div>);@@ -61,14 +61,14 @@ const EditReportName = ({ name }: Props) => {return (<button- type="button"- className="flex cursor-pointer select-none items-center gap-2 text-xl font-medium h-8 group"+ className="group flex h-8 cursor-pointer select-none items-center gap-2 font-medium text-xl"onClick={() => setIsEditing(true)}+ type="button">{newName || 'Unnamed Report'}<PencilIcon+ className="opacity-0 transition-opacity group-hover:opacity-100"size={16}- className="opacity-0 group-hover:opacity-100 transition-opacity"/></button>);diff --git a/apps/start/src/components/report/sidebar/ReportBreakdownMore.tsx b/apps/start/src/components/report/sidebar/ReportBreakdownMore.tsxindex d4697622f..152aeac4d 100644--- a/apps/start/src/components/report/sidebar/ReportBreakdownMore.tsx+++ b/apps/start/src/components/report/sidebar/ReportBreakdownMore.tsx@@ -1,3 +1,5 @@+import { MoreHorizontal, Trash } from 'lucide-react';+import * as React from 'react';import { Button } from '@/components/ui/button';import {DropdownMenu,@@ -7,8 +9,6 @@ import {DropdownMenuShortcut,DropdownMenuTrigger,} from '@/components/ui/dropdown-menu';-import { MoreHorizontal, Trash } from 'lucide-react';-import * as React from 'react';export interface ReportBreakdownMoreProps {onClick: (action: 'remove') => void;@@ -18,9 +18,9 @@ export function ReportBreakdownMore({ onClick }: ReportBreakdownMoreProps) {const [open, setOpen] = React.useState(false);return (- <DropdownMenu open={open} onOpenChange={setOpen}>+ <DropdownMenu onOpenChange={setOpen} open={open}><DropdownMenuTrigger asChild>- <Button variant="ghost" size="sm">+ <Button size="sm" variant="ghost"><MoreHorizontal /></Button></DropdownMenuTrigger>diff --git a/apps/start/src/components/report/sidebar/ReportEventMore.tsx b/apps/start/src/components/report/sidebar/ReportEventMore.tsxindex bfc26ab1a..1bbc413b6 100644--- a/apps/start/src/components/report/sidebar/ReportEventMore.tsx+++ b/apps/start/src/components/report/sidebar/ReportEventMore.tsx@@ -1,3 +1,5 @@+import { CopyIcon, MoreHorizontal, TrashIcon } from 'lucide-react';+import * as React from 'react';import { Button } from '@/components/ui/button';import {DropdownMenu,@@ -7,8 +9,6 @@ import {DropdownMenuShortcut,DropdownMenuTrigger,} from '@/components/ui/dropdown-menu';-import { CopyIcon, MoreHorizontal, TrashIcon } from 'lucide-react';-import * as React from 'react';export interface ReportEventMoreProps {onClick: (action: 'remove' | 'duplicate') => void;@@ -18,9 +18,9 @@ export function ReportEventMore({ onClick }: ReportEventMoreProps) {const [open, setOpen] = React.useState(false);return (- <DropdownMenu open={open} onOpenChange={setOpen}>+ <DropdownMenu onOpenChange={setOpen} open={open}><DropdownMenuTrigger asChild>- <Button variant="ghost" size="sm">+ <Button size="sm" variant="ghost"><MoreHorizontal /></Button></DropdownMenuTrigger>diff --git a/apps/start/src/components/report/sidebar/ReportSidebar.tsx b/apps/start/src/components/report/sidebar/ReportSidebar.tsxindex 004d081bf..7023136e1 100644--- a/apps/start/src/components/report/sidebar/ReportSidebar.tsx+++ b/apps/start/src/components/report/sidebar/ReportSidebar.tsx@@ -1,12 +1,11 @@-import { Button } from '@/components/ui/button';-import { SheetClose, SheetFooter } from '@/components/ui/sheet';-import { useSelector } from '@/redux';-import { ReportBreakdowns } from './ReportBreakdowns';import { ReportGlobalFilters } from './ReportGlobalFilters';import { ReportSeries } from './ReportSeries';import { ReportSettings } from './ReportSettings';import { ReportFixedEvents } from './report-fixed-events';+import { Button } from '@/components/ui/button';+import { SheetClose, SheetFooter } from '@/components/ui/sheet';+import { useSelector } from '@/redux';export function ReportSidebar() {const { chartType, options } = useSelector((state) => state.report);diff --git a/apps/start/src/components/selling-points.tsx b/apps/start/src/components/selling-points.tsxindex 75cd91b81..53f6c84a8 100644--- a/apps/start/src/components/selling-points.tsx+++ b/apps/start/src/components/selling-points.tsx@@ -3,7 +3,7 @@ import type { LucideIcon } from 'lucide-react';function SellingPointIcon({ icon: Icon }: { icon: LucideIcon }) {return (- <div className="size-22 center-center rounded-xl bg-gradient-to-br from-green-500 to-emerald-600">+ <div className="center-center size-22 rounded-xl bg-gradient-to-br from-green-500 to-emerald-600"><Icon className="h-8 w-8 text-white" /></div>);@@ -19,24 +19,24 @@ function SellingPoint({bgImage: string;}) {return (- <div className="flex flex-col justify-center h-full p-8 select-none relative">+ <div className="relative flex h-full select-none flex-col justify-center p-8"><img+ className="absolute inset-0 h-full w-full object-cover"src={bgImage}- className="absolute inset-0 w-full h-full object-cover"/>- <div className="relative z-10 center-center col">+ <div className="center-center col relative z-10"><motion.div- initial={{ opacity: 0, y: 20 }}animate={{ opacity: 1, y: 0 }}+ initial={{ opacity: 0, y: 20 }}transition={{ duration: 0.6 }}>- <h2 className="text-6xl font-bold text-white drop-shadow-2xl drop-shadow-highlight mb-2">+ <h2 className="mb-2 font-bold text-6xl text-white drop-shadow-2xl drop-shadow-highlight">{title}</h2></motion.div><motion.div- initial={{ opacity: 0, y: 20 }}animate={{ opacity: 1, y: 0 }}+ initial={{ opacity: 0, y: 20 }}transition={{ duration: 0.6 }}><p className="text-lg text-white/70 leading-relaxed">{description}</p>diff --git a/apps/start/src/components/sessions/replay/browser-chrome.tsx b/apps/start/src/components/sessions/replay/browser-chrome.tsxindex 88773120f..6162322f0 100644--- a/apps/start/src/components/sessions/replay/browser-chrome.tsx+++ b/apps/start/src/components/sessions/replay/browser-chrome.tsx@@ -1,5 +1,5 @@-import { cn } from '@/utils/cn';import type { ReactNode } from 'react';+import { cn } from '@/utils/cn';export function BrowserChrome({url,@@ -7,9 +7,9 @@ export function BrowserChrome({right,controls = (<div className="flex gap-1.5">- <div className="w-3 h-3 rounded-full bg-red-500" />- <div className="w-3 h-3 rounded-full bg-yellow-500" />- <div className="w-3 h-3 rounded-full bg-green-500" />+ <div className="h-3 w-3 rounded-full bg-red-500" />+ <div className="h-3 w-3 rounded-full bg-yellow-500" />+ <div className="h-3 w-3 rounded-full bg-green-500" /></div>),className,@@ -27,10 +27,10 @@ export function BrowserChrome({className)}>- <div className="flex items-center gap-2 px-4 py-2 border-b border-border bg-background h-10">+ <div className="flex h-10 items-center gap-2 border-border border-b bg-background px-4 py-2">{controls}{url !== false && (- <div className="flex-1 mx-4 px-3 h-8 py-1 text-sm bg-def-100 rounded-md border border-border flex items-center truncate">+ <div className="mx-4 flex h-8 flex-1 items-center truncate rounded-md border border-border bg-def-100 px-3 py-1 text-sm">{url}</div>)}diff --git a/apps/start/src/components/sessions/replay/replay-context.tsx b/apps/start/src/components/sessions/replay/replay-context.tsxindex 7c5e95847..cba34b19a 100644--- a/apps/start/src/components/sessions/replay/replay-context.tsx+++ b/apps/start/src/components/sessions/replay/replay-context.tsx@@ -1,6 +1,6 @@import {- type ReactNode,createContext,+ type ReactNode,useCallback,useContext,useEffect,@@ -166,7 +166,9 @@ export function ReplayProvider({ children }: { children: ReactNode }) {}, []);const setSpeed = useCallback((s: number) => {- if (!SPEED_OPTIONS.includes(s as (typeof SPEED_OPTIONS)[number])) return;+ if (!SPEED_OPTIONS.includes(s as (typeof SPEED_OPTIONS)[number])) {+ return;+ }playerRef.current?.setSpeed(s);}, []);@@ -179,7 +181,9 @@ export function ReplayProvider({ children }: { children: ReactNode }) {const refreshDuration = useCallback(() => {const total = playerRef.current?.getMetaData().totalTime ?? 0;- if (total > 0) setDuration(total);+ if (total > 0) {+ setDuration(total);+ }}, []);const value: ReplayContextValue = {diff --git a/apps/start/src/components/sessions/replay/replay-controls.tsx b/apps/start/src/components/sessions/replay/replay-controls.tsxindex d49ad60e9..6a4a10dfb 100644--- a/apps/start/src/components/sessions/replay/replay-controls.tsx+++ b/apps/start/src/components/sessions/replay/replay-controls.tsx@@ -1,17 +1,17 @@+import { Pause, Play } from 'lucide-react';+import { formatDuration } from './replay-utils';import {useCurrentTime,useReplayContext,} from '@/components/sessions/replay/replay-context';import { Button } from '@/components/ui/button';-import { Pause, Play } from 'lucide-react';-import { formatDuration } from './replay-utils';export function ReplayTime() {const { duration } = useReplayContext();const currentTime = useCurrentTime(250);return (- <span className="text-sm tabular-nums text-muted-foreground font-mono">+ <span className="font-mono text-muted-foreground text-sm tabular-nums">{formatDuration(currentTime)} / {formatDuration(duration)}</span>);@@ -20,15 +20,17 @@ export function ReplayTime() {export function ReplayPlayPauseButton() {const { isPlaying, isReady, toggle } = useReplayContext();- if (!isReady) return null;+ if (!isReady) {+ return null;+ }return (<Button+ aria-label={isPlaying ? 'Pause' : 'Play'}+ onClick={toggle}+ size="icon"type="button"variant={isPlaying ? 'outline' : 'default'}- size="icon"- onClick={toggle}- aria-label={isPlaying ? 'Pause' : 'Play'}>{isPlaying ? <Pause className="h-4 w-4" /> : <Play className="h-4 w-4" />}</Button>diff --git a/apps/start/src/components/sessions/replay/replay-event-feed.tsx b/apps/start/src/components/sessions/replay/replay-event-feed.tsxindex ae8cf8fc6..d2fbd9958 100644--- a/apps/start/src/components/sessions/replay/replay-event-feed.tsx+++ b/apps/start/src/components/sessions/replay/replay-event-feed.tsx@@ -1,13 +1,13 @@+import type { IServiceEvent } from '@openpanel/core';+import { useEffect, useMemo, useRef } from 'react';+import { BrowserChrome } from './browser-chrome';+import { getEventOffsetMs } from './replay-utils';import {useCurrentTime,useReplayContext,} from '@/components/sessions/replay/replay-context';import { ReplayEventItem } from '@/components/sessions/replay/replay-event-item';import { ScrollArea } from '@/components/ui/scroll-area';-import type { IServiceEvent } from '@openpanel/core';-import { useEffect, useMemo, useRef } from 'react';-import { BrowserChrome } from './browser-chrome';-import { getEventOffsetMs } from './replay-utils';type EventWithOffset = { event: IServiceEvent; offsetMs: number };@@ -26,7 +26,9 @@ export function ReplayEventFeed({// Pre-sort events by offset once when events/startTime changes.// This is the expensive part — done once, not on every tick.const sortedEvents = useMemo<EventWithOffset[]>(() => {- if (startTime == null || !isReady) return [];+ if (startTime == null || !isReady) {+ return [];+ }return events.map((ev) => ({ event: ev, offsetMs: getEventOffsetMs(ev, startTime) })).filter(({ offsetMs }) => offsetMs >= -10_000)@@ -54,7 +56,9 @@ export function ReplayEventFeed({useEffect(() => {const viewport = viewportRef.current;- if (!viewport || visibleEvents.length === 0) return;+ if (!viewport || visibleEvents.length === 0) {+ return;+ }const isNewItem = visibleEvents.length > prevCountRef.current;prevCountRef.current = visibleEvents.length;@@ -69,16 +73,16 @@ export function ReplayEventFeed({return (<BrowserChrome- url={false}- controls={<span className="text-lg font-medium">Timeline</span>}className="h-full"+ controls={<span className="font-medium text-lg">Timeline</span>}+ url={false}>- <ScrollArea className="flex-1 min-h-0" ref={viewportRef}>+ <ScrollArea className="min-h-0 flex-1" ref={viewportRef}><div className="flex w-full flex-col">{visibleEvents.map(({ event, offsetMs }) => (<div+ className="fade-in-0 slide-in-from-bottom-3 min-w-0 animate-in fill-mode-both duration-300"key={event.id}- className="animate-in fade-in-0 slide-in-from-bottom-3 min-w-0 duration-300 fill-mode-both"><ReplayEventItemevent={event}@@ -88,15 +92,15 @@ export function ReplayEventFeed({</div>))}{!replayLoading && visibleEvents.length === 0 && (- <div className="py-8 text-center text-sm text-muted-foreground">+ <div className="py-8 text-center text-muted-foreground text-sm">Events will appear as the replay plays.</div>)}{replayLoading &&Array.from({ length: 5 }).map((_, i) => (<div- key={i}className="flex items-center gap-2 border-b px-3 py-2"+ key={i}><div className="h-6 w-6 shrink-0 animate-pulse rounded-full bg-muted" /><div className="flex-1 space-y-1.5">diff --git a/apps/start/src/components/sessions/replay/replay-event-item.tsx b/apps/start/src/components/sessions/replay/replay-event-item.tsxindex 52e6ad8e5..cd23da7ef 100644--- a/apps/start/src/components/sessions/replay/replay-event-item.tsx+++ b/apps/start/src/components/sessions/replay/replay-event-item.tsx@@ -1,6 +1,6 @@+import type { IServiceEvent } from '@openpanel/core';import { EventIcon } from '@/components/events/event-icon';import { cn } from '@/lib/utils';-import type { IServiceEvent } from '@openpanel/core';function formatTime(date: Date | string): string {const d = date instanceof Date ? date : new Date(date);@@ -26,23 +26,23 @@ export function ReplayEventItem({return (<button- type="button"- onClick={onClick}className={cn('col w-full gap-3 border-b px-3 py-2 text-left transition-colors hover:bg-accent',isCurrent ? 'bg-accent/10' : 'bg-card')}+ onClick={onClick}+ type="button"><div className="row items-center gap-2"><div className="flex-shrink-0">- <EventIcon name={event.name} meta={event.meta} size="sm" />+ <EventIcon meta={event.meta} name={event.name} size="sm" /></div><div className="min-w-0 flex-1"><div className="truncate font-medium text-foreground">{displayName}</div></div>- <span className="flex-shrink-0 text-xs tabular-nums text-muted-foreground">+ <span className="flex-shrink-0 text-muted-foreground text-xs tabular-nums">{formatTime(event.createdAt)}</span></div>diff --git a/apps/start/src/components/sessions/replay/replay-player.tsx b/apps/start/src/components/sessions/replay/replay-player.tsxindex 888f7984d..0df5187b1 100644--- a/apps/start/src/components/sessions/replay/replay-player.tsx+++ b/apps/start/src/components/sessions/replay/replay-player.tsx@@ -1,6 +1,6 @@-import { useReplayContext } from '@/components/sessions/replay/replay-context';-import type { ReplayPlayerInstance } from '@/components/sessions/replay/replay-context';import { useEffect, useMemo, useRef, useState } from 'react';+import type { ReplayPlayerInstance } from '@/components/sessions/replay/replay-context';+import { useReplayContext } from '@/components/sessions/replay/replay-context';import 'rrweb-player/dist/style.css';@@ -17,7 +17,9 @@ function getRecordedDimensions('height' in meta.data) {const { width, height } = meta.data as { width: number; height: number };- if (width > 0 && height > 0) return { width, height };+ if (width > 0 && height > 0) {+ return { width, height };+ }}return null;}@@ -54,7 +56,9 @@ export function ReplayPlayer({);useEffect(() => {- if (!events.length || !containerRef.current) return;+ if (!(events.length && containerRef.current)) {+ return;+ }// Clear any previous player DOMcontainerRef.current.innerHTML = '';@@ -74,7 +78,9 @@ export function ReplayPlayer({import('rrweb-player').then((module) => {- if (!containerRef.current || !mounted) return;+ if (!(containerRef.current && mounted)) {+ return;+ }const PlayerConstructor = module.default;player = new PlayerConstructor({@@ -115,30 +121,38 @@ export function ReplayPlayer({// kept in sync by ui-update-player-state above.let wasPlaying = false;handleVisibilityChange = () => {- if (!player) return;+ if (!player) {+ return;+ }if (document.hidden) {wasPlaying = playingState;- if (wasPlaying) player.pause();- } else {if (wasPlaying) {- player.play();- wasPlaying = false;+ player.pause();}+ } else if (wasPlaying) {+ player.play();+ wasPlaying = false;}};document.addEventListener('visibilitychange', handleVisibilityChange);// Notify context — marks isReady = true and sets initial durationconst meta = player.getMetaData();- if (meta.totalTime > 0) setDuration(meta.totalTime);+ if (meta.totalTime > 0) {+ setDuration(meta.totalTime);+ }onPlayerReady(player, meta.startTime);}).catch(() => {- if (mounted) setImportError(true);+ if (mounted) {+ setImportError(true);+ }});const onWindowResize = () => {- if (!containerRef.current || !mounted || !playerRef.current?.$set) return;+ if (!(containerRef.current && mounted && playerRef.current?.$set)) {+ return;+ }const { width: w, height: h } = calcDimensions(containerRef.current.offsetWidth,aspectRatio@@ -177,7 +191,7 @@ export function ReplayPlayer({if (importError) {return (- <div className="flex h-[320px] items-center justify-center bg-black text-sm text-muted-foreground">+ <div className="flex h-[320px] items-center justify-center bg-black text-muted-foreground text-sm">Failed to load replay player.</div>);@@ -186,8 +200,8 @@ export function ReplayPlayer({return (<div className="relative flex w-full justify-center overflow-hidden"><div- ref={containerRef}className="w-full"+ ref={containerRef}style={{ maxHeight: '70vh' }}/></div>diff --git a/apps/start/src/components/sessions/replay/replay-timeline.tsx b/apps/start/src/components/sessions/replay/replay-timeline.tsxindex 55def7f82..e931f9b6d 100644--- a/apps/start/src/components/sessions/replay/replay-timeline.tsx+++ b/apps/start/src/components/sessions/replay/replay-timeline.tsx@@ -1,3 +1,9 @@+import type { IServiceEvent } from '@openpanel/core';+import { AnimatePresence, motion } from 'framer-motion';+import { useCallback, useEffect, useMemo, useRef, useState } from 'react';+import { ReplayPlayPauseButton } from './replay-controls';+import { formatDuration, getEventOffsetMs } from './replay-utils';+import { EventIcon } from '@/components/events/event-icon';import {useCurrentTime,useReplayContext,@@ -8,14 +14,6 @@ import {TooltipProvider,TooltipTrigger,} from '@/components/ui/tooltip';-import type { IServiceEvent } from '@openpanel/core';-import { AnimatePresence, motion } from 'framer-motion';-import { useCallback, useEffect, useMemo, useRef, useState } from 'react';--import { EventIcon } from '@/components/events/event-icon';-import { cn } from '@/lib/utils';-import { ReplayPlayPauseButton } from './replay-controls';-import { formatDuration, getEventOffsetMs } from './replay-utils';export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {const {@@ -49,7 +47,9 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {// Update progress bar and thumb directly via DOM on every tick — no React re-render.useEffect(() => {- if (duration <= 0) return;+ if (duration <= 0) {+ return;+ }return subscribeToCurrentTime((t) => {const pct = Math.max(0, Math.min(100, (t / duration) * 100));if (progressBarRef.current) {@@ -63,7 +63,9 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {const getTimeFromClientX = useCallback((clientX: number) => {- if (!trackRef.current || duration <= 0) return null;+ if (!trackRef.current || duration <= 0) {+ return null;+ }const rect = trackRef.current.getBoundingClientRect();if (rect.width <= 0 || !Number.isFinite(rect.width)) {return null;@@ -82,13 +84,17 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {return;}const info = getTimeFromClientX(e.clientX);- if (info) setHoverInfo(info);+ if (info) {+ setHoverInfo(info);+ }},[getTimeFromClientX]);const handleTrackMouseLeave = useCallback(() => {- if (!isDragging) setHoverInfo(null);+ if (!isDragging) {+ setHoverInfo(null);+ }}, [isDragging]);const handleTrackMouseDown = useCallback(@@ -97,10 +103,13 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {if (e.target !== trackRef.current &&!(e.target as HTMLElement).closest('.replay-track-bg')- )+ ) {return;+ }const info = getTimeFromClientX(e.clientX);- if (info) seek(info.timeMs);+ if (info) {+ seek(info.timeMs);+ }},[getTimeFromClientX, seek]);@@ -119,7 +128,9 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {// Group events that are within 24px of each other on the track.// We need the track width for pixel math — use a stable ref-based calculation.const groupedEvents = useMemo(() => {- if (!eventsWithOffset.length || duration <= 0) return [];+ if (!eventsWithOffset.length || duration <= 0) {+ return [];+ }// Sort by offsetMs so we sweep left-to-rightconst sorted = [...eventsWithOffset].sort(@@ -135,7 +146,7 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {const last = groups[groups.length - 1];const lastPct = last? (last.items[last.items.length - 1]!.offsetMs / duration) * 100- : -Infinity;+ : Number.NEGATIVE_INFINITY;const thisPct = (item.offsetMs / duration) * 100;if (@@ -155,7 +166,9 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {return groups;}, [eventsWithOffset, duration]);- if (!isReady || duration <= 0) return null;+ if (!isReady || duration <= 0) {+ return null;+ }const progressPct = Math.max(0,@@ -166,18 +179,12 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {<TooltipProvider delayDuration={300}><div className="row items-center gap-4 p-4"><ReplayPlayPauseButton />- <div className="col gap-4 flex-1 px-2">+ <div className="col flex-1 gap-4 px-2"><div- ref={trackRef}- role="slider"- aria-valuemin={0}aria-valuemax={duration}+ aria-valuemin={0}aria-valuenow={currentTime}- tabIndex={0}className="relative flex h-8 cursor-pointer items-center outline-0"- onMouseDown={handleTrackMouseDown}- onMouseMove={handleTrackMouseMove}- onMouseLeave={handleTrackMouseLeave}onKeyDown={(e) => {const step = 5000;if (e.key === 'ArrowLeft') {@@ -188,43 +195,49 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {seek(Math.min(duration, currentTime + step));}}}+ onMouseDown={handleTrackMouseDown}+ onMouseLeave={handleTrackMouseLeave}+ onMouseMove={handleTrackMouseMove}+ ref={trackRef}+ role="slider"+ tabIndex={0}>- <div className="replay-track-bg bg-muted h-1.5 w-full overflow-hidden rounded-full">+ <div className="replay-track-bg h-1.5 w-full overflow-hidden rounded-full bg-muted"><div+ className="h-full rounded-full bg-primary"ref={progressBarRef}- className="bg-primary h-full rounded-full"style={{ width: `${progressPct}%` }}/></div><div+ aria-hidden+ className="absolute top-1/2 left-0 z-10 h-4 w-4 -translate-y-1/2 rounded-full border-2 border-primary bg-background shadow-sm"ref={thumbRef}- className="absolute left-0 top-1/2 z-10 h-4 w-4 -translate-y-1/2 rounded-full border-2 border-primary bg-background shadow-sm"style={{ left: `calc(${progressPct}% - 8px)` }}- aria-hidden/>{/* Hover timestamp tooltip */}<AnimatePresence>{hoverInfo && (<motion.div+ animate={{ opacity: 1 }}className="pointer-events-none absolute z-20"+ exit={{ opacity: 0 }}+ initial={{ opacity: 0 }}style={{left: `${hoverInfo.pct * 100}%`,top: 0,bottom: 0,}}- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- exit={{ opacity: 0 }}transition={{ duration: 0.15 }}>{/* Vertical line */}- <div className="absolute left-0 top-1/2 h-4 w-px -translate-x-1/2 -translate-y-1/2 bg-foreground/30" />+ <div className="absolute top-1/2 left-0 h-4 w-px -translate-x-1/2 -translate-y-1/2 bg-foreground/30" />{/* Timestamp badge */}<motion.div- className="absolute bottom-6 left-1/2 mb-1.5 -translate-x-1/2 whitespace-nowrap rounded bg-foreground px-1.5 py-0.5 text-[10px] tabular-nums text-background shadow"- initial={{ opacity: 0, y: 16, scale: 0.5 }}animate={{ opacity: 1, y: 0, scale: 1 }}+ className="absolute bottom-6 left-1/2 mb-1.5 -translate-x-1/2 whitespace-nowrap rounded bg-foreground px-1.5 py-0.5 text-[10px] text-background tabular-nums shadow"exit={{ opacity: 0, y: 16, scale: 0.5 }}+ initial={{ opacity: 0, y: 16, scale: 0.5 }}transition={{ duration: 0.2 }}>{formatDuration(hoverInfo.timeMs)}@@ -239,36 +252,36 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {<Tooltip key={first.event.id}><TooltipTrigger asChild><button- type="button"- data-timeline-event- className="absolute top-1/2 z-[5] flex h-6 w-6 -translate-y-1/2 items-center justify-center transition-transform hover:scale-105"- style={{ left: `${group.pct}%`, marginLeft: -12 }}- onClick={(e) => {- e.stopPropagation();- seek(first.offsetMs);- }}aria-label={isGroup? `${group.items.length} events at ${formatDuration(first.offsetMs)}`: `${first.event.name} at ${formatDuration(first.offsetMs)}`}+ className="absolute top-1/2 z-[5] flex h-6 w-6 -translate-y-1/2 items-center justify-center transition-transform hover:scale-105"+ data-timeline-event+ onClick={(e) => {+ e.stopPropagation();+ seek(first.offsetMs);+ }}+ style={{ left: `${group.pct}%`, marginLeft: -12 }}+ type="button"><EventIcon- name={first.event.name}meta={first.event.meta}+ name={first.event.name}size="sm"/>{isGroup && (- <span className="absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full bg-foreground text-[9px] font-bold leading-none text-background">+ <span className="absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-foreground font-bold text-[9px] text-background leading-none">{group.items.length}</span>)}</button></TooltipTrigger>- <TooltipContent side="top" className="col gap-1.5">+ <TooltipContent className="col gap-1.5" side="top">{group.items.map(({ event: ev, offsetMs }) => (- <div key={ev.id} className="row items-center gap-2">- <EventIcon name={ev.name} meta={ev.meta} size="sm" />+ <div className="row items-center gap-2" key={ev.id}>+ <EventIcon meta={ev.meta} name={ev.name} size="sm" /><span className="font-medium">{ev.name === 'screen_view' ? ev.path : ev.name}</span>diff --git a/apps/start/src/components/sessions/table/index.tsx b/apps/start/src/components/sessions/table/index.tsxindex b26068675..fc7fdf65c 100644--- a/apps/start/src/components/sessions/table/index.tsx+++ b/apps/start/src/components/sessions/table/index.tsx@@ -48,7 +48,6 @@ import { useInViewport } from 'react-in-viewport';import { TableFilterPills } from '@/components/filters/TableFilterPills';import { FullPageEmptyState } from '@/components/full-page-empty-state';import { Skeleton } from '@/components/skeleton';-import { Button } from '@/components/ui/button';import {AnimatedSearchInput,DataTableToolbarContainer,@@ -368,9 +367,9 @@ function SessionTableToolbar({ table }: { table: Table<IServiceSession> }) {value={search}/><TableFilterPills- urlKey="f"categories={['profile', 'group', 'cohort', 'session']}title="Session filters"+ urlKey="f"/></div><DataTableViewOptions table={table} />diff --git a/apps/start/src/components/settings/delete-account.tsx b/apps/start/src/components/settings/delete-account.tsxindex 8be6c4000..deac8bd41 100644--- a/apps/start/src/components/settings/delete-account.tsx+++ b/apps/start/src/components/settings/delete-account.tsx@@ -1,11 +1,11 @@+import { useQuery } from '@tanstack/react-query';+import { Link } from '@tanstack/react-router';+import { TrashIcon } from 'lucide-react';import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';import { Button } from '@/components/ui/button';import { Widget, WidgetBody, WidgetHead } from '@/components/widget';import { useTRPC } from '@/integrations/trpc/react';import { pushModal } from '@/modals';-import { useQuery } from '@tanstack/react-query';-import { Link } from '@tanstack/react-router';-import { TrashIcon } from 'lucide-react';export default function DeleteAccount() {const trpc = useTRPC();@@ -16,7 +16,7 @@ export default function DeleteAccount() {const blocked = blockers.length > 0;return (- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead><span className="title">Delete account</span></WidgetHead>@@ -48,7 +48,7 @@ export default function DeleteAccount() {</AlertDescription></Alert>)}- <div className="flex gap-4 justify-start">+ <div className="flex justify-start gap-4"><Buttondisabled={blocked}icon={TrashIcon}diff --git a/apps/start/src/components/settings/delete-organization.tsx b/apps/start/src/components/settings/delete-organization.tsxindex e81816035..5a4a18e61 100644--- a/apps/start/src/components/settings/delete-organization.tsx+++ b/apps/start/src/components/settings/delete-organization.tsx@@ -1,13 +1,13 @@-import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';-import { Button } from '@/components/ui/button';-import { Widget, WidgetBody, WidgetHead } from '@/components/widget';-import { handleError, useTRPC } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';import type { IServiceOrganization } from '@openpanel/core';import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';import { addHours, format, startOfHour } from 'date-fns';import { TrashIcon } from 'lucide-react';import { toast } from 'sonner';+import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';+import { Button } from '@/components/ui/button';+import { Widget, WidgetBody, WidgetHead } from '@/components/widget';+import { handleError, useTRPC } from '@/integrations/trpc/react';+import { pushModal } from '@/modals';type Props = { organization: IServiceOrganization };@@ -44,7 +44,7 @@ export default function DeleteOrganization({ organization }: Props) {organization.hasSubscription && !organization.isWillBeCanceled;return (- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead><span className="title">Delete Organization</span></WidgetHead>@@ -77,7 +77,7 @@ export default function DeleteOrganization({ organization }: Props) {</AlertDescription></Alert>)}- <div className="flex gap-4 justify-start">+ <div className="flex justify-start gap-4">{organization.deleteAt && (<Buttonloading={cancelDeletionMutation.isPending}diff --git a/apps/start/src/components/settings/delete-project.tsx b/apps/start/src/components/settings/delete-project.tsxindex ac1dcbc38..bb486d8e7 100644--- a/apps/start/src/components/settings/delete-project.tsx+++ b/apps/start/src/components/settings/delete-project.tsx@@ -1,14 +1,14 @@-import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';-import { Button } from '@/components/ui/button';-import { Widget, WidgetBody, WidgetHead } from '@/components/widget';-import { handleError, useTRPC } from '@/integrations/trpc/react';-import { showConfirm } from '@/modals';import type { IServiceProjectWithClients } from '@openpanel/core';import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';import { useRouter } from '@tanstack/react-router';import { addHours, format, startOfHour } from 'date-fns';import { TrashIcon } from 'lucide-react';import { toast } from 'sonner';+import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';+import { Button } from '@/components/ui/button';+import { Widget, WidgetBody, WidgetHead } from '@/components/widget';+import { handleError, useTRPC } from '@/integrations/trpc/react';+import { showConfirm } from '@/modals';type Props = { project: IServiceProjectWithClients };@@ -54,7 +54,7 @@ export default function DeleteProject({ project }: Props) {);return (- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead><span className="title">Delete Project</span></WidgetHead>@@ -89,22 +89,21 @@ export default function DeleteProject({ project }: Props) {</AlertDescription></Alert>)}- <div className="flex gap-4 justify-start">+ <div className="flex justify-start gap-4">{project?.deleteAt && (<Button- variant="outline"disabled={isOrgScheduledForDeletion}+ loading={cancelDeletionMutation.isPending}onClick={() => {cancelDeletionMutation.mutate({ projectId: project.id });}}- loading={cancelDeletionMutation.isPending}+ variant="outline">Cancel deletion</Button>)}<Buttondisabled={!!project?.deleteAt}- variant="destructive"icon={TrashIcon}loading={mutation.isPending}onClick={() => {@@ -116,6 +115,7 @@ export default function DeleteProject({ project }: Props) {},});}}+ variant="destructive">Delete Project</Button>diff --git a/apps/start/src/components/settings/invites/columns.tsx b/apps/start/src/components/settings/invites/columns.tsxindex a5f218983..a93001a37 100644--- a/apps/start/src/components/settings/invites/columns.tsx+++ b/apps/start/src/components/settings/invites/columns.tsx@@ -1,13 +1,11 @@-import { TooltipComplete } from '@/components/tooltip-complete';-import { Badge } from '@/components/ui/badge';-import { DropdownMenuItem } from '@/components/ui/dropdown-menu';-import { useTRPC } from '@/integrations/trpc/react';import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';import type { ColumnDef, Row } from '@tanstack/react-table';import { toast } from 'sonner';-import { ColumnCreatedAt } from '@/components/column-created-at';+import { Badge } from '@/components/ui/badge';import { createActionColumn } from '@/components/ui/data-table/data-table-helpers';+import { DropdownMenuItem } from '@/components/ui/dropdown-menu';+import { useTRPC } from '@/integrations/trpc/react';import type { RouterOutputs } from '@/trpc/client';import { clipboard } from '@/utils/clipboard';@@ -123,13 +121,13 @@ function AccessCell({const project = projects.find((p) => p.id === grant.projectId);if (!project) {return (- <Badge key={grant.projectId} className="mr-1">+ <Badge className="mr-1" key={grant.projectId}>Unknown</Badge>);}return (- <Badge key={grant.projectId} color="blue" className="mr-1">+ <Badge className="mr-1" color="blue" key={grant.projectId}>{project.name}{grant.level === 'read' ? ' (read-only)' : ''}</Badge>diff --git a/apps/start/src/components/settings/invites/index.tsx b/apps/start/src/components/settings/invites/index.tsxindex 4017d1686..885199907 100644--- a/apps/start/src/components/settings/invites/index.tsx+++ b/apps/start/src/components/settings/invites/index.tsx@@ -1,13 +1,13 @@-import type { RouterOutputs } from '@/trpc/client';-+import type { UseQueryResult } from '@tanstack/react-query';+import { PlusIcon } from 'lucide-react';+import { useColumns } from './columns';import { Button } from '@/components/ui/button';import { DataTable } from '@/components/ui/data-table/data-table';import { DataTableToolbar } from '@/components/ui/data-table/data-table-toolbar';import { useTable } from '@/components/ui/data-table/use-table';import { pushModal } from '@/modals';-import type { UseQueryResult } from '@tanstack/react-query';-import { PlusIcon } from 'lucide-react';-import { useColumns } from './columns';+import type { RouterOutputs } from '@/trpc/client';+type CommonProps = {query: UseQueryResult<RouterOutputs['organization']['invitations'], unknown>;};@@ -36,7 +36,7 @@ export const InvitesTable = ({ query }: Props) => {Invite user</Button></DataTableToolbar>- <DataTable table={table} loading={isLoading} />+ <DataTable loading={isLoading} table={table} /></>);};diff --git a/apps/start/src/components/settings/members/columns.tsx b/apps/start/src/components/settings/members/columns.tsxindex cf99ecf87..315cedc50 100644--- a/apps/start/src/components/settings/members/columns.tsx+++ b/apps/start/src/components/settings/members/columns.tsx@@ -1,15 +1,13 @@-import { TooltipComplete } from '@/components/tooltip-complete';-import { DropdownMenuItem } from '@/components/ui/dropdown-menu';-import { useTRPC } from '@/integrations/trpc/react';+import type { IServiceMember } from '@openpanel/core';import { useMutation, useQueryClient } from '@tanstack/react-query';import type { ColumnDef } from '@tanstack/react-table';import { toast } from 'sonner';-import { ColumnCreatedAt } from '@/components/column-created-at';import { Badge } from '@/components/ui/badge';import { createActionColumn } from '@/components/ui/data-table/data-table-helpers';+import { DropdownMenuItem } from '@/components/ui/dropdown-menu';+import { useTRPC } from '@/integrations/trpc/react';import { pushModal } from '@/modals';-import type { IServiceMember } from '@openpanel/core';export function useColumns() {const columns: ColumnDef<IServiceMember>[] = [@@ -18,7 +16,9 @@ export function useColumns() {header: 'Name',cell: ({ row }) => {const user = row.original.user;- if (!user) return null;+ if (!user) {+ return null;+ }return [user.firstName, user.lastName].filter(Boolean).join(' ');},meta: {@@ -30,7 +30,9 @@ export function useColumns() {header: 'Email',cell: ({ row }) => {const user = row.original.user;- if (!user) return null;+ if (!user) {+ return null;+ }return <div className="font-medium">{user.email}</div>;},meta: {@@ -73,7 +75,7 @@ export function useColumns() {return (<div className="row flex-wrap gap-2">{row.original.access?.map((item) => (- <Badge variant={'outline'} key={item.projectId}>+ <Badge key={item.projectId} variant={'outline'}>{item.projectId}</Badge>))}diff --git a/apps/start/src/components/settings/members/index.tsx b/apps/start/src/components/settings/members/index.tsxindex 30cc45c2a..f7d2492c9 100644--- a/apps/start/src/components/settings/members/index.tsx+++ b/apps/start/src/components/settings/members/index.tsx@@ -1,10 +1,9 @@import type { IServiceMember } from '@openpanel/core';-+import type { UseQueryResult } from '@tanstack/react-query';+import { useColumns } from './columns';import { DataTable } from '@/components/ui/data-table/data-table';import { DataTableToolbar } from '@/components/ui/data-table/data-table-toolbar';import { useTable } from '@/components/ui/data-table/use-table';-import type { UseQueryResult } from '@tanstack/react-query';-import { useColumns } from './columns';type CommonProps = {query: UseQueryResult<IServiceMember[], unknown>;@@ -26,7 +25,7 @@ export const MembersTable = ({ query }: Props) => {return (<><DataTableToolbar table={table} />- <DataTable table={table} loading={isLoading} />+ <DataTable loading={isLoading} table={table} /></>);};diff --git a/apps/start/src/components/sidebar-link.tsx b/apps/start/src/components/sidebar-link.tsxindex ce0369607..39a1ac25b 100644--- a/apps/start/src/components/sidebar-link.tsx+++ b/apps/start/src/components/sidebar-link.tsx@@ -1,7 +1,6 @@-import { cn } from '@/utils/cn';import type { LucideIcon } from 'lucide-react';-import { ProjectLink } from '@/components/links';+import { cn } from '@/utils/cn';export function SidebarLink({href,@@ -19,11 +18,11 @@ export function SidebarLink({return (<ProjectLinkclassName={cn(- 'flex items-center gap-2 rounded-md px-3 py-2 font-medium transition-all hover:bg-def-200 text-[13px]',+ 'flex items-center gap-2 rounded-md px-3 py-2 font-medium text-[13px] transition-all hover:bg-def-200',className)}- href={href}exact={exact}+ href={href}><Icon size={20} /><div className="flex-1">{label}</div>diff --git a/apps/start/src/components/sidebar-project-menu.tsx b/apps/start/src/components/sidebar-project-menu.tsxindex db6f3c6c5..febbbf256 100644--- a/apps/start/src/components/sidebar-project-menu.tsx+++ b/apps/start/src/components/sidebar-project-menu.tsx@@ -3,7 +3,6 @@ import { useNavigate } from '@tanstack/react-router';import { AnimatePresence, motion } from 'framer-motion';import {BellIcon,- WorkflowIcon,BookOpenIcon,Building2Icon,ChartLineIcon,@@ -24,6 +23,7 @@ import {UserCircleIcon,UsersIcon,WallpaperIcon,+ WorkflowIcon,} from 'lucide-react';import { useEffect, useState } from 'react';import { SidebarLink } from './sidebar-link';@@ -159,13 +159,13 @@ export function ActionCTAButton() {<DropdownMenu><DropdownMenuTrigger asChild><button- type="button"className={cn('group flex w-full items-center gap-2 rounded-md border border-border bg-def-200 px-3 py-2 text-left',- 'text-[13px] font-medium text-foreground',+ 'font-medium text-[13px] text-foreground','transition-colors hover:bg-def-300','focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring')}+ type="button"><PlusIcon className="size-5 shrink-0" /><div className="relative flex h-5 flex-1 items-center overflow-hidden">diff --git a/apps/start/src/components/sidebar.tsx b/apps/start/src/components/sidebar.tsxindex 9f4c4d649..d461e3399 100644--- a/apps/start/src/components/sidebar.tsx+++ b/apps/start/src/components/sidebar.tsx@@ -147,13 +147,13 @@ export function SidebarContainer({</a>{projectId && (<button- type="button"+ aria-label="Open AI chat"+ className="flex h-12 w-12 items-center justify-center border-border border-r font-medium text-muted-foreground text-sm transition-colors hover:bg-accent hover:text-accent-foreground"onClick={() =>chatOpen ? closeChat() : openChatForContext()}- className="flex h-12 w-12 items-center justify-center border-border border-r font-medium text-muted-foreground text-sm transition-colors hover:bg-accent hover:text-accent-foreground"title="Open AI chat (⌘J)"- aria-label="Open AI chat"+ type="button"><SparklesIcon size={16} /></button>diff --git a/apps/start/src/components/stats.tsx b/apps/start/src/components/stats.tsxindex 51cbe6d14..7f2c423e9 100644--- a/apps/start/src/components/stats.tsx+++ b/apps/start/src/components/stats.tsx@@ -50,7 +50,7 @@ export function StatsCard({<divclassName={cn('font-mono leading-snug',- size === 'sm' ? 'text-sm font-medium' : 'text-lg font-bold'+ size === 'sm' ? 'font-medium text-sm' : 'font-bold text-lg')}>{value}diff --git a/apps/start/src/components/theme-provider.tsx b/apps/start/src/components/theme-provider.tsxindex 37b155a6d..734d3221c 100644--- a/apps/start/src/components/theme-provider.tsx+++ b/apps/start/src/components/theme-provider.tsx@@ -1,15 +1,17 @@-import { useCookieStore } from '@/hooks/use-cookie-store';-import { mapKeys } from '@/utils/object-to-zod-enums';-import { ScriptOnce, useRouteContext } from '@tanstack/react-router';+import { ScriptOnce } from '@tanstack/react-router';import { createIsomorphicFn } from '@tanstack/react-start';-import { type ReactNode, createContext, use, useEffect, useState } from 'react';+import { createContext, type ReactNode, use, useEffect } from 'react';import { z } from 'zod';+import { useCookieStore } from '@/hooks/use-cookie-store';+import { mapKeys } from '@/utils/object-to-zod-enums';const UserThemeSchema = z.enum(['light', 'dark', 'system']).catch('system');const AppThemeSchema = z.enum(['light', 'dark']).catch('light');const clientOnly = <T extends (...args: any[]) => void>(fn: T) => {- if (typeof window === 'undefined') return (() => {}) as unknown as T;+ if (typeof window === 'undefined') {+ return (() => {}) as unknown as T;+ }return fn;};@@ -113,7 +115,9 @@ export function ThemeProvider({ children }: ThemeProviderProps) {);useEffect(() => {- if (userTheme !== 'system') return;+ if (userTheme !== 'system') {+ return;+ }return setupPreferredListener();}, [userTheme]);diff --git a/apps/start/src/components/tooltip-complete.tsx b/apps/start/src/components/tooltip-complete.tsxindex 31fd0f632..3489f16c7 100644--- a/apps/start/src/components/tooltip-complete.tsx+++ b/apps/start/src/components/tooltip-complete.tsx@@ -25,7 +25,7 @@ export function TooltipComplete({{children}</TooltipTrigger><TooltipPortal>- <TooltipContent side={side} disabled={disabled}>+ <TooltipContent disabled={disabled} side={side}>{content}</TooltipContent></TooltipPortal>diff --git a/apps/start/src/components/ui/RenderDots.tsx b/apps/start/src/components/ui/RenderDots.tsxindex 343d73dfc..f5e9bba71 100644--- a/apps/start/src/components/ui/RenderDots.tsx+++ b/apps/start/src/components/ui/RenderDots.tsx@@ -1,7 +1,6 @@-import { cn } from '@/utils/cn';import { Asterisk, ChevronRight } from 'lucide-react';-import { Tooltip, TooltipContent, TooltipTrigger } from './tooltip';+import { cn } from '@/utils/cn';interface RenderDotsProps extends React.HTMLAttributes<HTMLDivElement> {children: string;@@ -30,15 +29,15 @@ export function RenderDots({key={str + (index as number)}>{index !== 0 && (- <ChevronRight className="relative top-[0.9px] !h-3 !w-3 flex-shrink-0" />+ <ChevronRight className="!h-3 !w-3 relative top-[0.9px] flex-shrink-0" />)}{str.includes('[*]') ? (<>{str.replace('[*]', '')}- <Asterisk className="relative top-[0.9px] !h-3 !w-3 flex-shrink-0" />+ <Asterisk className="!h-3 !w-3 relative top-[0.9px] flex-shrink-0" /></>) : str === '*' ? (- <Asterisk className="relative top-[0.9px] !h-3 !w-3 flex-shrink-0" />+ <Asterisk className="!h-3 !w-3 relative top-[0.9px] flex-shrink-0" />) : (str)}diff --git a/apps/start/src/components/ui/accordion.tsx b/apps/start/src/components/ui/accordion.tsxindex 7023215b2..11e6bfd25 100644--- a/apps/start/src/components/ui/accordion.tsx+++ b/apps/start/src/components/ui/accordion.tsx@@ -1,7 +1,7 @@-import { cn } from '@/utils/cn';import * as AccordionPrimitive from '@radix-ui/react-accordion';import { ChevronDown } from 'lucide-react';import * as React from 'react';+import { cn } from '@/utils/cn';const Accordion = AccordionPrimitive.Root;@@ -10,8 +10,8 @@ const AccordionItem = React.forwardRef<React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>>(({ className, ...props }, ref) => (<AccordionPrimitive.Item- ref={ref}className={cn('border-b [&:last-child]:border-b-0', className)}+ ref={ref}{...props}/>));@@ -23,11 +23,11 @@ const AccordionTrigger = React.forwardRef<>(({ className, children, ...props }, ref) => (<AccordionPrimitive.Header className="flex"><AccordionPrimitive.Trigger- ref={ref}className={cn('flex flex-1 items-center justify-between py-4 font-medium transition-all [&[data-state=closed]]:hover:bg-muted/30 [&[data-state=open]>svg]:rotate-180',className)}+ ref={ref}{...props}>{children}@@ -42,11 +42,11 @@ const AccordionContent = React.forwardRef<React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>>(({ className, children, ...props }, ref) => (<AccordionPrimitive.Content+ className="overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"ref={ref}- className="overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"{...props}>- <div className={cn('pb-4 pt-0', className)}>{children}</div>+ <div className={cn('pt-0 pb-4', className)}>{children}</div></AccordionPrimitive.Content>));diff --git a/apps/start/src/components/ui/alert-dialog.tsx b/apps/start/src/components/ui/alert-dialog.tsxindex 2d1baa50e..682c0cc9e 100644--- a/apps/start/src/components/ui/alert-dialog.tsx+++ b/apps/start/src/components/ui/alert-dialog.tsx@@ -1,7 +1,7 @@-import { buttonVariants } from '@/components/ui/button';-import { cn } from '@/utils/cn';import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';import * as React from 'react';+import { buttonVariants } from '@/components/ui/button';+import { cn } from '@/utils/cn';const AlertDialog = AlertDialogPrimitive.Root;@@ -15,7 +15,7 @@ const AlertDialogOverlay = React.forwardRef<>(({ className, children, ...props }, ref) => (<AlertDialogPrimitive.OverlayclassName={cn(- 'fixed inset-0 z-50 bg-card/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-card/80 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in',className)}{...props}@@ -31,11 +31,11 @@ const AlertDialogContent = React.forwardRef<<AlertDialogPortal><AlertDialogOverlay /><AlertDialogPrimitive.Content- ref={ref}className={cn(- 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg md:w-full',className)}+ ref={ref}{...props}/></AlertDialogPortal>@@ -75,8 +75,8 @@ const AlertDialogTitle = React.forwardRef<React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>>(({ className, ...props }, ref) => (<AlertDialogPrimitive.Title+ className={cn('font-semibold text-lg', className)}ref={ref}- className={cn('text-lg font-semibold', className)}{...props}/>));@@ -87,8 +87,8 @@ const AlertDialogDescription = React.forwardRef<React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>>(({ className, ...props }, ref) => (<AlertDialogPrimitive.Description+ className={cn('text-muted-foreground', className)}ref={ref}- className={cn(' text-muted-foreground', className)}{...props}/>));@@ -100,8 +100,8 @@ const AlertDialogAction = React.forwardRef<React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>>(({ className, ...props }, ref) => (<AlertDialogPrimitive.Action- ref={ref}className={cn(buttonVariants(), className)}+ ref={ref}{...props}/>));@@ -112,12 +112,12 @@ const AlertDialogCancel = React.forwardRef<React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>>(({ className, ...props }, ref) => (<AlertDialogPrimitive.Cancel- ref={ref}className={cn(buttonVariants({ variant: 'outline' }),'mt-2 sm:mt-0',className)}+ ref={ref}{...props}/>));diff --git a/apps/start/src/components/ui/alert.tsx b/apps/start/src/components/ui/alert.tsxindex 30bd82278..827845271 100644--- a/apps/start/src/components/ui/alert.tsx+++ b/apps/start/src/components/ui/alert.tsx@@ -1,10 +1,10 @@-import { cn } from '@/utils/cn';-import { cva } from 'class-variance-authority';import type { VariantProps } from 'class-variance-authority';+import { cva } from 'class-variance-authority';import * as React from 'react';+import { cn } from '@/utils/cn';const alertVariants = cva(- 'relative w-full rounded-lg border p-4 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7',+ 'relative w-full rounded-lg border p-4 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:top-4 [&>svg]:left-4 [&>svg]:text-foreground [&>svg~*]:pl-7',{variants: {variant: {@@ -12,7 +12,7 @@ const alertVariants = cva(destructive:'border-destructive text-destructive dark:border-destructive [&>svg]:text-destructive',warning:- 'bg-orange-400/10 border-orange-400 text-orange-600 dark:border-orange-400 [&>svg]:text-orange-400',+ 'border-orange-400 bg-orange-400/10 text-orange-600 dark:border-orange-400 [&>svg]:text-orange-400',},},defaultVariants: {@@ -26,9 +26,9 @@ const Alert = React.forwardRef<React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>>(({ className, variant, ...props }, ref) => (<div+ className={cn(alertVariants({ variant }), className)}ref={ref}role="alert"- className={cn(alertVariants({ variant }), className)}{...props}/>));@@ -39,8 +39,8 @@ const AlertTitle = React.forwardRef<React.HTMLAttributes<HTMLHeadingElement>>(({ className, children, ...props }, ref) => (<h5- ref={ref}className={cn('mb-1 font-medium leading-none tracking-tight', className)}+ ref={ref}{...props}>{children}@@ -53,8 +53,8 @@ const AlertDescription = React.forwardRef<React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (<div+ className={cn('[&_p]:leading-relaxed', className)}ref={ref}- className={cn(' [&_p]:leading-relaxed', className)}{...props}/>));diff --git a/apps/start/src/components/ui/avatar.tsx b/apps/start/src/components/ui/avatar.tsxindex 12a65a65e..fc2643dea 100644--- a/apps/start/src/components/ui/avatar.tsx+++ b/apps/start/src/components/ui/avatar.tsx@@ -1,17 +1,17 @@-import { cn } from '@/utils/cn';import * as AvatarPrimitive from '@radix-ui/react-avatar';import * as React from 'react';+import { cn } from '@/utils/cn';const Avatar = React.forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>,React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>>(({ className, ...props }, ref) => (<AvatarPrimitive.Root- ref={ref}className={cn(- 'relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full ',+ 'relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full',className)}+ ref={ref}{...props}/>));@@ -22,8 +22,8 @@ const AvatarImage = React.forwardRef<React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>>(({ className, ...props }, ref) => (<AvatarPrimitive.Image- ref={ref}className={cn('aspect-square h-full w-full', className)}+ ref={ref}{...props}/>));@@ -34,11 +34,11 @@ const AvatarFallback = React.forwardRef<React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>>(({ className, ...props }, ref) => (<AvatarPrimitive.Fallback- ref={ref}className={cn('flex h-full w-full items-center justify-center rounded-full bg-primary text-white',className)}+ ref={ref}{...props}/>));diff --git a/apps/start/src/components/ui/badge.tsx b/apps/start/src/components/ui/badge.tsxindex b086c711e..6366c4943 100644--- a/apps/start/src/components/ui/badge.tsx+++ b/apps/start/src/components/ui/badge.tsx@@ -1,11 +1,10 @@import { Slot } from '@radix-ui/react-slot';-import { type VariantProps, cva } from 'class-variance-authority';+import { cva, type VariantProps } from 'class-variance-authority';import type * as React from 'react';-import { cn } from '@/lib/utils';const badgeVariants = cva(- 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',+ 'inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-md border px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3',{variants: {variant: {@@ -19,7 +18,7 @@ const badgeVariants = cva(secondary:'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',destructive:- 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',+ 'border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90',outline:'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',},@@ -41,8 +40,8 @@ function Badge({return (<Comp- data-slot="badge"className={cn(badgeVariants({ variant }), className)}+ data-slot="badge"{...props}/>);diff --git a/apps/start/src/components/ui/carousel.tsx b/apps/start/src/components/ui/carousel.tsxindex 0dc7baf2d..5488564f6 100644--- a/apps/start/src/components/ui/carousel.tsx+++ b/apps/start/src/components/ui/carousel.tsx@@ -1,10 +1,10 @@-import { Button } from '@/components/ui/button';-import { cn } from '@/utils/cn';import Autoplay from 'embla-carousel-autoplay';-import useEmblaCarousel from 'embla-carousel-react';import type { UseEmblaCarouselType } from 'embla-carousel-react';+import useEmblaCarousel from 'embla-carousel-react';import { ArrowLeft, ArrowRight } from 'lucide-react';import * as React from 'react';+import { Button } from '@/components/ui/button';+import { cn } from '@/utils/cn';type CarouselApi = UseEmblaCarouselType[1];type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;@@ -96,7 +96,7 @@ const Carousel = React.forwardRef<);React.useEffect(() => {- if (!api || !setApi) {+ if (!(api && setApi)) {return;}@@ -121,7 +121,7 @@ const Carousel = React.forwardRef<<CarouselContext.Providervalue={{carouselRef,- api: api,+ api,opts,orientation:orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),@@ -137,11 +137,11 @@ const Carousel = React.forwardRef<}}><div- ref={ref}- onKeyDownCapture={handleKeyDown}+ aria-roledescription="carousel"className={cn('relative', className)}+ onKeyDownCapture={handleKeyDown}+ ref={ref}role="region"- aria-roledescription="carousel"{...props}>{children}@@ -159,14 +159,14 @@ const CarouselContent = React.forwardRef<const { carouselRef, orientation } = useCarousel();return (- <div ref={carouselRef} className="overflow-hidden">+ <div className="overflow-hidden" ref={carouselRef}><div- ref={ref}className={cn('flex',orientation === 'horizontal' ? '' : 'flex-col',className)}+ ref={ref}{...props}/></div>@@ -182,14 +182,14 @@ const CarouselItem = React.forwardRef<return (<div- ref={ref}- role="group"aria-roledescription="slide"className={cn('min-w-0 shrink-0 grow-0 basis-full',orientation === 'horizontal' ? 'pl-4' : 'pt-4',className)}+ ref={ref}+ role="group"{...props}/>);@@ -204,18 +204,18 @@ const CarouselPrevious = React.forwardRef<return (<Button- ref={ref}- variant={variant}- size={size}className={cn(- 'absolute h-10 w-10 rounded-full hover:scale-100 hover:translate-y-[-50%] transition-all duration-200',+ 'absolute h-10 w-10 rounded-full transition-all duration-200 hover:translate-y-[-50%] hover:scale-100',orientation === 'horizontal'- ? 'left-6 top-1/2 -translate-y-1/2'+ ? 'top-1/2 left-6 -translate-y-1/2': '-top-12 left-1/2 -translate-x-1/2 rotate-90',className)}disabled={!canScrollPrev}onClick={scrollPrev}+ ref={ref}+ size={size}+ variant={variant}{...props}><ArrowLeft className="h-4 w-4" />@@ -233,18 +233,18 @@ const CarouselNext = React.forwardRef<return (<Button- ref={ref}- variant={variant}- size={size}className={cn(- 'absolute h-10 w-10 rounded-full hover:scale-100 hover:translate-y-[-50%] transition-all duration-200',+ 'absolute h-10 w-10 rounded-full transition-all duration-200 hover:translate-y-[-50%] hover:scale-100',orientation === 'horizontal'- ? 'right-6 top-1/2 -translate-y-1/2'+ ? 'top-1/2 right-6 -translate-y-1/2': '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',className)}disabled={!canScrollNext}onClick={scrollNext}+ ref={ref}+ size={size}+ variant={variant}{...props}><ArrowRight className="h-4 w-4" />diff --git a/apps/start/src/components/ui/checkbox.tsx b/apps/start/src/components/ui/checkbox.tsxindex 39d794b81..d65c5dad5 100644--- a/apps/start/src/components/ui/checkbox.tsx+++ b/apps/start/src/components/ui/checkbox.tsx@@ -1,7 +1,7 @@-import { cn } from '@/utils/cn';import * as CheckboxPrimitive from '@radix-ui/react-checkbox';import { Check } from 'lucide-react';import * as React from 'react';+import { cn } from '@/utils/cn';export const DumpCheckbox = ({ checked }: { checked: boolean }) => {return (@@ -23,11 +23,11 @@ const Checkbox = React.forwardRef<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>>(({ className, ...props }, ref) => (<CheckboxPrimitive.Root- ref={ref}className={cn('block h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',className)}+ ref={ref}{...props}><CheckboxPrimitive.Indicatordiff --git a/apps/start/src/components/ui/combobox-advanced.tsx b/apps/start/src/components/ui/combobox-advanced.tsxindex 6b5bd2eb2..1ebe9ca21 100644--- a/apps/start/src/components/ui/combobox-advanced.tsx+++ b/apps/start/src/components/ui/combobox-advanced.tsx@@ -1,9 +1,6 @@-import { Badge } from '@/components/ui/badge';-import { Command, CommandInput, CommandItem } from '@/components/ui/command';import { ChevronsUpDownIcon } from 'lucide-react';import VirtualList from 'rc-virtual-list';import * as React from 'react';-import { Button, type ButtonProps } from './button';import { DumpCheckbox } from './checkbox';import {@@ -12,6 +9,8 @@ import {PopoverPortal,PopoverTrigger,} from './popover';+import { Badge } from '@/components/ui/badge';+import { Command, CommandInput, CommandItem } from '@/components/ui/command';type IValue = any;type IItem = Record<'value' | 'label', IValue>;@@ -60,6 +59,7 @@ export function ComboboxAdvanced({const checked = !!value.find((s) => s === desanitize(item.value));return (<CommandItem+ className={'flex cursor-pointer items-center gap-2'}onMouseDown={(e) => {e.preventDefault();e.stopPropagation();@@ -72,7 +72,6 @@ export function ComboboxAdvanced({: [...value, desanitize(item.value)]);}}- className={'flex cursor-pointer items-center gap-2'}value={item.value}><DumpCheckbox checked={checked} />@@ -102,7 +101,7 @@ export function ComboboxAdvanced({}, [inputValue, selectables, items]);const trigger = children ?? (- <Button variant={'outline'} className={className} size={size} autoHeight>+ <Button autoHeight className={className} size={size} variant={'outline'}><div className="flex w-full flex-wrap gap-1">{value.length === 0 && placeholder}{value.map((val) => {@@ -118,23 +117,23 @@ export function ComboboxAdvanced({);return (- <Popover open={open} onOpenChange={setOpen}>+ <Popover onOpenChange={setOpen} open={open}><PopoverTrigger asChild>{trigger}</PopoverTrigger><PopoverPortal>- <PopoverContent className="w-full max-w-md p-0" align="start">+ <PopoverContent align="start" className="w-full max-w-md p-0"><Command shouldFilter={false}><CommandInput+ onValueChange={setInputValue}placeholder="Search"value={inputValue}- onValueChange={setInputValue}/><VirtualList- height={Math.min(items.length * 32, 300)}data={data.map((item) => ({...item,label: sanitize(item.label),value: sanitize(item.value),}))}+ height={Math.min(items.length * 32, 300)}itemHeight={32}itemKey="value">diff --git a/apps/start/src/components/ui/combobox-events.tsx b/apps/start/src/components/ui/combobox-events.tsxindex e8171e8de..b3f5eabf0 100644--- a/apps/start/src/components/ui/combobox-events.tsx+++ b/apps/start/src/components/ui/combobox-events.tsx@@ -1,3 +1,8 @@+import { PopoverPortal } from '@radix-ui/react-popover';+import { CheckIcon, ChevronsUpDown, GanttChartIcon } from 'lucide-react';+import VirtualList from 'rc-virtual-list';+import * as React from 'react';+import { EventIcon } from '../events/event-icon';import type { ButtonProps } from '@/components/ui/button';import { Button } from '@/components/ui/button';import {@@ -14,11 +19,6 @@ import {import { useNumber } from '@/hooks/use-numer-formatter';import type { RouterOutputs } from '@/trpc/client';import { cn } from '@/utils/cn';-import { PopoverPortal } from '@radix-ui/react-popover';-import { CheckIcon, ChevronsUpDown, GanttChartIcon } from 'lucide-react';-import VirtualList from 'rc-virtual-list';-import * as React from 'react';-import { EventIcon } from '../events/event-icon';/*** Type-safe ComboboxEvents component that supports both single and multiple selection.@@ -129,30 +129,30 @@ export function ComboboxEvents<};return (- <Popover open={open} onOpenChange={setOpen}>+ <Popover onOpenChange={setOpen} open={open}><PopoverTrigger asChild><Button- disabled={disabled}- size={size}- variant="outline"- role="combobox"aria-expanded={open}className={cn('justify-between',!!error && 'border-destructive',className)}+ disabled={disabled}+ role="combobox"+ size={size}+ variant="outline"><div className="flex min-w-0 items-center">{current?.meta ? (<EventIcon- name={current.name}+ className="mr-2 shrink-0"meta={current.meta}+ name={current.name}size="xs"- className="mr-2 shrink-0"/>) : (- <GanttChartIcon size={16} className="mr-2 shrink-0" />+ <GanttChartIcon className="mr-2 shrink-0" size={16} />)}<span className="overflow-hidden text-ellipsis whitespace-nowrap">{renderTriggerContent()}@@ -163,52 +163,54 @@ export function ComboboxEvents<</PopoverTrigger><PopoverPortal><PopoverContent- className="w-full max-w-[33em] max-sm:max-w-[100vw] p-0"align={align}+ className="w-full max-w-[33em] p-0 max-sm:max-w-[100vw]"portal={portal}><Command shouldFilter={false}>{searchable === true && (<CommandInput+ onValueChange={setSearch}placeholder="Search event..."value={search}- onValueChange={setSearch}/>)}<CommandEmpty>Nothing selected</CommandEmpty><VirtualList- height={300}+ className="w-[33em] max-sm:max-w-[100vw]"data={items.filter((item) => {- if (search === '') return true;+ if (search === '') {+ return true;+ }return item.name.toLowerCase().includes(search.toLowerCase());})}+ height={300}itemHeight={32}itemKey="value"- className="w-[33em] max-sm:max-w-[100vw]">{(item) => {return (<CommandItemclassName={cn(- 'p-4 py-2.5 gap-4',+ 'gap-4 p-4 py-2.5',selectedValues.includes(item.name as T) && 'bg-accent')}key={item.name}- value={item.name}onSelect={(currentValue) => {handleSelection(item.name);}}+ value={item.name}>{selectedValues.includes(item.name as T) ? (<CheckIcon className="h-4 w-4 flex-shrink-0" />) : (- <EventIcon name={item.name} meta={item.meta} size="sm" />+ <EventIcon meta={item.meta} name={item.name} size="sm" />)}- <span className="font-medium flex-1 truncate">+ <span className="flex-1 truncate font-medium">{item.name === '*' ? 'Any events' : item.name}</span>- <span className="text-muted-foreground font-mono font-medium">+ <span className="font-medium font-mono text-muted-foreground">{number.short(item.count)}</span></CommandItem>diff --git a/apps/start/src/components/ui/combobox.tsx b/apps/start/src/components/ui/combobox.tsxindex 8cc4180fc..62c218b0e 100644--- a/apps/start/src/components/ui/combobox.tsx+++ b/apps/start/src/components/ui/combobox.tsx@@ -1,3 +1,8 @@+import { PopoverPortal } from '@radix-ui/react-popover';+import type { LucideIcon } from 'lucide-react';+import { Check, ChevronsUpDown } from 'lucide-react';+import VirtualList from 'rc-virtual-list';+import * as React from 'react';import type { ButtonProps } from '@/components/ui/button';import { Button } from '@/components/ui/button';import {@@ -12,11 +17,6 @@ import {PopoverTrigger,} from '@/components/ui/popover';import { cn } from '@/utils/cn';-import { PopoverPortal } from '@radix-ui/react-popover';-import type { LucideIcon } from 'lucide-react';-import { Check, ChevronsUpDown } from 'lucide-react';-import VirtualList from 'rc-virtual-list';-import * as React from 'react';export interface ComboboxProps<T> {placeholder: string;@@ -72,23 +72,23 @@ export function Combobox<T extends string>({}return (- <Popover open={open} onOpenChange={setOpen}>+ <Popover onOpenChange={setOpen} open={open}><PopoverTrigger asChild>{children ?? (<Button- disabled={disabled}- size={size}- variant="outline"- role="combobox"aria-expanded={open}className={cn('justify-between',!!error && 'border-destructive',className)}+ disabled={disabled}+ role="combobox"+ size={size}+ variant="outline"><div className="flex min-w-0 items-center">- {Icon ? <Icon size={16} className="mr-2 shrink-0" /> : null}+ {Icon ? <Icon className="mr-2 shrink-0" size={16} /> : null}<span className="overflow-hidden text-ellipsis whitespace-nowrap">{value ? (find(value)?.label ?? 'No match') : placeholder}</span>@@ -99,16 +99,16 @@ export function Combobox<T extends string>({</PopoverTrigger><PopoverPortal><PopoverContent- className="w-full max-w-md p-0"align={align}+ className="w-full max-w-md p-0"portal={portal}><Command shouldFilter={false}>{searchable === true && (<CommandInput+ onValueChange={setSearch}placeholder="Search item..."value={search}- onValueChange={setSearch}/>)}{typeof onCreate === 'function' && search ? (@@ -127,24 +127,26 @@ export function Combobox<T extends string>({<CommandEmpty>Nothing selected</CommandEmpty>)}<VirtualList- height={Math.min(items.length * 32, 300)}+ className="min-w-60"data={items.filter((item) => {- if (search === '') return true;+ if (search === '') {+ return true;+ }return item.label.toLowerCase().includes(search.toLowerCase());})}+ height={Math.min(items.length * 32, 300)}itemHeight={32}itemKey="value"- className="min-w-60">{(item) => (<CommandItemkey={item.value}- value={item.value}onSelect={(currentValue) => {const value = find(currentValue)?.value ?? currentValue;onChange(value as T);setOpen(false);}}+ value={item.value}{...(item.disabled && { disabled: true })}><Checkdiff --git a/apps/start/src/components/ui/command.tsx b/apps/start/src/components/ui/command.tsxindex 222fdc6a2..45c06ac3f 100644--- a/apps/start/src/components/ui/command.tsx+++ b/apps/start/src/components/ui/command.tsx@@ -1,7 +1,6 @@import { Command as CommandPrimitive } from 'cmdk';import { SearchIcon } from 'lucide-react';import type * as React from 'react';-import {Dialog,DialogContent,@@ -17,11 +16,11 @@ function Command({}: React.ComponentProps<typeof CommandPrimitive>) {return (<CommandPrimitive- data-slot="command"className={cn(- 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',+ 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',className)}+ data-slot="command"{...props}/>);@@ -50,7 +49,7 @@ function CommandDialog({className={cn('overflow-hidden p-0', className)}showCloseButton={showCloseButton}>- <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">+ <Command className="**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">{children}</Command></DialogContent>@@ -64,16 +63,16 @@ function CommandInput({}: React.ComponentProps<typeof CommandPrimitive.Input>) {return (<div- data-slot="command-input-wrapper"className="flex h-9 items-center gap-2 border-b px-3"+ data-slot="command-input-wrapper"><SearchIcon className="size-4 shrink-0 opacity-50" /><CommandPrimitive.Input- data-slot="command-input"className={cn(- 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',+ 'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',className)}+ data-slot="command-input"{...props}/></div>@@ -86,11 +85,11 @@ function CommandList({}: React.ComponentProps<typeof CommandPrimitive.List>) {return (<CommandPrimitive.List- data-slot="command-list"className={cn(- 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',+ 'max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden',className)}+ data-slot="command-list"{...props}/>);@@ -101,8 +100,8 @@ function CommandEmpty({}: React.ComponentProps<typeof CommandPrimitive.Empty>) {return (<CommandPrimitive.Empty- data-slot="command-empty"className="py-6 text-center text-sm"+ data-slot="command-empty"{...props}/>);@@ -114,11 +113,11 @@ function CommandGroup({}: React.ComponentProps<typeof CommandPrimitive.Group>) {return (<CommandPrimitive.Group- data-slot="command-group"className={cn(- 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',+ 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs',className)}+ data-slot="command-group"{...props}/>);@@ -130,8 +129,8 @@ function CommandSeparator({}: React.ComponentProps<typeof CommandPrimitive.Separator>) {return (<CommandPrimitive.Separator+ className={cn('-mx-1 h-px bg-border', className)}data-slot="command-separator"- className={cn('bg-border -mx-1 h-px', className)}{...props}/>);@@ -143,11 +142,11 @@ function CommandItem({}: React.ComponentProps<typeof CommandPrimitive.Item>) {return (<CommandPrimitive.Item- data-slot="command-item"className={cn(- "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",className)}+ data-slot="command-item"{...props}/>);@@ -159,11 +158,11 @@ function CommandShortcut({}: React.ComponentProps<'span'>) {return (<span- data-slot="command-shortcut"className={cn(- 'text-muted-foreground ml-auto text-xs tracking-widest',+ 'ml-auto text-muted-foreground text-xs tracking-widest',className)}+ data-slot="command-shortcut"{...props}/>);diff --git a/apps/start/src/components/ui/data-table/data-table-column-header.tsx b/apps/start/src/components/ui/data-table/data-table-column-header.tsxindex 892506f54..a836be991 100644--- a/apps/start/src/components/ui/data-table/data-table-column-header.tsx+++ b/apps/start/src/components/ui/data-table/data-table-column-header.tsx@@ -1,17 +1,11 @@import type { Column } from '@tanstack/react-table';import {- ChevronDown,ChevronDownIcon,- ChevronUp,- ChevronUpIcon,- ChevronsUpDown,ChevronsUpDownIcon,- EyeOff,+ ChevronUpIcon,EyeOffIcon,- X,XIcon,} from 'lucide-react';-import {DropdownMenu,DropdownMenuCheckboxItem,@@ -33,7 +27,7 @@ export function DataTableColumnHeader<TData, TValue>({className,...props}: DataTableColumnHeaderProps<TData, TValue>) {- if (!column.getCanSort() && !column.getCanHide()) {+ if (!(column.getCanSort() || column.getCanHide())) {return <div className={cn(className)}>{title}</div>;}@@ -41,7 +35,7 @@ export function DataTableColumnHeader<TData, TValue>({<DropdownMenu><DropdownMenuTriggerclassName={cn(- 'text-[10px] uppercase -ml-1.5 flex h-8 items-center gap-1.5 rounded-md px-2 py-1.5 hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring data-[state=open]:bg-accent [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground',+ '-ml-1.5 flex h-8 items-center gap-1.5 rounded-md px-2 py-1.5 text-[10px] uppercase hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring data-[state=open]:bg-accent [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground',className)}{...props}@@ -60,16 +54,16 @@ export function DataTableColumnHeader<TData, TValue>({{column.getCanSort() && (<><DropdownMenuCheckboxItem- className="relative pr-8 pl-2 [&>span:first-child]:right-2 [&>span:first-child]:left-auto [&_svg]:text-muted-foreground"checked={column.getIsSorted() === 'asc'}+ className="relative pr-8 pl-2 [&>span:first-child]:right-2 [&>span:first-child]:left-auto [&_svg]:text-muted-foreground"onClick={() => column.toggleSorting(false)}><ChevronUpIcon className="size-4" />Asc</DropdownMenuCheckboxItem><DropdownMenuCheckboxItem- className="relative pr-8 pl-2 [&>span:first-child]:right-2 [&>span:first-child]:left-auto [&_svg]:text-muted-foreground"checked={column.getIsSorted() === 'desc'}+ className="relative pr-8 pl-2 [&>span:first-child]:right-2 [&>span:first-child]:left-auto [&_svg]:text-muted-foreground"onClick={() => column.toggleSorting(true)}><ChevronDownIcon className="size-4" />@@ -88,8 +82,8 @@ export function DataTableColumnHeader<TData, TValue>({)}{column.getCanHide() && (<DropdownMenuCheckboxItem- className="relative pr-8 pl-2 [&>span:first-child]:right-2 [&>span:first-child]:left-auto [&_svg]:text-muted-foreground"checked={!column.getIsVisible()}+ className="relative pr-8 pl-2 [&>span:first-child]:right-2 [&>span:first-child]:left-auto [&_svg]:text-muted-foreground"onClick={() => column.toggleVisibility(false)}><EyeOffIcon className="size-4" />diff --git a/apps/start/src/components/ui/data-table/data-table-date-filter.tsx b/apps/start/src/components/ui/data-table/data-table-date-filter.tsxindex 59d320eb4..0dcc7f185 100644--- a/apps/start/src/components/ui/data-table/data-table-date-filter.tsx+++ b/apps/start/src/components/ui/data-table/data-table-date-filter.tsx@@ -1,8 +1,7 @@import type { Column } from '@tanstack/react-table';-import { CalendarIcon, XCircle, XCircleIcon } from 'lucide-react';+import { CalendarIcon, XCircleIcon } from 'lucide-react';import * as React from 'react';import type { DateRange } from 'react-day-picker';-import { Button } from '@/components/ui/button';import { Calendar } from '@/components/ui/calendar';import {@@ -20,11 +19,13 @@ function getIsDateRange(value: DateSelection): value is DateRange {}function parseAsDate(timestamp: number | string | undefined): Date | undefined {- if (!timestamp) return undefined;+ if (!timestamp) {+ return undefined;+ }const numericTimestamp =typeof timestamp === 'string' ? Number(timestamp) : timestamp;const date = new Date(numericTimestamp);- return !Number.isNaN(date.getTime()) ? date : undefined;+ return Number.isNaN(date.getTime()) ? undefined : date;}function parseColumnFilterValue(value: unknown) {@@ -107,15 +108,21 @@ export function DataTableDateFilter<TData>({const hasValue = React.useMemo(() => {if (multiple) {- if (!getIsDateRange(selectedDates)) return false;+ if (!getIsDateRange(selectedDates)) {+ return false;+ }return selectedDates.from || selectedDates.to;}- if (!Array.isArray(selectedDates)) return false;+ if (!Array.isArray(selectedDates)) {+ return false;+ }return selectedDates.length > 0;}, [multiple, selectedDates]);const formatDateRange = React.useCallback((range: DateRange) => {- if (!range.from && !range.to) return '';+ if (!(range.from || range.to)) {+ return '';+ }if (range.from && range.to) {return `${formatDate(range.from)} - ${formatDate(range.to)}`;}@@ -124,7 +131,9 @@ export function DataTableDateFilter<TData>({const label = React.useMemo(() => {if (multiple) {- if (!getIsDateRange(selectedDates)) return null;+ if (!getIsDateRange(selectedDates)) {+ return null;+ }const hasSelectedDates = selectedDates.from || selectedDates.to;const dateText = hasSelectedDates@@ -137,8 +146,8 @@ export function DataTableDateFilter<TData>({{hasSelectedDates && (<><Separator- orientation="vertical"className="mx-0.5 data-[orientation=vertical]:h-4"+ orientation="vertical"/><span>{dateText}</span></>@@ -147,7 +156,9 @@ export function DataTableDateFilter<TData>({);}- if (getIsDateRange(selectedDates)) return null;+ if (getIsDateRange(selectedDates)) {+ return null;+ }const hasSelectedDate = selectedDates.length > 0;const dateText = hasSelectedDate@@ -160,8 +171,8 @@ export function DataTableDateFilter<TData>({{hasSelectedDate && (<><Separator- orientation="vertical"className="mx-0.5 data-[orientation=vertical]:h-4"+ orientation="vertical"/><span>{dateText}</span></>@@ -173,47 +184,47 @@ export function DataTableDateFilter<TData>({return (<Popover><PopoverTrigger asChild>- <Button variant="outline" size="sm" className="border-dashed">+ <Button className="border-dashed" size="sm" variant="outline">{hasValue ? (<div+ aria-label={`Clear ${title} filter`}+ className="rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"+ onClick={onReset}onKeyDown={onReset}role="button"- aria-label={`Clear ${title} filter`}tabIndex={0}- onClick={onReset}- className="rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">- <XCircleIcon className="size-4 mr-2" />+ <XCircleIcon className="mr-2 size-4" /></div>) : (- <CalendarIcon className="size-4 mr-2" />+ <CalendarIcon className="mr-2 size-4" />)}{label}</Button></PopoverTrigger><PopoverContent- className="w-auto p-0 rounded-lg overflow-hidden"align="start"+ className="w-auto overflow-hidden rounded-lg p-0">{multiple ? (<CalendarinitialFocusmode="range"+ onSelect={onSelect}selected={getIsDateRange(selectedDates)? selectedDates: { from: undefined, to: undefined }}- onSelect={onSelect}/>) : (<CalendarinitialFocusmode="single"+ onSelect={onSelect}selected={- !getIsDateRange(selectedDates) ? selectedDates[0] : undefined+ getIsDateRange(selectedDates) ? undefined : selectedDates[0]}- onSelect={onSelect}/>)}</PopoverContent>diff --git a/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsx b/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsxindex ba1e34f3c..088cb07c6 100644--- a/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsx+++ b/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsx@@ -1,14 +1,6 @@import type { Column } from '@tanstack/react-table';-import {- Check,- CheckIcon,- PlusCircle,- PlusCircleIcon,- XCircle,- XCircleIcon,-} from 'lucide-react';+import { CheckIcon, PlusCircleIcon, XCircleIcon } from 'lucide-react';import * as React from 'react';-import { Badge } from '@/components/ui/badge';import { Button } from '@/components/ui/button';import {@@ -51,7 +43,9 @@ export function DataTableFacetedFilter<TData, TValue>({const onItemSelect = React.useCallback((option: Option, isSelected: boolean) => {- if (!column) return;+ if (!column) {+ return;+ }if (multiple) {const newSelectedValues = new Set(selectedValues);@@ -79,41 +73,41 @@ export function DataTableFacetedFilter<TData, TValue>({);return (- <Popover open={open} onOpenChange={setOpen}>+ <Popover onOpenChange={setOpen} open={open}><PopoverTrigger asChild>- <Button variant="outline" size="sm" className="border-dashed">+ <Button className="border-dashed" size="sm" variant="outline">{selectedValues?.size > 0 ? (<div- role="button"aria-label={`Clear ${title} filter`}- tabIndex={0}+ className="rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"onClick={onReset}onKeyDown={onReset}- className="rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"+ role="button"+ tabIndex={0}>- <XCircleIcon className="size-4 mr-2" />+ <XCircleIcon className="mr-2 size-4" /></div>) : (- <PlusCircleIcon className="size-4 mr-2" />+ <PlusCircleIcon className="mr-2 size-4" />)}{title}{selectedValues?.size > 0 && (<><Separator- orientation="vertical"className="mx-0.5 data-[orientation=vertical]:h-4"+ orientation="vertical"/><Badge- variant="secondary"className="rounded-sm px-1 font-normal lg:hidden"+ variant="secondary">{selectedValues.size}</Badge><div className="hidden items-center gap-1 lg:flex">{selectedValues.size > 2 ? (<Badge- variant="secondary"className="rounded-sm px-1 font-normal"+ variant="secondary">{selectedValues.size} selected</Badge>@@ -122,9 +116,9 @@ export function DataTableFacetedFilter<TData, TValue>({.filter((option) => selectedValues.has(option.value)).map((option) => (<Badge- variant="secondary"- key={option.value}className="rounded-sm px-1 font-normal"+ key={option.value}+ variant="secondary">{option.label}</Badge>@@ -135,7 +129,7 @@ export function DataTableFacetedFilter<TData, TValue>({)}</Button></PopoverTrigger>- <PopoverContent className="w-[12.5rem] p-0" align="start">+ <PopoverContent align="start" className="w-[12.5rem] p-0"><Command><CommandInput placeholder={title} /><CommandList className="max-h-full">@@ -159,7 +153,7 @@ export function DataTableFacetedFilter<TData, TValue>({><CheckIcon className="size-4" /></div>- {option.icon && <option.icon className="size-4 mr-2" />}+ {option.icon && <option.icon className="mr-2 size-4" />}<span className="truncate">{option.label}</span>{option.count && (<span className="ml-auto font-mono text-xs">@@ -175,8 +169,8 @@ export function DataTableFacetedFilter<TData, TValue>({<CommandSeparator /><CommandGroup><CommandItem- onSelect={() => onReset()}className="justify-center text-center"+ onSelect={() => onReset()}>Clear filters</CommandItem>diff --git a/apps/start/src/components/ui/data-table/data-table-helpers.tsx b/apps/start/src/components/ui/data-table/data-table-helpers.tsxindex 0bcda2dac..441fee196 100644--- a/apps/start/src/components/ui/data-table/data-table-helpers.tsx+++ b/apps/start/src/components/ui/data-table/data-table-helpers.tsx@@ -33,7 +33,7 @@ export function createActionColumn<TData>(<DropdownMenuTrigger asChild><Button icon={MoreHorizontalIcon} size="icon" variant={'ghost'} /></DropdownMenuTrigger>- <DropdownMenuContent side="bottom" align="end">+ <DropdownMenuContent align="end" side="bottom"><Component row={row} /></DropdownMenuContent></DropdownMenu>diff --git a/apps/start/src/components/ui/data-table/data-table-hooks.tsx b/apps/start/src/components/ui/data-table/data-table-hooks.tsxindex ba57802dc..c7a5be698 100644--- a/apps/start/src/components/ui/data-table/data-table-hooks.tsx+++ b/apps/start/src/components/ui/data-table/data-table-hooks.tsx@@ -4,7 +4,7 @@ import type {VisibilityState,} from '@tanstack/react-table';import { parseAsInteger, useQueryState } from 'nuqs';-import { useEffect, useState } from 'react';+import { useEffect } from 'react';import { useLocalStorage, useReadLocalStorage } from 'usehooks-ts';export const useDataTablePagination = (pageSize = 10) => {@@ -17,7 +17,7 @@ export const useDataTablePagination = (pageSize = 10) => {);const state: PaginationState = {pageIndex: page - 1,- pageSize: pageSize,+ pageSize,};return { page, setPage, state };};diff --git a/apps/start/src/components/ui/data-table/data-table-parsers.ts b/apps/start/src/components/ui/data-table/data-table-parsers.tsindex b6794813e..6296e3c36 100644--- a/apps/start/src/components/ui/data-table/data-table-parsers.ts+++ b/apps/start/src/components/ui/data-table/data-table-parsers.ts@@ -1,8 +1,6 @@import { createParser } from 'nuqs/server';import { z } from 'zod';-import { dataTableConfig } from '@/components/ui/data-table/data-table-config';-import type {ExtendedColumnFilter,ExtendedColumnSort,@@ -28,7 +26,9 @@ export const getSortingStateParser = <TData>(const parsed = JSON.parse(value);const result = z.array(sortingItemSchema).safeParse(parsed);- if (!result.success) return null;+ if (!result.success) {+ return null;+ }if (validKeys && result.data.some((item) => !validKeys.has(item.id))) {return null;@@ -74,7 +74,9 @@ export const getFiltersStateParser = <TData>(const parsed = JSON.parse(value);const result = z.array(filterItemSchema).safeParse(parsed);- if (!result.success) return null;+ if (!result.success) {+ return null;+ }if (validKeys && result.data.some((item) => !validKeys.has(item.id))) {return null;diff --git a/apps/start/src/components/ui/data-table/data-table-slider-filter.tsx b/apps/start/src/components/ui/data-table/data-table-slider-filter.tsxindex 675514669..e99a70076 100644--- a/apps/start/src/components/ui/data-table/data-table-slider-filter.tsx+++ b/apps/start/src/components/ui/data-table/data-table-slider-filter.tsx@@ -1,3 +1,6 @@+import type { Column } from '@tanstack/react-table';+import { PlusCircle, XCircle } from 'lucide-react';+import * as React from 'react';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';@@ -9,9 +12,6 @@ import {import { Separator } from '@/components/ui/separator';import { Slider } from '@/components/ui/slider';import { cn } from '@/lib/utils';-import type { Column } from '@tanstack/react-table';-import { PlusCircle, XCircle } from 'lucide-react';-import * as React from 'react';interface Range {min: number;@@ -128,14 +128,14 @@ export function DataTableSliderFilter<TData>({return (<Popover><PopoverTrigger asChild>- <Button variant="outline" size="sm" className="border-dashed">+ <Button className="border-dashed" size="sm" variant="outline">{columnFilterValue ? (<div- role="button"aria-label={`Clear ${title} filter`}- tabIndex={0}className="rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"onClick={onReset}+ role="button"+ tabIndex={0}><XCircle /></div>@@ -146,8 +146,8 @@ export function DataTableSliderFilter<TData>({{columnFilterValue ? (<><Separator- orientation="vertical"className="mx-0.5 data-[orientation=vertical]:h-4"+ orientation="vertical"/>{formatValue(columnFilterValue[0])} -{' '}{formatValue(columnFilterValue[1])}@@ -162,23 +162,23 @@ export function DataTableSliderFilter<TData>({{title}</p><div className="flex items-center gap-4">- <Label htmlFor={`${id}-from`} className="sr-only">+ <Label className="sr-only" htmlFor={`${id}-from`}>From</Label><div className="relative"><Input- id={`${id}-from`}- type="number"- aria-valuemin={min}aria-valuemax={max}+ aria-valuemin={min}+ className={cn('h-8 w-24', unit && 'pr-8')}+ id={`${id}-from`}inputMode="numeric"+ max={max}+ min={min}+ onChange={onFromInputChange}pattern="[0-9]*"placeholder={min.toString()}- min={min}- max={max}+ type="number"value={range[0]?.toString()}- onChange={onFromInputChange}- className={cn('h-8 w-24', unit && 'pr-8')}/>{unit && (<span className="absolute top-0 right-0 bottom-0 flex items-center rounded-r-md bg-accent px-2 text-muted-foreground text-sm">@@ -186,23 +186,23 @@ export function DataTableSliderFilter<TData>({</span>)}</div>- <Label htmlFor={`${id}-to`} className="sr-only">+ <Label className="sr-only" htmlFor={`${id}-to`}>to</Label><div className="relative"><Input- id={`${id}-to`}- type="number"- aria-valuemin={min}aria-valuemax={max}+ aria-valuemin={min}+ className={cn('h-8 w-24', unit && 'pr-8')}+ id={`${id}-to`}inputMode="numeric"+ max={max}+ min={min}+ onChange={onToInputChange}pattern="[0-9]*"placeholder={max.toString()}- min={min}- max={max}+ type="number"value={range[1]?.toString()}- onChange={onToInputChange}- className={cn('h-8 w-24', unit && 'pr-8')}/>{unit && (<span className="absolute top-0 right-0 bottom-0 flex items-center rounded-r-md bg-accent px-2 text-muted-foreground text-sm">@@ -211,23 +211,23 @@ export function DataTableSliderFilter<TData>({)}</div></div>- <Label htmlFor={`${id}-slider`} className="sr-only">+ <Label className="sr-only" htmlFor={`${id}-slider`}>{title} slider</Label><Sliderid={`${id}-slider`}- min={min}max={max}+ min={min}+ onValueChange={onSliderValueChange}step={step}value={range}- onValueChange={onSliderValueChange}/></div><Buttonaria-label={`Clear ${title} filter`}- variant="outline"- size="sm"onClick={onReset}+ size="sm"+ variant="outline">Clear</Button>diff --git a/apps/start/src/components/ui/data-table/data-table-view-options.tsx b/apps/start/src/components/ui/data-table/data-table-view-options.tsxindex 8bde75eea..a69d69364 100644--- a/apps/start/src/components/ui/data-table/data-table-view-options.tsx+++ b/apps/start/src/components/ui/data-table/data-table-view-options.tsx@@ -1,24 +1,9 @@-import { Button } from '@/components/ui/button';-import {- Command,- CommandEmpty,- CommandGroup,- CommandInput,- CommandItem,- CommandList,-} from '@/components/ui/command';-import {- Popover,- PopoverContent,- PopoverTrigger,-} from '@/components/ui/popover';-import { cn } from '@/lib/utils';import {+ closestCenter,DndContext,type DragEndEvent,KeyboardSensor,PointerSensor,- closestCenter,useSensor,useSensors,} from '@dnd-kit/core';@@ -38,6 +23,21 @@ import {Settings2Icon,} from 'lucide-react';import * as React from 'react';+import { Button } from '@/components/ui/button';+import {+ Command,+ CommandEmpty,+ CommandGroup,+ CommandInput,+ CommandItem,+ CommandList,+} from '@/components/ui/command';+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from '@/components/ui/popover';+import { cn } from '@/lib/utils';interface DataTableViewOptionsProps<TData> {table: Table<TData>;@@ -68,19 +68,19 @@ function SortableColumnItem({return (<CommandItem- ref={setNodeRef}- style={style}className={cn('flex items-center gap-2', isDragging && 'opacity-50')}onSelect={onToggleVisibility}+ ref={setNodeRef}+ style={style}><div{...attributes}{...listeners}- className="cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded"+ className="cursor-grab rounded p-1 hover:bg-muted active:cursor-grabbing"><GripVertical className="size-3 text-muted-foreground" /></div>- <span className="truncate flex-1">+ <span className="flex-1 truncate">{typeof column.columnDef.header === 'string'? column.columnDef.header: (column.columnDef.meta?.label ?? column.id)}@@ -174,14 +174,14 @@ export function DataTableViewOptions<TData>({<PopoverTrigger asChild><Buttonaria-label="Toggle columns"+ className="ml-auto hidden h-8 lg:flex"role="combobox"- variant="outline"size="sm"- className="ml-auto hidden h-8 lg:flex"+ variant="outline">- <Settings2Icon className="size-4 mr-2" />+ <Settings2Icon className="mr-2 size-4" />View- <ChevronsUpDown className="opacity-50 ml-2 size-4" />+ <ChevronsUpDown className="ml-2 size-4 opacity-50" /></Button></PopoverTrigger><PopoverContent align="end" className="w-52 p-0">@@ -191,9 +191,9 @@ export function DataTableViewOptions<TData>({<CommandEmpty>No columns found.</CommandEmpty><CommandGroup><DndContext- sensors={sensors}collisionDetection={closestCenter}onDragEnd={handleDragEnd}+ sensors={sensors}><SortableContextitems={columns.map((col) => col.id)}@@ -201,8 +201,8 @@ export function DataTableViewOptions<TData>({>{columns.map((column) => (<SortableColumnItem- key={column.id}column={column}+ key={column.id}onToggleVisibility={() =>column.toggleVisibility(!column.getIsVisible())}@@ -213,10 +213,10 @@ export function DataTableViewOptions<TData>({</CommandGroup><CommandGroup><CommandItem- onSelect={handleReset}className="text-muted-foreground"+ onSelect={handleReset}>- <RotateCcw className="size-4 mr-2" />+ <RotateCcw className="mr-2 size-4" />Reset to default</CommandItem></CommandGroup>diff --git a/apps/start/src/components/ui/data-table/data-table.tsx b/apps/start/src/components/ui/data-table/data-table.tsxindex c876e01f7..f45b6cfd5 100644--- a/apps/start/src/components/ui/data-table/data-table.tsx+++ b/apps/start/src/components/ui/data-table/data-table.tsx@@ -1,7 +1,3 @@-import { FullPageEmptyState } from '@/components/full-page-empty-state';-import { FloatingPagination } from '@/components/pagination-floating';-import { Skeleton } from '@/components/skeleton';-import { cn } from '@/utils/cn';import type { Table as ITable } from '@tanstack/react-table';import { flexRender } from '@tanstack/react-table';import {@@ -13,6 +9,10 @@ import {TableRow,} from '../table';import { getCommonPinningStyles } from './data-table-helpers';+import { FullPageEmptyState } from '@/components/full-page-empty-state';+import { FloatingPagination } from '@/components/pagination-floating';+import { Skeleton } from '@/components/skeleton';+import { cn } from '@/utils/cn';export interface DataTableProps<TData> {table: ITable<TData>;@@ -55,8 +55,8 @@ export function DataTable<TData>({<TableRow key={headerGroup.id}>{headerGroup.headers.map((header) => (<TableHead- key={header.id}colSpan={header.colSpan}+ key={header.id}style={{...getCommonPinningStyles({column: header.column,@@ -78,22 +78,22 @@ export function DataTable<TData>({{table.getRowModel().rows?.length ? (table.getRowModel().rows.map((row) => (<TableRow- key={row.id}+ className={onRowClick ? 'cursor-pointer' : undefined}data-state={row.getIsSelected() && 'selected'}+ key={row.id}onClick={onRowClick ? () => onRowClick(row) : undefined}- className={onRowClick ? 'cursor-pointer' : undefined}>{row.getVisibleCells().map((cell) => (<TableCell+ className={cn(+ cell.column.columnDef.meta?.bold && 'font-medium'+ )}key={cell.id}style={{...getCommonPinningStyles({column: cell.column,}),}}- className={cn(- cell.column.columnDef.meta?.bold && 'font-medium'- )}>{loading ? (<Skeleton className="h-4 w-3/5" />@@ -110,12 +110,12 @@ export function DataTable<TData>({) : (<TableRow><TableCell- colSpan={table.getAllColumns().length}className="h-24 text-center"+ colSpan={table.getAllColumns().length}><FullPageEmptyState- title={empty.title}description={empty.description}+ title={empty.title}/></TableCell></TableRow>@@ -128,11 +128,11 @@ export function DataTable<TData>({<FloatingPaginationcanNextPage={table.getCanNextPage()}canPreviousPage={table.getCanPreviousPage()}- pageIndex={table.getState().pagination.pageIndex}- nextPage={table.nextPage}- previousPage={table.previousPage}firstPage={table.firstPage}lastPage={table.lastPage}+ nextPage={table.nextPage}+ pageIndex={table.getState().pagination.pageIndex}+ previousPage={table.previousPage}/><div className="h-20" /></>diff --git a/apps/start/src/components/ui/data-table/use-table.tsx b/apps/start/src/components/ui/data-table/use-table.tsxindex 39abf0da5..a82a370b5 100644--- a/apps/start/src/components/ui/data-table/use-table.tsx+++ b/apps/start/src/components/ui/data-table/use-table.tsx@@ -1,18 +1,18 @@+import type {+ ColumnFiltersState,+ PaginationState,+ Row,+} from '@tanstack/react-table';import {type ColumnDef,type ColumnPinningState,- type Updater,getCoreRowModel,getFilteredRowModel,getPaginationRowModel,getSortedRowModel,+ type Updater,useReactTable,} from '@tanstack/react-table';-import type {- ColumnFiltersState,- PaginationState,-} from '@tanstack/react-table';-import type { Row } from '@tanstack/react-table';import {type Options,type Parser,@@ -77,7 +77,9 @@ export function useTable<TData>({Record<string, Parser<string> | Parser<string[]> | Parser<number[]>>>((acc, column) => {const columnId = (column.id ?? (column as any).accessorKey)?.toString();- if (!columnId) return acc;+ if (!columnId) {+ return acc;+ }const variant = column.meta?.variant;switch (variant) {@@ -110,9 +112,13 @@ export function useTable<TData>({const initialColumnFilters: ColumnFiltersState = useMemo(() => {return Object.entries(qsFilters).reduce<ColumnFiltersState>((filters, [key, value]) => {- if (value === null || value === undefined) return filters;+ if (value === null || value === undefined) {+ return filters;+ }if (Array.isArray(value)) {- if (value.length > 0) filters.push({ id: key, value });+ if (value.length > 0) {+ filters.push({ id: key, value });+ }} else if (value !== '') {filters.push({ id: key, value });}@@ -136,7 +142,9 @@ export function useTable<TData>({value: [number, number]) => {const cellDate = row.getValue<Date>(columnId);- if (!cellDate) return false;+ if (!cellDate) {+ return false;+ }const [rawStart, rawEnd] = value; // epoch ms from date inputs (local)@@ -183,8 +191,12 @@ export function useTable<TData>({const nextPerPage = nextPagination.pageSize;// Only write to the URL when values truly change to avoid reload loops- if (nextPage !== page) void setPage(nextPage);- if (nextPerPage !== perPage) void setPerPage(nextPerPage);+ if (nextPage !== page) {+ void setPage(nextPage);+ }+ if (nextPerPage !== perPage) {+ void setPerPage(nextPerPage);+ }},state: {pagination,diff --git a/apps/start/src/components/ui/data-table/virtualized-data-table.tsx b/apps/start/src/components/ui/data-table/virtualized-data-table.tsxindex 626924be9..d23448097 100644--- a/apps/start/src/components/ui/data-table/virtualized-data-table.tsx+++ b/apps/start/src/components/ui/data-table/virtualized-data-table.tsx@@ -1,11 +1,8 @@-import { FloatingPagination } from '@/components/pagination-floating';-import { Skeleton } from '@/components/skeleton';-import { cn } from '@/utils/cn';import type { Table as ITable, Row } from '@tanstack/react-table';import { flexRender } from '@tanstack/react-table';import {- type VirtualItem,useWindowVirtualizer,+ type VirtualItem,} from '@tanstack/react-virtual';import throttle from 'lodash.throttle';import { useEffect, useRef, useState } from 'react';@@ -19,6 +16,8 @@ import {} from '../table';import { DataTableColumnHeader } from './data-table-column-header';import { getCommonPinningStyles } from './data-table-helpers';+import { Skeleton } from '@/components/skeleton';+import { cn } from '@/utils/cn';export interface DataTableProps<TData> {table: ITable<TData>;@@ -77,9 +76,10 @@ export function VirtualizedDataTable<TData>({const renderTableRow = (row: Row<TData>, virtualRow: VirtualItem) => {return (<TableRow- data-index={virtualRow.index}- // ref={virtualizer.measureElement}className={cn('absolute top-0 left-0 w-full')}+ // ref={virtualizer.measureElement}+ data-index={virtualRow.index}+ key={row.id}style={{transform: `translateY(${virtualRow.start - virtualizer.options.scrollMargin@@ -87,10 +87,10 @@ export function VirtualizedDataTable<TData>({height: `${virtualRow.size}px`,display: 'flex',}}- key={row.id}>{row.getVisibleCells().map((cell) => (<TableCell+ className={cn(cell.column.columnDef.meta?.bold && 'font-medium')}key={cell.id}style={{...getCommonPinningStyles({ column: cell.column }),@@ -100,7 +100,6 @@ export function VirtualizedDataTable<TData>({display: 'flex',alignItems: 'center',}}- className={cn(cell.column.columnDef.meta?.bold && 'font-medium')}>{loading ? (<Skeleton className="h-4 w-3/5" />@@ -125,8 +124,8 @@ export function VirtualizedDataTable<TData>({<TableRow key={headerGroup.id} style={{ display: 'flex' }}>{headerGroup.headers.map((header) => (<TableHead- key={header.id}colSpan={header.colSpan}+ key={header.id}style={{...getCommonPinningStyles({ column: header.column }),width: header.column.getSize(),@@ -165,8 +164,8 @@ export function VirtualizedDataTable<TData>({) : (<TableRow style={{ display: 'flex', height: '96px' }}><TableCell+ className="flex h-24 items-center justify-center text-center"colSpan={table.getAllColumns().length}- className="h-24 text-center flex items-center justify-center"style={{ width: '100%' }}>No results.diff --git a/apps/start/src/components/ui/date-time.tsx b/apps/start/src/components/ui/date-time.tsxindex 1003a8508..54fb7cf1c 100644--- a/apps/start/src/components/ui/date-time.tsx+++ b/apps/start/src/components/ui/date-time.tsx@@ -1,5 +1,6 @@+import { PopoverPortal } from '@radix-ui/react-popover';import { format } from 'date-fns';-+import { CalendarIcon } from 'lucide-react';import { Button } from '@/components/ui/button';import { Calendar } from '@/components/ui/calendar';import {@@ -9,8 +10,6 @@ import {} from '@/components/ui/popover';import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';import { cn } from '@/lib/utils';-import { PopoverPortal } from '@radix-ui/react-popover';-import { CalendarIcon } from 'lucide-react';export function DateTimePicker({value,@@ -43,11 +42,11 @@ export function DateTimePicker({<Popover><PopoverTrigger asChild><Button- variant={'outline'}className={cn('w-full pl-3 text-left font-normal',!value && 'text-muted-foreground')}+ variant={'outline'}>{value ? (format(value, 'MM/dd/yyyy HH:mm')@@ -61,57 +60,57 @@ export function DateTimePicker({<PopoverContent className="w-auto p-0"><div className="sm:flex"><Calendar+ initialFocusmode="single"- selected={value}onSelect={handleDateSelect}- initialFocus+ selected={value}/>- <div className="flex flex-col sm:flex-row sm:h-[300px] divide-y sm:divide-y-0 sm:divide-x">+ <div className="flex flex-col divide-y sm:h-[300px] sm:flex-row sm:divide-x sm:divide-y-0"><ScrollArea className="w-64 sm:w-auto">- <div className="flex sm:flex-col p-2">+ <div className="flex p-2 sm:flex-col">{Array.from({ length: 24 }, (_, i) => i).reverse().map((hour) => (<Button+ className="aspect-square shrink-0 sm:w-full"key={hour}+ onClick={() =>+ handleTimeChange('hour', hour.toString())+ }size="icon"variant={value && value.getHours() === hour? 'default': 'ghost'}- className="sm:w-full shrink-0 aspect-square"- onClick={() =>- handleTimeChange('hour', hour.toString())- }>{hour}</Button>))}</div>- <ScrollBar orientation="horizontal" className="sm:hidden" />+ <ScrollBar className="sm:hidden" orientation="horizontal" /></ScrollArea><ScrollArea className="w-64 sm:w-auto">- <div className="flex sm:flex-col p-2">+ <div className="flex p-2 sm:flex-col">{Array.from({ length: 12 }, (_, i) => i * 5).map((minute) => (<Button+ className="aspect-square shrink-0 sm:w-full"key={minute}+ onClick={() =>+ handleTimeChange('minute', minute.toString())+ }size="icon"variant={value && value.getMinutes() === minute? 'default': 'ghost'}- className="sm:w-full shrink-0 aspect-square"- onClick={() =>- handleTimeChange('minute', minute.toString())- }>{minute.toString().padStart(2, '0')}</Button>))}</div>- <ScrollBar orientation="horizontal" className="sm:hidden" />+ <ScrollBar className="sm:hidden" orientation="horizontal" /></ScrollArea></div></div>diff --git a/apps/start/src/components/ui/dialog.tsx b/apps/start/src/components/ui/dialog.tsxindex 9719282ad..a39aa2ae7 100644--- a/apps/start/src/components/ui/dialog.tsx+++ b/apps/start/src/components/ui/dialog.tsx@@ -1,7 +1,6 @@import * as DialogPrimitive from '@radix-ui/react-dialog';import { XIcon } from 'lucide-react';import type * as React from 'react';-import { cn } from '@/lib/utils';function Dialog({@@ -34,11 +33,11 @@ function DialogOverlay({}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {return (<DialogPrimitive.Overlay- data-slot="dialog-overlay"className={cn(- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',className)}+ data-slot="dialog-overlay"{...props}/>);@@ -57,22 +56,22 @@ function DialogContent({<div data-slot="dialog-portal"><DialogOverlay /><DialogPrimitive.Content- data-slot="dialog-content"className={cn('max-h-screen overflow-y-auto overflow-x-hidden', // Ensure the dialog is scrollable if it exceeds the screen height'mt-auto', // Add margin-top: auto for all screen sizes- 'focus:outline-none focus:ring-0 transition-none',+ 'transition-none focus:outline-none focus:ring-0','border bg-def-100 shadow-lg sm:rounded-lg md:max-h-[90vh]',- 'bg-def-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg [&>*]:min-w-0',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-def-100 p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg [&>*]:min-w-0',className)}+ data-slot="dialog-content"{...props}>{children}{showCloseButton && (<DialogPrimitive.Close+ className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0"data-slot="dialog-close"- className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"><XIcon /><span className="sr-only">Close</span>@@ -86,8 +85,8 @@ function DialogContent({function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {return (<div- data-slot="dialog-header"className={cn('flex flex-col gap-2 text-center sm:text-left', className)}+ data-slot="dialog-header"{...props}/>);@@ -96,11 +95,11 @@ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {function DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {return (<div- data-slot="dialog-footer"className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',className)}+ data-slot="dialog-footer"{...props}/>);@@ -112,8 +111,8 @@ function DialogTitle({}: React.ComponentProps<typeof DialogPrimitive.Title>) {return (<DialogPrimitive.Title+ className={cn('font-semibold text-lg leading-none', className)}data-slot="dialog-title"- className={cn('text-lg leading-none font-semibold', className)}{...props}/>);@@ -125,8 +124,8 @@ function DialogDescription({}: React.ComponentProps<typeof DialogPrimitive.Description>) {return (<DialogPrimitive.Description- data-slot="dialog-description"className={cn('text-muted-foreground text-sm', className)}+ data-slot="dialog-description"{...props}/>);diff --git a/apps/start/src/components/ui/dropdown-menu.tsx b/apps/start/src/components/ui/dropdown-menu.tsxindex 04510b131..f83dbcb24 100644--- a/apps/start/src/components/ui/dropdown-menu.tsx+++ b/apps/start/src/components/ui/dropdown-menu.tsx@@ -1,8 +1,7 @@-import { cn } from '@/utils/cn';import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';import { Check, ChevronRight, Circle } from 'lucide-react';import * as React from 'react';-import { ButtonProps } from './button';+import { cn } from '@/utils/cn';const DropdownMenu = DropdownMenuPrimitive.Root;@@ -23,12 +22,12 @@ const DropdownMenuSubTrigger = React.forwardRef<}>(({ className, inset, children, ...props }, ref) => (<DropdownMenuPrimitive.SubTrigger- ref={ref}className={cn(- 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none focus:bg-accent data-[state=open]:bg-accent',+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none focus:bg-accent data-[state=open]:bg-accent',inset && 'pl-8',className)}+ ref={ref}{...props}>{children}@@ -43,11 +42,11 @@ const DropdownMenuSubContent = React.forwardRef<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>>(({ className, ...props }, ref) => (<DropdownMenuPrimitive.SubContent- ref={ref}className={cn(- 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in',className)}+ ref={ref}{...props}/>));@@ -60,12 +59,12 @@ const DropdownMenuContent = React.forwardRef<>(({ className, sideOffset = 4, ...props }, ref) => (<DropdownMenuPrimitive.Portal><DropdownMenuPrimitive.Content- ref={ref}- sideOffset={sideOffset}className={cn(- 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in',className)}+ ref={ref}+ sideOffset={sideOffset}{...props}/></DropdownMenuPrimitive.Portal>@@ -80,14 +79,14 @@ const DropdownMenuItem = React.forwardRef<}>(({ className, inset, variant, ...props }, ref) => (<DropdownMenuPrimitive.Item- ref={ref}className={cn(- 'relative flex min-h-8 cursor-pointer select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:mr-2',+ 'relative flex min-h-8 cursor-pointer select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:mr-2',inset && 'pl-8',variant === 'destructive' &&'text-destructive hover:text-destructive-foreground',className)}+ ref={ref}{...props}/>));@@ -98,12 +97,12 @@ const DropdownMenuCheckboxItem = React.forwardRef<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>>(({ className, children, checked, ...props }, ref) => (<DropdownMenuPrimitive.CheckboxItem- ref={ref}+ checked={checked}className={cn(- 'cursor-pointer relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:mr-2',+ 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pr-2 pl-8 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:mr-2',className)}- checked={checked}+ ref={ref}{...props}><span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">@@ -122,11 +121,11 @@ const DropdownMenuRadioItem = React.forwardRef<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>>(({ className, children, ...props }, ref) => (<DropdownMenuPrimitive.RadioItem- ref={ref}className={cn(- 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',+ 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pr-2 pl-8 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',className)}+ ref={ref}{...props}><span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">@@ -146,8 +145,8 @@ const DropdownMenuLabel = React.forwardRef<}>(({ className, inset, ...props }, ref) => (<DropdownMenuPrimitive.Label+ className={cn('px-2 py-1.5 font-semibold', inset && 'pl-8', className)}ref={ref}- className={cn('px-2 py-1.5 font-semibold', inset && 'pl-8', className)}{...props}/>));@@ -158,8 +157,8 @@ const DropdownMenuSeparator = React.forwardRef<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>>(({ className, ...props }, ref) => (<DropdownMenuPrimitive.Separator- ref={ref}className={cn('-mx-1 my-1 h-px bg-muted', className)}+ ref={ref}{...props}/>));@@ -202,7 +201,7 @@ export function DropdownMenuComposed<Value extends string>({return (<DropdownMenu><DropdownMenuTrigger asChild>{children}</DropdownMenuTrigger>- <DropdownMenuContent className="w-56" align="start">+ <DropdownMenuContent align="start" className="w-56">{label && (<><DropdownMenuLabel>{label}</DropdownMenuLabel>diff --git a/apps/start/src/components/ui/gradient-background.tsx b/apps/start/src/components/ui/gradient-background.tsxindex 96a2c6f4d..5ea46d7b1 100644--- a/apps/start/src/components/ui/gradient-background.tsx+++ b/apps/start/src/components/ui/gradient-background.tsx@@ -13,7 +13,7 @@ export function GradientBackground({return (<divclassName={cn(- 'from-def-200 rounded-md bg-gradient-to-tr to-white',+ 'rounded-md bg-gradient-to-tr from-def-200 to-white',className)}{...props}diff --git a/apps/start/src/components/ui/input-date-time.tsx b/apps/start/src/components/ui/input-date-time.tsxindex 394445ed5..2569395aa 100644--- a/apps/start/src/components/ui/input-date-time.tsx+++ b/apps/start/src/components/ui/input-date-time.tsx@@ -1,9 +1,9 @@-import { pushModal } from '@/modals';import { format, isValid, parseISO } from 'date-fns';import { CalendarIcon } from 'lucide-react';import { type InputHTMLAttributes, useEffect, useState } from 'react';import { WithLabel } from '../forms/input-with-label';import { Input } from './input';+import { pushModal } from '@/modals';export function InputDateTime({value,@@ -26,7 +26,9 @@ export function InputDateTime({// Convert string to Date for modalconst getDateFromValue = (dateString: string): Date => {- if (!dateString) return new Date();+ if (!dateString) {+ return new Date();+ }try {const date = parseISO(dateString);@@ -38,7 +40,9 @@ export function InputDateTime({// Format date for displayconst getDisplayValue = (dateString: string): string => {- if (!dateString) return '';+ if (!dateString) {+ return '';+ }try {const date = parseISO(dateString);@@ -73,13 +77,13 @@ export function InputDateTime({><Input{...props}- value={getDisplayValue(value || '')}+ className="cursor-pointer pr-10"placeholder={placeholder}readOnly- className="cursor-pointer pr-10"size="default"+ value={getDisplayValue(value || '')}/>- <div className="absolute right-4 top-1/2 -translate-y-1/2 pointer-events-none">+ <div className="pointer-events-none absolute top-1/2 right-4 -translate-y-1/2"><CalendarIcon className="h-4 w-4 text-muted-foreground" /></div></div>diff --git a/apps/start/src/components/ui/input-enter.tsx b/apps/start/src/components/ui/input-enter.tsxindex cb97f6a9c..642cb99a6 100644--- a/apps/start/src/components/ui/input-enter.tsx+++ b/apps/start/src/components/ui/input-enter.tsx@@ -1,8 +1,6 @@-import { motion } from 'framer-motion';--import { AnimatePresence } from 'framer-motion';+import { AnimatePresence, motion } from 'framer-motion';import { CornerDownLeftIcon } from 'lucide-react';-import { type InputHTMLAttributes, useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { Badge } from './badge';import { Input, type InputProps } from './input';@@ -28,7 +26,6 @@ export function InputEnter({<div className="relative w-full"><Input{...props}- value={internalValue}onChange={(e) => {setInternalValue(e.target.value);if (immediate) {@@ -41,19 +38,20 @@ export function InputEnter({onChangeValue(internalValue);}}}+ value={internalValue}/>- <div className="absolute right-2 top-1/2 -translate-y-1/2">+ <div className="absolute top-1/2 right-2 -translate-y-1/2"><AnimatePresence>{!immediate && internalValue !== value && (<motion.button- key="refresh"- type="button"- initial={{ opacity: 0, scale: 0.8 }}animate={{ opacity: 1, scale: 1 }}exit={{ opacity: 0, scale: 0.8 }}+ initial={{ opacity: 0, scale: 0.8 }}+ key="refresh"onClick={() => onChangeValue(internalValue)}+ type="button">- <Badge variant="secondary" className="gap-1 px-1.5 py-0 text-xs">+ <Badge className="gap-1 px-1.5 py-0 text-xs" variant="secondary">Press<CornerDownLeftIcon className="h-3 w-3" /></Badge>diff --git a/apps/start/src/components/ui/input-otp.tsx b/apps/start/src/components/ui/input-otp.tsxindex fcbb7b361..c2711da42 100644--- a/apps/start/src/components/ui/input-otp.tsx+++ b/apps/start/src/components/ui/input-otp.tsx@@ -1,19 +1,19 @@-import { cn } from '@/utils/cn';import { OTPInput, OTPInputContext } from 'input-otp';import { Dot } from 'lucide-react';import * as React from 'react';+import { cn } from '@/utils/cn';const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>,React.ComponentPropsWithoutRef<typeof OTPInput>>(({ className, containerClassName, ...props }, ref) => (<OTPInput- ref={ref}+ className={cn('disabled:cursor-not-allowed', className)}containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50',containerClassName)}- className={cn('disabled:cursor-not-allowed', className)}+ ref={ref}{...props}/>));@@ -23,7 +23,7 @@ const InputOTPGroup = React.forwardRef<React.ElementRef<'div'>,React.ComponentPropsWithoutRef<'div'>>(({ className, ...props }, ref) => (- <div ref={ref} className={cn('flex items-center', className)} {...props} />+ <div className={cn('flex items-center', className)} ref={ref} {...props} />));InputOTPGroup.displayName = 'InputOTPGroup';@@ -36,18 +36,18 @@ const InputOTPSlot = React.forwardRef<return (<div- ref={ref}className={cn(- 'relative flex h-10 w-10 items-center justify-center border-y border-r border-input transition-all first:rounded-l-md first:border-l last:rounded-r-md',+ 'relative flex h-10 w-10 items-center justify-center border-input border-y border-r transition-all first:rounded-l-md first:border-l last:rounded-r-md',isActive && 'z-10 ring-2 ring-ring ring-offset-background',className)}+ ref={ref}{...props}>{char}{hasFakeCaret && (<div className="pointer-events-none absolute inset-0 flex items-center justify-center">- <div className="animate-caret-blink h-4 w-px bg-foreground duration-1000" />+ <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" /></div>)}</div>diff --git a/apps/start/src/components/ui/input-with-toggle.tsx b/apps/start/src/components/ui/input-with-toggle.tsxindex 666ca5b24..d724a578d 100644--- a/apps/start/src/components/ui/input-with-toggle.tsx+++ b/apps/start/src/components/ui/input-with-toggle.tsx@@ -1,4 +1,3 @@-import type { Dispatch, SetStateAction } from 'react';import AnimateHeight from '../animate-height';import { Label } from './label';import { Switch } from './switch';@@ -18,7 +17,7 @@ export function InputWithToggle({}: Props) {return (<div className="col gap-2">- <div className="flex gap-2 items-center justify-between">+ <div className="flex items-center justify-between gap-2"><Label className="mb-0">{label}</Label><Switch checked={active} onCheckedChange={onActiveChange} /></div>diff --git a/apps/start/src/components/ui/input.tsx b/apps/start/src/components/ui/input.tsxindex 60f6eb717..c40c01413 100644--- a/apps/start/src/components/ui/input.tsx+++ b/apps/start/src/components/ui/input.tsx@@ -1,15 +1,15 @@-import { cn } from '@/utils/cn';import type { VariantProps } from 'class-variance-authority';import { cva } from 'class-variance-authority';import * as React from 'react';+import { cn } from '@/utils/cn';const inputVariant = cva('flex w-full rounded-md border border-input bg-card ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50',{variants: {size: {- sm: 'h-8 px-3 py-2 ',- default: 'h-10 px-3 py-2 ',+ sm: 'h-8 px-3 py-2',+ default: 'h-10 px-3 py-2',large: 'h-12 px-4 py-3 text-lg',},},@@ -30,12 +30,12 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(<inputautoComplete="off"autoCorrect="off"- type={type}className={cn(inputVariant({ size, className }),!!error && 'border-destructive')}ref={ref}+ type={type}{...props}/>);diff --git a/apps/start/src/components/ui/key-value-grid.tsx b/apps/start/src/components/ui/key-value-grid.tsxindex 7304c6d8c..fe31fecd1 100644--- a/apps/start/src/components/ui/key-value-grid.tsx+++ b/apps/start/src/components/ui/key-value-grid.tsx@@ -1,13 +1,13 @@+import type { IServiceEvent } from '@openpanel/core';+import { isToday } from 'date-fns';+import { CopyIcon } from 'lucide-react';+import { SerieIcon } from '../report-chart/common/serie-icon';import { fancyMinutes } from '@/hooks/use-numer-formatter';import { countries } from '@/translations/countries';import { camelCaseToWords } from '@/utils/casing';import { clipboard } from '@/utils/clipboard';import { cn } from '@/utils/cn';import { formatDateTime, formatTime } from '@/utils/date';-import type { IServiceEvent } from '@openpanel/core';-import { isToday } from 'date-fns';-import { CopyIcon } from 'lucide-react';-import { SerieIcon } from '../report-chart/common/serie-icon';export interface KeyValueItem {name: string;@@ -75,12 +75,12 @@ export function KeyValueGrid({<div className="flex items-center gap-1">{splitKey.map((name, index) => (<span- key={name}className={index === splitKey.length - 1? 'text-foreground': 'text-muted-foreground'}+ key={name}>{camelCaseToWords(name)}{index < splitKey.length - 1 && (@@ -94,7 +94,7 @@ export function KeyValueGrid({const defaultRenderValue = (item: KeyValueItem) => {return (- <FieldValue name={item.name} value={item.value} event={item.event} />+ <FieldValue event={item.event} name={item.name} value={item.value} />);};@@ -107,19 +107,19 @@ export function KeyValueGrid({return (<div- className={cn('grid card overflow-hidden', gridCols[columns], className)}+ className={cn('card grid overflow-hidden', gridCols[columns], className)}>{data.map((item, index) => {const stringValue = toStringValue(item.value);return (<div- key={`${item.name}-${index}`}className={cn(- 'relative flex items-center justify-between gap-4 p-4 py-3 shadow-[0_0_0_0.5px] shadow-border group',+ 'group relative flex items-center justify-between gap-4 p-4 py-3 shadow-[0_0_0_0.5px] shadow-border',onItemClick && 'cursor-pointer hover:bg-muted/50',rowClassName)}+ key={`${item.name}-${index}`}onClick={() => onItemClick?.(item)}onKeyDown={(e) => {if (onItemClick && (e.key === 'Enter' || e.key === ' ')) {@@ -127,27 +127,27 @@ export function KeyValueGrid({onItemClick(item);}}}- tabIndex={onItemClick ? 0 : undefined}role={onItemClick ? 'button' : undefined}+ tabIndex={onItemClick ? 0 : undefined}>{copyable && stringValue !== undefined && (<button+ className="absolute top-1/2 left-2 z-10 -translate-x-full -translate-y-1/2 rounded border border-border bg-background p-1 opacity-0 shadow-sm transition-all duration-200 ease-out group-hover:translate-x-0 group-hover:opacity-100"onClick={(e) => {e.stopPropagation();clipboard(stringValue);}}type="button"- className="absolute left-2 top-1/2 -translate-y-1/2 -translate-x-full opacity-0 group-hover:translate-x-0 group-hover:opacity-100 transition-all duration-200 ease-out bg-background border border-border rounded p-1 shadow-sm z-10"><CopyIcon className="size-3 shrink-0" /></button>)}- <div className={cn('flex-1 min-w-0 text-sm', keyClassName)}>+ <div className={cn('min-w-0 flex-1 text-sm', keyClassName)}>{renderKey ? renderKey(item) : defaultRenderKey(item)}</div><divclassName={cn(- 'text-right text-sm font-mono truncate min-w-0 max-w-[60%]',+ 'min-w-0 max-w-[60%] truncate text-right font-mono text-sm',valueClassName)}title={stringValue}@@ -159,7 +159,7 @@ export function KeyValueGrid({})}{data.length === 0 && (- <div className="text-center text-muted-foreground py-8 col-span-full">+ <div className="col-span-full py-8 text-center text-muted-foreground">No data available</div>)}@@ -188,28 +188,28 @@ export function FieldValue({switch (name) {case 'osVersion':return (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={event.os} /><span>{value}</span></div>);case 'browserVersion':return (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={event.browser} /><span>{value}</span></div>);case 'city':return (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={event.country} /><span>{value}</span></div>);case 'region':return (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={event.country} /><span>{value}</span></div>@@ -218,7 +218,7 @@ export function FieldValue({return JSON.stringify(value);case 'country':return (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={value} /><span>{countries[value as keyof typeof countries] ?? value}</span></div>@@ -229,7 +229,7 @@ export function FieldValue({case 'model':case 'device':return (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={value} /><span>{value}</span></div>diff --git a/apps/start/src/components/ui/key-value.tsx b/apps/start/src/components/ui/key-value.tsxindex 4d5d46ff4..7eff72e9d 100644--- a/apps/start/src/components/ui/key-value.tsx+++ b/apps/start/src/components/ui/key-value.tsx@@ -1,5 +1,5 @@-import { cn } from '@/utils/cn';import { Link } from '@tanstack/react-router';+import { cn } from '@/utils/cn';interface KeyValueProps {name: string;@@ -15,7 +15,7 @@ export function KeyValue({ href, onClick, name, value }: KeyValueProps) {return (<ComponentclassName={cn(- 'group flex min-w-0 max-w-full divide-x self-start overflow-hidden rounded-md border border-border text-sm font-medium transition-transform',+ 'group flex min-w-0 max-w-full divide-x self-start overflow-hidden rounded-md border border-border font-medium text-sm transition-transform',clickable && 'hover:-translate-y-0.5')}{...{ href, onClick }}@@ -23,7 +23,7 @@ export function KeyValue({ href, onClick, name, value }: KeyValueProps) {<div className="bg-black/5 p-1 px-2 capitalize">{name}</div><divclassName={cn(- 'font-mono overflow-hidden max-w-[300px] text-ellipsis whitespace-nowrap bg-card p-1 px-2 text-highlight',+ 'max-w-[300px] overflow-hidden text-ellipsis whitespace-nowrap bg-card p-1 px-2 font-mono text-highlight',clickable && 'group-hover:underline')}>diff --git a/apps/start/src/components/ui/popover.tsx b/apps/start/src/components/ui/popover.tsxindex b2047620c..665125fe7 100644--- a/apps/start/src/components/ui/popover.tsx+++ b/apps/start/src/components/ui/popover.tsx@@ -1,6 +1,6 @@-import { cn } from '@/utils/cn';import * as PopoverPrimitive from '@radix-ui/react-popover';import * as React from 'react';+import { cn } from '@/utils/cn';const Popover = PopoverPrimitive.Root;@@ -16,13 +16,13 @@ const PopoverContent = React.forwardRef<>(({ className, align = 'center', sideOffset = 4, portal, ...props }, ref) => {const node = (<PopoverPrimitive.Content- ref={ref}align={align}- sideOffset={sideOffset}className={cn(- 'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=closed]:animate-out data-[state=open]:animate-in',className)}+ ref={ref}+ sideOffset={sideOffset}style={{boxShadow: '0 0 0 9000px rgba(0, 0, 0, 0.05)',}}diff --git a/apps/start/src/components/ui/progress.tsx b/apps/start/src/components/ui/progress.tsxindex 9bf3191e9..e7cfa1694 100644--- a/apps/start/src/components/ui/progress.tsx+++ b/apps/start/src/components/ui/progress.tsx@@ -1,7 +1,7 @@-import { cn } from '@/utils/cn';import { round } from '@openpanel/shared';import * as ProgressPrimitive from '@radix-ui/react-progress';import * as React from 'react';+import { cn } from '@/utils/cn';const Progress = React.forwardRef<React.ElementRef<typeof ProgressPrimitive.Root>,@@ -11,13 +11,13 @@ const Progress = React.forwardRef<}>(({ className, innerClassName, value, size = 'default', ...props }, ref) => (<ProgressPrimitive.Root- ref={ref}className={cn('relative h-4 w-full min-w-16 overflow-hidden rounded bg-def-200 shadow-sm',size === 'sm' && 'h-2',size === 'lg' && 'h-5',className)}+ ref={ref}{...props}><ProgressPrimitive.Indicator@@ -30,7 +30,7 @@ const Progress = React.forwardRef<}}/>{value && size !== 'sm' && (- <div className="z-5 absolute bottom-0 top-0 flex items-center px-2 text-sm font-medium font-mono">+ <div className="absolute top-0 bottom-0 z-5 flex items-center px-2 font-medium font-mono text-sm"><div>{round(value, 2)}%</div></div>)}diff --git a/apps/start/src/components/ui/radio-group.tsx b/apps/start/src/components/ui/radio-group.tsxindex e7b95c23e..a142acfe5 100644--- a/apps/start/src/components/ui/radio-group.tsx+++ b/apps/start/src/components/ui/radio-group.tsx@@ -1,7 +1,7 @@-import { cn } from '@/utils/cn';import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';import { Circle } from 'lucide-react';import * as React from 'react';+import { cn } from '@/utils/cn';const RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>,@@ -23,11 +23,11 @@ const RadioGroupItem = React.forwardRef<>(({ className, ...props }, ref) => {return (<RadioGroupPrimitive.Item- ref={ref}className={cn('aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',className)}+ ref={ref}{...props}><RadioGroupPrimitive.Indicator className="flex items-center justify-center">diff --git a/apps/start/src/components/ui/scroll-area.tsx b/apps/start/src/components/ui/scroll-area.tsxindex 31e98d78f..ce91f9597 100644--- a/apps/start/src/components/ui/scroll-area.tsx+++ b/apps/start/src/components/ui/scroll-area.tsx@@ -1,6 +1,5 @@import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';import * as React from 'react';-import { cn } from '@/lib/utils';export const VirtualScrollArea = React.forwardRef<@@ -16,8 +15,8 @@ export const VirtualScrollArea = React.forwardRef<// 2. A constrained height (via flex-1 min-h-0 or fixed height)return (<div+ className={cn('w-full overflow-y-auto', className)}ref={ref}- className={cn('overflow-y-auto w-full', className)}style={{// Ensure height is constrained by flex parentheight: '100%',@@ -42,13 +41,13 @@ function ScrollArea({}) {return (<ScrollAreaPrimitive.Root- data-slot="scroll-area"className={cn('relative', className)}+ data-slot="scroll-area"{...props}><ScrollAreaPrimitive.Viewport+ className="[&>div]:!block size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"data-slot="scroll-area-viewport"- className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&>div]:!block"ref={ref}>{children}@@ -66,21 +65,21 @@ function ScrollBar({}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {return (<ScrollAreaPrimitive.ScrollAreaScrollbar- data-slot="scroll-area-scrollbar"- orientation={orientation}className={cn(- 'flex touch-none p-px transition-colors select-none',+ 'flex touch-none select-none p-px transition-colors',orientation === 'vertical' &&'h-full w-2.5 border-l border-l-transparent',orientation === 'horizontal' &&'h-2.5 flex-col border-t border-t-transparent',className)}+ data-slot="scroll-area-scrollbar"+ orientation={orientation}{...props}><ScrollAreaPrimitive.ScrollAreaThumb+ className="relative flex-1 rounded-full bg-border"data-slot="scroll-area-thumb"- className="bg-border relative flex-1 rounded-full"/></ScrollAreaPrimitive.ScrollAreaScrollbar>);diff --git a/apps/start/src/components/ui/separator.tsx b/apps/start/src/components/ui/separator.tsxindex 95c1758e9..d18bf8355 100644--- a/apps/start/src/components/ui/separator.tsx+++ b/apps/start/src/components/ui/separator.tsx@@ -1,6 +1,5 @@import * as SeparatorPrimitive from '@radix-ui/react-separator';import type * as React from 'react';-import { cn } from '@/lib/utils';function Separator({@@ -11,13 +10,13 @@ function Separator({}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {return (<SeparatorPrimitive.Root- data-slot="separator"- decorative={decorative}- orientation={orientation}className={cn(- 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',+ 'shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px',className)}+ data-slot="separator"+ decorative={decorative}+ orientation={orientation}{...props}/>);diff --git a/apps/start/src/components/ui/sheet.tsx b/apps/start/src/components/ui/sheet.tsxindex e55c3bd13..b87497113 100644--- a/apps/start/src/components/ui/sheet.tsx+++ b/apps/start/src/components/ui/sheet.tsx@@ -1,9 +1,9 @@-import { cn } from '@/utils/cn';import * as SheetPrimitive from '@radix-ui/react-dialog';-import { cva } from 'class-variance-authority';import type { VariantProps } from 'class-variance-authority';+import { cva } from 'class-variance-authority';import { XIcon } from 'lucide-react';import * as React from 'react';+import { cn } from '@/utils/cn';const Sheet = SheetPrimitive.Root;@@ -19,7 +19,7 @@ const SheetOverlay = React.forwardRef<>(({ className, ...props }, ref) => (<SheetPrimitive.OverlayclassName={cn(- 'fixed inset-0 z-50 bg-black/20 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',+ 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/20 data-[state=closed]:animate-out data-[state=open]:animate-in',className)}{...props}@@ -29,16 +29,16 @@ const SheetOverlay = React.forwardRef<SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;const sheetVariants = cva(- 'fixed z-50 flex flex-col gap-4 overflow-y-auto rounded-lg bg-def-100 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out max-sm:w-[calc(100%-theme(spacing.8))]',+ 'fixed z-50 flex flex-col gap-4 overflow-y-auto rounded-lg bg-def-100 p-6 shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500 max-sm:w-[calc(100%-theme(spacing.8))]',{variants: {side: {- top: 'inset-x-4 top-4 border data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',+ top: 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-4 top-4 border',bottom:- 'inset-x-4 bottom-4 border data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',- left: 'bottom-4 left-4 top-4 w-3/4 border data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',+ 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-4 bottom-4 border',+ left: 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left top-4 bottom-4 left-4 w-3/4 border sm:max-w-sm',right:- 'bottom-4 right-4 top-4 w-3/4 border data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',+ 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right top-4 right-4 bottom-4 w-3/4 border sm:max-w-sm',},},defaultVariants: {@@ -60,15 +60,15 @@ const SheetContent = React.forwardRef<<SheetPortal><SheetOverlay onClick={onClose} /><SheetPrimitive.Content- ref={ref}className={cn(sheetVariants({ side }), className)}+ ref={ref}{...props}>{children}- <SheetPrimitive.Close id="close-sheet" className="hidden" />+ <SheetPrimitive.Close className="hidden" id="close-sheet" /><SheetPrimitive.Close+ className="absolute top-6 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-def-100"onClick={onClose}- className="absolute right-4 top-6 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-def-100"><XIcon className="h-4 w-4" /><span className="sr-only">Close</span>@@ -116,8 +116,8 @@ const SheetTitle = React.forwardRef<React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>>(({ className, ...props }, ref) => (<SheetPrimitive.Title+ className={cn('font-semibold text-2xl text-foreground', className)}ref={ref}- className={cn('text-2xl font-semibold text-foreground', className)}{...props}/>));@@ -128,15 +128,17 @@ const SheetDescription = React.forwardRef<React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>>(({ className, ...props }, ref) => (<SheetPrimitive.Description+ className={cn('text-muted-foreground', className)}ref={ref}- className={cn(' text-muted-foreground', className)}{...props}/>));SheetDescription.displayName = SheetPrimitive.Description.displayName;export function closeSheet() {- if (typeof document === 'undefined') return;+ if (typeof document === 'undefined') {+ return;+ }const element = document.querySelector('#close-sheet');if (element instanceof HTMLElement) {element.click();diff --git a/apps/start/src/components/ui/slider.tsx b/apps/start/src/components/ui/slider.tsxindex f8ce0390a..4fa1e796e 100644--- a/apps/start/src/components/ui/slider.tsx+++ b/apps/start/src/components/ui/slider.tsx@@ -1,6 +1,5 @@import * as SliderPrimitive from '@radix-ui/react-slider';import * as React from 'react';-import { cn } from '@/lib/utils';function Slider({@@ -23,35 +22,35 @@ function Slider({return (<SliderPrimitive.Root- data-slot="slider"- defaultValue={defaultValue}- value={value}- min={min}- max={max}className={cn(- 'relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col',+ 'relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50',className)}+ data-slot="slider"+ defaultValue={defaultValue}+ max={max}+ min={min}+ value={value}{...props}><SliderPrimitive.Track- data-slot="slider-track"className={cn(- 'bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5'+ 'relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5')}+ data-slot="slider-track"><SliderPrimitive.Range- data-slot="slider-range"className={cn(- 'bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full'+ 'absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full')}+ data-slot="slider-range"/></SliderPrimitive.Track>{Array.from({ length: _values.length }, (_, index) => (<SliderPrimitive.Thumb+ className="block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50"data-slot="slider-thumb"key={index}- className="border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"/>))}</SliderPrimitive.Root>diff --git a/apps/start/src/components/ui/sonner.tsx b/apps/start/src/components/ui/sonner.tsxindex 6917da527..40075b7a2 100644--- a/apps/start/src/components/ui/sonner.tsx+++ b/apps/start/src/components/ui/sonner.tsx@@ -1,5 +1,5 @@-import { useTheme } from '@/hooks/use-theme';import { Toaster as Sonner } from 'sonner';+import { useTheme } from '@/hooks/use-theme';type ToasterProps = React.ComponentProps<typeof Sonner>;@@ -8,8 +8,8 @@ const Toaster = ({ ...props }: ToasterProps) => {return (<Sonner- theme={theme as ToasterProps['theme']}className="toaster group"+ theme={theme as ToasterProps['theme']}toastOptions={{classNames: {toast:diff --git a/apps/start/src/components/ui/spinner.tsx b/apps/start/src/components/ui/spinner.tsxindex 8dfeafff9..86662c467 100644--- a/apps/start/src/components/ui/spinner.tsx+++ b/apps/start/src/components/ui/spinner.tsx@@ -1,6 +1,6 @@-import { cn } from '@/utils/cn';-import { type VariantProps, cva } from 'class-variance-authority';+import { cva, type VariantProps } from 'class-variance-authority';import type * as React from 'react';+import { cn } from '@/utils/cn';const spinnerVariants = cva('', {variants: {@@ -54,11 +54,11 @@ const Spinner = ({case 'circle':return (<svg- ref={ref}className={spinnerClasses}- xmlns="http://www.w3.org/2000/svg"fill="none"+ ref={ref}viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"{...props}><circle@@ -71,8 +71,8 @@ const Spinner = ({/><pathclassName="opacity-75"- fill="currentColor"d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"+ fill="currentColor"/></svg>);@@ -80,38 +80,38 @@ const Spinner = ({case 'dots':return (<svg- ref={ref}className={baseClasses}- xmlns="http://www.w3.org/2000/svg"fill="currentColor"+ ref={ref}viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"{...props}><circle cx="4" cy="12" r="3"><animateattributeName="opacity"+ begin="0s"dur="1s"repeatCount="indefinite"values="0;1;0"- begin="0s"/></circle><circle cx="12" cy="12" r="3"><animateattributeName="opacity"+ begin="0.2s"dur="1s"repeatCount="indefinite"values="0;1;0"- begin="0.2s"/></circle><circle cx="20" cy="12" r="3"><animateattributeName="opacity"+ begin="0.4s"dur="1s"repeatCount="indefinite"values="0;1;0"- begin="0.4s"/></circle></svg>@@ -120,11 +120,11 @@ const Spinner = ({case 'pulse':return (<div- ref={ref as unknown as React.RefObject<HTMLDivElement>}className={cn(- 'rounded-full bg-current animate-pulse',+ 'animate-pulse rounded-full bg-current',spinnerClasses)}+ ref={ref as unknown as React.RefObject<HTMLDivElement>}style={{animationDuration:speed === 'slow' ? '2s' : speed === 'fast' ? '0.5s' : '1s',@@ -136,91 +136,91 @@ const Spinner = ({case 'bars':return (<svg- ref={ref}className={spinnerClasses}- xmlns="http://www.w3.org/2000/svg"fill="currentColor"+ ref={ref}viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"{...props}>- <rect x="1" y="6" width="2.8" height="12">+ <rect height="12" width="2.8" x="1" y="6"><animateattributeName="height"+ begin="0s"dur="1s"repeatCount="indefinite"values="12;4;12"- begin="0s"/><animateattributeName="y"+ begin="0s"dur="1s"repeatCount="indefinite"values="6;10;6"- begin="0s"/></rect>- <rect x="5.8" y="6" width="2.8" height="12">+ <rect height="12" width="2.8" x="5.8" y="6"><animateattributeName="height"+ begin="0.2s"dur="1s"repeatCount="indefinite"values="12;4;12"- begin="0.2s"/><animateattributeName="y"+ begin="0.2s"dur="1s"repeatCount="indefinite"values="6;10;6"- begin="0.2s"/></rect>- <rect x="10.6" y="6" width="2.8" height="12">+ <rect height="12" width="2.8" x="10.6" y="6"><animateattributeName="height"+ begin="0.4s"dur="1s"repeatCount="indefinite"values="12;4;12"- begin="0.4s"/><animateattributeName="y"+ begin="0.4s"dur="1s"repeatCount="indefinite"values="6;10;6"- begin="0.4s"/></rect>- <rect x="15.4" y="6" width="2.8" height="12">+ <rect height="12" width="2.8" x="15.4" y="6"><animateattributeName="height"+ begin="0.6s"dur="1s"repeatCount="indefinite"values="12;4;12"- begin="0.6s"/><animateattributeName="y"+ begin="0.6s"dur="1s"repeatCount="indefinite"values="6;10;6"- begin="0.6s"/></rect>- <rect x="20.2" y="6" width="2.8" height="12">+ <rect height="12" width="2.8" x="20.2" y="6"><animateattributeName="height"+ begin="0.8s"dur="1s"repeatCount="indefinite"values="12;4;12"- begin="0.8s"/><animateattributeName="y"+ begin="0.8s"dur="1s"repeatCount="indefinite"values="6;10;6"- begin="0.8s"/></rect></svg>@@ -229,11 +229,11 @@ const Spinner = ({case 'ring':return (<svg- ref={ref}className={spinnerClasses}- xmlns="http://www.w3.org/2000/svg"fill="none"+ ref={ref}viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"{...props}><circle@@ -250,9 +250,9 @@ const Spinner = ({cy="12"r="10"stroke="currentColor"- strokeWidth="4"strokeDasharray="32"strokeDashoffset="32"+ strokeWidth="4"><animateattributeName="stroke-dasharray"@@ -273,11 +273,11 @@ const Spinner = ({default:return (<svg- ref={ref}className={spinnerClasses}- xmlns="http://www.w3.org/2000/svg"fill="none"+ ref={ref}viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"{...props}><circle@@ -290,8 +290,8 @@ const Spinner = ({/><pathclassName="opacity-75"- fill="currentColor"d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"+ fill="currentColor"/></svg>);diff --git a/apps/start/src/components/ui/switch.tsx b/apps/start/src/components/ui/switch.tsxindex 4042c7bc9..9c4d0a851 100644--- a/apps/start/src/components/ui/switch.tsx+++ b/apps/start/src/components/ui/switch.tsx@@ -1,6 +1,6 @@-import { cn } from '@/utils/cn';import * as SwitchPrimitives from '@radix-ui/react-switch';import * as React from 'react';+import { cn } from '@/utils/cn';const Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.Root>,@@ -8,7 +8,7 @@ const Switch = React.forwardRef<>(({ className, ...props }, ref) => (<SwitchPrimitives.RootclassName={cn(- 'data-[state=checked]:bg-highlight peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-input',+ 'peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-highlight data-[state=unchecked]:bg-input',className)}{...props}diff --git a/apps/start/src/components/ui/table.tsx b/apps/start/src/components/ui/table.tsxindex b1c6d25a2..f716e656f 100644--- a/apps/start/src/components/ui/table.tsx+++ b/apps/start/src/components/ui/table.tsx@@ -1,5 +1,4 @@import type * as React from 'react';-import { cn } from '@/lib/utils';export function TableButtons({@@ -10,7 +9,7 @@ export function TableButtons({className?: string;}) {return (- <div className={cn('mb-2 row flex-wrap items-center gap-2', className)}>+ <div className={cn('row mb-2 flex-wrap items-center gap-2', className)}>{children}</div>);@@ -19,12 +18,12 @@ export function TableButtons({function Table({ className, ...props }: React.ComponentProps<'table'>) {return (<div- data-slot="table-container"className="relative w-full overflow-x-auto"+ data-slot="table-container"><table- data-slot="table"className={cn('w-full caption-bottom bg-card', className)}+ data-slot="table"{...props}/></div>@@ -34,8 +33,8 @@ function Table({ className, ...props }: React.ComponentProps<'table'>) {function TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {return (<thead- data-slot="table-header"className={cn('[&_tr]:border-b', className)}+ data-slot="table-header"{...props}/>);@@ -44,8 +43,8 @@ function TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {return (<tbody- data-slot="table-body"className={cn('[&_tr:last-child]:border-0', className)}+ data-slot="table-body"{...props}/>);@@ -54,11 +53,11 @@ function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {return (<tfoot- data-slot="table-footer"className={cn(- 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',+ 'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0',className)}+ data-slot="table-footer"{...props}/>);@@ -67,11 +66,11 @@ function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {return (<tr- data-slot="table-row"className={cn(- 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors group/row',+ 'group/row border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',className)}+ data-slot="table-row"{...props}/>);@@ -80,11 +79,11 @@ function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {function TableHead({ className, ...props }: React.ComponentProps<'th'>) {return (<th- data-slot="table-head"className={cn(- 'text-[10px] uppercase text-foreground h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',+ 'h-10 whitespace-nowrap px-4 text-left align-middle font-medium text-[10px] text-foreground uppercase [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',className)}+ data-slot="table-head"{...props}/>);@@ -93,11 +92,11 @@ function TableHead({ className, ...props }: React.ComponentProps<'th'>) {function TableCell({ className, ...props }: React.ComponentProps<'td'>) {return (<td- data-slot="table-cell"className={cn(- 'p-2 px-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] max-w-94',+ 'max-w-94 whitespace-nowrap p-2 px-4 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',className)}+ data-slot="table-cell"{...props}/>);@@ -109,8 +108,8 @@ function TableCaption({}: React.ComponentProps<'caption'>) {return (<caption+ className={cn('mt-4 text-muted-foreground text-sm', className)}data-slot="table-caption"- className={cn('text-muted-foreground mt-4 text-sm', className)}{...props}/>);diff --git a/apps/start/src/components/ui/tabs.tsx b/apps/start/src/components/ui/tabs.tsxindex 256db3681..d5140ed6c 100644--- a/apps/start/src/components/ui/tabs.tsx+++ b/apps/start/src/components/ui/tabs.tsx@@ -1,6 +1,6 @@-import { cn } from '@/utils/cn';import * as TabsPrimitive from '@radix-ui/react-tabs';import * as React from 'react';+import { cn } from '@/utils/cn';const Tabs = TabsPrimitive.Root;@@ -9,11 +9,11 @@ const TabsList = React.forwardRef<React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>>(({ className, ...props }, ref) => (<TabsPrimitive.List- ref={ref}className={cn(- 'inline-flex w-full h-auto items-center justify-start overflow-x-auto border-b border-border text-muted-foreground hide-scrollbar',+ 'hide-scrollbar inline-flex h-auto w-full items-center justify-start overflow-x-auto border-border border-b text-muted-foreground',className)}+ ref={ref}{...props}/>));@@ -24,14 +24,14 @@ const TabsTrigger = React.forwardRef<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>>(({ className, ...props }, ref) => (<TabsPrimitive.Trigger- ref={ref}className={cn(- 'group inline-flex items-center justify-center whitespace-nowrap px-3 py-1 font-medium text-muted-foreground transition-all border-b-2 border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:border-foreground',+ 'group inline-flex items-center justify-center whitespace-nowrap border-transparent border-b-2 px-3 py-1 font-medium text-muted-foreground transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-foreground data-[state=active]:text-foreground',className)}+ ref={ref}{...props}>- <span className="group-hover:bg-def-300 group-hover:text-foreground p-0.5 px-1.5 rounded-sm">+ <span className="rounded-sm p-0.5 px-1.5 group-hover:bg-def-300 group-hover:text-foreground">{props.children}</span></TabsPrimitive.Trigger>@@ -43,11 +43,11 @@ const TabsContent = React.forwardRef<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>>(({ className, ...props }, ref) => (<TabsPrimitive.Content- ref={ref}className={cn('mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',className)}+ ref={ref}{...props}/>));diff --git a/apps/start/src/components/ui/textarea.tsx b/apps/start/src/components/ui/textarea.tsxindex f32c81df7..818a1a967 100644--- a/apps/start/src/components/ui/textarea.tsx+++ b/apps/start/src/components/ui/textarea.tsx@@ -1,5 +1,5 @@-import { cn } from '@/utils/cn';import * as React from 'react';+import { cn } from '@/utils/cn';export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;@@ -8,7 +8,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(return (<textareaclassName={cn(- 'flex min-h-[80px] w-full rounded-md border border-input bg-card px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',+ 'flex min-h-[80px] w-full rounded-md border border-input bg-card px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',className)}ref={ref}diff --git a/apps/start/src/components/ui/toast.tsx b/apps/start/src/components/ui/toast.tsxindex 2fa0cb653..d99041c60 100644--- a/apps/start/src/components/ui/toast.tsx+++ b/apps/start/src/components/ui/toast.tsx@@ -1,9 +1,9 @@-import { cn } from '@/utils/cn';import * as ToastPrimitives from '@radix-ui/react-toast';-import { cva } from 'class-variance-authority';import type { VariantProps } from 'class-variance-authority';+import { cva } from 'class-variance-authority';import { X } from 'lucide-react';import * as React from 'react';+import { cn } from '@/utils/cn';const ToastProvider = ToastPrimitives.Provider;@@ -12,18 +12,18 @@ const ToastViewport = React.forwardRef<React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>>(({ className, ...props }, ref) => (<ToastPrimitives.Viewport- ref={ref}className={cn(- 'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]',+ 'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',className)}+ ref={ref}{...props}/>));ToastViewport.displayName = ToastPrimitives.Viewport.displayName;const toastVariants = cva(- 'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',+ 'group data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none',{variants: {variant: {@@ -45,8 +45,8 @@ const Toast = React.forwardRef<>(({ className, variant, ...props }, ref) => {return (<ToastPrimitives.Root- ref={ref}className={cn(toastVariants({ variant }), className)}+ ref={ref}{...props}/>);@@ -58,11 +58,11 @@ const ToastAction = React.forwardRef<React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>>(({ className, ...props }, ref) => (<ToastPrimitives.Action- ref={ref}className={cn(- 'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 font-medium ring-offset-background transition-colors hover:bg-def-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive',+ 'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 font-medium ring-offset-background transition-colors hover:bg-def-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:focus:ring-destructive group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground',className)}+ ref={ref}{...props}/>));@@ -73,11 +73,11 @@ const ToastClose = React.forwardRef<React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>>(({ className, ...props }, ref) => (<ToastPrimitives.Close- ref={ref}className={cn(- 'absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',+ 'absolute top-2 right-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 group-[.destructive]:hover:text-red-50',className)}+ ref={ref}toast-close=""{...props}>@@ -91,8 +91,8 @@ const ToastTitle = React.forwardRef<React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>>(({ className, ...props }, ref) => (<ToastPrimitives.Title+ className={cn('font-semibold', className)}ref={ref}- className={cn(' font-semibold', className)}{...props}/>));@@ -103,8 +103,8 @@ const ToastDescription = React.forwardRef<React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>>(({ className, ...props }, ref) => (<ToastPrimitives.Description+ className={cn('opacity-90', className)}ref={ref}- className={cn(' opacity-90', className)}{...props}/>));diff --git a/apps/start/src/components/ui/toaster.tsx b/apps/start/src/components/ui/toaster.tsxindex 6917da527..40075b7a2 100644--- a/apps/start/src/components/ui/toaster.tsx+++ b/apps/start/src/components/ui/toaster.tsx@@ -1,5 +1,5 @@-import { useTheme } from '@/hooks/use-theme';import { Toaster as Sonner } from 'sonner';+import { useTheme } from '@/hooks/use-theme';type ToasterProps = React.ComponentProps<typeof Sonner>;@@ -8,8 +8,8 @@ const Toaster = ({ ...props }: ToasterProps) => {return (<Sonner- theme={theme as ToasterProps['theme']}className="toaster group"+ theme={theme as ToasterProps['theme']}toastOptions={{classNames: {toast:diff --git a/apps/start/src/components/ui/toggle-group.tsx b/apps/start/src/components/ui/toggle-group.tsxindex 3a59624ae..8e0279648 100644--- a/apps/start/src/components/ui/toggle-group.tsx+++ b/apps/start/src/components/ui/toggle-group.tsx@@ -1,8 +1,8 @@-import { toggleVariants } from '@/components/ui/toggle';-import { cn } from '@/utils/cn';import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';import type { VariantProps } from 'class-variance-authority';import * as React from 'react';+import { toggleVariants } from '@/components/ui/toggle';+import { cn } from '@/utils/cn';const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>@@ -17,8 +17,8 @@ const ToggleGroup = React.forwardRef<VariantProps<typeof toggleVariants>>(({ className, variant, size, children, ...props }, ref) => (<ToggleGroupPrimitive.Root- ref={ref}className={cn('flex items-center justify-center gap-1', className)}+ ref={ref}{...props}><ToggleGroupContext.Provider value={{ variant, size }}>@@ -38,7 +38,6 @@ const ToggleGroupItem = React.forwardRef<return (<ToggleGroupPrimitive.Item- ref={ref}className={cn(toggleVariants({variant: context.variant || variant,@@ -46,6 +45,7 @@ const ToggleGroupItem = React.forwardRef<}),className)}+ ref={ref}{...props}>{children}diff --git a/apps/start/src/components/ui/toggle.tsx b/apps/start/src/components/ui/toggle.tsxindex e19b74619..f322c6fc3 100644--- a/apps/start/src/components/ui/toggle.tsx+++ b/apps/start/src/components/ui/toggle.tsx@@ -1,11 +1,11 @@-import { cn } from '@/utils/cn';import * as TogglePrimitive from '@radix-ui/react-toggle';-import { cva } from 'class-variance-authority';import type { VariantProps } from 'class-variance-authority';+import { cva } from 'class-variance-authority';import * as React from 'react';+import { cn } from '@/utils/cn';const toggleVariants = cva(- 'inline-flex items-center justify-center rounded-md font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',+ 'inline-flex items-center justify-center rounded-md font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',{variants: {variant: {@@ -32,8 +32,8 @@ const Toggle = React.forwardRef<VariantProps<typeof toggleVariants>>(({ className, variant, size, ...props }, ref) => (<TogglePrimitive.Root- ref={ref}className={cn(toggleVariants({ variant, size, className }))}+ ref={ref}{...props}/>));diff --git a/apps/start/src/components/ui/tooltip.tsx b/apps/start/src/components/ui/tooltip.tsxindex 2dc0f1fd1..be6cb1442 100644--- a/apps/start/src/components/ui/tooltip.tsx+++ b/apps/start/src/components/ui/tooltip.tsx@@ -1,6 +1,6 @@-import { cn } from '@/utils/cn';import * as TooltipPrimitive from '@radix-ui/react-tooltip';import * as React from 'react';+import { cn } from '@/utils/cn';const TooltipProvider = TooltipPrimitive.Provider;@@ -17,12 +17,12 @@ const TooltipContent = React.forwardRef<>(({ className, sideOffset = 4, disabled, ...props }, ref) =>disabled ? null : (<TooltipPrimitive.Content- ref={ref}- sideOffset={sideOffset}className={cn(- 'z-50 rounded-md border bg-background p-4 py-2.5 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ 'fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 animate-in rounded-md border bg-background p-4 py-2.5 data-[state=closed]:animate-out',className)}+ ref={ref}+ sideOffset={sideOffset}{...props}/>)@@ -57,7 +57,9 @@ export function Tooltiper({disabled = false,align,}: TooltiperProps) {- if (disabled) return children;+ if (disabled) {+ return children;+ }return (<Tooltip delayDuration={delayDuration}><TooltipTrigger@@ -70,10 +72,10 @@ export function Tooltiper({</TooltipTrigger><TooltipPortal><TooltipContent- sideOffset={sideOffset}- side={side}- className={tooltipClassName}align={align}+ className={tooltipClassName}+ side={side}+ sideOffset={sideOffset}>{content}</TooltipContent>diff --git a/apps/start/src/components/widget-table.tsx b/apps/start/src/components/widget-table.tsxindex 808b704a2..bdd70dbf3 100644--- a/apps/start/src/components/widget-table.tsx+++ b/apps/start/src/components/widget-table.tsx@@ -1,5 +1,5 @@-import { cn } from '@/utils/cn';import React from 'react';+import { cn } from '@/utils/cn';export type ColumnPriority = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;@@ -55,7 +55,7 @@ export const WidgetTableHead = ({return (<theadclassName={cn(- 'text-def-1000 sticky top-0 z-10 border-b border-border bg-def-100 [&_th:last-child]:text-right [&_th]:whitespace-nowrap [&_th]:p-4 [&_th]:py-2 [&_th]:text-right [&_th:first-child]:text-left [&_th]:font-medium',+ 'sticky top-0 z-10 border-border border-b bg-def-100 text-def-1000 [&_th:first-child]:text-left [&_th:last-child]:text-right [&_th]:whitespace-nowrap [&_th]:p-4 [&_th]:py-2 [&_th]:text-right [&_th]:font-medium',className)}>@@ -166,7 +166,7 @@ export function WidgetTable<T>({{containerQueryStyles}{/* Header */}<div- className={cn('grid border-b border-border head', columnClassName)}+ className={cn('head grid border-border border-b', columnClassName)}style={{ gridTemplateColumns }}>{columns.map((column, colIndex) => {@@ -194,14 +194,14 @@ export function WidgetTable<T>({return (<div- key={columnKey}className={cn(- 'p-2 font-medium font-sans text-sm whitespace-nowrap cell',+ 'cell whitespace-nowrap p-2 font-medium font-sans text-sm',columns.length > 1 && column !== columns[0]? 'text-right': 'text-left',responsiveClass)}+ key={columnKey}style={{ width: column.width }}{...dataAttrs}>@@ -212,14 +212,14 @@ export function WidgetTable<T>({</div>{/* Body */}- <div className="flex flex-col body">+ <div className="body flex flex-col">{data.map((item, index) => (<div- key={keyExtractor(item)}className={cn(- 'group/row relative border-b border-border last:border-0 h-8 overflow-hidden',+ 'group/row relative h-8 overflow-hidden border-border border-b last:border-0',columnClassName)}+ key={keyExtractor(item)}>{eachRow?.(item, index)}<div@@ -255,9 +255,8 @@ export function WidgetTable<T>({return (<div- key={columnKey}className={cn(- 'px-2 relative cell',+ 'cell relative px-2',columns.length > 1 && column !== columns[0]? 'text-right': 'text-left',@@ -265,6 +264,7 @@ export function WidgetTable<T>({column.width === 'w-full' && 'w-full min-w-0',responsiveClass)}+ key={columnKey}style={column.width !== 'w-full' ? { width: column.width } : {}}diff --git a/apps/start/src/components/widget.tsx b/apps/start/src/components/widget.tsxindex b9bdfa246..2e76c675d 100644--- a/apps/start/src/components/widget.tsx+++ b/apps/start/src/components/widget.tsx@@ -1,5 +1,5 @@-import { cn } from '@/utils/cn';import type { LucideIcon } from 'lucide-react';+import { cn } from '@/utils/cn';export interface WidgetHeadProps {children: React.ReactNode;@@ -9,7 +9,7 @@ export function WidgetHead({ children, className }: WidgetHeadProps) {return (<divclassName={cn(- 'border-b border-border p-4 [&_.title]:whitespace-nowrap [&_.title]:font-semibold [&_.title]:text-lg',+ 'border-border border-b p-4 [&_.title]:whitespace-nowrap [&_.title]:font-semibold [&_.title]:text-lg',className)}>diff --git a/apps/start/src/hooks/use-breakpoint.ts b/apps/start/src/hooks/use-breakpoint.tsindex 4c840a092..8a7cf2ce2 100644--- a/apps/start/src/hooks/use-breakpoint.ts+++ b/apps/start/src/hooks/use-breakpoint.ts@@ -1,4 +1,5 @@import { useMediaQuery } from 'react-responsive';+// import type { ScreensConfig } from 'tailwindcss/types/config';// TODO: Ensure we have same breakpoints as tailwinddiff --git a/apps/start/src/hooks/use-cohorts.ts b/apps/start/src/hooks/use-cohorts.tsindex f9bfa48e6..53e86d096 100644--- a/apps/start/src/hooks/use-cohorts.ts+++ b/apps/start/src/hooks/use-cohorts.ts@@ -1,5 +1,5 @@-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';+import { useTRPC } from '@/integrations/trpc/react';export function useCohorts(params: { projectId: string; includeCount?: boolean },diff --git a/apps/start/src/hooks/use-conversion-rechart-data-model.ts b/apps/start/src/hooks/use-conversion-rechart-data-model.tsindex 5b7695d6b..78dfb1363 100644--- a/apps/start/src/hooks/use-conversion-rechart-data-model.ts+++ b/apps/start/src/hooks/use-conversion-rechart-data-model.ts@@ -1,11 +1,11 @@-import type { RouterOutputs } from '@/trpc/client';import { useMemo } from 'react';+import type { RouterOutputs } from '@/trpc/client';export function useConversionRechartDataModel(series: RouterOutputs['chart']['conversion']['current']) {return useMemo(() => {- if (!series.length || !series[0]?.data.length) {+ if (!(series.length && series[0]?.data.length)) {return [];}diff --git a/apps/start/src/hooks/use-dashed-stroke.tsx b/apps/start/src/hooks/use-dashed-stroke.tsxindex 2719a0a07..f2ce1aa8a 100644--- a/apps/start/src/hooks/use-dashed-stroke.tsx+++ b/apps/start/src/hooks/use-dashed-stroke.tsx@@ -1,5 +1,4 @@-import { forwardRef, useCallback, useRef, useState } from 'react';-import { Customized, Line } from 'recharts';+import { useCallback, useRef, useState } from 'react';export type GraphicalItemPoint = {/*** x point coordinate.@@ -116,7 +115,9 @@ export function useStrokeDasharray({const getLineWidth = (points: GraphicalItemPoint[]) => {const width = points?.reduce((acc, point, index) => {- if (!index) return acc;+ if (!index) {+ return acc;+ }const prevPoint = points?.[index - 1];@@ -146,7 +147,9 @@ export function useStrokeDasharray({const dashedPoints = linePoints?.slice(targetIndex);const dashedWidth = getLineWidth(dashedPoints || []);- if (!lineWidth || !dashedWidth) return;+ if (!(lineWidth && dashedWidth)) {+ return;+ }const firstWidth = lineWidth - dashedWidth;const targetCurve = targetLine?.curveCorrection ?? curveCorrection;diff --git a/apps/start/src/hooks/use-debounced-callback.ts b/apps/start/src/hooks/use-debounced-callback.tsindex e31c23d7b..aa870831f 100644--- a/apps/start/src/hooks/use-debounced-callback.ts+++ b/apps/start/src/hooks/use-debounced-callback.ts@@ -1,5 +1,4 @@import * as React from 'react';-import { useCallbackRef } from '@/hooks/use-callback-ref';export function useDebouncedCallback<T extends (...args: never[]) => unknown>(diff --git a/apps/start/src/hooks/use-event-names.ts b/apps/start/src/hooks/use-event-names.tsindex d962aac85..45f11a4ec 100644--- a/apps/start/src/hooks/use-event-names.ts+++ b/apps/start/src/hooks/use-event-names.ts@@ -1,5 +1,5 @@-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';+import { useTRPC } from '@/integrations/trpc/react';export function useEventNames(params: {projectId: string;diff --git a/apps/start/src/hooks/use-event-properties.ts b/apps/start/src/hooks/use-event-properties.tsindex 02ae23b62..fa8b11644 100644--- a/apps/start/src/hooks/use-event-properties.ts+++ b/apps/start/src/hooks/use-event-properties.ts@@ -1,6 +1,6 @@+import { useQuery } from '@tanstack/react-query';import { useTRPC } from '@/integrations/trpc/react';import type { RouterInputs } from '@/trpc/client';-import { useQuery } from '@tanstack/react-query';export function useEventProperties(params: RouterInputs['chart']['properties'],diff --git a/apps/start/src/hooks/use-logout.ts b/apps/start/src/hooks/use-logout.tsindex 0952ed938..a9d6f6fb8 100644--- a/apps/start/src/hooks/use-logout.ts+++ b/apps/start/src/hooks/use-logout.ts@@ -1,5 +1,5 @@-import { useTRPC } from '@/integrations/trpc/react';import { useMutation } from '@tanstack/react-query';+import { useTRPC } from '@/integrations/trpc/react';export function useLogout() {const trpc = useTRPC();diff --git a/apps/start/src/hooks/use-numer-formatter.ts b/apps/start/src/hooks/use-numer-formatter.tsindex b5eba167d..19f3d4eeb 100644--- a/apps/start/src/hooks/use-numer-formatter.ts+++ b/apps/start/src/hooks/use-numer-formatter.ts@@ -9,7 +9,9 @@ export function fancyMinutes(time: number) {return `${hours}h ${remainingMinutes}m`;}const seconds = round(time - minutes * 60, 0);- if (minutes === 0) return `${seconds}s`;+ if (minutes === 0) {+ return `${seconds}s`;+ }return `${minutes}m ${seconds}s`;}@@ -53,7 +55,7 @@ export const formatCurrency =// Get currency symbolconst currencyFormatter = new Intl.NumberFormat(locale, {style: 'currency',- currency: currency,+ currency,minimumFractionDigits: 0,maximumFractionDigits: 0,});@@ -64,7 +66,7 @@ export const formatCurrency =}return new Intl.NumberFormat(locale, {style: 'currency',- currency: currency,+ currency,minimumFractionDigits: 0,maximumFractionDigits: 1,}).format(amount);diff --git a/apps/start/src/hooks/use-organization-access.ts b/apps/start/src/hooks/use-organization-access.tsindex dae93d89a..514448741 100644--- a/apps/start/src/hooks/use-organization-access.ts+++ b/apps/start/src/hooks/use-organization-access.ts@@ -1,5 +1,5 @@-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';+import { useTRPC } from '@/integrations/trpc/react';export function useOrganizationAccess(organizationId: string | undefined) {const trpc = useTRPC();diff --git a/apps/start/src/hooks/use-profile-properties.ts b/apps/start/src/hooks/use-profile-properties.tsindex 1f8cb1bb9..213cd274b 100644--- a/apps/start/src/hooks/use-profile-properties.ts+++ b/apps/start/src/hooks/use-profile-properties.ts@@ -1,5 +1,5 @@-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';+import { useTRPC } from '@/integrations/trpc/react';export function useProfileProperties(projectId: string) {const trpc = useTRPC();diff --git a/apps/start/src/hooks/use-profile-values.ts b/apps/start/src/hooks/use-profile-values.tsindex 398d0fec8..03829bb5a 100644--- a/apps/start/src/hooks/use-profile-values.ts+++ b/apps/start/src/hooks/use-profile-values.ts@@ -1,11 +1,11 @@-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';+import { useTRPC } from '@/integrations/trpc/react';export function useProfileValues(projectId: string, property: string) {const trpc = useTRPC();const query = useQuery(trpc.profile.values.queryOptions({- projectId: projectId,+ projectId,property,}));diff --git a/apps/start/src/hooks/use-project-document-title.ts b/apps/start/src/hooks/use-project-document-title.tsindex 8fdb05621..b73257f82 100644--- a/apps/start/src/hooks/use-project-document-title.ts+++ b/apps/start/src/hooks/use-project-document-title.ts@@ -3,8 +3,12 @@ import { useEffect, useRef } from 'react';const BASE_SUFFIX = ' | OpenPanel.dev';function inject(title: string, projectName: string): string {- if (!title.endsWith(BASE_SUFFIX)) return title;- if (title.includes(` | ${projectName}${BASE_SUFFIX}`)) return title;+ if (!title.endsWith(BASE_SUFFIX)) {+ return title;+ }+ if (title.includes(` | ${projectName}${BASE_SUFFIX}`)) {+ return title;+ }return title.replace(BASE_SUFFIX, ` | ${projectName}${BASE_SUFFIX}`);}@@ -17,11 +21,15 @@ export function useProjectDocumentTitle(projectName: string | undefined) {const lastApplied = useRef<string | null>(null);useEffect(() => {- if (!projectName) return;+ if (!projectName) {+ return;+ }const apply = () => {const current = document.title;- if (current === lastApplied.current) return;+ if (current === lastApplied.current) {+ return;+ }const next = inject(current, projectName);if (next !== current) {document.title = next;diff --git a/apps/start/src/hooks/use-rechart-data-model.ts b/apps/start/src/hooks/use-rechart-data-model.tsindex ba8f069f6..1d7be625d 100644--- a/apps/start/src/hooks/use-rechart-data-model.ts+++ b/apps/start/src/hooks/use-rechart-data-model.ts@@ -1,6 +1,6 @@+import { useMemo } from 'react';import type { IChartData } from '@/trpc/client';import { getChartColor } from '@/utils/theme';-import { useMemo } from 'react';export type IRechartPayloadItem = {id: string;diff --git a/apps/start/src/hooks/use-resizable-drawer.ts b/apps/start/src/hooks/use-resizable-drawer.tsindex 8f880be55..6e7414f5c 100644--- a/apps/start/src/hooks/use-resizable-drawer.ts+++ b/apps/start/src/hooks/use-resizable-drawer.ts@@ -40,17 +40,25 @@ export function useResizableDrawer({// Hydrate from localStorage on mount (avoids SSR mismatch).useEffect(() => {- if (typeof window === 'undefined') return;+ if (typeof window === 'undefined') {+ return;+ }const raw = window.localStorage.getItem(storageKey);- if (!raw) return;+ if (!raw) {+ return;+ }const n = Number(raw);- if (Number.isNaN(n)) return;+ if (Number.isNaN(n)) {+ return;+ }setWidth(Math.min(maxWidth, Math.max(minWidth, n)));}, [storageKey, minWidth, maxWidth]);// Persist on idle (debounced).useEffect(() => {- if (typeof window === 'undefined') return;+ if (typeof window === 'undefined') {+ return;+ }const t = window.setTimeout(() => {window.localStorage.setItem(storageKey, String(width));}, 300);@@ -65,7 +73,9 @@ export function useResizableDrawer({dragRef.current = { startX: e.clientX, startWidth: width };const onMove = (ev: MouseEvent) => {- if (!dragRef.current) return;+ if (!dragRef.current) {+ return;+ }const dx =edge === 'left'? dragRef.current.startX - ev.clientXdiff --git a/apps/start/src/hooks/use-scroll-anchor.ts b/apps/start/src/hooks/use-scroll-anchor.tsindex 935551531..3bf4893bb 100644--- a/apps/start/src/hooks/use-scroll-anchor.ts+++ b/apps/start/src/hooks/use-scroll-anchor.ts@@ -18,12 +18,10 @@ export const useScrollAnchor = () => {}, []);useEffect(() => {- if (messagesRef.current) {- if (isAtBottom && !isVisible) {- messagesRef.current.scrollIntoView({- block: 'end',- });- }+ if (messagesRef.current && isAtBottom && !isVisible) {+ messagesRef.current.scrollIntoView({+ block: 'end',+ });}}, [isAtBottom, isVisible]);diff --git a/apps/start/src/hooks/use-search-query-state.ts b/apps/start/src/hooks/use-search-query-state.tsindex f41746290..400c7157f 100644--- a/apps/start/src/hooks/use-search-query-state.ts+++ b/apps/start/src/hooks/use-search-query-state.ts@@ -1,6 +1,6 @@-import { useDataTablePagination } from '@/components/ui/data-table/data-table-hooks';import { useQueryState } from 'nuqs';import { useDebounceValue } from './use-debounce-value';+import { useDataTablePagination } from '@/components/ui/data-table/data-table-hooks';export function useSearchQueryState(props?: {searchKey?: string;diff --git a/apps/start/src/hooks/use-visible-conversion-series.ts b/apps/start/src/hooks/use-visible-conversion-series.tsindex 1c888e198..dfa6126ff 100644--- a/apps/start/src/hooks/use-visible-conversion-series.ts+++ b/apps/start/src/hooks/use-visible-conversion-series.ts@@ -1,5 +1,5 @@-import type { RouterOutputs } from '@/trpc/client';import { useCallback, useMemo, useRef, useState } from 'react';+import type { RouterOutputs } from '@/trpc/client';export type IVisibleConversionSeries = ReturnType<typeof useVisibleConversionSeries@@ -28,7 +28,9 @@ export function useVisibleConversionSeries(const valid = savedVisibleSeries.filter((id) =>series.some((s) => s.id === id));- if (valid.length > 0) return valid;+ if (valid.length > 0) {+ return valid;+ }}return series.slice(0, max).map((s) => s.id);};diff --git a/apps/start/src/hooks/use-visible-funnel-breakdowns.ts b/apps/start/src/hooks/use-visible-funnel-breakdowns.tsindex 7f47cddcc..65f2e81e2 100644--- a/apps/start/src/hooks/use-visible-funnel-breakdowns.ts+++ b/apps/start/src/hooks/use-visible-funnel-breakdowns.ts@@ -1,5 +1,5 @@-import type { RouterOutputs } from '@/trpc/client';import { useCallback, useMemo, useRef, useState } from 'react';+import type { RouterOutputs } from '@/trpc/client';export type IVisibleFunnelBreakdowns = ReturnType<typeof useVisibleFunnelBreakdowns@@ -28,7 +28,9 @@ export function useVisibleFunnelBreakdowns(const valid = savedVisibleSeries.filter((id) =>items.some((s) => s.id === id));- if (valid.length > 0) return valid;+ if (valid.length > 0) {+ return valid;+ }}return items.slice(0, max).map((s) => s.id);};diff --git a/apps/start/src/hooks/use-visible-series.ts b/apps/start/src/hooks/use-visible-series.tsindex adee7eecd..d6cf24b1c 100644--- a/apps/start/src/hooks/use-visible-series.ts+++ b/apps/start/src/hooks/use-visible-series.ts@@ -1,5 +1,5 @@-import type { IChartData } from '@/trpc/client';import { useCallback, useMemo, useRef, useState } from 'react';+import type { IChartData } from '@/trpc/client';export type IVisibleSeries = ReturnType<typeof useVisibleSeries>['series'];@@ -26,7 +26,9 @@ export function useVisibleSeries(const valid = savedVisibleSeries.filter((id) =>series.some((s) => s.id === id));- if (valid.length > 0) return valid;+ if (valid.length > 0) {+ return valid;+ }}return series.slice(0, max).map((s) => s.id);};diff --git a/apps/start/src/modals/Instructions.tsx b/apps/start/src/modals/Instructions.tsxindex 126ece295..941460dcf 100644--- a/apps/start/src/modals/Instructions.tsx+++ b/apps/start/src/modals/Instructions.tsx@@ -1,5 +1,7 @@-import Syntax from '@/components/syntax';-import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';+import type { IServiceClient } from '@openpanel/core';+import type { frameworks } from '@openpanel/sdk-info';+import { ExternalLinkIcon, XIcon } from 'lucide-react';+import { popModal } from '.';import { Button, LinkButton } from '@/components/ui/button';import {SheetContent,@@ -7,12 +9,6 @@ import {SheetHeader,SheetTitle,} from '@/components/ui/sheet';-import { ExternalLinkIcon, XIcon } from 'lucide-react';--import type { IServiceClient } from '@openpanel/core';-import type { frameworks } from '@openpanel/sdk-info';--import { popModal } from '.';type Props = {client: IServiceClient | null;@@ -26,20 +22,20 @@ const Header = ({ framework }: Pick<Props, 'framework'>) => ();const Footer = ({ framework }: Pick<Props, 'framework'>) => (- <SheetFooter className="absolute bottom-0 left-0 right-0 p-4">+ <SheetFooter className="absolute right-0 bottom-0 left-0 p-4"><Button- variant={'secondary'}className="flex-1"- onClick={() => popModal()}icon={XIcon}+ onClick={() => popModal()}+ variant={'secondary'}>Close</Button><LinkButton- target="_blank"- href={framework.href}className="flex-1"+ href={framework.href}icon={ExternalLinkIcon}+ target="_blank">More details</LinkButton>@@ -49,7 +45,7 @@ const Footer = ({ framework }: Pick<Props, 'framework'>) => (const Instructions = ({ framework }: Props) => {return (<iframe- className="w-full h-full"+ className="h-full w-full"src={framework.href}title={framework.name}/>diff --git a/apps/start/src/modals/Modal/scrollable-modal.tsx b/apps/start/src/modals/Modal/scrollable-modal.tsxindex 53e48783b..02fd05387 100644--- a/apps/start/src/modals/Modal/scrollable-modal.tsx+++ b/apps/start/src/modals/Modal/scrollable-modal.tsx@@ -1,7 +1,7 @@-import { ScrollArea, VirtualScrollArea } from '@/components/ui/scroll-area';-import { cn } from '@/utils/cn';import { createContext, useContext, useRef } from 'react';import { ModalContent } from './Container';+import { VirtualScrollArea } from '@/components/ui/scroll-area';+import { cn } from '@/utils/cn';const ScrollableModalContext = createContext<{scrollAreaRef: React.RefObject<HTMLDivElement | null>;@@ -25,15 +25,15 @@ export function ScrollableModal({const scrollAreaRef = useRef<HTMLDivElement>(null);return (<ScrollableModalContext.Provider value={{ scrollAreaRef }}>- <ModalContent className="flex !max-h-[90vh] flex-col p-0 gap-0">+ <ModalContent className="!max-h-[90vh] flex flex-col gap-0 p-0"><div className="flex-shrink-0 p-6">{header}</div><VirtualScrollArea- ref={scrollAreaRef}className={cn(- 'flex-1 min-h-0 w-full',+ 'min-h-0 w-full flex-1',footer && 'border-b',header && 'border-t')}+ ref={scrollAreaRef}>{children}</VirtualScrollArea>diff --git a/apps/start/src/modals/add-client.tsx b/apps/start/src/modals/add-client.tsxindex b0114b050..22f8c0dfb 100644--- a/apps/start/src/modals/add-client.tsx+++ b/apps/start/src/modals/add-client.tsx@@ -1,23 +1,21 @@-import { CreateClientSuccess } from '@/components/clients/create-client-success';-import { Button, buttonVariants } from '@/components/ui/button';-import { Combobox } from '@/components/ui/combobox';-import { DialogFooter } from '@/components/ui/dialog';-import { Input } from '@/components/ui/input';-import { Label } from '@/components/ui/label';-import { useAppParams } from '@/hooks/use-app-params';-import { handleError } from '@/integrations/trpc/react';-import { cn } from '@/utils/cn';import { zodResolver } from '@hookform/resolvers/zod';+import { useMutation, useQueryClient } from '@tanstack/react-query';import { SaveIcon } from 'lucide-react';import type { SubmitHandler } from 'react-hook-form';import { Controller, useForm } from 'react-hook-form';import { toast } from 'sonner';import { z } from 'zod';--import { useTRPC } from '@/integrations/trpc/react';-import { useMutation, useQueryClient } from '@tanstack/react-query';import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { CreateClientSuccess } from '@/components/clients/create-client-success';+import { Button, buttonVariants } from '@/components/ui/button';+import { Combobox } from '@/components/ui/combobox';+import { DialogFooter } from '@/components/ui/dialog';+import { Input } from '@/components/ui/input';+import { Label } from '@/components/ui/label';+import { useAppParams } from '@/hooks/use-app-params';+import { handleError, useTRPC } from '@/integrations/trpc/react';+import { cn } from '@/utils/cn';const validation = z.object({name: z.string().min(1),@@ -65,14 +63,14 @@ export default function AddClient() {<ModalContent>{mutation.isSuccess ? (<>- <ModalHeader title="Success" text={'Your client is created'} />+ <ModalHeader text={'Your client is created'} title="Success" /><CreateClientSuccess {...mutation.data} /><div className="mt-4 flex gap-4"><aclassName={cn(buttonVariants({ variant: 'secondary' }), 'flex-1')}href="https://openpanel.dev/docs"- target="_blank"rel="noreferrer"+ target="_blank">Read docs</a>@@ -91,8 +89,8 @@ export default function AddClient() {<div><Label>Client name</Label><Input- placeholder="Eg. My App Client"error={form.formState.errors.name?.message}+ placeholder="Eg. My App Client"{...form.register('name')}/></div>@@ -108,9 +106,6 @@ export default function AddClient() {<Combobox{...field}className="w-full"- onChange={(value) => {- field.onChange(value);- }}items={[{value: 'write',@@ -125,9 +120,12 @@ export default function AddClient() {label: 'Root (access export API)',},]}+ onChange={(value) => {+ field.onChange(value);+ }}placeholder="Select a project"/>- <p className="mt-2 text-sm text-muted-foreground">+ <p className="mt-2 text-muted-foreground text-sm">{field.value === 'write' &&'Write: Is the default client type and is used for ingestion of data'}{field.value === 'read' &&@@ -142,16 +140,16 @@ export default function AddClient() {</div><DialogFooter><Button+ onClick={() => popModal()}type="button"variant={'secondary'}- onClick={() => popModal()}>Cancel</Button><Button- type="submit"icon={SaveIcon}loading={mutation.isPending}+ type="submit">Create</Button>diff --git a/apps/start/src/modals/add-dashboard.tsx b/apps/start/src/modals/add-dashboard.tsxindex bb68b6117..7c4e857fe 100644--- a/apps/start/src/modals/add-dashboard.tsx+++ b/apps/start/src/modals/add-dashboard.tsx@@ -1,18 +1,16 @@-import { ButtonContainer } from '@/components/button-container';-import { InputWithLabel } from '@/components/forms/input-with-label';-import { Button } from '@/components/ui/button';-import { useAppParams } from '@/hooks/use-app-params';-import { useTRPC } from '@/integrations/trpc/react';-import { handleError } from '@/integrations/trpc/react';import { zodResolver } from '@hookform/resolvers/zod';import { useMutation, useQueryClient } from '@tanstack/react-query';import { useRouter } from '@tanstack/react-router';import { useForm } from 'react-hook-form';import { toast } from 'sonner';import { z } from 'zod';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { ButtonContainer } from '@/components/button-container';+import { InputWithLabel } from '@/components/forms/input-with-label';+import { Button } from '@/components/ui/button';+import { useAppParams } from '@/hooks/use-app-params';+import { handleError, useTRPC } from '@/integrations/trpc/react';const validator = z.object({name: z.string().min(1, 'Required'),@@ -72,10 +70,10 @@ export default function AddDashboard() {{...register('name')}/><ButtonContainer>- <Button type="button" variant="outline" onClick={() => popModal()}>+ <Button onClick={() => popModal()} type="button" variant="outline">Cancel</Button>- <Button type="submit" disabled={!formState.isDirty}>+ <Button disabled={!formState.isDirty} type="submit">Create</Button></ButtonContainer>diff --git a/apps/start/src/modals/billing-success.tsx b/apps/start/src/modals/billing-success.tsxindex d68e6f52d..1abb5e109 100644--- a/apps/start/src/modals/billing-success.tsx+++ b/apps/start/src/modals/billing-success.tsx@@ -6,17 +6,17 @@ export default function BillingSuccess() {return (<ModalContent className="max-w-2xl"><button- type="button"+ className="absolute top-6 right-6 z-10 rounded-full bg-black p-2.5 text-white transition-colors hover:bg-gray-800"onClick={() => popModal()}- className="absolute right-6 top-6 z-10 rounded-full bg-black text-white p-2.5 hover:bg-gray-800 transition-colors"+ type="button"><X className="h-5 w-5" /></button>- <div className="flex flex-col items-center justify-center py-12 px-8">+ <div className="flex flex-col items-center justify-center px-8 py-12">{/* Success Icon with animated rings */}- <div className="relative mb-10 h-64 w-64 flex items-center justify-center">- <div className="absolute inset-0 flex items-center justify-center animate-ping-slow opacity-10">+ <div className="relative mb-10 flex h-64 w-64 items-center justify-center">+ <div className="absolute inset-0 flex animate-ping-slow items-center justify-center opacity-10"><div className="h-64 w-64 rounded-full bg-emerald-400" /></div><div className="absolute inset-0 flex items-center justify-center">@@ -26,17 +26,17 @@ export default function BillingSuccess() {<div className="h-40 w-40 rounded-full bg-emerald-300/40" /></div><div className="relative flex items-center justify-center">- <div className="h-32 w-32 rounded-full bg-emerald-500 shadow-lg flex items-center justify-center">- <Check className="h-16 w-16 text-white stroke-[3]" />+ <div className="flex h-32 w-32 items-center justify-center rounded-full bg-emerald-500 shadow-lg">+ <Check className="h-16 w-16 stroke-[3] text-white" /></div></div></div>{/* Success Message */}- <h2 className="text-3xl font-semibold mb-4">+ <h2 className="mb-4 font-semibold text-3xl">Subscription updated successfully</h2>- <p className="text-center mb-12 max-w-md text-base leading-normal">+ <p className="mb-12 max-w-md text-center text-base leading-normal">Thank you for your purchase! You have now full access to OpenPanel. Ifyou have any questions or feedback, please don't hesitate to contactus.diff --git a/apps/start/src/modals/confirm-delete-account.tsx b/apps/start/src/modals/confirm-delete-account.tsxindex f7334da17..e9d385e04 100644--- a/apps/start/src/modals/confirm-delete-account.tsx+++ b/apps/start/src/modals/confirm-delete-account.tsx@@ -1,12 +1,12 @@-import { Button } from '@/components/ui/button';-import { DialogFooter } from '@/components/ui/dialog';-import { Input } from '@/components/ui/input';-import { handleError, useTRPC } from '@/integrations/trpc/react';import { useMutation } from '@tanstack/react-query';import { useState } from 'react';import { toast } from 'sonner';import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { Button } from '@/components/ui/button';+import { DialogFooter } from '@/components/ui/dialog';+import { Input } from '@/components/ui/input';+import { handleError, useTRPC } from '@/integrations/trpc/react';const CONFIRMATION = 'DELETE';@@ -30,11 +30,11 @@ export default function ConfirmDeleteAccount() {return (<ModalContent><ModalHeader- title="Delete account"text="Your account and all of your personal data will be permanently deleted. Organizations you created that have no other admin will also be removed, along with their projects and events. This cannot be undone."+ title="Delete account"/><div className="col gap-2">- <label className="text-sm font-medium" htmlFor="confirm-delete-account">+ <label className="font-medium text-sm" htmlFor="confirm-delete-account">Type <span className="font-bold">{CONFIRMATION}</span> to confirm</label><Inputdiff --git a/apps/start/src/modals/confirm-delete-organization.tsx b/apps/start/src/modals/confirm-delete-organization.tsxindex e4974aeb9..aa6e92155 100644--- a/apps/start/src/modals/confirm-delete-organization.tsx+++ b/apps/start/src/modals/confirm-delete-organization.tsx@@ -1,12 +1,12 @@-import { Button } from '@/components/ui/button';-import { DialogFooter } from '@/components/ui/dialog';-import { Input } from '@/components/ui/input';-import { handleError, useTRPC } from '@/integrations/trpc/react';import { useMutation, useQueryClient } from '@tanstack/react-query';import { useState } from 'react';import { toast } from 'sonner';import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { Button } from '@/components/ui/button';+import { DialogFooter } from '@/components/ui/dialog';+import { Input } from '@/components/ui/input';+import { handleError, useTRPC } from '@/integrations/trpc/react';type Props = {organizationId: string;@@ -39,11 +39,11 @@ export default function ConfirmDeleteOrganization({return (<ModalContent><ModalHeader- title="Delete organization"text={`${organizationName} and all of its projects and events will be permanently deleted after 24 hours. You can cancel before then.`}+ title="Delete organization"/><div className="col gap-2">- <label className="text-sm font-medium" htmlFor="confirm-org-name">+ <label className="font-medium text-sm" htmlFor="confirm-org-name">Type <span className="font-bold">{organizationName}</span> to confirm</label><Inputdiff --git a/apps/start/src/modals/confirm.tsx b/apps/start/src/modals/confirm.tsxindex f876359d2..04a77df61 100644--- a/apps/start/src/modals/confirm.tsx+++ b/apps/start/src/modals/confirm.tsx@@ -1,8 +1,7 @@-import { ButtonContainer } from '@/components/button-container';-import { Button } from '@/components/ui/button';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { ButtonContainer } from '@/components/button-container';+import { Button } from '@/components/ui/button';export type ConfirmProps = {title: string;@@ -20,14 +19,14 @@ export default function Confirm({return (<ModalContent><ModalHeader title={title} />- <p className="text-lg -mt-2 leading-normal">{text}</p>+ <p className="-mt-2 text-lg leading-normal">{text}</p><ButtonContainer><Button- variant="outline"onClick={() => {popModal('Confirm');onCancel?.();}}+ variant="outline">Cancel</Button>diff --git a/apps/start/src/modals/date-time-picker.tsx b/apps/start/src/modals/date-time-picker.tsxindex 9c77710c2..00d0cf8fe 100644--- a/apps/start/src/modals/date-time-picker.tsx+++ b/apps/start/src/modals/date-time-picker.tsx@@ -1,13 +1,12 @@-import { Button } from '@/components/ui/button';-import { Calendar } from '@/components/ui/calendar';-import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';-import { cn } from '@/lib/utils';import { format } from 'date-fns';import { CalendarIcon, ClockIcon } from 'lucide-react';import { useEffect, useRef, useState } from 'react';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { Button } from '@/components/ui/button';+import { Calendar } from '@/components/ui/calendar';+import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';+import { cn } from '@/lib/utils';// Utility function to round date to nearest 5-minute intervalfunction roundToNearestFiveMinutes(date: Date): Date {@@ -131,34 +130,34 @@ export default function DateTimePicker({</div>{/* Calendar Section */}- <div className="row gap-2 h-[333px]">+ <div className="row h-[333px] gap-2"><Calendar+ className="rounded-lg border [&_table]:mx-auto [&_table]:w-auto"+ initialFocusmode="single"- selected={selectedDate}onSelect={handleDateSelect}- initialFocus- className="[&_table]:mx-auto [&_table]:w-auto border rounded-lg"+ selected={selectedDate}/><ScrollArea- className="h-full w-full border rounded-lg bg-background/50"+ className="h-full w-full rounded-lg border bg-background/50"ref={scrollRef}><div className="flex flex-col p-1">{timeOptions.map((time) => (<Button- key={time.value}- size="sm"- data-value={time.value}- variant={- currentTimeValue === time.value ? 'default' : 'ghost'- }className={cn(- 'w-full mb-0.5 h-8 text-xs font-mono transition-all duration-200 justify-start',+ 'mb-0.5 h-8 w-full justify-start font-mono text-xs transition-all duration-200',currentTimeValue === time.value? 'bg-primary text-primary-foreground shadow-sm': 'hover:bg-muted')}+ data-value={time.value}+ key={time.value}onClick={() => handleTimeSelect(time.value)}+ size="sm"+ variant={+ currentTimeValue === time.value ? 'default' : 'ghost'+ }>{time.label}</Button>@@ -171,9 +170,9 @@ export default function DateTimePicker({{/* Action Buttons */}<div className="flex gap-3 pt-2"><Button- variant="outline"className="flex-1"onClick={() => popModal()}+ variant="outline">Cancel</Button>diff --git a/apps/start/src/modals/edit-client.tsx b/apps/start/src/modals/edit-client.tsxindex 7ea3455cb..923f3ee30 100644--- a/apps/start/src/modals/edit-client.tsx+++ b/apps/start/src/modals/edit-client.tsx@@ -1,19 +1,15 @@-import { ButtonContainer } from '@/components/button-container';-import { InputWithLabel } from '@/components/forms/input-with-label';-import { Button } from '@/components/ui/button';-import { useTRPC } from '@/integrations/trpc/react';-import { handleError } from '@/integrations/trpc/react';import { zodResolver } from '@hookform/resolvers/zod';+import type { IServiceClient } from '@openpanel/core';import { useMutation, useQueryClient } from '@tanstack/react-query';-import { useRouter } from '@tanstack/react-router';import { useForm } from 'react-hook-form';import { toast } from 'sonner';import { z } from 'zod';--import type { IServiceClient } from '@openpanel/core';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { ButtonContainer } from '@/components/button-container';+import { InputWithLabel } from '@/components/forms/input-with-label';+import { Button } from '@/components/ui/button';+import { handleError, useTRPC } from '@/integrations/trpc/react';type EditClientProps = IServiceClient;@@ -56,10 +52,10 @@ export default function EditClient({ id, name }: EditClientProps) {<form onSubmit={handleSubmit((values) => mutation.mutate(values))}><InputWithLabel label="Name" placeholder="Name" {...register('name')} /><ButtonContainer>- <Button type="button" variant="outline" onClick={() => popModal()}>+ <Button onClick={() => popModal()} type="button" variant="outline">Cancel</Button>- <Button type="submit" disabled={!formState.isDirty}>+ <Button disabled={!formState.isDirty} type="submit">Save</Button></ButtonContainer>diff --git a/apps/start/src/modals/edit-dashboard.tsx b/apps/start/src/modals/edit-dashboard.tsxindex 2d9600fad..04f3f615d 100644--- a/apps/start/src/modals/edit-dashboard.tsx+++ b/apps/start/src/modals/edit-dashboard.tsx@@ -1,19 +1,15 @@-import { ButtonContainer } from '@/components/button-container';-import { InputWithLabel } from '@/components/forms/input-with-label';-import { Button } from '@/components/ui/button';-import { useTRPC } from '@/integrations/trpc/react';-import { handleError } from '@/integrations/trpc/react';import { zodResolver } from '@hookform/resolvers/zod';+import type { IServiceDashboard } from '@openpanel/core';import { useMutation, useQueryClient } from '@tanstack/react-query';-import { useRouter } from '@tanstack/react-router';import { useForm } from 'react-hook-form';import { toast } from 'sonner';import { z } from 'zod';--import type { IServiceDashboard } from '@openpanel/core';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { ButtonContainer } from '@/components/button-container';+import { InputWithLabel } from '@/components/forms/input-with-label';+import { Button } from '@/components/ui/button';+import { useTRPC } from '@/integrations/trpc/react';type EditDashboardProps = Exclude<IServiceDashboard, null>;@@ -63,10 +59,10 @@ export default function EditDashboard({ id, name }: EditDashboardProps) {defaultValue={name}/><ButtonContainer>- <Button type="button" variant="outline" onClick={() => popModal()}>+ <Button onClick={() => popModal()} type="button" variant="outline">Cancel</Button>- <Button type="submit" disabled={!formState.isDirty}>+ <Button disabled={!formState.isDirty} type="submit">Update</Button></ButtonContainer>diff --git a/apps/start/src/modals/edit-event.tsx b/apps/start/src/modals/edit-event.tsxindex 6aaad4d86..31332a8a4 100644--- a/apps/start/src/modals/edit-event.tsx+++ b/apps/start/src/modals/edit-event.tsx@@ -1,3 +1,10 @@+import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';+import { AnimatePresence, motion } from 'framer-motion';+import { PaintBucketIcon, UndoIcon } from 'lucide-react';+import { useEffect, useState } from 'react';+import { toast } from 'sonner';+import { popModal } from '.';+import { ModalContent, ModalHeader } from './Modal/Container';import {EventIconColors,EventIconMapper,@@ -6,20 +13,11 @@ import {import { Badge } from '@/components/ui/badge';import { Button } from '@/components/ui/button';import { Checkbox } from '@/components/ui/checkbox';+import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';import { useAppParams } from '@/hooks/use-app-params';import { useTRPC } from '@/integrations/trpc/react';import { cn } from '@/utils/cn';-import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';--import { AnimatePresence, motion } from 'framer-motion';-import { PaintBucketIcon, UndoIcon } from 'lucide-react';-import { useEffect, useState } from 'react';-import { toast } from 'sonner';--import { Input } from '@/components/ui/input';-import { popModal } from '.';-import { ModalContent, ModalHeader } from './Modal/Container';interface Props {id: string;@@ -68,8 +66,8 @@ export default function EditEvent({ id }: Props) {return (<ModalContent><ModalHeader- title={`Edit: ${event?.name}`}text={`Changes here will affect all "${event?.name}" events`}+ title={`Edit: ${event?.name}`}/><div className="col gap-4"><div>@@ -78,7 +76,9 @@ export default function EditEvent({ id }: Props) {<Checkboxchecked={conversion}onCheckedChange={(checked) => {- if (checked === 'indeterminate') return;+ if (checked === 'indeterminate') {+ return;+ }setConversion(checked);}}/>@@ -90,16 +90,16 @@ export default function EditEvent({ id }: Props) {<AnimatePresence mode="wait">{step === 'icon' ? (<motion.div- key="icon-step"- initial={{ opacity: 0, x: 20 }}animate={{ opacity: 1, x: 0 }}exit={{ opacity: 0, x: -20 }}+ initial={{ opacity: 0, x: 20 }}+ key="icon-step"transition={{ duration: 0.15 }}><div className="row mb-4 items-center justify-between"><div className="font-medium leading-none">Pick an icon</div>{- <button type="button" onClick={() => setStep('color')}>+ <button onClick={() => setStep('color')} type="button"><Badge variant="outline">Select color<PaintBucketIcon className="ml-1 h-3 w-3" />@@ -109,9 +109,9 @@ export default function EditEvent({ id }: Props) {</div><InputclassName="mb-4"- value={search}onChange={(e) => setSearch(e.target.value)}placeholder="Search for an icon"+ value={search}/><div className={iconGrid}>{Object.entries(EventIconMapper)@@ -120,18 +120,18 @@ export default function EditEvent({ id }: Props) {).map(([name, Icon]) => (<button- type="button"- key={name}- onClick={() => {- setIcon(name);- setStep('color');- }}className={cn('inline-flex h-8 w-8 flex-shrink-0 cursor-pointer items-center justify-center rounded-md bg-def-200 transition-all',name === selectedIcon? 'scale-110 ring-1 ring-black': '[&_svg]:opacity-50')}+ key={name}+ onClick={() => {+ setIcon(name);+ setStep('color');+ }}+ type="button"><Icon size={16} /></button>@@ -140,15 +140,15 @@ export default function EditEvent({ id }: Props) {</motion.div>) : (<motion.div- key="color-step"- initial={{ opacity: 0, x: 20 }}animate={{ opacity: 1, x: 0 }}exit={{ opacity: 0, x: -20 }}+ initial={{ opacity: 0, x: 20 }}+ key="color-step"transition={{ duration: 0.15 }}><div className="row mb-4 items-center justify-between"><div className="font-medium leading-none">Pick a color</div>- <button type="button" onClick={() => setStep('icon')}>+ <button onClick={() => setStep('icon')} type="button"><Badge variant="outline">Select icon<UndoIcon className="ml-1 h-3 w-3" />@@ -159,29 +159,29 @@ export default function EditEvent({ id }: Props) {<div className={iconGrid}>{EventIconColors.map((color) => (<button- type="button"- key={color}- onClick={() => {- setColor(color);- }}className={cn('flex h-8 w-8 flex-shrink-0 cursor-pointer items-center justify-center rounded-md transition-all',color === selectedColor ? 'ring-1 ring-black' : '',getBg(color))}+ key={color}+ onClick={() => {+ setColor(color);+ }}+ type="button">{SelectedIcon ? (- <SelectedIcon size={16} className={getText(color)} />+ <SelectedIcon className={getText(color)} size={16} />) : (<svgclassName={`${getText(color)} opacity-70`}- xmlns="http://www.w3.org/2000/svg"- width="24"- height="24"- viewBox="0 0 24 24"fill="currentColor"+ height="24"stroke="currentColor"strokeWidth="2"+ viewBox="0 0 24 24"+ width="24"+ xmlns="http://www.w3.org/2000/svg"><circle cx="12.1" cy="12.1" r="4" /></svg>diff --git a/apps/start/src/modals/edit-reference.tsx b/apps/start/src/modals/edit-reference.tsxindex 315c83f11..5db3b7302 100644--- a/apps/start/src/modals/edit-reference.tsx+++ b/apps/start/src/modals/edit-reference.tsx@@ -1,19 +1,16 @@-import { ButtonContainer } from '@/components/button-container';-import { InputWithLabel } from '@/components/forms/input-with-label';-import { Button } from '@/components/ui/button';-import { InputDateTime } from '@/components/ui/input-date-time';-import { useTRPC } from '@/integrations/trpc/react';-import { handleError } from '@/integrations/trpc/react';import { zodResolver } from '@hookform/resolvers/zod';-import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';+import type { IServiceReference } from '@openpanel/core';+import { useMutation, useQueryClient } from '@tanstack/react-query';import { Controller, useForm } from 'react-hook-form';import { toast } from 'sonner';import { z } from 'zod';--import type { IServiceReference } from '@openpanel/core';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { ButtonContainer } from '@/components/button-container';+import { InputWithLabel } from '@/components/forms/input-with-label';+import { Button } from '@/components/ui/button';+import { InputDateTime } from '@/components/ui/input-date-time';+import { handleError, useTRPC } from '@/integrations/trpc/react';const validator = z.object({id: z.string().min(1),@@ -83,10 +80,10 @@ export default function EditReference({)}/><ButtonContainer>- <Button type="button" variant="outline" onClick={() => popModal()}>+ <Button onClick={() => popModal()} type="button" variant="outline">Cancel</Button>- <Button type="submit" disabled={!formState.isDirty}>+ <Button disabled={!formState.isDirty} type="submit">Update</Button></ButtonContainer>diff --git a/apps/start/src/modals/edit-report.tsx b/apps/start/src/modals/edit-report.tsxindex 780c06fd7..b1d30e088 100644--- a/apps/start/src/modals/edit-report.tsx+++ b/apps/start/src/modals/edit-report.tsx@@ -1,13 +1,12 @@-import { ButtonContainer } from '@/components/button-container';-import { InputWithLabel } from '@/components/forms/input-with-label';-import { Button } from '@/components/ui/button';import { zodResolver } from '@hookform/resolvers/zod';import type { SubmitHandler } from 'react-hook-form';import { useForm } from 'react-hook-form';import { z } from 'zod';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { ButtonContainer } from '@/components/button-container';+import { InputWithLabel } from '@/components/forms/input-with-label';+import { Button } from '@/components/ui/button';const validator = z.object({name: z.string().min(1),@@ -32,10 +31,10 @@ export default function EditReport({ form, onSubmit }: EditReportProps) {<form onSubmit={handleSubmit(onSubmit)}><InputWithLabel label="Name" placeholder="Name" {...register('name')} /><ButtonContainer>- <Button type="button" variant="outline" onClick={() => popModal()}>+ <Button onClick={() => popModal()} type="button" variant="outline">Cancel</Button>- <Button type="submit" disabled={!formState.isDirty}>+ <Button disabled={!formState.isDirty} type="submit">Update</Button></ButtonContainer>diff --git a/apps/start/src/modals/event-details.tsx b/apps/start/src/modals/event-details.tsxindex 1ced77b7f..445371cee 100644--- a/apps/start/src/modals/event-details.tsx+++ b/apps/start/src/modals/event-details.tsx@@ -12,6 +12,7 @@ import {} from '@/components/overview/overview-widget';import { SerieIcon } from '@/components/report-chart/common/serie-icon';import { ReportChartShortcut } from '@/components/report-chart/shortcut';+import Syntax from '@/components/syntax';import { Button } from '@/components/ui/button';import { FieldValue, KeyValueGrid } from '@/components/ui/key-value-grid';import { Widget, WidgetBody } from '@/components/widget';@@ -23,7 +24,6 @@ import { fancyMinutes } from '@/hooks/use-numer-formatter';import { useTRPC } from '@/integrations/trpc/react';import { cn } from '@/utils/cn';import { getProfileName } from '@/utils/getters';-import Syntax from '@/components/syntax';interface Props {id: string;@@ -235,9 +235,9 @@ function EventDetailsContent({ id, createdAt, projectId }: Props) {{profile && (<ProjectLinkclassName="card col gap-2 p-4 py-2 hover:bg-def-100"- to="/profiles/$profileId"- params={{ profileId: profile.id }}onClick={() => popModal()}+ params={{ profileId: profile.id }}+ to="/profiles/$profileId"><div className="row items-center justify-between gap-2"><div className="row min-w-0 items-center gap-2">@@ -277,11 +277,11 @@ function EventDetailsContent({ id, createdAt, projectId }: Props) {<div className="mb-2 flex justify-between font-medium"><div>Properties</div><button- type="button"+ className="text-muted-foreground transition-colors hover:text-foreground"onClick={() =>setPropertiesMode((p) => (p === 'table' ? 'json' : 'table'))}- className="text-muted-foreground hover:text-foreground transition-colors"+ type="button">{propertiesMode === 'table' ? 'View JSON' : 'View Table'}</button>diff --git a/apps/start/src/modals/move-report.tsx b/apps/start/src/modals/move-report.tsxindex 333d782a4..6baa63aa2 100644--- a/apps/start/src/modals/move-report.tsx+++ b/apps/start/src/modals/move-report.tsx@@ -1,16 +1,15 @@-import { ButtonContainer } from '@/components/button-container';-import { SelectDashboard } from '@/components/dashboards/select-dashboard';-import { Button } from '@/components/ui/button';-import { useAppParams } from '@/hooks/use-app-params';-import { handleError, useTRPC } from '@/integrations/trpc/react';import { zodResolver } from '@hookform/resolvers/zod';import { useMutation, useQueryClient } from '@tanstack/react-query';import { Controller, useForm } from 'react-hook-form';import { toast } from 'sonner';import { z } from 'zod';-import { popModal } from '.';import { ModalContent, ModalHeader } from './Modal/Container';+import { ButtonContainer } from '@/components/button-container';+import { SelectDashboard } from '@/components/dashboards/select-dashboard';+import { Button } from '@/components/ui/button';+import { useAppParams } from '@/hooks/use-app-params';+import { handleError, useTRPC } from '@/integrations/trpc/react';type MoveReportProps = {reportId: string;@@ -65,27 +64,27 @@ export default function MoveReport({ reportId, dashboardId }: MoveReportProps) {render={({ field }) => {return (<SelectDashboard- value={field.value}+ excludeDashboardId={dashboardId}onChange={field.onChange}projectId={projectId!}- excludeDashboardId={dashboardId}+ value={field.value}/>);}}/><ButtonContainer><Button- type="button"- variant="outline"onClick={() => popModal()}size="default"+ type="button"+ variant="outline">Cancel</Button><Button- type="submit"disabled={!formState.isValid || move.isPending}size="default"+ type="submit">Move</Button>diff --git a/apps/start/src/router.tsx b/apps/start/src/router.tsxindex 86ac130ac..5de93be85 100644--- a/apps/start/src/router.tsx+++ b/apps/start/src/router.tsx@@ -1,10 +1,10 @@import { createRouter as createTanstackRouter } from '@tanstack/react-router';import { setupRouterSsrQueryIntegration } from '@tanstack/react-router-ssr-query';-import { FullPageEmptyState } from '@/components/full-page-empty-state';-import { LinkButton } from '@/components/ui/button';import * as TanstackQuery from './integrations/tanstack-query/root-provider';import { routeTree } from './routeTree.gen';import { getServerEnvs } from './server/get-envs';+import { FullPageEmptyState } from '@/components/full-page-empty-state';+import { LinkButton } from '@/components/ui/button';export const getRouter = async () => {const envs = await getServerEnvs();@@ -25,9 +25,9 @@ export const getRouter = async () => {defaultPreload: 'intent',defaultNotFoundComponent: () => (<FullPageEmptyState- title="Page not found"- description="The page you're looking for doesn't exist or has moved."className="min-h-screen"+ description="The page you're looking for doesn't exist or has moved."+ title="Page not found"><LinkButton href="/">Go to home</LinkButton></FullPageEmptyState>diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsxindex 2e0f78bcc..698fe1425 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsx@@ -1,15 +1,3 @@-import { Card, CardActions, CardActionsItem } from '@/components/card';-import { FullPageEmptyState } from '@/components/full-page-empty-state';-import FullPageLoadingState from '@/components/full-page-loading-state';-import { ProjectLink } from '@/components/links';-import { PageContainer } from '@/components/page-container';-import { PageHeader } from '@/components/page-header';-import { Button } from '@/components/ui/button';-import { handleError, useTRPC } from '@/integrations/trpc/react';-import { pushModal, showConfirm } from '@/modals';-import { cn } from '@/utils/cn';-import { cohortMembersToCSV, downloadCSV } from '@/utils/csv-download';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';import { createFileRoute } from '@tanstack/react-router';import { format } from 'date-fns';@@ -22,6 +10,18 @@ import {UsersIcon,} from 'lucide-react';import { toast } from 'sonner';+import { Card, CardActions, CardActionsItem } from '@/components/card';+import { FullPageEmptyState } from '@/components/full-page-empty-state';+import FullPageLoadingState from '@/components/full-page-loading-state';+import { ProjectLink } from '@/components/links';+import { PageContainer } from '@/components/page-container';+import { PageHeader } from '@/components/page-header';+import { Button } from '@/components/ui/button';+import { handleError, useTRPC } from '@/integrations/trpc/react';+import { pushModal, showConfirm } from '@/modals';+import { cn } from '@/utils/cn';+import { cohortMembersToCSV, downloadCSV } from '@/utils/csv-download';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/cohorts'@@ -88,12 +88,12 @@ function Component() {if (cohorts.length === 0) {return (- <FullPageEmptyState title="No cohorts" icon={UsersIcon}>+ <FullPageEmptyState icon={UsersIcon} title="No cohorts"><p>You have not created any cohorts for this project yet</p><Button- onClick={() => pushModal('AddCohort')}className="mt-14"icon={PlusIcon}+ onClick={() => pushModal('AddCohort')}>Create cohort</Button>@@ -104,15 +104,15 @@ function Component() {return (<PageContainer><PageHeader- title="Cohorts"- description="Create and manage user segments based on events and properties"- className="mb-8"actions={<Button icon={PlusIcon} onClick={() => pushModal('AddCohort')}><span className="max-sm:hidden">Create cohort</span><span className="sm:hidden">Cohort</span></Button>}+ className="mb-8"+ description="Create and manage user segments based on events and properties"+ title="Cohorts"/><div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3">{cohorts.map((cohort) => {@@ -122,20 +122,20 @@ function Component() {: cohort.profileCount;const displayCount = count ?? 0;return (- <Card key={cohort.id} hover>+ <Card hover key={cohort.id}><ProjectLink- to="/cohorts/$cohortId"- params={{ cohortId: cohort.id }}className="flex flex-col p-4 outline-none"+ params={{ cohortId: cohort.id }}+ to="/cohorts/$cohortId"><div className="col gap-2"><div className="font-medium">{cohort.name}</div>{cohort.description && (- <div className="line-clamp-2 text-sm text-muted-foreground">+ <div className="line-clamp-2 text-muted-foreground text-sm">{cohort.description}</div>)}- <div className="mt-2 flex items-center gap-4 text-sm text-muted-foreground">+ <div className="mt-2 flex items-center gap-4 text-muted-foreground text-sm"><div className="flex items-center gap-1"><UsersIcon size={14} /><span>@@ -150,7 +150,7 @@ function Component() {)}</div>{cohort.isStatic && (- <div className="mt-1 inline-flex w-fit rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700">+ <div className="mt-1 inline-flex w-fit rounded bg-blue-100 px-2 py-0.5 text-blue-700 text-xs">Static</div>)}@@ -158,31 +158,30 @@ function Component() {</ProjectLink><CardActions>- <CardActionsItem className="w-full" asChild>+ <CardActionsItem asChild className="w-full"><button- type="button"onClick={() => handleDownload(cohort.id, cohort.name)}+ type="button"><DownloadIcon size={16} />Download</button></CardActionsItem>{!cohort.isStatic && (- <CardActionsItem className="w-full" asChild>+ <CardActionsItem asChild className="w-full"><button- type="button"onClick={() => {refresh.mutate({ cohortId: cohort.id });}}+ type="button"><RefreshCwIcon size={16} />Refresh</button></CardActionsItem>)}- <CardActionsItem className="w-full" asChild>+ <CardActionsItem asChild className="w-full"><button- type="button"onClick={() => {pushModal('EditCohort', {id: cohort.id,@@ -192,14 +191,14 @@ function Component() {isStatic: cohort.isStatic,});}}+ type="button"><PencilIcon size={16} />Edit</button></CardActionsItem>- <CardActionsItem className="w-full text-destructive" asChild>+ <CardActionsItem asChild className="w-full text-destructive"><button- type="button"onClick={() => {showConfirm({title: 'Delete cohort',@@ -207,6 +206,7 @@ function Component() {onConfirm: () => deletion.mutate({ id: cohort.id }),});}}+ type="button"><TrashIcon size={16} />Deletediff --git a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.index.tsxindex 25f4e22b4..556d0539f 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.index.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.index.tsx@@ -59,10 +59,12 @@ function Component() {);const c = cohort.data;- if (!c) return null;+ if (!c) {+ return null;+ }const notComputed = c.lastComputedAt === null;- const isCapped = c.profileCount >= 10000;+ const isCapped = c.profileCount >= 10_000;return (<div className="col gap-6">diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsxindex 0e570d56b..a82020dba 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsx@@ -78,7 +78,9 @@ function Component() {);async function handleDownload() {- if (!c) return;+ if (!c) {+ return;+ }try {const result = await queryClient.fetchQuery(trpc.cohort.exportProfiles.queryOptions({ cohortId })@@ -177,7 +179,7 @@ function Component() {<TargetIcon className="size-6 shrink-0" /><span className="truncate">{c.name}</span>{c.isStatic && (- <span className="rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700">+ <span className="rounded bg-blue-100 px-2 py-0.5 text-blue-700 text-xs">Static</span>)}diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsxindex e83c64a7d..7a158a3ca 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsx@@ -1,10 +1,5 @@-import { Card, CardActions, CardActionsItem } from '@/components/card';-import { FullPageEmptyState } from '@/components/full-page-empty-state';-import { Button } from '@/components/ui/button';-import { useAppParams } from '@/hooks/use-app-params';-import { pushModal, showConfirm } from '@/modals';-import { cn } from '@/utils/cn';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';+import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';+import { createFileRoute, Link } from '@tanstack/react-router';import { format } from 'date-fns';import {AreaChartIcon,@@ -24,13 +19,16 @@ import {TrendingUpIcon,} from 'lucide-react';import { toast } from 'sonner';-+import { Card, CardActions, CardActionsItem } from '@/components/card';+import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';import { PageContainer } from '@/components/page-container';import { PageHeader } from '@/components/page-header';+import { Button } from '@/components/ui/button';import { handleErrorToastOptions, useTRPC } from '@/integrations/trpc/react';-import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';-import { Link, createFileRoute } from '@tanstack/react-router';+import { pushModal, showConfirm } from '@/modals';+import { cn } from '@/utils/cn';+import { createProjectTitle } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/dashboards'@@ -92,12 +90,12 @@ function Component() {if (dashboards.length === 0) {return (- <FullPageEmptyState title="No dashboards" icon={LayoutPanelTopIcon}>+ <FullPageEmptyState icon={LayoutPanelTopIcon} title="No dashboards"><p>You have not created any dashboards for this project yet</p><Button- onClick={() => pushModal('AddDashboard')}className="mt-14"icon={PlusIcon}+ onClick={() => pushModal('AddDashboard')}>Create dashboard</Button>@@ -108,15 +106,15 @@ function Component() {return (<PageContainer><PageHeader- title="Dashboards"- description="Access all your dashboards here"- className="mb-8"actions={<Button icon={PlusIcon} onClick={() => pushModal('AddDashboard')}><span className="max-sm:hidden">Create dashboard</span><span className="sm:hidden">Dashboard</span></Button>}+ className="mb-8"+ description="Access all your dashboards here"+ title="Dashboards"/><div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3">{dashboards.map((item) => {@@ -125,23 +123,23 @@ function Component() {item.reports.length > 6 ? 5 : 6);return (- <Card key={item.id} hover>+ <Card hover key={item.id}><div><Link+ className="@container flex flex-col p-4"from={Route.fullPath}to={`${item.id}`}- className="flex flex-col p-4 @container"><div className="col gap-2"><div className="font-medium">{item.name}</div>- <div className="text-sm text-muted-foreground">+ <div className="text-muted-foreground text-sm">{format(item.updatedAt, 'HH:mm · MMM d')}</div></div><divclassName={cn('mt-4 grid gap-2',- 'grid-cols-1 @sm:grid-cols-2'+ '@sm:grid-cols-2 grid-cols-1')}>{visibleReports.map((report) => {@@ -190,20 +188,19 @@ function Component() {</div><CardActions>- <CardActionsItem className="w-full" asChild>+ <CardActionsItem asChild className="w-full"><button- type="button"onClick={() => {pushModal('EditDashboard', item);}}+ type="button"><Pencil size={16} />Edit</button></CardActionsItem>- <CardActionsItem className="w-full text-destructive" asChild>+ <CardActionsItem asChild className="w-full text-destructive"><button- type="button"onClick={() => {showConfirm({title: 'Delete dashboard',@@ -211,6 +208,7 @@ function Component() {onConfirm: () => deletion.mutate({ id: item.id }),});}}+ type="button"><Trash size={16} />Deletediff --git a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsxindex ea5f992d8..5b2d8885d 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsx@@ -1,14 +1,5 @@-import { FullPageEmptyState } from '@/components/full-page-empty-state';-import { useOverviewOptions } from '@/components/overview/useOverviewOptions';-import { Button, LinkButton } from '@/components/ui/button';-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuGroup,- DropdownMenuItem,- DropdownMenuTrigger,-} from '@/components/ui/dropdown-menu';-import { createProjectTitle } from '@/utils/title';+import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';+import { createFileRoute, useRouter } from '@tanstack/react-router';import {LayoutPanelTopIcon,MoreHorizontal,@@ -18,8 +9,9 @@ import {ShareIcon,TrashIcon,} from 'lucide-react';+import { useCallback, useEffect, useMemo, useState } from 'react';import { toast } from 'sonner';-+import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';import {GrafanaGrid,@@ -28,19 +20,26 @@ import {} from '@/components/grafana-grid';import { OverviewInterval } from '@/components/overview/overview-interval';import { OverviewRange } from '@/components/overview/overview-range';+import { useOverviewOptions } from '@/components/overview/useOverviewOptions';import { PageContainer } from '@/components/page-container';import { PageHeader } from '@/components/page-header';import {ReportItem,ReportItemSkeleton,} from '@/components/report/report-item';+import { Button, LinkButton } from '@/components/ui/button';+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuGroup,+ DropdownMenuItem,+ DropdownMenuTrigger,+} from '@/components/ui/dropdown-menu';import { Input } from '@/components/ui/input';import { useDashboardPageContext } from '@/hooks/use-page-context-helpers';import { handleErrorToastOptions, useTRPC } from '@/integrations/trpc/react';import { pushModal, showConfirm } from '@/modals';-import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';-import { createFileRoute, useRouter } from '@tanstack/react-router';-import { useCallback, useEffect, useMemo, useState } from 'react';+import { createProjectTitle } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/dashboards_/$dashboardId'@@ -130,7 +129,9 @@ function Component() {const filteredReports = useMemo(() => {const q = search.trim().toLowerCase();- if (!q) return reports;+ if (!q) {+ return reports;+ }return reports.filter((r) => r.name?.toLowerCase().includes(q));}, [reports, search]);@@ -284,20 +285,17 @@ function Component() {return (<PageContainer><PageHeader- title={dashboard.name}- description="View and manage your reports"- className="mb-4"actions={<>{reports.length > 0 && (<div className="relative">- <SearchIcon className="absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground pointer-events-none" />+ <SearchIcon className="pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground" /><Input- type="search"+ className="w-[180px] pl-8 sm:w-[220px]"+ onChange={(e) => setSearch(e.target.value)}placeholder="Search reports..."+ type="search"value={search}- onChange={(e) => setSearch(e.target.value)}- className="pl-8 w-[180px] sm:w-[220px]"/></div>)}@@ -305,8 +303,8 @@ function Component() {<OverviewInterval /><LinkButtonfrom={Route.fullPath}- to={'/$organizationId/$projectId/reports'}icon={PlusIcon}+ to={'/$organizationId/$projectId/reports'}><span className="max-sm:hidden">Create report</span><span className="sm:hidden">Report</span>@@ -341,7 +339,6 @@ function Component() {Reset layout</DropdownMenuItem><DropdownMenuItem- variant="destructive"onClick={() =>showConfirm({title: 'Delete dashboard',@@ -350,6 +347,7 @@ function Component() {dashboardDeletion.mutate({ id: dashboardId }),})}+ variant="destructive"><TrashIcon className="mr-2 size-4" />Delete dashboard@@ -359,22 +357,25 @@ function Component() {</DropdownMenu></>}+ className="mb-4"+ description="View and manage your reports"+ title={dashboard.name}/>{reports.length === 0 ? (- <FullPageEmptyState title="No reports" icon={LayoutPanelTopIcon}>+ <FullPageEmptyState icon={LayoutPanelTopIcon} title="No reports"><p>You can visualize your data with a report</p><LinkButton- from={Route.fullPath}- to={'/$organizationId/$projectId/reports'}className="mt-14"+ from={Route.fullPath}icon={PlusIcon}+ to={'/$organizationId/$projectId/reports'}>Create report</LinkButton></FullPageEmptyState>) : !isGridReady || reportsQuery.isLoading ? (- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">+ <div className="grid grid-cols-1 gap-4 md:grid-cols-2"><ReportItemSkeleton /><ReportItemSkeleton /><ReportItemSkeleton />@@ -383,27 +384,22 @@ function Component() {<ReportItemSkeleton /></div>) : filteredReports.length === 0 ? (- <FullPageEmptyState title="No matching reports" icon={SearchIcon}>+ <FullPageEmptyState icon={SearchIcon} title="No matching reports"><p>No reports match "{search}". Try a different search.</p></FullPageEmptyState>) : (<GrafanaGrid- transitions={enableTransitions}+ isDraggable={!search}+ isResizable={!search}layouts={layouts}- onLayoutChange={handleLayoutChange}onDragStop={handleDragStop}+ onLayoutChange={handleLayoutChange}onResizeStop={handleResizeStop}- isDraggable={!search}- isResizable={!search}+ transitions={enableTransitions}>{filteredReports.map((report) => (<div key={report.id}><ReportItem- report={report}- organizationId={organizationId}- projectId={projectId}- range={range}- startDate={startDate}endDate={endDate}interval={interval}onDelete={(reportId) => {@@ -415,6 +411,11 @@ function Component() {onMove={(reportId) => {pushModal('MoveReport', { reportId, dashboardId });}}+ organizationId={organizationId}+ projectId={projectId}+ range={range}+ report={report}+ startDate={startDate}/></div>))}diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsxindex 8a813b42d..206b0264d 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsx@@ -1,10 +1,10 @@+import { useInfiniteQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { parseAsIsoDateTime, useQueryState } from 'nuqs';import { EventsTable } from '@/components/events/table';import { useReadColumnVisibility } from '@/components/ui/data-table/data-table-hooks';import { useEventQueryNamesFilter } from '@/hooks/use-event-query-filters';import { useTRPC } from '@/integrations/trpc/react';-import { useInfiniteQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { parseAsIsoDateTime, useQueryState } from 'nuqs';export const Route = createFileRoute('/_app/$organizationId/$projectId/events/_tabs/conversions'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsxindex 4b34ccd9b..6960078e5 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsx@@ -1,3 +1,6 @@+import { useInfiniteQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { parseAsIsoDateTime, useQueryState } from 'nuqs';import { EventsTable } from '@/components/events/table';import { useReadColumnVisibility } from '@/components/ui/data-table/data-table-hooks';import {@@ -5,9 +8,6 @@ import {useEventQueryNamesFilter,} from '@/hooks/use-event-query-filters';import { useTRPC } from '@/integrations/trpc/react';-import { useInfiniteQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { parseAsIsoDateTime, useQueryState } from 'nuqs';export const Route = createFileRoute('/_app/$organizationId/$projectId/events/_tabs/events'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsxindex a442a4f4a..6db19d755 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsx@@ -1,3 +1,5 @@+import type { IChartEventItem } from '@openpanel/core/modules/report/report.constants';+import { createFileRoute } from '@tanstack/react-router';import {OverviewFilterButton,OverviewFiltersButtons,@@ -9,10 +11,6 @@ import {useEventQueryNamesFilter,} from '@/hooks/use-event-query-filters';-import type { IChartEventItem } from '@openpanel/core/modules/report/report.constants';--import { createFileRoute } from '@tanstack/react-router';-export const Route = createFileRoute('/_app/$organizationId/$projectId/events/_tabs/stats')({@@ -47,9 +45,9 @@ function Component() {</WidgetHead><WidgetBody><ReportChartShortcut+ chartType="histogram"projectId={projectId}range="30d"- chartType="histogram"series={events && events.length > 0? events.map((name) => ({@@ -71,6 +69,13 @@ function Component() {</WidgetHead><WidgetBody><ReportChartShortcut+ breakdowns={[+ {+ id: 'A',+ name: 'name',+ },+ ]}+ chartType="pie"options={{renderSerieName(names) {return names[1];@@ -78,13 +83,6 @@ function Component() {}}projectId={projectId}range="30d"- chartType="pie"- breakdowns={[- {- id: 'A',- name: 'name',- },- ]}series={events && events.length > 0? events.map((name) => ({@@ -115,6 +113,13 @@ function Component() {</WidgetHead><WidgetBody><ReportChartShortcut+ breakdowns={[+ {+ id: 'A',+ name: 'name',+ },+ ]}+ chartType="bar"options={{renderSerieName(names) {return names[1];@@ -122,13 +127,6 @@ function Component() {}}projectId={projectId}range="30d"- chartType="bar"- breakdowns={[- {- id: 'A',- name: 'name',- },- ]}series={events && events.length > 0? events.map((name) => ({@@ -159,6 +157,13 @@ function Component() {</WidgetHead><WidgetBody><ReportChartShortcut+ breakdowns={[+ {+ id: 'A',+ name: 'name',+ },+ ]}+ chartType="linear"options={{renderSerieName(names) {return names[1];@@ -166,13 +171,6 @@ function Component() {}}projectId={projectId}range="30d"- chartType="linear"- breakdowns={[- {- id: 'A',- name: 'name',- },- ]}series={events && events.length > 0? events.map((name) => ({diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsxindex fb1acb1f6..3217748f0 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsx@@ -1,9 +1,9 @@+import { createFileRoute, Outlet, useRouter } from '@tanstack/react-router';import { PageHeader } from '@/components/page-header';import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';-import { usePageTabs } from '@/hooks/use-page-tabs';import { useRangePageContext } from '@/hooks/use-page-context-helpers';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';+import { usePageTabs } from '@/hooks/use-page-tabs';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/events/_tabs'@@ -41,14 +41,14 @@ function Component() {return (<div className="container p-8"><PageHeader- title="Events"description="Paginate through your events, conversions and overall stats"+ title="Events"/><Tabs- value={activeTab}- onValueChange={handleTabChange}className="mt-2 mb-8"+ onValueChange={handleTabChange}+ value={activeTab}><TabsList>{tabs.map((tab) => (diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.events.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.events.tsxindex 6ca89c852..c9832456e 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.events.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.events.tsx@@ -1,11 +1,11 @@+import { useInfiniteQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { parseAsIsoDateTime, useQueryState } from 'nuqs';import { EventsTable } from '@/components/events/table';import { useReadColumnVisibility } from '@/components/ui/data-table/data-table-hooks';import { useEventQueryNamesFilter } from '@/hooks/use-event-query-filters';import { useTRPC } from '@/integrations/trpc/react';import { createProjectTitle } from '@/utils/title';-import { useInfiniteQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { parseAsIsoDateTime, useQueryState } from 'nuqs';export const Route = createFileRoute('/_app/$organizationId/$projectId/groups_/$groupId/_tabs/events'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsxindex edf058d95..2023949a0 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsx@@ -1,10 +1,10 @@+import { keepPreviousData, useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import { ProfilesTable } from '@/components/profiles/table';import { useDataTablePagination } from '@/components/ui/data-table/data-table-hooks';import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTRPC } from '@/integrations/trpc/react';import { createProjectTitle } from '@/utils/title';-import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/$projectId/groups_/$groupId/_tabs/members'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.index.tsxindex 706a3cd85..d580a4e8d 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.index.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.index.tsx@@ -1,13 +1,12 @@import { createFileRoute } from '@tanstack/react-router';import { LazyComponent } from '@/components/lazy-component';import ActivationBanner from '@/components/onboarding/activation-banner';-import { useRangePageContext } from '@/hooks/use-page-context-helpers';import {OverviewFilterButton,OverviewFiltersButtons,} from '@/components/overview/filters/overview-filters-buttons';-import { OverviewAICommand } from '@/components/overview/overview-ai-command';import { LiveCounter } from '@/components/overview/live-counter';+import { OverviewAICommand } from '@/components/overview/overview-ai-command';import OverviewInsights from '@/components/overview/overview-insights';import { OverviewInterval } from '@/components/overview/overview-interval';import OverviewMetrics from '@/components/overview/overview-metrics';@@ -20,6 +19,7 @@ import OverviewTopPages from '@/components/overview/overview-top-pages';import OverviewTopSources from '@/components/overview/overview-top-sources';import OverviewUserJourney from '@/components/overview/overview-user-journey';import OverviewWeeklyTrends from '@/components/overview/overview-weekly-trends';+import { useRangePageContext } from '@/hooks/use-page-context-helpers';import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/')({diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsxindex 214e41bed..a828175b7 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsx@@ -1,6 +1,9 @@import { INSIGHT_LIST_ALL_MAX_LIMIT } from '@openpanel/core/modules/insight/insight.constants';+import { useQuery } from '@tanstack/react-query';+import { createFileRoute, useNavigate } from '@tanstack/react-router';+import { parseAsString, parseAsStringEnum, useQueryState } from 'nuqs';+import { useMemo } from 'react';import { FullPageEmptyState } from '@/components/full-page-empty-state';-import { useRangePageContext } from '@/hooks/use-page-context-helpers';import { InsightCard } from '@/components/insights/insight-card';import { PageContainer } from '@/components/page-container';import { PageHeader } from '@/components/page-header';@@ -21,13 +24,10 @@ import {SelectValue,} from '@/components/ui/select';import { TableButtons } from '@/components/ui/table';+import { useRangePageContext } from '@/hooks/use-page-context-helpers';import { useTRPC } from '@/integrations/trpc/react';import { cn } from '@/utils/cn';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute, useNavigate } from '@tanstack/react-router';-import { parseAsString, parseAsStringEnum, useQueryState } from 'nuqs';-import { useMemo } from 'react';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/insights'@@ -117,7 +117,9 @@ function Component() {);const filteredAndSorted = useMemo(() => {- if (!insights) return [];+ if (!insights) {+ return [];+ }const filtered = insights.filter((insight) => {// Search filter@@ -134,10 +136,12 @@ function Component() {.toLowerCase().includes(searchLower);if (- !matchesTitle &&- !matchesSummary &&- !matchesAiSummary &&- !matchesDimension+ !(+ matchesTitle ||+ matchesSummary ||+ matchesAiSummary ||+ matchesDimension+ )) {return false;}@@ -158,12 +162,15 @@ function Component() {// Severity filterif (severityFilter !== 'all') {- if (severityFilter === 'none' && insight.severityBand) return false;+ if (severityFilter === 'none' && insight.severityBand) {+ return false;+ }if (severityFilter !== 'none' &&insight.severityBand !== severityFilter- )+ ) {return false;+ }}// Direction filter@@ -242,8 +249,12 @@ function Component() {return Array.from(groups.entries()).sort(([keyA, insightsA], [keyB, insightsB]) => {// Referrers always first- if (keyA === 'referrers') return -1;- if (keyB === 'referrers') return 1;+ if (keyA === 'referrers') {+ return -1;+ }+ if (keyB === 'referrers') {+ return 1;+ }// Calculate average impact for each moduleconst avgImpactA =@@ -262,18 +273,18 @@ function Component() {if (isLoading) {return (<PageContainer>- <PageHeader title="Insights" className="mb-8" />+ <PageHeader className="mb-8" title="Insights" /><div className="space-y-8">{Array.from({ length: 3 }, (_, i) => `section-${i}`).map((key) => (- <div key={key} className="space-y-4">+ <div className="space-y-4" key={key}><Skeleton className="h-8 w-32" />- <Carousel opts={{ align: 'start' }} className="w-full">+ <Carousel className="w-full" opts={{ align: 'start' }}><CarouselContent className="-ml-4">{Array.from({ length: 4 }, (_, i) => `skeleton-${i}`).map((cardKey) => (<CarouselItem+ className="basis-full pl-4 sm:basis-1/2 lg:basis-1/3 xl:basis-1/4"key={cardKey}- className="pl-4 basis-full sm:basis-1/2 lg:basis-1/3 xl:basis-1/4"><Skeleton className="h-48 w-full" /></CarouselItem>@@ -291,22 +302,22 @@ function Component() {return (<PageContainer><PageHeader- title="Insights"- description="Discover trends and changes in your analytics"className="mb-8"+ description="Discover trends and changes in your analytics"+ title="Insights"/><TableButtons className="mb-8"><Input+ className="max-w-xs"+ onChange={(e) => void setSearch(e.target.value || null)}placeholder="Search insights..."value={search ?? ''}- onChange={(e) => void setSearch(e.target.value || null)}- className="max-w-xs"/><Select- value={windowKindFilter ?? 'all'}onValueChange={(v) =>void setWindowKindFilter(v as typeof windowKindFilter)}+ value={windowKindFilter ?? 'all'}><SelectTrigger className="w-[140px]"><SelectValue placeholder="Time Window" />@@ -319,10 +330,10 @@ function Component() {</SelectContent></Select><Select- value={severityFilter ?? 'all'}onValueChange={(v) =>void setSeverityFilter(v as typeof severityFilter)}+ value={severityFilter ?? 'all'}><SelectTrigger className="w-[140px]"><SelectValue placeholder="Severity" />@@ -336,10 +347,10 @@ function Component() {</SelectContent></Select><Select- value={directionFilter ?? 'all'}onValueChange={(v) =>void setDirectionFilter(v as typeof directionFilter)}+ value={directionFilter ?? 'all'}><SelectTrigger className="w-[140px]"><SelectValue placeholder="Direction" />@@ -352,8 +363,8 @@ function Component() {</SelectContent></Select><Select- value={sortBy ?? 'impact-desc'}onValueChange={(v) => void setSortBy(v as SortOption)}+ value={sortBy ?? 'impact-desc'}><SelectTrigger className="w-[160px]"><SelectValue placeholder="Sort by" />@@ -371,40 +382,40 @@ function Component() {{filteredAndSorted.length === 0 && !isLoading && (<FullPageEmptyState- title="No insights found"description={search || moduleFilter !== 'all' || windowKindFilter !== 'all'? 'Try adjusting your filters to see more insights.': 'Insights will appear here as trends are detected in your analytics.'}+ title="No insights found"/>)}{groupedByModule.length > 0 && (<div className="space-y-8">{groupedByModule.map(([moduleKey, moduleInsights]) => (- <div key={moduleKey} className="space-y-4">+ <div className="space-y-4" key={moduleKey}><div className="flex items-center justify-between">- <h2 className="text-lg font-semibold capitalize">+ <h2 className="font-semibold text-lg capitalize">{getModuleDisplayName(moduleKey)}</h2>- <span className="text-sm text-muted-foreground">+ <span className="text-muted-foreground text-sm">{moduleInsights.length}{' '}{moduleInsights.length === 1 ? 'insight' : 'insights'}</span></div><div className="-mx-8"><Carousel+ className="group w-full"opts={{ align: 'start', dragFree: true }}- className="w-full group"><CarouselContent className="mx-4 mr-8">{moduleInsights.map((insight, index) => (<CarouselItem- key={insight.id}className={cn(- 'pl-4 basis-full sm:basis-1/2 lg:basis-1/3 xl:basis-1/4'+ 'basis-full pl-4 sm:basis-1/2 lg:basis-1/3 xl:basis-1/4')}+ key={insight.id}><InsightCardinsight={insight}@@ -432,8 +443,8 @@ function Component() {</CarouselItem>))}</CarouselContent>- <CarouselPrevious className="opacity-0 [&:disabled]:opacity-0 pointer-events-none transition-opacity group-hover:opacity-100 group-hover:pointer-events-auto left-3" />- <CarouselNext className="opacity-0 [&:disabled]:opacity-0 pointer-events-none transition-opacity group-hover:opacity-100 group-hover:pointer-events-auto right-3" />+ <CarouselPrevious className="pointer-events-none left-3 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 [&:disabled]:opacity-0" />+ <CarouselNext className="pointer-events-none right-3 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 [&:disabled]:opacity-0" /></Carousel></div></div>@@ -442,7 +453,7 @@ function Component() {)}{filteredAndSorted.length > 0 && (- <div className="mt-8 text-sm text-muted-foreground text-center">+ <div className="mt-8 text-center text-muted-foreground text-sm">Showing {filteredAndSorted.length} of {insights?.length ?? 0} insights</div>)}diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsxindex 5ca6560ee..d58cc8373 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsx@@ -1,5 +1,5 @@-import { AllIntegrations } from '@/components/integrations/all-integrations';import { createFileRoute } from '@tanstack/react-router';+import { AllIntegrations } from '@/components/integrations/all-integrations';export const Route = createFileRoute('/_app/$organizationId/$projectId/integrations/_tabs/available'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsxindex 099f7ba64..f96de603d 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsx@@ -1,5 +1,5 @@-import { ActiveIntegrations } from '@/components/integrations/active-integrations';import { createFileRoute } from '@tanstack/react-router';+import { ActiveIntegrations } from '@/components/integrations/active-integrations';export const Route = createFileRoute('/_app/$organizationId/$projectId/integrations/_tabs/installed'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsxindex b96dfcfbf..bea1e8d31 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsx@@ -1,8 +1,8 @@+import { createFileRoute, Outlet, useRouter } from '@tanstack/react-router';import { PageHeader } from '@/components/page-header';import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';import { usePageTabs } from '@/hooks/use-page-tabs';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/integrations/_tabs'@@ -37,14 +37,14 @@ function Component() {return (<div className="container p-8"><PageHeader- title="Integrations"description="Manage your integrations here"+ title="Integrations"/><Tabs- value={activeTab}- onValueChange={handleTabChange}className="mt-2 mb-8"+ onValueChange={handleTabChange}+ value={activeTab}><TabsList>{tabs.map((tab) => (diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsxindex edff9905e..aef9f17f6 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsx@@ -1,8 +1,8 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import FullPageLoadingState from '@/components/full-page-loading-state';import { NotificationsTable } from '@/components/notifications/table';import { useTRPC } from '@/integrations/trpc/react';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/$projectId/notifications/_tabs/notifications'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsxindex 36cbae3f4..0db5d6a17 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsx@@ -1,3 +1,8 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { AnimatePresence, motion } from 'framer-motion';+import { PencilRulerIcon, PlusIcon } from 'lucide-react';+import { useMemo } from 'react';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';import { IntegrationCardSkeleton } from '@/components/integrations/integration-card';@@ -5,11 +10,6 @@ import { RuleCard } from '@/components/notifications/rule-card';import { Button } from '@/components/ui/button';import { useTRPC } from '@/integrations/trpc/react';import { pushModal } from '@/modals';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { AnimatePresence, motion } from 'framer-motion';-import { PencilRulerIcon, PlusIcon } from 'lucide-react';-import { useMemo } from 'react';export const Route = createFileRoute('/_app/$organizationId/$projectId/notifications/_tabs/rules'@@ -41,19 +41,19 @@ function Component() {if (!isLoading && data.length === 0) {return (- <FullPageEmptyState title="No rules yet" icon={PencilRulerIcon}>+ <FullPageEmptyState icon={PencilRulerIcon} title="No rules yet"><p>You have not created any rules yet. Create a rule to start gettingnotifications.</p><ButtonclassName="mt-8"- variant="outline"onClick={() =>pushModal('AddNotificationRule', {rule: undefined,})}+ variant="outline">Add Rule</Button>@@ -66,17 +66,17 @@ function Component() {<div className="mb-2"><Buttonicon={PlusIcon}- variant="outline"onClick={() =>pushModal('AddNotificationRule', {rule: undefined,})}+ variant="outline">Add Rule</Button></div>- <div className="col gap-4 w-full grid md:grid-cols-2">+ <div className="col grid w-full gap-4 md:grid-cols-2">{isLoading && (<><IntegrationCardSkeleton />diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsxindex 6319c9a20..09c23cdae 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsx@@ -1,8 +1,8 @@+import { createFileRoute, Outlet, useRouter } from '@tanstack/react-router';import { PageHeader } from '@/components/page-header';import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';import { usePageTabs } from '@/hooks/use-page-tabs';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/notifications/_tabs'@@ -38,14 +38,14 @@ function Component() {return (<div className="container p-8"><PageHeader- title="Notifications"description="See notifications and manage your rules when to get notifications"+ title="Notifications"/><Tabs- value={activeTab}- onValueChange={handleTabChange}className="mt-2 mb-8"+ onValueChange={handleTabChange}+ value={activeTab}><TabsList>{tabs.map((tab) => (diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsxindex 1d7fdede7..aca956389 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsx@@ -1,9 +1,9 @@-import { PagesTable } from '@/components/pages/table';+import { createFileRoute } from '@tanstack/react-router';import { PageContainer } from '@/components/page-container';import { PageHeader } from '@/components/page-header';+import { PagesTable } from '@/components/pages/table';import { useRangePageContext } from '@/hooks/use-page-context-helpers';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { createFileRoute } from '@tanstack/react-router';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/pages')({component: Component,@@ -18,9 +18,9 @@ function Component() {return (<PageContainer><PageHeader- title="Pages"- description="Access all your pages here"className="mb-8"+ description="Access all your pages here"+ title="Pages"/><PagesTable projectId={projectId} /></PageContainer>diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsxindex 8f40452b8..1dcdcdc3c 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsx@@ -1,3 +1,6 @@+import { useInfiniteQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { parseAsIsoDateTime, useQueryState } from 'nuqs';import { EventsTable } from '@/components/events/table';import { useReadColumnVisibility } from '@/components/ui/data-table/data-table-hooks';import {@@ -5,10 +8,7 @@ import {useEventQueryNamesFilter,} from '@/hooks/use-event-query-filters';import { useTRPC } from '@/integrations/trpc/react';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { useInfiniteQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { parseAsIsoDateTime, useQueryState } from 'nuqs';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/$profileId/_tabs/events'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsxindex 57bf8439c..6e272f927 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx@@ -1,3 +1,5 @@+import { useSuspenseQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import FullPageLoadingState from '@/components/full-page-loading-state';import { LatestEvents } from '@/components/profiles/latest-events';import { MostEvents } from '@/components/profiles/most-events';@@ -8,9 +10,7 @@ import { ProfileGroups } from '@/components/profiles/profile-groups';import { ProfileMetrics } from '@/components/profiles/profile-metrics';import { ProfileProperties } from '@/components/profiles/profile-properties';import { useTRPC } from '@/integrations/trpc/react';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { useSuspenseQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/$profileId/_tabs/'@@ -108,9 +108,9 @@ function Component() {<ProfileProperties profile={profile.data!} />{profile.data?.groups?.length ? (<ProfileGroups+ groups={profile.data.groups}profileId={profileId}projectId={projectId}- groups={profile.data.groups}/>) : null}</div>@@ -123,9 +123,9 @@ function Component() {{/* Latest events */}<div className="col-span-1"><LatestEvents+ organizationId={organizationId}profileId={profileId}projectId={projectId}- organizationId={organizationId}/></div>diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsxindex 3755456cd..1ad5f217f 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsx@@ -1,8 +1,8 @@+import { useInfiniteQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import { SessionsTable } from '@/components/sessions/table';import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTRPC } from '@/integrations/trpc/react';-import { useInfiniteQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/$profileId/_tabs/sessions'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsxindex 8692a6370..cfc0feeb0 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsx@@ -1,3 +1,5 @@+import { useSuspenseQuery } from '@tanstack/react-query';+import { createFileRoute, Outlet, useRouter } from '@tanstack/react-router';import FullPageLoadingState from '@/components/full-page-loading-state';import { PageContainer } from '@/components/page-container';import { PageHeader } from '@/components/page-header';@@ -8,8 +10,6 @@ import { useEntityPageContext } from '@/hooks/use-page-context-helpers';import { usePageTabs } from '@/hooks/use-page-tabs';import { useTRPC } from '@/integrations/trpc/react';import { getProfileName } from '@/utils/getters';-import { useSuspenseQuery } from '@tanstack/react-query';-import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/$profileId/_tabs'@@ -70,7 +70,7 @@ function Component() {<PageContainer><PageHeadertitle={- <div className="row items-center gap-4 min-w-0">+ <div className="row min-w-0 items-center gap-4"><ProfileAvatar {...profile.data} /><span className="truncate">{profile.data@@ -80,9 +80,9 @@ function Component() {</div>}>- <div className="row gap-4 mb-6 flex-wrap">+ <div className="row mb-6 flex-wrap gap-4">{profile.data?.properties.country && (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={profile.data.properties.country} /><span>{profile.data.properties.country}@@ -92,7 +92,7 @@ function Component() {</div>)}{profile.data?.properties.device && (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={profile.data.properties.device} /><span className="capitalize">{profile.data.properties.device}@@ -100,19 +100,19 @@ function Component() {</div>)}{profile.data?.properties.os && (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={profile.data.properties.os} /><span>{profile.data.properties.os}</span></div>)}{profile.data?.properties.model && (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={profile.data.properties.model} /><span>{profile.data.properties.model}</span></div>)}{profile.data?.properties.browser && (- <div className="row gap-2 items-center">+ <div className="row items-center gap-2"><SerieIcon name={profile.data.properties.browser} /><span>{profile.data.properties.browser}</span></div>@@ -121,9 +121,9 @@ function Component() {</PageHeader><Tabs- value={activeTab}- onValueChange={handleTabChange}className="mt-2 mb-8"+ onValueChange={handleTabChange}+ value={activeTab}><TabsList>{tabs.map((tab) => (diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsxindex e1ad99392..b0b34199d 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsx@@ -1,11 +1,11 @@+import { keepPreviousData, useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import { ProfilesTable } from '@/components/profiles/table';import { useDataTablePagination } from '@/components/ui/data-table/data-table-hooks';import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTableFilters } from '@/hooks/use-table-filters';import { useTRPC } from '@/integrations/trpc/react';-import { PAGE_TITLES, createEntityTitle } from '@/utils/title';-import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';+import { createEntityTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/_tabs/anonymous'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsxindex fbfaf3ba0..494f5a252 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsx@@ -1,11 +1,11 @@+import { keepPreviousData, useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import { ProfilesTable } from '@/components/profiles/table';import { useDataTablePagination } from '@/components/ui/data-table/data-table-hooks';import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTableFilters } from '@/hooks/use-table-filters';import { useTRPC } from '@/integrations/trpc/react';-import { PAGE_TITLES, createEntityTitle } from '@/utils/title';-import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';+import { createEntityTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/_tabs/identified'@@ -46,5 +46,5 @@ function Component() {));- return <ProfilesTable type="profiles" query={query} />;+ return <ProfilesTable query={query} type="profiles" />;}diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsxindex 3b7c06857..c50a96c35 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsx@@ -1,9 +1,9 @@+import { keepPreviousData, useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import { ProfilesTable } from '@/components/profiles/table';import { useDataTablePagination } from '@/components/ui/data-table/data-table-hooks';import { useTRPC } from '@/integrations/trpc/react';-import { PAGE_TITLES, createEntityTitle } from '@/utils/title';-import { keepPreviousData, useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';+import { createEntityTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/_tabs/power-users'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsxindex cf2aab05c..2850c03d9 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsx@@ -1,8 +1,8 @@+import { createFileRoute, Outlet, useRouter } from '@tanstack/react-router';import { PageHeader } from '@/components/page-header';import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';import { usePageTabs } from '@/hooks/use-page-tabs';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/profiles/_tabs'@@ -39,14 +39,14 @@ function Component() {return (<div className="container p-8"><PageHeader- title="Profiles"description="If you haven't called identify your profiles will be anonymous"+ title="Profiles"/><Tabs- value={activeTab}- onValueChange={handleTabChange}className="mt-2 mb-8"+ onValueChange={handleTabChange}+ value={activeTab}><TabsList>{tabs.map((tab) => (diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.references.tsxindex 7fb501aba..2b36ae8cf 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx@@ -1,3 +1,14 @@+import type { IServiceReference } from '@openpanel/core';+import {+ keepPreviousData,+ useMutation,+ useQuery,+ useQueryClient,+} from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import type { ColumnDef } from '@tanstack/react-table';+import { PlusIcon } from 'lucide-react';+import { toast } from 'sonner';import { ColumnCreatedAt } from '@/components/column-created-at';import { PageContainer } from '@/components/page-container';import { PageHeader } from '@/components/page-header';@@ -18,19 +29,8 @@ import {// import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTRPC } from '@/integrations/trpc/react';import { pushModal, showConfirm } from '@/modals';-import { formatDate, formatDateTime } from '@/utils/date';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';-import type { IServiceReference } from '@openpanel/core';-import {- keepPreviousData,- useMutation,- useQuery,- useQueryClient,-} from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import type { ColumnDef } from '@tanstack/react-table';-import { PlusIcon } from 'lucide-react';-import { toast } from 'sonner';+import { formatDateTime } from '@/utils/date';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/references'@@ -56,7 +56,7 @@ export const columnDefs: ColumnDef<IServiceReference>[] = [<div><div className="font-medium">{row.original.title}</div>{!!row.original.description && (- <div className="text-muted-foreground break-words whitespace-normal">+ <div className="whitespace-normal break-words text-muted-foreground">{row.original.description}</div>)}@@ -129,7 +129,6 @@ export const columnDefs: ColumnDef<IServiceReference>[] = [</DropdownMenuItem><DropdownMenuSeparator /><DropdownMenuItem- variant="destructive"onClick={() =>showConfirm({title: 'Delete reference',@@ -141,6 +140,7 @@ export const columnDefs: ColumnDef<IServiceReference>[] = [},})}+ variant="destructive">Delete</DropdownMenuItem>@@ -175,9 +175,9 @@ function Component() {return (<PageContainer><PageHeader- title="References"- description="References is a good way to keep track of important events. They will show up in your reports."className="mb-8"+ description="References is a good way to keep track of important events. They will show up in your reports."+ title="References"/><DataTableToolbar table={table}><Button icon={PlusIcon} onClick={() => pushModal('AddReference')}>@@ -185,7 +185,7 @@ function Component() {<span className="sm:hidden">Reference</span></Button></DataTableToolbar>- <DataTable table={table} loading={loading} />+ <DataTable loading={loading} table={table} /></PageContainer>);}diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsxindex 8bfa4665d..baded27b4 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsx@@ -1,7 +1,7 @@-import ReportEditor from '@/components/report-chart/report-editor';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';import { createFileRoute } from '@tanstack/react-router';import { z } from 'zod';+import ReportEditor from '@/components/report-chart/report-editor';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId/reports'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsxindex 5b78ebaef..fd89fe6ad 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsx@@ -1,11 +1,11 @@+import { useSuspenseQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { z } from 'zod';import FullPageLoadingState from '@/components/full-page-loading-state';import ReportEditor from '@/components/report-chart/report-editor';import { useReportEditorContext } from '@/hooks/use-page-context-helpers';import { useTRPC } from '@/integrations/trpc/react';import { createProjectTitle } from '@/utils/title';-import { useSuspenseQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { z } from 'zod';export const Route = createFileRoute('/_app/$organizationId/$projectId/reports_/$reportId'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsxindex 0b5a7c559..8ca06d9f2 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx@@ -362,14 +362,14 @@ function Component() {<WidgetBody className="p-0">{sessionGroups.map((group) => (<Link- key={group.id}className="row items-center gap-3 p-4 transition-colors hover:bg-accent"+ key={group.id}params={{ organizationId, projectId, groupId: group.id }}to="/$organizationId/$projectId/groups/$groupId"><div className="col min-w-0 flex-1 gap-0.5"><span className="truncate font-medium">{group.name}</span>- <span className="truncate text-muted-foreground text-sm font-mono">+ <span className="truncate font-mono text-muted-foreground text-sm">{group.id}</span></div>diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsxindex 1e643cb8b..25e16baaf 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsx@@ -1,8 +1,8 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import { ClientsTable } from '@/components/clients/table';import { useAppParams } from '@/hooks/use-app-params';import { useTRPC } from '@/integrations/trpc/react';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/$projectId/settings/_tabs/clients'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsxindex 212ddcc0e..c9445df56 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsx@@ -1,10 +1,10 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import FullPageLoadingState from '@/components/full-page-loading-state';import DeleteProject from '@/components/settings/delete-project';import EditProjectDetails from '@/components/settings/edit-project-details';import { useAppParams } from '@/hooks/use-app-params';import { useTRPC } from '@/integrations/trpc/react';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/$projectId/settings/_tabs/details'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsxindex 67a442bf1..ff2af952c 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsx@@ -1,9 +1,9 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import FullPageLoadingState from '@/components/full-page-loading-state';import EditProjectFilters from '@/components/settings/edit-project-filters';import { useAppParams } from '@/hooks/use-app-params';import { useTRPC } from '@/integrations/trpc/react';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/$projectId/settings/_tabs/events'diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsxindex 65fb66f30..2c2b89627 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsx@@ -1,3 +1,12 @@+import type {+ IRealtimeWidgetOptions,+ IWidgetType,+} from '@openpanel/core/modules/report/report.constants';+import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { ExternalLinkIcon } from 'lucide-react';+import { useEffect, useState } from 'react';+import { toast } from 'sonner';import CopyInput from '@/components/forms/copy-input';import FullPageLoadingState from '@/components/full-page-loading-state';import Syntax from '@/components/syntax';@@ -8,15 +17,6 @@ import { Widget, WidgetBody, WidgetHead } from '@/components/widget';import { useAppContext } from '@/hooks/use-app-context';import { useAppParams } from '@/hooks/use-app-params';import { useTRPC } from '@/integrations/trpc/react';-import type {- IRealtimeWidgetOptions,- IWidgetType,-} from '@openpanel/core/modules/report/report.constants';-import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { ExternalLinkIcon } from 'lucide-react';-import { useEffect, useState } from 'react';-import { toast } from 'sonner';export const Route = createFileRoute('/_app/$organizationId/$projectId/settings/_tabs/widgets'@@ -87,7 +87,6 @@ function Component() {return (<div className="space-y-6"><RealtimeWidgetSection- widget={realtimeWidget as any}dashboardUrl={dashboardUrl}isToggling={toggleMutation.isPending}isUpdatingOptions={updateOptionsMutation.isPending}@@ -99,18 +98,19 @@ function Component() {options,})}+ widget={realtimeWidget as any}/><CounterWidgetSection- widget={counterWidget as any}dashboardUrl={dashboardUrl}isToggling={toggleMutation.isPending}onToggle={(enabled) => handleToggle('counter', enabled)}+ widget={counterWidget as any}/><BadgeWidgetSection- widget={counterWidget as any}dashboardUrl={dashboardUrl}+ widget={counterWidget as any}/></div>);@@ -175,7 +175,7 @@ function RealtimeWidgetSection({};return (- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead className="row items-center justify-between gap-6"><div className="space-y-2"><span className="title">Realtime Widget</span>@@ -187,94 +187,94 @@ function RealtimeWidgetSection({</div><Switchchecked={isEnabled}- onCheckedChange={onToggle}disabled={isToggling}+ onCheckedChange={onToggle}/></WidgetHead>{isEnabled && (<WidgetBody className="space-y-6"><div className="space-y-4">- <h3 className="text-sm font-medium">Widget Options</h3>+ <h3 className="font-medium text-sm">Widget Options</h3><div className="space-y-3"><div className="flex items-center justify-between">- <Label htmlFor="referrers" className="text-sm">+ <Label className="text-sm" htmlFor="referrers">Show Referrers</Label><Switch- id="referrers"checked={options.referrers}+ disabled={isUpdatingOptions}+ id="referrers"onCheckedChange={(checked) =>handleUpdateOptions({ ...options, referrers: checked })}- disabled={isUpdatingOptions}/></div><div className="flex items-center justify-between">- <Label htmlFor="countries" className="text-sm">+ <Label className="text-sm" htmlFor="countries">Show Countries</Label><Switch- id="countries"checked={options.countries}+ disabled={isUpdatingOptions}+ id="countries"onCheckedChange={(checked) =>handleUpdateOptions({ ...options, countries: checked })}- disabled={isUpdatingOptions}/></div><div className="flex items-center justify-between">- <Label htmlFor="paths" className="text-sm">+ <Label className="text-sm" htmlFor="paths">Show Paths</Label><Switch- id="paths"checked={options.paths}+ disabled={isUpdatingOptions}+ id="paths"onCheckedChange={(checked) =>handleUpdateOptions({ ...options, paths: checked })}- disabled={isUpdatingOptions}/></div></div></div><div className="space-y-2">- <h3 className="text-sm font-medium">Widget URL</h3>- <CopyInput label="" value={widgetUrl!} className="w-full" />- <p className="text-xs text-muted-foreground">+ <h3 className="font-medium text-sm">Widget URL</h3>+ <CopyInput className="w-full" label="" value={widgetUrl!} />+ <p className="text-muted-foreground text-xs">Direct link to the widget. You can open this in a new tab or embedit.</p></div><div className="space-y-2">- <h3 className="text-sm font-medium">Embed Code</h3>+ <h3 className="font-medium text-sm">Embed Code</h3><Syntax code={embedCode!} language="bash" />- <p className="text-xs text-muted-foreground">+ <p className="text-muted-foreground text-xs">Copy this code and paste it into your website HTML where you wantthe widget to appear.</p></div><div className="space-y-2">- <h3 className="text-sm font-medium">Preview</h3>- <div className="border rounded-lg overflow-hidden">+ <h3 className="font-medium text-sm">Preview</h3>+ <div className="overflow-hidden rounded-lg border"><iframe+ className="border-0"+ height="600"key={widgetChecksum}src={`${widgetUrl}&checksum=${widgetChecksum}`}- width="100%"- height="600"- className="border-0"title="Realtime Widget Preview"+ width="100%"/></div><div className="flex gap-2"><Button- variant="outline"- size="sm"icon={ExternalLinkIcon}onClick={() =>window.open(widgetUrl!, '_blank', 'noopener,noreferrer')}+ size="sm"+ variant="outline">Open in new tab</Button>@@ -312,7 +312,7 @@ function CounterWidgetSection({: null;return (- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead className="row items-center justify-between gap-6"><div className="space-y-2"><span className="title">Counter Widget</span>@@ -323,47 +323,47 @@ function CounterWidgetSection({</div><Switchchecked={isEnabled}- onCheckedChange={onToggle}disabled={isToggling}+ onCheckedChange={onToggle}/></WidgetHead>{isEnabled && counterUrl && (<WidgetBody className="space-y-6"><div className="space-y-2">- <h3 className="text-sm font-medium">Widget URL</h3>- <CopyInput label="" value={counterUrl} className="w-full" />- <p className="text-xs text-muted-foreground">+ <h3 className="font-medium text-sm">Widget URL</h3>+ <CopyInput className="w-full" label="" value={counterUrl} />+ <p className="text-muted-foreground text-xs">Direct link to the counter widget.</p></div><div className="space-y-2">- <h3 className="text-sm font-medium">Embed Code</h3>+ <h3 className="font-medium text-sm">Embed Code</h3><Syntax code={counterEmbedCode!} language="bash" />- <p className="text-xs text-muted-foreground">+ <p className="text-muted-foreground text-xs">Copy this code and paste it into your website HTML where you wantthe counter to appear.</p></div><div className="space-y-2">- <h3 className="text-sm font-medium">Preview</h3>- <div className="border rounded-lg p-4 bg-muted/30">+ <h3 className="font-medium text-sm">Preview</h3>+ <div className="rounded-lg border bg-muted/30 p-4"><iframe- src={counterUrl}- height="32"className="border-0"+ height="32"+ src={counterUrl}title="Counter Widget Preview"/></div><div className="flex gap-2"><Button- variant="outline"- size="sm"icon={ExternalLinkIcon}onClick={() =>window.open(counterUrl, '_blank', 'noopener,noreferrer')}+ size="sm"+ variant="outline">Open in new tab</Button>@@ -395,12 +395,12 @@ function BadgeWidgetSection({ widget, dashboardUrl }: BadgeWidgetSectionProps) {</a>`: null;- if (!isEnabled || !badgeUrl) {+ if (!(isEnabled && badgeUrl)) {return null;}return (- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead className="row items-center justify-between gap-6"><div className="space-y-2"><span className="title">Analytics Badge</span>@@ -412,52 +412,52 @@ function BadgeWidgetSection({ widget, dashboardUrl }: BadgeWidgetSectionProps) {</WidgetHead><WidgetBody className="space-y-6"><div className="space-y-2">- <h3 className="text-sm font-medium">Widget URL</h3>- <CopyInput label="" value={badgeUrl} className="w-full" />- <p className="text-xs text-muted-foreground">+ <h3 className="font-medium text-sm">Widget URL</h3>+ <CopyInput className="w-full" label="" value={badgeUrl} />+ <p className="text-muted-foreground text-xs">Direct link to the analytics badge widget.</p></div><div className="space-y-2">- <h3 className="text-sm font-medium">Embed Code</h3>+ <h3 className="font-medium text-sm">Embed Code</h3><Syntax code={badgeEmbedCode!} language="bash" />- <p className="text-xs text-muted-foreground">+ <p className="text-muted-foreground text-xs">Copy this code and paste it into your website HTML where you wantthe badge to appear.</p></div><div className="space-y-2">- <h3 className="text-sm font-medium">Preview</h3>- <div className="border rounded-lg p-4 bg-muted/30">+ <h3 className="font-medium text-sm">Preview</h3>+ <div className="rounded-lg border bg-muted/30 p-4"><ahref="https://openpanel.dev"- target="_blank"rel="noopener noreferrer"style={{overflow: 'hidden',borderRadius: '8px',display: 'inline-block',}}+ target="_blank"><iframe- src={badgeUrl}+ className="pointer-events-none border-0"height="48"- width="250"- className="border-0 pointer-events-none"+ src={badgeUrl}title="Analytics Badge Preview"+ width="250"/></a></div><div className="flex gap-2"><Button- variant="outline"- size="sm"icon={ExternalLinkIcon}onClick={() =>window.open(badgeUrl, '_blank', 'noopener,noreferrer')}+ size="sm"+ variant="outline">Open in new tab</Button>diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.tsxindex 297f078f4..d73f9308a 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.tsx@@ -1,12 +1,12 @@-import BillingPrompt from '@/components/organization/billing-prompt';-import { useProjectDocumentTitle } from '@/hooks/use-project-document-title';-import { useTRPC } from '@/integrations/trpc/react';-import { getSubscriptionStateMeta } from '@openpanel/payments/subscription-state-meta';-import { PAGE_TITLES, createProjectTitle } from '@/utils/title';import { FREE_PRODUCT_IDS } from '@openpanel/payments';import { subscriptionBlocksDashboard } from '@openpanel/payments/subscription-state';+import { getSubscriptionStateMeta } from '@openpanel/payments/subscription-state-meta';import { useSuspenseQuery } from '@tanstack/react-query';-import { Outlet, createFileRoute } from '@tanstack/react-router';+import { createFileRoute, Outlet } from '@tanstack/react-router';+import BillingPrompt from '@/components/organization/billing-prompt';+import { useProjectDocumentTitle } from '@/hooks/use-project-document-title';+import { useTRPC } from '@/integrations/trpc/react';+import { createProjectTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/$projectId')({component: ProjectDashboard,diff --git a/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsxindex 6faeff98b..c481536dd 100644--- a/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsx+++ b/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsx@@ -1,16 +1,19 @@+import {+ useMutation,+ useQueryClient,+ useSuspenseQuery,+} from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { SaveIcon } from 'lucide-react';+import { useForm } from 'react-hook-form';+import { toast } from 'sonner';+import { z } from 'zod';import { InputWithLabel } from '@/components/forms/input-with-label';import FullPageLoadingState from '@/components/full-page-loading-state';import DeleteAccount from '@/components/settings/delete-account';import { Button } from '@/components/ui/button';import { Widget, WidgetBody, WidgetHead } from '@/components/widget';import { handleError, useTRPC } from '@/integrations/trpc/react';-import { useSuspenseQuery } from '@tanstack/react-query';-import { useMutation, useQueryClient } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { SaveIcon } from 'lucide-react';-import { useForm } from 'react-hook-form';-import { toast } from 'sonner';-import { z } from 'zod';const validator = z.object({firstName: z.string(),@@ -64,16 +67,16 @@ function Component() {mutation.mutate(values);})}>- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead><span className="title">Profile</span></WidgetHead>- <WidgetBody className="gap-4 col">+ <WidgetBody className="col gap-4"><InputWithLabel- label="Email"- value={user.email}disabled+ label="Email"readOnly+ value={user.email}/><InputWithLabellabel="First name"@@ -86,12 +89,12 @@ function Component() {defaultValue={user.lastName ?? ''}/><Button- size="sm"- type="submit"- disabled={!formState.isDirty || mutation.isPending}className="self-end"+ disabled={!formState.isDirty || mutation.isPending}icon={SaveIcon}loading={mutation.isPending}+ size="sm"+ type="submit">Save</Button>diff --git a/apps/start/src/routes/_app.$organizationId.account._tabs.tsx b/apps/start/src/routes/_app.$organizationId.account._tabs.tsxindex 300d831e3..4aec1aca2 100644--- a/apps/start/src/routes/_app.$organizationId.account._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.account._tabs.tsx@@ -1,9 +1,9 @@+import { createFileRoute, Outlet, useRouter } from '@tanstack/react-router';import FullPageLoadingState from '@/components/full-page-loading-state';import { PageContainer } from '@/components/page-container';import { PageHeader } from '@/components/page-header';import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';import { usePageTabs } from '@/hooks/use-page-tabs';-import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/account/_tabs')({component: Component,@@ -37,9 +37,9 @@ function Component() {<PageContainer><PageHeader title="Your account" /><Tabs- value={activeTab}- onValueChange={handleTabChange}className="mt-2 mb-8"+ onValueChange={handleTabChange}+ value={activeTab}><TabsList>{tabs.map((tab) => (diff --git a/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsx b/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsxindex 0b1ad000a..f8783989d 100644--- a/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsx+++ b/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsx@@ -1,11 +1,11 @@+import { useSuspenseQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { ShieldCheckIcon, ShieldOffIcon } from 'lucide-react';import FullPageLoadingState from '@/components/full-page-loading-state';import { Button } from '@/components/ui/button';import { Widget, WidgetBody, WidgetHead } from '@/components/widget';import { useTRPC } from '@/integrations/trpc/react';import { pushModal } from '@/modals';-import { useSuspenseQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { ShieldCheckIcon, ShieldOffIcon } from 'lucide-react';export const Route = createFileRoute('/_app/$organizationId/account/_tabs/two-factor'@@ -19,12 +19,12 @@ function Component() {const status = useSuspenseQuery(trpc.auth.totpStatus.queryOptions());return (- <Widget className="max-w-screen-md w-full">+ <Widget className="w-full max-w-screen-md"><WidgetHead><span className="title">Two-factor authentication</span></WidgetHead><WidgetBody className="col gap-4">- <p className="text-sm text-muted-foreground leading-normal">+ <p className="text-muted-foreground text-sm leading-normal">Protect your account with an authenticator app (Google Authenticator,1Password, Authy, etc.). You'll be asked for a 6-digit code each timeyou sign in with email and password.@@ -66,7 +66,7 @@ function DisabledView({ hasEmailProvider }: { hasEmailProvider: boolean }) {<ShieldOffIcon className="size-4 text-muted-foreground" /><span>Two-factor authentication is disabled.</span></div>- <Button size="sm" onClick={() => pushModal('SetupTwoFactor')}>+ <Button onClick={() => pushModal('SetupTwoFactor')} size="sm">Enable</Button></div>@@ -84,12 +84,12 @@ function EnabledView({<><div className="row items-center justify-between rounded-md border border-border bg-def-100 px-4 py-3"><div className="row items-center gap-2">- <div className="size-10 bg-emerald-500/10 rounded-full center-center">+ <div className="center-center size-10 rounded-full bg-emerald-500/10"><ShieldCheckIcon className="size-4 text-emerald-500" /></div><div className="col gap-1"><span>Two-factor authentication is enabled.</span>- <span className="text-xs text-muted-foreground">+ <span className="text-muted-foreground text-xs">Enabled {new Date(enabledAt).toLocaleString()} ·{' '}{remainingRecoveryCodes} recovery code{remainingRecoveryCodes === 1 ? '' : 's'} remaining@@ -100,16 +100,16 @@ function EnabledView({<div className="row gap-2"><Button+ onClick={() => pushModal('RegenerateRecoveryCodes')}size="sm"variant="outline"- onClick={() => pushModal('RegenerateRecoveryCodes')}>Regenerate recovery codes</Button><Button+ onClick={() => pushModal('DisableTwoFactor')}size="sm"variant="destructive"- onClick={() => pushModal('DisableTwoFactor')}>Disable</Button>diff --git a/apps/start/src/routes/_app.$organizationId.billing.tsx b/apps/start/src/routes/_app.$organizationId.billing.tsxindex c17061a84..fe5ec2fb1 100644--- a/apps/start/src/routes/_app.$organizationId.billing.tsx+++ b/apps/start/src/routes/_app.$organizationId.billing.tsx@@ -1,12 +1,12 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute, redirect } from '@tanstack/react-router';+import { BoxSelectIcon } from 'lucide-react';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';import Billing from '@/components/organization/billing';import { PageHeader } from '@/components/page-header';import { useTRPC } from '@/integrations/trpc/react';-import { PAGE_TITLES, createOrganizationTitle } from '@/utils/title';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute, redirect } from '@tanstack/react-router';-import { BoxSelectIcon } from 'lucide-react';+import { createOrganizationTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/billing')({component: OrganizationPage,@@ -61,16 +61,16 @@ function OrganizationPage() {if (!organization) {return (- <FullPageEmptyState title="Organization not found" icon={BoxSelectIcon} />+ <FullPageEmptyState icon={BoxSelectIcon} title="Organization not found" />);}return (<div className="container p-8"><PageHeader- title="Billing"- description="Manage your billing here"className="mb-8"+ description="Manage your billing here"+ title="Billing"/><Billing organization={organization} />diff --git a/apps/start/src/routes/_app.$organizationId.index.tsx b/apps/start/src/routes/_app.$organizationId.index.tsxindex 024c45b24..dd703d067 100644--- a/apps/start/src/routes/_app.$organizationId.index.tsx+++ b/apps/start/src/routes/_app.$organizationId.index.tsx@@ -1,3 +1,6 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { BoxSelectIcon, PlusIcon } from 'lucide-react';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';import { LazyComponent } from '@/components/lazy-component';@@ -12,10 +15,7 @@ import { useOrganizationAccess } from '@/hooks/use-organization-access';import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTRPC } from '@/integrations/trpc/react';import { pushModal } from '@/modals';-import { PAGE_TITLES, createOrganizationTitle } from '@/utils/title';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { BoxSelectIcon, PlusIcon } from 'lucide-react';+import { createOrganizationTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/')({component: OrganizationPage,@@ -52,13 +52,13 @@ function OrganizationPage() {if (!projects?.length) {return (<FullPageEmptyState- title="No projects found"description={isAdmin? 'Create your first project to get started with analytics.': 'You do not have access to any projects in this organization yet. Ask an admin to grant you access.'}icon={BoxSelectIcon}+ title="No projects found">{isAdmin && (<Button icon={PlusIcon} onClick={() => pushModal('AddProject')}>@@ -72,30 +72,32 @@ function OrganizationPage() {return (<div className="container p-8"><PageHeader- title="Projects"- description="All your projects in this workspace"className="mb-8"+ description="All your projects in this workspace"+ title="Projects"/><TableButtons><AnimatedSearchInput+ onChange={setSearch}placeholder="Search projects"value={search}- onChange={setSearch}/></TableButtons><div className="grid gap-6 md:grid-cols-2">{projects.filter((project) => {- if (!search) return true;+ if (!search) {+ return true;+ }return project.name.toLowerCase().includes(search.toLowerCase());}).map((project, index) => (<LazyComponent- lazy={index >= 6}- key={project.id}fallback={<ProjectCardSkeleton />}+ key={project.id}+ lazy={index >= 6}><ProjectCard {...project} organizationId={organizationId} /></LazyComponent>diff --git a/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsx b/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsxindex 00251ccd9..4bae5225d 100644--- a/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsx+++ b/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsx@@ -1,10 +1,7 @@-import { InvitesTable } from '@/components/settings/invites';-import { Button } from '@/components/ui/button';-import { useTRPC } from '@/integrations/trpc/react';-import { pushModal } from '@/modals';import { useQuery } from '@tanstack/react-query';import { createFileRoute } from '@tanstack/react-router';-import { PlusIcon } from 'lucide-react';+import { InvitesTable } from '@/components/settings/invites';+import { useTRPC } from '@/integrations/trpc/react';export const Route = createFileRoute('/_app/$organizationId/members/_tabs/invitations'diff --git a/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsx b/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsxindex 00ef66439..5f397dc58 100644--- a/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsx+++ b/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsx@@ -1,8 +1,8 @@+import { useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';import { MembersTable } from '@/components/settings/members';import { useAppParams } from '@/hooks/use-app-params';import { useTRPC } from '@/integrations/trpc/react';-import { useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';export const Route = createFileRoute('/_app/$organizationId/members/_tabs/members'diff --git a/apps/start/src/routes/_app.$organizationId.members._tabs.tsx b/apps/start/src/routes/_app.$organizationId.members._tabs.tsxindex c46dde4f5..203904308 100644--- a/apps/start/src/routes/_app.$organizationId.members._tabs.tsx+++ b/apps/start/src/routes/_app.$organizationId.members._tabs.tsx@@ -1,13 +1,13 @@-import { PageHeader } from '@/components/page-header';-import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';-import { usePageTabs } from '@/hooks/use-page-tabs';-import { PAGE_TITLES, createOrganizationTitle } from '@/utils/title';import {- Outlet,createFileRoute,+ Outlet,redirect,useRouter,} from '@tanstack/react-router';+import { PageHeader } from '@/components/page-header';+import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';+import { usePageTabs } from '@/hooks/use-page-tabs';+import { createOrganizationTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_app/$organizationId/members/_tabs')({component: Component,@@ -51,12 +51,12 @@ function Component() {return (<div className="container p-8">- <PageHeader title="Members" description="Manage your members here" />+ <PageHeader description="Manage your members here" title="Members" /><Tabs- value={activeTab}- onValueChange={handleTabChange}className="mt-2 mb-8"+ onValueChange={handleTabChange}+ value={activeTab}><TabsList>{tabs.map((tab) => (diff --git a/apps/start/src/routes/_app.$organizationId.settings.tsx b/apps/start/src/routes/_app.$organizationId.settings.tsxindex 48ac9159d..302986492 100644--- a/apps/start/src/routes/_app.$organizationId.settings.tsx+++ b/apps/start/src/routes/_app.$organizationId.settings.tsx@@ -1,19 +1,19 @@+import { zEditOrganization } from '@openpanel/core/modules/organization/organization.constants';+import { useMutation, useQuery } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { Controller, useForm } from 'react-hook-form';+import { toast } from 'sonner';+import type { z } from 'zod';import { InputWithLabel, WithLabel } from '@/components/forms/input-with-label';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';import { PageHeader } from '@/components/page-header';+import DeleteOrganization from '@/components/settings/delete-organization';import { Button } from '@/components/ui/button';import { Combobox } from '@/components/ui/combobox';-import DeleteOrganization from '@/components/settings/delete-organization';import { Widget, WidgetBody, WidgetHead } from '@/components/widget';import { handleError, useTRPC } from '@/integrations/trpc/react';-import { PAGE_TITLES, createOrganizationTitle } from '@/utils/title';-import { zEditOrganization } from '@openpanel/core/modules/organization/organization.constants';-import { useMutation, useQuery } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { Controller, useForm } from 'react-hook-form';-import { toast } from 'sonner';-import type { z } from 'zod';+import { createOrganizationTitle, PAGE_TITLES } from '@/utils/title';const validator = zEditOrganization;@@ -80,9 +80,9 @@ function Component() {return (<div className="container p-8"><PageHeader- title="Workspace settings"- description="Manage your workspace settings here"className="mb-8"+ description="Manage your workspace settings here"+ title="Workspace settings"/><form@@ -94,7 +94,7 @@ function Component() {<WidgetHead className="flex items-center justify-between"><span className="title">Details</span></WidgetHead>- <WidgetBody className="gap-4 col">+ <WidgetBody className="col gap-4"><InputWithLabelclassName="flex-1"label="Name"@@ -102,28 +102,28 @@ function Component() {defaultValue={organization?.name}/><Controller- name="timezone"control={control}+ name="timezone"render={({ field }) => (<WithLabel label="Timezone"><Combobox- placeholder="Select timezone"+ className="w-full"items={Intl.supportedValuesOf('timeZone').map((item) => ({value: item,label: item,}))}- value={field.value}onChange={field.onChange}- className="w-full"+ placeholder="Select timezone"+ value={field.value}/></WithLabel>)}/><Button+ className="self-end"+ disabled={!formState.isDirty}size="sm"type="submit"- disabled={!formState.isDirty}- className="self-end">Save</Button>diff --git a/apps/start/src/routes/_app.$organizationId.tsx b/apps/start/src/routes/_app.$organizationId.tsxindex 2c46d5821..6e7727b4f 100644--- a/apps/start/src/routes/_app.$organizationId.tsx+++ b/apps/start/src/routes/_app.$organizationId.tsx@@ -1,23 +1,23 @@-import { FullPageEmptyState } from '@/components/full-page-empty-state';-import FullPageLoadingState from '@/components/full-page-loading-state';-import FeedbackPrompt from '@/components/organization/feedback-prompt';-import SupporterPrompt from '@/components/organization/supporter-prompt';-import YearlySwitchPrompt from '@/components/organization/yearly-switch-prompt';-import { LinkButton } from '@/components/ui/button';-import { useTRPC } from '@/integrations/trpc/react';-import { cn } from '@/utils/cn';-import { getSubscriptionStateMeta } from '@openpanel/payments/subscription-state-meta';import { subscriptionBlocksDashboard } from '@openpanel/payments/subscription-state';+import { getSubscriptionStateMeta } from '@openpanel/payments/subscription-state-meta';import { useSuspenseQuery } from '@tanstack/react-query';import {- Outlet,createFileRoute,notFound,+ Outlet,useLocation,useMatches,} from '@tanstack/react-router';import { format } from 'date-fns';import { Building2Icon } from 'lucide-react';+import { FullPageEmptyState } from '@/components/full-page-empty-state';+import FullPageLoadingState from '@/components/full-page-loading-state';+import FeedbackPrompt from '@/components/organization/feedback-prompt';+import SupporterPrompt from '@/components/organization/supporter-prompt';+import YearlySwitchPrompt from '@/components/organization/yearly-switch-prompt';+import { LinkButton } from '@/components/ui/button';+import { useTRPC } from '@/integrations/trpc/react';+import { cn } from '@/utils/cn';const IGNORE_ORGANIZATION_IDS = ['.well-known', 'onboarding', 'assets'];@@ -74,10 +74,10 @@ export const Route = createFileRoute('/_app/$organizationId')({pendingComponent: FullPageLoadingState,notFoundComponent: () => (<FullPageEmptyState- title="Workspace not found"+ className="min-h-[calc(100vh-4rem)]"description="This workspace doesn't exist or you don't have access to it."icon={Building2Icon}- className="min-h-[calc(100vh-4rem)]"+ title="Workspace not found"><LinkButton href="/">Go to home</LinkButton></FullPageEmptyState>@@ -103,8 +103,8 @@ function Alert({}return (- <div className={cn('p-4 lg:p-8 bg-card border-b col gap-1', className)}>- <div className="text-lg font-medium">{title}</div>+ <div className={cn('col gap-1 border-b bg-card p-4 lg:p-8', className)}>+ <div className="font-medium text-lg">{title}</div><div className="mb-1">{description}</div><div className="row gap-2">{children}</div></div>@@ -144,19 +144,19 @@ function Component() {return (<>- {!stateMeta.banner && !isBillingPage && (+ {!(stateMeta.banner || isBillingPage) && (<YearlySwitchPrompt organization={organization} />)}{stateMeta.banner && !hideBannerForPrompt && (<Alert- title={stateMeta.banner.title}description={stateMeta.banner.description}+ title={stateMeta.banner.title}><LinkButton- to="/$organizationId/billing"params={{- organizationId: organizationId,+ organizationId,}}+ to="/$organizationId/billing">{stateMeta.banner.cta}</LinkButton>@@ -168,14 +168,14 @@ function Component() {organization.subscriptionPeriodEventsCount >=organization.subscriptionPeriodEventsLimit * 0.8 && (<Alert- title="Approaching your events limit"description={`You've used ${Math.round((organization.subscriptionPeriodEventsCount / organization.subscriptionPeriodEventsLimit) * 100)}% of your ${organization.subscriptionPeriodEventsLimit.toLocaleString()} monthly events. If you go over, we keep collecting your events but charts pause until you upgrade.`}+ title="Approaching your events limit"><LinkButton- to="/$organizationId/billing"params={{- organizationId: organizationId,+ organizationId,}}+ to="/$organizationId/billing">See plans</LinkButton>@@ -185,14 +185,14 @@ function Component() {organization.isActive &&organization.isExceeded && (<Alert- title="Events limit exceeded"description={`You hit your monthly events limit on ${format(organization.subscriptionPeriodEventsCountExceededAt, 'PPP')}. We're still collecting your events — nothing is lost — but charts won't show new data until you upgrade or your next cycle starts.`}+ title="Events limit exceeded"><LinkButton- to="/$organizationId/billing"params={{- organizationId: organizationId,+ organizationId,}}+ to="/$organizationId/billing">Upgrade now</LinkButton>diff --git a/apps/start/src/routes/_app.tsx b/apps/start/src/routes/_app.tsxindex 5383b2e7d..ac5187ccd 100644--- a/apps/start/src/routes/_app.tsx+++ b/apps/start/src/routes/_app.tsx@@ -42,7 +42,7 @@ function AppLayout() {return (<div className="flex h-screen w-full"><Sidebar />- <div className="w-full lg:pl-72 min-w-0 flex-1">+ <div className="w-full min-w-0 flex-1 lg:pl-72"><div className="fixed top-0 z-10 block h-16 w-full border-b bg-background lg:hidden" /><div className="block h-16 lg:hidden" /><Outlet />diff --git a/apps/start/src/routes/_login.reset-password.tsx b/apps/start/src/routes/_login.reset-password.tsxindex bcf1789a6..e75b4e6e5 100644--- a/apps/start/src/routes/_login.reset-password.tsx+++ b/apps/start/src/routes/_login.reset-password.tsx@@ -1,8 +1,8 @@-import { ResetPasswordForm } from '@/components/auth/reset-password-form';-import { FullPageErrorState } from '@/components/full-page-error-state';-import { PAGE_TITLES, createTitle } from '@/utils/title';import { createFileRoute } from '@tanstack/react-router';import { z } from 'zod';+import { ResetPasswordForm } from '@/components/auth/reset-password-form';+import { FullPageErrorState } from '@/components/full-page-error-state';+import { createTitle, PAGE_TITLES } from '@/utils/title';export const Route = createFileRoute('/_login/reset-password')({head: () => ({@@ -24,7 +24,7 @@ function Component() {const { token } = Route.useSearch();return (- <div className="col gap-8 w-full text-left">+ <div className="col w-full gap-8 text-left"><ResetPasswordForm token={token} /></div>);diff --git a/apps/start/src/routes/_login.verify.tsx b/apps/start/src/routes/_login.verify.tsxindex 73c83cd25..8b04a156f 100644--- a/apps/start/src/routes/_login.verify.tsx+++ b/apps/start/src/routes/_login.verify.tsx@@ -1,16 +1,16 @@-import { useTRPC } from '@/integrations/trpc/react';+import { useMutation } from '@tanstack/react-query';+import { createFileRoute } from '@tanstack/react-router';+import { useState } from 'react';+import { toast } from 'sonner';+import { Button } from '@/components/ui/button';+import { Input } from '@/components/ui/input';import {InputOTP,InputOTPGroup,InputOTPSlot,} from '@/components/ui/input-otp';-import { Button } from '@/components/ui/button';-import { Input } from '@/components/ui/input';+import { useTRPC } from '@/integrations/trpc/react';import { createTitle, PAGE_TITLES } from '@/utils/title';-import { useMutation } from '@tanstack/react-query';-import { createFileRoute } from '@tanstack/react-router';-import { useState } from 'react';-import { toast } from 'sonner';export const Route = createFileRoute('/_login/verify')({component: VerifyPage,@@ -45,12 +45,14 @@ function VerifyPage() {const handleSubmit = (e: React.FormEvent) => {e.preventDefault();- if (!canSubmit) return;+ if (!canSubmit) {+ return;+ }mutation.mutate({ code });};return (- <form onSubmit={handleSubmit} className="col w-full gap-8 text-left">+ <form className="col w-full gap-8 text-left" onSubmit={handleSubmit}><div><h1 className="mb-2 font-bold text-3xl text-foreground">Two-factor authentication@@ -65,16 +67,16 @@ function VerifyPage() {{mode === 'totp' ? (<div className="col items-center gap-4"><InputOTP+ autoFocus+ disabled={mutation.isPending}maxLength={6}- value={code}onChange={(value) => {setCode(value);if (value.length === 6) {mutation.mutate({ code: value });}}}- disabled={mutation.isPending}- autoFocus+ value={code}><InputOTPGroup><InputOTPSlot index={0} />@@ -88,39 +90,39 @@ function VerifyPage() {</div>) : (<Input- placeholder="ABCDE-FGHIJ"- value={code}- onChange={(e) => setCode(e.target.value)}- autoFocusautoCapitalize="characters"+ autoFocusdisabled={mutation.isPending}+ onChange={(e) => setCode(e.target.value)}+ placeholder="ABCDE-FGHIJ"+ value={code}/>)}<Button- type="submit"- size="lg"disabled={!canSubmit}loading={mutation.isPending}+ size="lg"+ type="submit">Verify</Button><button- type="button"+ className="text-center text-muted-foreground text-sm transition-colors duration-200 hover:text-highlight hover:underline"onClick={() => {setMode(mode === 'totp' ? 'recovery' : 'totp');setCode('');}}- className="text-sm text-muted-foreground hover:text-highlight hover:underline transition-colors duration-200 text-center"+ type="button">{mode === 'totp'? 'Use a recovery code instead': 'Use authenticator app instead'}</button><a+ className="text-center text-muted-foreground text-xs hover:underline"href="/login"- className="text-xs text-muted-foreground hover:underline text-center">Sign in with a different account</a>diff --git a/apps/start/src/routes/_public.tsx b/apps/start/src/routes/_public.tsxindex 153c53f09..e84fc128c 100644--- a/apps/start/src/routes/_public.tsx+++ b/apps/start/src/routes/_public.tsx@@ -1,6 +1,6 @@+import { createFileRoute, Outlet } from '@tanstack/react-router';import { LoginNavbar } from '@/components/login-navbar';import { OnboardingLeftPanel } from '@/components/onboarding-left-panel';-import { Outlet, createFileRoute, redirect } from '@tanstack/react-router';export const Route = createFileRoute('/_public')({component: OnboardingLayout,diff --git a/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsx b/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsxindex b68607633..d963ead9a 100644--- a/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsx+++ b/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsx@@ -1,13 +1,13 @@import { useQuery, useQueryClient } from '@tanstack/react-query';import { createFileRoute, Link, redirect } from '@tanstack/react-router';import { BoxSelectIcon } from 'lucide-react';+import { useEffect } from 'react';import { ButtonContainer } from '@/components/button-container';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';import VerifyListener from '@/components/onboarding/onboarding-verify-listener';import { VerifyFaq } from '@/components/onboarding/verify-faq';import { LinkButton } from '@/components/ui/button';-import { useEffect } from 'react';import useWS from '@/hooks/use-ws';import { useTRPC } from '@/integrations/trpc/react';import { cn } from '@/lib/utils';diff --git a/apps/start/src/routes/share.dashboard.$shareId.tsx b/apps/start/src/routes/share.dashboard.$shareId.tsxindex 6e7775462..bb005074f 100644--- a/apps/start/src/routes/share.dashboard.$shareId.tsx+++ b/apps/start/src/routes/share.dashboard.$shareId.tsx@@ -1,3 +1,6 @@+import { useQuery, useSuspenseQuery } from '@tanstack/react-query';+import { createFileRoute, notFound, useSearch } from '@tanstack/react-router';+import { z } from 'zod';import { ShareEnterPassword } from '@/components/auth/share-enter-password';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';@@ -6,18 +9,11 @@ import { LoginNavbar } from '@/components/login-navbar';import { OverviewInterval } from '@/components/overview/overview-interval';import { OverviewRange } from '@/components/overview/overview-range';import { useOverviewOptions } from '@/components/overview/useOverviewOptions';-import { ReportChart } from '@/components/report-chart';import {- ReportItem,ReportItemReadOnly,ReportItemSkeleton,} from '@/components/report/report-item';import { useTRPC } from '@/integrations/trpc/react';-import { cn } from '@/utils/cn';-import { timeWindows } from '@openpanel/core/modules/report/report.constants';-import { useQuery, useSuspenseQuery } from '@tanstack/react-query';-import { createFileRoute, notFound, useSearch } from '@tanstack/react-router';-import { z } from 'zod';const shareSearchSchema = z.object({header: z.optional(z.number().or(z.string().or(z.boolean()))),@@ -70,9 +66,9 @@ export const Route = createFileRoute('/share/dashboard/$shareId')({pendingComponent: FullPageLoadingState,errorComponent: () => (<FullPageEmptyState- title="Share not found"- description="The dashboard you are looking for does not exist."className="min-h-[calc(100vh-theme(spacing.16))]"+ description="The dashboard you are looking for does not exist."+ title="Share not found"/>),});@@ -123,7 +119,7 @@ function RouteComponent() {</div>)}<div className="sticky-header [animation-range:50px_100px]!">- <div className="p-4 col gap-2 mx-auto max-w-7xl">+ <div className="col mx-auto max-w-7xl gap-2 p-4"><div className="row justify-between"><div className="flex gap-2"><OverviewRange />@@ -134,7 +130,7 @@ function RouteComponent() {</div><div className="mx-auto max-w-7xl p-4">{reportsQuery.isLoading ? (- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">+ <div className="grid grid-cols-1 gap-4 md:grid-cols-2"><ReportItemSkeleton /><ReportItemSkeleton /><ReportItemSkeleton />@@ -149,12 +145,12 @@ function RouteComponent() {{reports.map((report) => (<div key={report.id}><ReportItemReadOnly+ endDate={endDate}+ interval={interval}+ range={range}report={report}shareId={shareId}- range={range}startDate={startDate}- endDate={endDate}- interval={interval}/></div>))}diff --git a/apps/start/src/routes/share.overview.$shareId.tsx b/apps/start/src/routes/share.overview.$shareId.tsxindex 7a884c070..6601af428 100644--- a/apps/start/src/routes/share.overview.$shareId.tsx+++ b/apps/start/src/routes/share.overview.$shareId.tsx@@ -1,3 +1,6 @@+import { useSuspenseQuery } from '@tanstack/react-query';+import { createFileRoute, notFound, useSearch } from '@tanstack/react-router';+import { z } from 'zod';import { ShareEnterPassword } from '@/components/auth/share-enter-password';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';@@ -15,9 +18,6 @@ import OverviewTopSources from '@/components/overview/overview-top-sources';import OverviewUserJourney from '@/components/overview/overview-user-journey';import OverviewWeeklyTrends from '@/components/overview/overview-weekly-trends';import { useTRPC } from '@/integrations/trpc/react';-import { useSuspenseQuery } from '@tanstack/react-query';-import { createFileRoute, notFound, useSearch } from '@tanstack/react-router';-import { z } from 'zod';const shareSearchSchema = z.object({header: z.optional(z.number().or(z.string().or(z.boolean()))),@@ -59,9 +59,9 @@ export const Route = createFileRoute('/share/overview/$shareId')({pendingComponent: FullPageLoadingState,errorComponent: () => (<FullPageEmptyState- title="Share not found"- description="The overview you are looking for does not exist."className="min-h-[calc(100vh-theme(spacing.16))]"+ description="The overview you are looking for does not exist."+ title="Share not found"/>),});@@ -105,7 +105,7 @@ function RouteComponent() {</div>)}<div className="sticky-header [animation-range:50px_100px]!">- <div className="p-4 col gap-2 mx-auto max-w-7xl">+ <div className="col mx-auto max-w-7xl gap-2 p-4"><div className="row justify-between"><div className="flex gap-2"><OverviewRange />diff --git a/apps/start/src/routes/share.report.$shareId.tsx b/apps/start/src/routes/share.report.$shareId.tsxindex a38a94857..fe37e6d1f 100644--- a/apps/start/src/routes/share.report.$shareId.tsx+++ b/apps/start/src/routes/share.report.$shareId.tsx@@ -1,3 +1,6 @@+import { useSuspenseQuery } from '@tanstack/react-query';+import { createFileRoute, notFound, useSearch } from '@tanstack/react-router';+import { z } from 'zod';import { ShareEnterPassword } from '@/components/auth/share-enter-password';import { FullPageEmptyState } from '@/components/full-page-empty-state';import FullPageLoadingState from '@/components/full-page-loading-state';@@ -7,9 +10,6 @@ import { OverviewRange } from '@/components/overview/overview-range';import { useOverviewOptions } from '@/components/overview/useOverviewOptions';import { ReportChart } from '@/components/report-chart';import { useTRPC } from '@/integrations/trpc/react';-import { useSuspenseQuery } from '@tanstack/react-query';-import { createFileRoute, notFound, useSearch } from '@tanstack/react-router';-import { z } from 'zod';const shareSearchSchema = z.object({header: z.optional(z.number().or(z.string().or(z.boolean()))),@@ -66,9 +66,9 @@ export const Route = createFileRoute('/share/report/$shareId')({pendingComponent: FullPageLoadingState,errorComponent: () => (<FullPageEmptyState- title="Share not found"- description="The report you are looking for does not exist."className="min-h-[calc(100vh-theme(spacing.16))]"+ description="The report you are looking for does not exist."+ title="Share not found"/>),});@@ -107,7 +107,7 @@ function RouteComponent() {</div>)}<div className="sticky-header [animation-range:50px_100px]!">- <div className="p-4 col gap-2 mx-auto max-w-7xl">+ <div className="col mx-auto max-w-7xl gap-2 p-4"><div className="row justify-between"><div className="flex gap-2"><OverviewRange />@@ -118,7 +118,7 @@ function RouteComponent() {</div><div className="mx-auto max-w-7xl p-4"><div className="card">- <div className="p-4 border-b">+ <div className="border-b p-4"><div className="font-medium text-xl">{share.report.name}</div></div><div className="p-4">diff --git a/apps/start/src/routes/widget/badge.tsx b/apps/start/src/routes/widget/badge.tsxindex cf9551a2e..20b031bb6 100644--- a/apps/start/src/routes/widget/badge.tsx+++ b/apps/start/src/routes/widget/badge.tsx@@ -1,10 +1,10 @@-import { LogoSquare } from '@/components/logo';-import { useNumber } from '@/hooks/use-numer-formatter';-import { useTRPC } from '@/integrations/trpc/react';import { useQuery } from '@tanstack/react-query';import { createFileRoute } from '@tanstack/react-router';import { UsersIcon } from 'lucide-react';import { z } from 'zod';+import { LogoSquare } from '@/components/logo';+import { useNumber } from '@/hooks/use-numer-formatter';+import { useTRPC } from '@/integrations/trpc/react';const widgetSearchSchema = z.object({shareId: z.string(),@@ -26,14 +26,14 @@ function RouteComponent() {);if (isLoading) {- return <BadgeWidget visitors={0} isLoading color={color} />;+ return <BadgeWidget color={color} isLoading visitors={0} />;}if (!data) {- return <BadgeWidget visitors={0} color={color} />;+ return <BadgeWidget color={color} visitors={0} />;}- return <BadgeWidget visitors={data.visitors} color={color} />;+ return <BadgeWidget color={color} visitors={data.visitors} />;}interface BadgeWidgetProps {@@ -46,7 +46,7 @@ function BadgeWidget({ visitors, isLoading, color }: BadgeWidgetProps) {const number = useNumber();return (<div- className="absolute inset-0 group inline-flex items-center gap-3 rounded-lg center-center px-2"+ className="group center-center absolute inset-0 inline-flex items-center gap-3 rounded-lg px-2"style={{backgroundColor: color,}}@@ -57,8 +57,8 @@ function BadgeWidget({ visitors, isLoading, color }: BadgeWidgetProps) {</div>{/* Center text */}- <div className="flex flex-col gap-0.5 flex-1 min-w-0 items-start -mt-px">- <div className="text-[10px] font-medium uppercase tracking-wide text-white/80">+ <div className="-mt-px flex min-w-0 flex-1 flex-col items-start gap-0.5">+ <div className="font-medium text-[10px] text-white/80 uppercase tracking-wide">ANALYTICS FROM</div><div className="font-semibold text-white leading-tight">OpenPanel</div>@@ -67,7 +67,7 @@ function BadgeWidget({ visitors, isLoading, color }: BadgeWidgetProps) {{/* Visitor count on the right */}<div className="col center-center flex-shrink-0 gap-1"><UsersIcon className="size-4 text-white" />- <div className="text-sm font-medium text-white tabular-nums">+ <div className="font-medium text-sm text-white tabular-nums">{isLoading ? <span>...</span> : number.short(visitors)}</div></div>diff --git a/apps/start/src/routes/widget/test.tsx b/apps/start/src/routes/widget/test.tsxindex 947192ec1..01b92a133 100644--- a/apps/start/src/routes/widget/test.tsx+++ b/apps/start/src/routes/widget/test.tsx@@ -8,26 +8,26 @@ function RouteComponent() {return (<div className="center-center h-screen w-screen gap-4"><iframe- title="Realtime Widget"+ className="rounded-xl border"+ height="400"src="http://localhost:3000/widget/realtime?shareId=qkC561&limit=2"+ title="Realtime Widget"width="300"- height="400"- className="rounded-xl border"/><iframe- title="Realtime Widget"+ className="rounded-xl border"+ height="400"src="http://localhost:3000/widget/realtime?shareId=qkC562&limit=2"+ title="Realtime Widget"width="300"- height="400"- className="rounded-xl border"/><iframe- title="Counter Widget"- src="http://localhost:3000/widget/counter?shareId=qkC561"+ className="rounded-xl border"+ frameBorder="0"height="32"+ src="http://localhost:3000/widget/counter?shareId=qkC561"+ title="Counter Widget"width="auto"- frameBorder="0"- className="rounded-xl border"/></div>);diff --git a/apps/start/src/trpc/client.ts b/apps/start/src/trpc/client.tsindex 044dd1fda..0830229d1 100644--- a/apps/start/src/trpc/client.ts+++ b/apps/start/src/trpc/client.ts@@ -1,10 +1,6 @@-import { useTRPC } from '@/integrations/trpc/react';import type { AppRouter } from '@openpanel/core';-import type {- inferRouterInputs,- inferRouterOutputs,- inferTRPCClientTypes,-} from '@trpc/server';+import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';+import { useTRPC } from '@/integrations/trpc/react';export const api = useTRPC();diff --git a/apps/start/src/types/data-table.ts b/apps/start/src/types/data-table.tsindex 6d5b6cfb1..6aa6ba157 100644--- a/apps/start/src/types/data-table.ts+++ b/apps/start/src/types/data-table.ts@@ -1,6 +1,6 @@+import type { ColumnSort, FilterFn, Row, RowData } from '@tanstack/react-table';import type { DataTableConfig } from '@/components/ui/data-table/data-table-config';import type { FilterItemSchema } from '@/components/ui/data-table/data-table-parsers';-import type { ColumnSort, FilterFn, Row, RowData } from '@tanstack/react-table';declare module '@tanstack/react-table' {interface ColumnMeta<TData extends RowData, TValue> {diff --git a/apps/start/src/utils/cn.ts b/apps/start/src/utils/cn.tsindex 04ec7b9bf..568578c5a 100644--- a/apps/start/src/utils/cn.ts+++ b/apps/start/src/utils/cn.ts@@ -1,5 +1,5 @@-import { clsx } from 'clsx';import type { ClassValue } from 'clsx';+import { clsx } from 'clsx';import { twMerge } from 'tailwind-merge';export function cn(...inputs: ClassValue[]) {diff --git a/apps/start/src/utils/csv-download.ts b/apps/start/src/utils/csv-download.tsindex 379ac8734..e097560f1 100644--- a/apps/start/src/utils/csv-download.ts+++ b/apps/start/src/utils/csv-download.ts@@ -1,5 +1,7 @@function escapeCsvValue(value: string | number | null | undefined): string {- if (value === null || value === undefined) return '';+ if (value === null || value === undefined) {+ return '';+ }const str = String(value);if (str.includes(',') || str.includes('"') || str.includes('\n')) {return `"${str.replace(/"/g, '""')}"`;@@ -24,6 +26,8 @@ export function downloadCSV(content: string, filename: string): void {}export function cohortMembersToCSV(profileIds: string[]): string {- if (!profileIds.length) return '';+ if (!profileIds.length) {+ return '';+ }return buildCSV([['profile_id'], ...profileIds.map((id) => [id])]);}diff --git a/apps/start/src/utils/date.ts b/apps/start/src/utils/date.tsindex 46f6d6384..27dd26dc8 100644--- a/apps/start/src/utils/date.ts+++ b/apps/start/src/utils/date.ts@@ -1,4 +1,4 @@-import { differenceInDays, differenceInHours, isSameDay } from 'date-fns';+import { differenceInHours, isSameDay } from 'date-fns';import type { FormatStyleName } from 'javascript-time-ago';import TimeAgo from 'javascript-time-ago';import en from 'javascript-time-ago/locale/en';diff --git a/apps/testbed/src/pages/Cart.tsx b/apps/testbed/src/pages/Cart.tsxindex 3cfd5449e..2c0ec6901 100644--- a/apps/testbed/src/pages/Cart.tsx+++ b/apps/testbed/src/pages/Cart.tsx@@ -32,7 +32,7 @@ export function CartPage({ cart, onRemove, onCheckout }: Props) {<th>Price</th><th>Qty</th><th>Subtotal</th>- <th></th>+ <th /></tr></thead><tbody>@@ -44,9 +44,9 @@ export function CartPage({ cart, onRemove, onCheckout }: Props) {<td>${item.price * item.qty}</td><td><button- type="button"className="danger"onClick={() => onRemove(item.id)}+ type="button">Remove</button>@@ -61,7 +61,7 @@ export function CartPage({ cart, onRemove, onCheckout }: Props) {<Link to="/"><button type="button">← Shop</button></Link>- <button type="button" className="primary" onClick={onCheckout}>+ <button className="primary" onClick={onCheckout} type="button">Checkout →</button></div>diff --git a/apps/testbed/src/pages/Checkout.tsx b/apps/testbed/src/pages/Checkout.tsxindex 01eadf5d2..61bd75b41 100644--- a/apps/testbed/src/pages/Checkout.tsx+++ b/apps/testbed/src/pages/Checkout.tsx@@ -17,7 +17,7 @@ export function CheckoutPage({ cart, onPay }: Props) {<label className="form-label" htmlFor="card">Card number</label>- <input id="card" defaultValue="4242 4242 4242 4242" readOnly />+ <input defaultValue="4242 4242 4242 4242" id="card" readOnly /></div><divstyle={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }}@@ -26,13 +26,13 @@ export function CheckoutPage({ cart, onPay }: Props) {<label className="form-label" htmlFor="expiry">Expiry</label>- <input id="expiry" defaultValue="12/28" readOnly />+ <input defaultValue="12/28" id="expiry" readOnly /></div><div className="form-group"><label className="form-label" htmlFor="cvc">CVC</label>- <input id="cvc" defaultValue="123" readOnly />+ <input defaultValue="123" id="cvc" readOnly /></div></div><div className="checkout-total">Total: ${total}</div>@@ -40,10 +40,10 @@ export function CheckoutPage({ cart, onPay }: Props) {<Link to="/cart"><button type="button">← Back</button></Link>- <button type="button" className="primary" onClick={() => onPay(true)}>+ <button className="primary" onClick={() => onPay(true)} type="button">Pay ${total} (success)</button>- <button type="button" className="danger" onClick={() => onPay(false)}>+ <button className="danger" onClick={() => onPay(false)} type="button">Pay ${total} (fail)</button></div>diff --git a/apps/testbed/src/pages/Product.tsx b/apps/testbed/src/pages/Product.tsxindex b14eaaa73..c032afc63 100644--- a/apps/testbed/src/pages/Product.tsx+++ b/apps/testbed/src/pages/Product.tsx@@ -50,9 +50,9 @@ export function ProductPage({ products, onAddToCart }: Props) {Lorem ipsum dolor sit amet consectetur adipiscing elit.</p><button- type="button"className="primary"onClick={() => onAddToCart(product)}+ type="button">Add to cart</button>diff --git a/apps/testbed/src/pages/Shop.tsx b/apps/testbed/src/pages/Shop.tsxindex 2a07027f2..2cba1f516 100644--- a/apps/testbed/src/pages/Shop.tsx+++ b/apps/testbed/src/pages/Shop.tsx@@ -12,18 +12,18 @@ export function ShopPage({ products, onAddToCart }: Props) {<div className="page-title">Products</div><div className="product-grid">{products.map((product) => (- <div key={product.id} className="product-card">+ <div className="product-card" key={product.id}><div className="product-card-category">{product.category}</div>- <Link to={`/product/${product.id}`} className="product-card-name">+ <Link className="product-card-name" to={`/product/${product.id}`}>{product.name}</Link><div className="product-card-price">${product.price}</div><div className="product-card-actions"><button- type="button"className="primary"- style={{ width: '100%' }}onClick={() => onAddToCart(product)}+ style={{ width: '100%' }}+ type="button">Add to cart</button>diff --git a/biome.json b/biome.jsonindex 42e61b3c4..1d5abe6df 100644--- a/biome.json+++ b/biome.json@@ -7,11 +7,10 @@},"files": {"includes": [- "**",- "!apps/public/public/**",+ "!apps/public/public","!apps/start/src/routeTree.gen.ts","!apps/api/scripts/mock-big.json",- "!packages/db/src/generated/**",+ "!packages/db/src/generated","!packages/core/src/modules/import/src/providers/__fixtures__/*.json"]},diff --git a/hub.config.ts b/hub.config.tsindex afe153463..5c73de2e5 100644--- a/hub.config.ts+++ b/hub.config.ts@@ -8,7 +8,9 @@ function seededMcp(w: {}): Record<string, { url: string }> {try {const seed = JSON.parse(readFileSync(join(w.dir, '.seed.json'), 'utf8'));- if (typeof seed?.mcp?.token !== 'string') return {};+ if (typeof seed?.mcp?.token !== 'string') {+ return {};+ }return {openpanel: { url: `${w.url('api')}/mcp?token=${seed.mcp.token}` },};diff --git a/packages/db/prisma/prisma-json-types.ts b/packages/db/prisma/prisma-json-types.tsindex 3ef1a3659..90663ce2f 100644--- a/packages/db/prisma/prisma-json-types.ts+++ b/packages/db/prisma/prisma-json-types.ts@@ -1,6 +1,5 @@-import { readFileSync, readdirSync, writeFileSync } from 'node:fs';-import { join } from 'node:path';-import { dirname } from 'node:path';+import { readdirSync, readFileSync, writeFileSync } from 'node:fs';+import { dirname, join } from 'node:path';import { fileURLToPath } from 'node:url';const __filename = fileURLToPath(import.meta.url);diff --git a/packages/db/scripts/find-duplicate-events.ts b/packages/db/scripts/find-duplicate-events.tsindex ef9370cc3..4a6f8c63c 100644--- a/packages/db/scripts/find-duplicate-events.ts+++ b/packages/db/scripts/find-duplicate-events.ts@@ -29,9 +29,9 @@* flag the script only reports.*/import {- TABLE_NAMES,ch,getReplicatedTableName,+ TABLE_NAMES,} from '../src/clickhouse/client';// ---------------------------------------------------------------------------@@ -63,7 +63,7 @@ function parseSince(raw: string): Date {const relative = raw.match(/^(\d+)([hd])$/);if (relative) {const amount = Number.parseInt(relative[1]!, 10);- const unitMs = relative[2] === 'h' ? 3600_000 : 86_400_000;+ const unitMs = relative[2] === 'h' ? 3_600_000 : 86_400_000;return new Date(Date.now() - amount * unitMs);}const parsed = new Date(raw);@@ -244,7 +244,7 @@ function* bucketRanges(since: Date,bucket: Bucket): Generator<{ start: Date; end: Date }> {- const stepMs = bucket === 'day' ? 86_400_000 : 3600_000;+ const stepMs = bucket === 'day' ? 86_400_000 : 3_600_000;// Align the first bucket to the start of the day/hour.const start = new Date(since);if (bucket === 'day') {@@ -261,10 +261,10 @@ function* bucketRanges(async function deleteDuplicates(args: Args): Promise<void> {const target = getReplicatedTableName(TABLE_NAMES.events);console.log(- `\n⚠️ DELETE MODE — keeping the lowest id per group, deleting the rest.\n` ++ '\n⚠️ DELETE MODE — keeping the lowest id per group, deleting the rest.\n' +` Target: ${target}\n` +- ` Note: ClickHouse mutations run asynchronously; rows disappear once the\n` +- ` mutation completes server-side.\n`+ ' Note: ClickHouse mutations run asynchronously; rows disappear once the\n' ++ ' mutation completes server-side.\n');let grandTotal = 0;@@ -316,8 +316,8 @@ async function deleteDuplicates(args: Args): Promise<void> {console.log(`\nSubmitted deletes for ${grandTotal.toLocaleString()} duplicate rows.\n` +- `Watch system.mutations for completion:\n` +- ` SELECT * FROM system.mutations WHERE is_done = 0\n`+ 'Watch system.mutations for completion:\n' ++ ' SELECT * FROM system.mutations WHERE is_done = 0\n');}diff --git a/packages/db/scripts/set-subscription-state.ts b/packages/db/scripts/set-subscription-state.tsindex 76f229922..2240dcd49 100644--- a/packages/db/scripts/set-subscription-state.ts+++ b/packages/db/scripts/set-subscription-state.ts@@ -119,7 +119,7 @@ async function main() {const state = process.argv[2];const orgId = process.argv[3] ?? 'openpanel-dev';- if (!state || !recipes[state]) {+ if (!(state && recipes[state])) {console.error(`Usage: set-subscription-state <state> [orgId]\n\nStates: ${Object.keys(recipes).join(', ')}`);diff --git a/packages/db/src/clickhouse/migration.ts b/packages/db/src/clickhouse/migration.tsindex deae71175..3460701bd 100644--- a/packages/db/src/clickhouse/migration.ts+++ b/packages/db/src/clickhouse/migration.ts@@ -41,7 +41,9 @@ const replicated = (tableName: string) => `${tableName}_replicated`;*/export function migrationDatabase(): string {const raw = (process.env.CLICKHOUSE_URL ?? '').split(',')[0]?.trim();- if (!raw) return 'openpanel';+ if (!raw) {+ return 'openpanel';+ }try {const name = new URL(raw).pathname.replace(/^\/+|\/+$/g, '');return /^[A-Za-z_][A-Za-z0-9_]*$/.test(name) ? name : 'openpanel';@@ -190,7 +192,8 @@ export function dropColumns(export async function getExistingTables() {try {const existingTablesQuery = await chMigrationClient.query({- query: `SELECT name FROM system.tables WHERE database = {database:String}`,+ query:+ 'SELECT name FROM system.tables WHERE database = {database:String}',query_params: { database: migrationDatabase() },format: 'JSONEachRow',});diff --git a/packages/db/src/clickhouse/round-robin.test.ts b/packages/db/src/clickhouse/round-robin.test.tsindex 52dfa8019..396764837 100644--- a/packages/db/src/clickhouse/round-robin.test.ts+++ b/packages/db/src/clickhouse/round-robin.test.ts@@ -1,7 +1,7 @@import { describe, expect, it } from 'bun:test';import {- type ErrorClass,classifyError,+ type ErrorClass,isRetriableConnectionError,} from './round-robin';diff --git a/packages/email/src/components/footer.tsx b/packages/email/src/components/footer.tsxindex 3beead858..1781a2516 100644--- a/packages/email/src/components/footer.tsx+++ b/packages/email/src/components/footer.tsx@@ -7,7 +7,6 @@ import {Section,Text,} from '@react-email/components';-import React from 'react';const baseUrl = 'https://openpanel.dev';@@ -16,7 +15,7 @@ export function Footer({ unsubscribeUrl }: { unsubscribeUrl?: string }) {<><Hr /><Section className="w-full p-6">- <Text className="text-[21px] font-regular" style={{ margin: 0 }}>+ <Text className="font-regular text-[21px]" style={{ margin: 0 }}>An open-source alternative to Mixpanel</Text>@@ -26,40 +25,40 @@ export function Footer({ unsubscribeUrl }: { unsubscribeUrl?: string }) {<Column className="w-8"><Link href="https://git.new/openpanel"><Img+ alt="OpenPanel on Github"+ height="22"src={`${baseUrl}/icons/github.png`}width="22"- height="22"- alt="OpenPanel on Github"/></Link></Column><Column className="w-8"><Link href="https://x.com/openpaneldev"><Img+ alt="OpenPanel on X"+ height="22"src={`${baseUrl}/icons/x.png`}width="22"- height="22"- alt="OpenPanel on X"/></Link></Column><Column className="w-8"><Link href="https://go.openpanel.dev/discord"><Img+ alt="OpenPanel on Discord"+ height="22"src={`${baseUrl}/icons/discord.png`}width="22"- height="22"- alt="OpenPanel on Discord"/></Link></Column><Column className="w-auto"><Link href="mailto:[email protected]"><Img+ alt="Contact OpenPanel with email"+ height="22"src={`${baseUrl}/icons/email.png`}width="22"- height="22"- alt="Contact OpenPanel with email"/></Link></Column>diff --git a/packages/email/src/components/layout.tsx b/packages/email/src/components/layout.tsxindex aca77ac57..bf82fc87c 100644--- a/packages/email/src/components/layout.tsx+++ b/packages/email/src/components/layout.tsx@@ -22,39 +22,39 @@ export function Layout({ children, unsubscribeUrl }: Props) {<Tailwind><head><Font- fontFamily="Geist"fallbackFontFamily="Helvetica"+ fontFamily="Geist"+ fontStyle="normal"+ fontWeight={400}webFont={{url: 'https://cdn.jsdelivr.net/npm/@fontsource/[email protected]/files/geist-sans-latin-400-normal.woff2',format: 'woff2',}}- fontWeight={400}- fontStyle="normal"/><Font- fontFamily="Geist"fallbackFontFamily="Helvetica"+ fontFamily="Geist"+ fontStyle="normal"+ fontWeight={500}webFont={{url: 'https://cdn.jsdelivr.net/npm/@fontsource/[email protected]/files/geist-sans-latin-500-normal.woff2',format: 'woff2',}}- fontWeight={500}- fontStyle="normal"/></head>- <Body className="bg-[#fff] my-auto mx-auto font-sans">+ <Body className="mx-auto my-auto bg-[#fff] font-sans"><Container- className="border-transparent md:border-[#E8E7E1] my-[40px] mx-auto max-w-[600px]"+ className="mx-auto my-[40px] max-w-[600px] border-transparent md:border-[#E8E7E1]"style={{ borderStyle: 'solid', borderWidth: 1 }}><Section className="p-6"><Img- src={'https://openpanel.dev/logo.png'}- width="80"- height="80"alt="OpenPanel Logo"+ height="80"+ src={'https://openpanel.dev/logo.png'}style={{ borderRadius: 4 }}+ width="80"/></Section><Section className="p-6">{children}</Section>diff --git a/packages/email/src/emails/email-invite.tsx b/packages/email/src/emails/email-invite.tsxindex 472de8706..2256cff2b 100644--- a/packages/email/src/emails/email-invite.tsx+++ b/packages/email/src/emails/email-invite.tsx@@ -1,5 +1,4 @@import { Button, Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/email-reset-password.tsx b/packages/email/src/emails/email-reset-password.tsxindex cf6136f12..defcefae0 100644--- a/packages/email/src/emails/email-reset-password.tsx+++ b/packages/email/src/emails/email-reset-password.tsx@@ -1,5 +1,4 @@import { Button, Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/index.tsx b/packages/email/src/emails/index.tsxindex 1f56ea5dd..c31acb583 100644--- a/packages/email/src/emails/index.tsx+++ b/packages/email/src/emails/index.tsx@@ -3,6 +3,7 @@ import { EmailInvite, zEmailInvite } from './email-invite';import EmailResetPassword, {zEmailResetPassword,} from './email-reset-password';+import NotificationRule, { zNotificationRule } from './notification-rule';import OnboardingDashboards, {zOnboardingDashboards,} from './onboarding-dashboards';@@ -12,7 +13,6 @@ import OnboardingFeatureRequest, {import OnboardingTrialEnding, {zOnboardingTrialEnding,} from './onboarding-trial-ending';-import NotificationRule, { zNotificationRule } from './notification-rule';import OnboardingWelcome, { zOnboardingWelcome } from './onboarding-welcome';import OnboardingWhatToTrack, {zOnboardingWhatToTrack,diff --git a/packages/email/src/emails/notification-rule.tsx b/packages/email/src/emails/notification-rule.tsxindex d45de0eff..fb24c06dc 100644--- a/packages/email/src/emails/notification-rule.tsx+++ b/packages/email/src/emails/notification-rule.tsx@@ -1,5 +1,4 @@import { Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/onboarding-dashboards.tsx b/packages/email/src/emails/onboarding-dashboards.tsxindex 4449ccb74..db56ae67d 100644--- a/packages/email/src/emails/onboarding-dashboards.tsx+++ b/packages/email/src/emails/onboarding-dashboards.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Layout } from '../components/layout';import { List } from '../components/list';@@ -87,8 +86,8 @@ export function OnboardingDashboards({<Text>Carl</Text><span style={{ margin: '0 -20px', display: 'block' }}><img- src="https://openpanel.dev/_next/image?url=%2Fscreenshots%2Fdashboard-dark.webp&w=3840&q=75"alt="Dashboard"+ src="https://openpanel.dev/_next/image?url=%2Fscreenshots%2Fdashboard-dark.webp&w=3840&q=75"style={{width: '100%',height: 'auto',@@ -104,5 +103,5 @@ OnboardingDashboards.PreviewProps = {firstName: 'Alex',dashboardUrl: 'https://dashboard.openpanel.dev/org-id',hasData: true,- eventsCount: 48211,+ eventsCount: 48_211,};diff --git a/packages/email/src/emails/onboarding-feature-request.tsx b/packages/email/src/emails/onboarding-feature-request.tsxindex a67e7f927..33e382364 100644--- a/packages/email/src/emails/onboarding-feature-request.tsx+++ b/packages/email/src/emails/onboarding-feature-request.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Layout } from '../components/layout';import { withUtm } from '../utm';diff --git a/packages/email/src/emails/onboarding-trial-ending.tsx b/packages/email/src/emails/onboarding-trial-ending.tsxindex c87f38a17..ff0952d07 100644--- a/packages/email/src/emails/onboarding-trial-ending.tsx+++ b/packages/email/src/emails/onboarding-trial-ending.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';@@ -97,5 +96,5 @@ OnboardingTrialEnding.PreviewProps = {recommendedPlan: '100K events per month for $20.00',trialEndDate: 'June 16',hasData: true,- eventsCount: 84211,+ eventsCount: 84_211,};diff --git a/packages/email/src/emails/onboarding-welcome.tsx b/packages/email/src/emails/onboarding-welcome.tsxindex efe12d5e9..0641aaa39 100644--- a/packages/email/src/emails/onboarding-welcome.tsx+++ b/packages/email/src/emails/onboarding-welcome.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Layout } from '../components/layout';import { List } from '../components/list';@@ -48,20 +47,20 @@ export function OnboardingWelcome({<Listitems={[<Link- key="install"href={withUtm('https://openpanel.dev/docs/get-started/install-openpanel','onboarding-welcome')}+ key="install">Install the tracking script</Link>,<Link- key="track"href={withUtm('https://openpanel.dev/docs/get-started/track-events','onboarding-welcome')}+ key="track">Track custom events</Link>,diff --git a/packages/email/src/emails/onboarding-what-to-track.tsx b/packages/email/src/emails/onboarding-what-to-track.tsxindex bde868878..2b90e6be2 100644--- a/packages/email/src/emails/onboarding-what-to-track.tsx+++ b/packages/email/src/emails/onboarding-what-to-track.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Layout } from '../components/layout';import { withUtm } from '../utm';@@ -78,5 +77,5 @@ export function OnboardingWhatToTrack({OnboardingWhatToTrack.PreviewProps = {firstName: 'Alex',hasData: true,- eventsCount: 12544,+ eventsCount: 12_544,};diff --git a/packages/email/src/emails/tracking-data-stopped.tsx b/packages/email/src/emails/tracking-data-stopped.tsxindex 6b8398b28..3a605aaea 100644--- a/packages/email/src/emails/tracking-data-stopped.tsx+++ b/packages/email/src/emails/tracking-data-stopped.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/tracking-no-data.tsx b/packages/email/src/emails/tracking-no-data.tsxindex a92939317..c8b43658a 100644--- a/packages/email/src/emails/tracking-no-data.tsx+++ b/packages/email/src/emails/tracking-no-data.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/usage-limit-exceeded.tsx b/packages/email/src/emails/usage-limit-exceeded.tsxindex 596ead383..03805ddfd 100644--- a/packages/email/src/emails/usage-limit-exceeded.tsx+++ b/packages/email/src/emails/usage-limit-exceeded.tsx@@ -1,5 +1,4 @@import { Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/usage-near-limit.tsx b/packages/email/src/emails/usage-near-limit.tsxindex cff14cad2..32c5bf2f8 100644--- a/packages/email/src/emails/usage-near-limit.tsx+++ b/packages/email/src/emails/usage-near-limit.tsx@@ -1,5 +1,4 @@import { Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/weekly-digest.tsx b/packages/email/src/emails/weekly-digest.tsxindex 839006881..3462f8f85 100644--- a/packages/email/src/emails/weekly-digest.tsx+++ b/packages/email/src/emails/weekly-digest.tsx@@ -1,5 +1,4 @@import { Heading, Hr, Link, Section, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Layout } from '../components/layout';import { List } from '../components/list';@@ -30,8 +29,12 @@ export type Props = z.infer<typeof zWeeklyDigest>;export default WeeklyDigest;function deltaColor(direction?: 'up' | 'down' | 'flat'): string {- if (direction === 'up') return '#16a34a';- if (direction === 'down') return '#dc2626';+ if (direction === 'up') {+ return '#16a34a';+ }+ if (direction === 'down') {+ return '#dc2626';+ }return '#6b7280';}@@ -46,17 +49,17 @@ export function WeeklyDigest({}: Props & { unsubscribeUrl?: string }) {return (<Layout unsubscribeUrl={unsubscribeUrl}>- <Heading as="h2" className="text-xl font-semibold">+ <Heading as="h2" className="font-semibold text-xl">Your week on {projectName}</Heading>- <Text className="text-sm text-gray-500">{dateRange}</Text>+ <Text className="text-gray-500 text-sm">{dateRange}</Text>{narrative && <Text>{narrative}</Text>}{stats.length > 0 && (<Section className="my-4">{stats.map((s) => (- <Text key={s.label} className="my-1">+ <Text className="my-1" key={s.label}><strong>{s.value}</strong> {s.label}{s.delta && (<span style={{ color: deltaColor(s.direction) }}>@@ -72,7 +75,7 @@ export function WeeklyDigest({{insights.length > 0 && (<><Hr />- <Heading as="h3" className="text-base font-semibold">+ <Heading as="h3" className="font-semibold text-base">What stood out</Heading><Listdiff --git a/packages/email/src/emails/wind-down-blocked.tsx b/packages/email/src/emails/wind-down-blocked.tsxindex dc4cbb723..592bca111 100644--- a/packages/email/src/emails/wind-down-blocked.tsx+++ b/packages/email/src/emails/wind-down-blocked.tsx@@ -1,5 +1,4 @@import { Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/wind-down-expired.tsx b/packages/email/src/emails/wind-down-expired.tsxindex 668bf5e64..132c1bf6e 100644--- a/packages/email/src/emails/wind-down-expired.tsx+++ b/packages/email/src/emails/wind-down-expired.tsx@@ -1,5 +1,4 @@import { Link, Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/wind-down-final-warning.tsx b/packages/email/src/emails/wind-down-final-warning.tsxindex bd7eb2119..cdbd4902c 100644--- a/packages/email/src/emails/wind-down-final-warning.tsx+++ b/packages/email/src/emails/wind-down-final-warning.tsx@@ -1,5 +1,4 @@import { Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/emails/wind-down-stopping-soon.tsx b/packages/email/src/emails/wind-down-stopping-soon.tsxindex 332691675..f343f4fdc 100644--- a/packages/email/src/emails/wind-down-stopping-soon.tsx+++ b/packages/email/src/emails/wind-down-stopping-soon.tsx@@ -1,5 +1,4 @@import { Text } from '@react-email/components';-import React from 'react';import { z } from 'zod';import { Button } from '../components/button';import { Layout } from '../components/layout';diff --git a/packages/email/src/index.tsx b/packages/email/src/index.tsxindex 6d1d7e13d..546678db4 100644--- a/packages/email/src/index.tsx+++ b/packages/email/src/index.tsx@@ -1,10 +1,8 @@-import React from 'react';+import { db } from '@openpanel/db';import { render } from '@react-email/render';import { createTransport } from 'nodemailer';import { Resend } from 'resend';import type { z } from 'zod';--import { db } from '@openpanel/db';import { type TemplateKey, type Templates, templates } from './emails';import { getUnsubscribeUrl } from './unsubscribe';diff --git a/packages/payments/scripts/create-checkout-link.ts b/packages/payments/scripts/create-checkout-link.tsindex c9f52bfe2..a976d9c62 100644--- a/packages/payments/scripts/create-checkout-link.ts+++ b/packages/payments/scripts/create-checkout-link.ts@@ -106,7 +106,7 @@ async function promptForInput(polar: Polar) {},});- if (!org || !org.members || org.members.length === 0) {+ if (!(org && org.members) || org.members.length === 0) {return [{ name: 'No members found', value: '', disabled: true }];}@@ -160,7 +160,9 @@ async function main() {name: 'polarApiKey',message: 'Enter your Polar API key:',validate: (input: string) => {- if (!input) return 'API key is required';+ if (!input) {+ return 'API key is required';+ }return true;},},diff --git a/packages/payments/scripts/create-custom-pricing.ts b/packages/payments/scripts/create-custom-pricing.tsindex c783900e2..3d9355c1d 100644--- a/packages/payments/scripts/create-custom-pricing.ts+++ b/packages/payments/scripts/create-custom-pricing.ts@@ -50,7 +50,9 @@ async function promptForInput() {name: 'polarApiKey',message: 'Enter your Polar API key:',validate: (input: string) => {- if (!input) return 'API key is required';+ if (!input) {+ return 'API key is required';+ }return true;},},@@ -126,8 +128,12 @@ async function promptForInput() {name: 'price',message: 'Enter price',validate: (input: number) => {- if (!Number.isInteger(input)) return false;- if (input < 0) return false;+ if (!Number.isInteger(input)) {+ return false;+ }+ if (input < 0) {+ return false;+ }return true;},},@@ -136,8 +142,12 @@ async function promptForInput() {name: 'eventsLimit',message: 'Enter events limit:',validate: (input: number) => {- if (!Number.isInteger(input)) return false;- if (input < 0) return false;+ if (!Number.isInteger(input)) {+ return false;+ }+ if (input < 0) {+ return false;+ }return true;},},diff --git a/packages/payments/scripts/create-products.ts b/packages/payments/scripts/create-products.tsindex 79964d542..0ce9e1f2d 100644--- a/packages/payments/scripts/create-products.ts+++ b/packages/payments/scripts/create-products.ts@@ -38,7 +38,9 @@ async function promptForInput() {name: 'polarApiKey',message: 'Enter your Polar API key:',validate: (input: string) => {- if (!input) return 'API key is required';+ if (!input) {+ return 'API key is required';+ }return true;},},diff --git a/packages/payments/src/polar.ts b/packages/payments/src/polar.tsindex 796d809e9..38376fcc1 100644--- a/packages/payments/src/polar.ts+++ b/packages/payments/src/polar.ts@@ -1,5 +1,6 @@// src/polar.tsimport { Polar } from '@polar-sh/sdk';+export {validateEvent as validatePolarEvent,WebhookVerificationError as PolarWebhookVerificationError,diff --git a/packages/payments/src/prices.ts b/packages/payments/src/prices.tsindex c0b9be39f..d5efb195e 100644--- a/packages/payments/src/prices.ts+++ b/packages/payments/src/prices.ts@@ -18,7 +18,7 @@ export type IPrice = {};export const PRICING: IPrice[] = [- { price: 2.5, events: 5_000 },+ { price: 2.5, events: 5000 },{ price: 5, events: 10_000 },{ price: 20, events: 100_000 },{ price: 30, events: 250_000, popular: true },diff --git a/packages/payments/src/subscription-state.test.ts b/packages/payments/src/subscription-state.test.tsindex bedef5569..2bfa6389e 100644--- a/packages/payments/src/subscription-state.test.ts+++ b/packages/payments/src/subscription-state.test.ts@@ -1,7 +1,7 @@import { afterEach, beforeEach, describe, expect, it } from 'vitest';import {- type SubscriptionState,getSubscriptionState,+ type SubscriptionState,subscriptionBlocksDashboard,} from './subscription-state.js';diff --git a/packages/redis/publisher.ts b/packages/redis/publisher.tsindex ddb036694..3f3e45e50 100644--- a/packages/redis/publisher.ts+++ b/packages/redis/publisher.ts@@ -1,8 +1,6 @@-import { type Redis, getRedisPub, getRedisSub } from './redis';--import type { IServiceEvent } from '@openpanel/core';-import type { Notification, Prisma } from '@openpanel/db';+import type { Prisma } from '@openpanel/db';import { getSuperJson, setSuperJson } from '@openpanel/shared';+import { getRedisPub, getRedisSub, type Redis } from './redis';export type IPublishChannels = {organization: {diff --git a/packages/redis/redis.ts b/packages/redis/redis.tsindex a4a87ec7d..2b840c55d 100644--- a/packages/redis/redis.ts+++ b/packages/redis/redis.ts@@ -3,7 +3,7 @@ import type { RedisOptions } from 'ioredis';import { Redis } from 'ioredis';const options: RedisOptions = {- connectTimeout: 10000,+ connectTimeout: 10_000,};/**diff --git a/packages/sdks/_info/frameworks.tsx b/packages/sdks/_info/frameworks.tsxindex e163eac2b..451be8a9a 100644--- a/packages/sdks/_info/frameworks.tsx+++ b/packages/sdks/_info/frameworks.tsx@@ -9,10 +9,10 @@ import { NodeIcon } from './icons/node-icon';import { ReactIcon } from './icons/react-icon';import { RemixIcon } from './icons/remix-icon';import { RestIcon } from './icons/rest-icon';+import { RubyIcon } from './icons/ruby-icon';+import { RustIcon } from './icons/rust-icon';import { SwiftIcon } from './icons/swift-icon';import { VueIcon } from './icons/vue-icon';-import { RustIcon } from './icons/rust-icon';-import { RubyIcon } from './icons/ruby-icon';export type Framework = {key: string;diff --git a/packages/sdks/_info/icons/astro-icon.tsx b/packages/sdks/_info/icons/astro-icon.tsxindex daae6f2ed..7bd0428a4 100644--- a/packages/sdks/_info/icons/astro-icon.tsx+++ b/packages/sdks/_info/icons/astro-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function AstroIcon({ className }: IconProps) {return (<svg- width="407"+ className={className}+ fill="none"height="512"viewBox="0 0 407 512"+ width="407"xmlns="http://www.w3.org/2000/svg"- fill="none"- className={className}><pathd="M132.014 436.092C108.884 414.948 102.132 370.522 111.769 338.336C128.478 358.629 151.631 365.057 175.612 368.686C212.633 374.285 248.992 372.191 283.384 355.269C287.318 353.332 290.954 350.756 295.253 348.147C298.48 357.509 299.32 366.961 298.192 376.58C295.452 400.009 283.793 418.106 265.249 431.825C257.833 437.312 249.987 442.217 242.328 447.391C218.8 463.294 212.435 481.94 221.276 509.061C221.486 509.726 221.674 510.387 222.149 511.999C210.136 506.621 201.361 498.792 194.675 488.5C187.613 477.639 184.254 465.623 184.077 452.621C183.989 446.294 183.989 439.91 183.138 433.672C181.06 418.464 173.921 411.655 160.471 411.263C146.669 410.861 135.75 419.394 132.855 432.832C132.634 433.863 132.313 434.882 131.992 436.08L132.014 436.092Z"diff --git a/packages/sdks/_info/icons/express-icon.tsx b/packages/sdks/_info/icons/express-icon.tsxindex 865c3dbdd..2cdafe139 100644--- a/packages/sdks/_info/icons/express-icon.tsx+++ b/packages/sdks/_info/icons/express-icon.tsx@@ -3,24 +3,24 @@ import type { IconProps } from './types';export function ExpressIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"+ width="512"xmlns="http://www.w3.org/2000/svg"- fill="none"- className={className}><g clipPath="url(#clip0_367_145)"><path- fillRule="evenodd"clipRule="evenodd"d="M59.072 260.272C59.712 293.312 63.68 323.984 70.992 352.272C78.288 380.544 89.552 405.184 104.832 426.16C120.08 447.12 139.792 463.648 163.936 475.728C188.096 487.808 217.648 493.84 252.576 493.84C304.096 493.84 346.816 480.336 380.832 453.328C414.832 426.288 435.968 385.808 444.224 331.776H463.296C456.304 388.976 433.744 433.296 395.616 464.768C357.472 496.224 310.432 511.968 254.496 511.968C216.368 512.608 183.776 506.56 156.784 493.84C129.744 481.136 107.664 463.168 90.512 439.968C73.344 416.768 60.64 389.44 52.384 357.984C44.128 326.528 40 292.704 40 256.448C40 215.776 46.032 179.552 58.112 147.776C70.192 116 86.08 89.12 105.792 67.2C125.44 45.28 148.32 28.64 174.4 17.184C200.48 5.728 227.168 0 254.496 0C292.624 0 325.536 7.312 353.168 21.92C380.816 36.544 403.376 55.936 420.848 80.08C438.336 104.24 451.04 131.888 458.992 163.024C466.928 194.144 470.272 226.544 468.992 260.256H59.088L59.072 260.272ZM449.952 241.2C449.952 211.328 445.792 182.88 437.552 155.872C429.296 128.864 417.072 105.184 400.848 84.832C384.64 64.512 364.464 48.464 340.304 36.704C316.144 24.944 288.176 19.072 256.4 19.072C229.68 19.072 204.752 24.144 181.552 34.32C158.352 44.496 138.032 59.28 120.544 78.64C103.072 98.032 88.928 121.392 78.112 148.72C67.312 176.048 60.96 206.88 59.072 241.2H449.952Z"fill="currentColor"+ fillRule="evenodd"/></g><defs><clipPath id="clip0_367_145">- <rect width="512" height="512" fill="white" />+ <rect fill="white" height="512" width="512" /></clipPath></defs></svg>diff --git a/packages/sdks/_info/icons/flutter-icon.tsx b/packages/sdks/_info/icons/flutter-icon.tsxindex c549e2c06..53cf30e3c 100644--- a/packages/sdks/_info/icons/flutter-icon.tsx+++ b/packages/sdks/_info/icons/flutter-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function FlutterIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"+ width="512"xmlns="http://www.w3.org/2000/svg"- fill="none"- className={className}><pathd="M302.543 237.44L173.167 366.56L302.527 495.92H449.951L320.783 366.592L449.951 237.424H302.559L302.543 237.44ZM302.271 16.064L62.0635 256L136.047 329.984L449.631 16.336H302.527L302.271 16.064Z"diff --git a/packages/sdks/_info/icons/html-icon.tsx b/packages/sdks/_info/icons/html-icon.tsxindex 7f1c0fad7..bca8edaa3 100644--- a/packages/sdks/_info/icons/html-icon.tsx+++ b/packages/sdks/_info/icons/html-icon.tsx@@ -3,18 +3,18 @@ import type { IconProps } from './types';export function HtmlIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"+ width="512"xmlns="http://www.w3.org/2000/svg"- fill="none"- className={className}><path- fillRule="evenodd"clipRule="evenodd"d="M395.14 153.6H394.957H174.388L179.663 204.8H389.891C386.81 249.651 377.488 344.674 374.067 387.913L255.988 421.15V421.25L255.727 421.375L137.57 379.8L129.475 281.6H187.392L191.492 334.413L255.832 358.4H255.988L320.224 335.363L326.831 256H126.89C125.924 245.734 113.495 112.435 111.328 102.4H400.31C398.691 119.296 397.046 136.653 395.14 153.6ZM25.6016 0L67.5376 464.588L255.727 512L444.413 463.638L486.402 0H25.6016Z"fill="currentColor"+ fillRule="evenodd"/></svg>);diff --git a/packages/sdks/_info/icons/kotlin-icon.tsx b/packages/sdks/_info/icons/kotlin-icon.tsxindex 55b6fe9c4..9ec6efa59 100644--- a/packages/sdks/_info/icons/kotlin-icon.tsx+++ b/packages/sdks/_info/icons/kotlin-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function KotlinIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><g clipPath="url(#clip0_367_180)"><path@@ -18,7 +18,7 @@ export function KotlinIcon({ className }: IconProps) {</g><defs><clipPath id="clip0_367_180">- <rect width="512" height="512" fill="white" />+ <rect fill="white" height="512" width="512" /></clipPath></defs></svg>diff --git a/packages/sdks/_info/icons/laravel-icon.tsx b/packages/sdks/_info/icons/laravel-icon.tsxindex f43b287fe..11598f72c 100644--- a/packages/sdks/_info/icons/laravel-icon.tsx+++ b/packages/sdks/_info/icons/laravel-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function LaravelIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><pathd="M210.288 377.36L377.648 281.84L301.616 238.064L134.368 334.368L210.288 377.36ZM385.344 181.984L309.232 138.208V224.88L385.36 268.672L385.344 181.984ZM392.944 81.2479L316.848 125.024L392.944 168.8L469.024 125.008L392.944 81.2479ZM158.576 302.848L202.736 277.424V86.4799L126.608 130.288V321.232L158.576 302.848ZM118.992 29.5359L42.8963 73.3279L118.992 117.12L195.04 73.3279L118.992 29.5359ZM35.2643 86.4959V381.728L202.688 478.08V390.544L115.136 341.008C114.848 340.8 114.624 340.576 114.32 340.384C114.096 340.176 113.84 340.016 113.616 339.84L113.6 339.792C113.36 339.552 113.152 339.296 112.976 339.008L112.96 338.992C112.736 338.784 112.56 338.544 112.4 338.272L112.384 338.256H112.336C112.208 338.016 112.08 337.696 111.952 337.376L111.936 337.312C111.824 337.072 111.696 336.8 111.584 336.496L111.568 336.448C111.504 336.128 111.44 335.728 111.408 335.328V335.296C111.36 335.056 111.312 334.768 111.28 334.48V334.464V130.32L67.1683 104.88L35.2643 86.4959ZM385.36 381.712V294.96L217.936 390.544V478.064L385.36 381.712ZM476.624 224.88V138.208L400.528 182V268.672L476.624 224.88ZM491.6 123.04C491.776 123.648 491.888 124.336 491.888 125.056V229.264C491.888 232.08 490.368 234.528 488.096 235.84L488.064 235.856L400.576 286.24V386.096C400.576 388.896 399.056 391.344 396.8 392.672L396.768 392.688L214.112 497.808C213.728 498.016 213.28 498.208 212.816 498.336L212.768 498.352L212.288 498.56C211.712 498.736 211.04 498.832 210.352 498.832C209.664 498.832 208.992 498.736 208.352 498.544L208.4 498.56C208.16 498.496 207.968 498.416 207.776 498.304L207.792 498.32C207.296 498.144 206.88 497.984 206.48 497.792L206.544 497.824L23.9363 392.704C21.6323 391.36 20.1123 388.912 20.1123 386.112V73.3439C20.1123 72.6399 20.2243 71.9519 20.4163 71.3119L20.4003 71.3599C20.4643 71.1199 20.6083 70.9599 20.6883 70.7199C20.8323 70.2559 20.9923 69.8719 21.1683 69.5039L21.1523 69.5519C21.2803 69.2959 21.4403 69.0719 21.6163 68.8799L22.2883 67.9679L23.0403 67.4239C23.3283 67.1839 23.5843 66.9439 23.8723 66.7359H23.8883L115.216 14.1759C116.304 13.5359 117.616 13.1519 119.008 13.1519C120.4 13.1519 121.712 13.5359 122.832 14.1919L122.8 14.1759L214.16 66.7359C214.464 66.9439 214.72 67.1679 214.976 67.4079L215.744 67.9519C216 68.2399 216.144 68.5599 216.416 68.8639C216.608 69.0559 216.768 69.2799 216.912 69.5199L216.928 69.5359C217.088 69.8559 217.248 70.2399 217.392 70.6399L217.408 70.7039L217.664 71.3439C217.84 71.9039 217.952 72.5599 217.952 73.2319C217.952 73.2639 217.952 73.2959 217.952 73.3279V268.656L294.048 224.864V125.008C294.048 124.992 294.048 124.976 294.048 124.976C294.048 124.288 294.144 123.616 294.32 122.976L294.304 123.024C294.368 122.816 294.512 122.624 294.56 122.384C294.72 121.904 294.88 121.52 295.072 121.136L295.04 121.2C295.184 120.96 295.408 120.8 295.552 120.528C295.792 120.224 295.984 119.92 296.224 119.664C296.448 119.456 296.688 119.264 296.944 119.104L296.96 119.088C297.248 118.88 297.488 118.624 297.792 118.448H297.808L389.136 65.8719C390.224 65.2319 391.536 64.8479 392.928 64.8479C394.32 64.8479 395.632 65.2319 396.752 65.8879L396.72 65.8719L488.048 118.448C488.368 118.656 488.592 118.88 488.896 119.072C489.136 119.28 489.408 119.44 489.632 119.632C489.888 119.92 490.08 120.24 490.32 120.528C490.496 120.72 490.656 120.944 490.8 121.168L490.816 121.184C491.008 121.536 491.168 121.936 491.296 122.352L491.312 122.4C491.44 122.592 491.536 122.8 491.616 123.024L491.6 123.04Z"diff --git a/packages/sdks/_info/icons/nextjs-icon.tsx b/packages/sdks/_info/icons/nextjs-icon.tsxindex 3d09c538c..fd0660db6 100644--- a/packages/sdks/_info/icons/nextjs-icon.tsx+++ b/packages/sdks/_info/icons/nextjs-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function NextjsIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><g clipPath="url(#clip0_367_158)"><path@@ -18,7 +18,7 @@ export function NextjsIcon({ className }: IconProps) {</g><defs><clipPath id="clip0_367_158">- <rect width="512" height="512" fill="white" />+ <rect fill="white" height="512" width="512" /></clipPath></defs></svg>diff --git a/packages/sdks/_info/icons/node-icon.tsx b/packages/sdks/_info/icons/node-icon.tsxindex 3df82c527..74d3204b2 100644--- a/packages/sdks/_info/icons/node-icon.tsx+++ b/packages/sdks/_info/icons/node-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function NodeIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><pathd="M482.584 147.869V363.982C482.584 378.007 475.038 391.066 462.912 398.125L275.664 506.241C269.675 509.715 262.882 511.5 255.945 511.5C249.107 511.5 242.296 509.715 236.306 506.241L173.785 469.251C164.459 464.044 169.01 462.192 172.093 461.123C184.547 456.801 187.066 455.805 200.361 448.26C201.748 447.467 203.577 447.777 205.008 448.603L253.039 477.122C254.78 478.103 257.239 478.103 258.84 477.122L446.103 369.036C447.847 368.04 448.965 366.053 448.965 363.983V147.869C448.965 145.752 447.847 143.775 446.059 142.706L258.873 34.7158C257.147 33.7058 254.843 33.7058 253.105 34.7158L65.9611 142.736C64.1431 143.776 62.9961 145.815 62.9961 147.869V363.982C62.9961 366.051 64.1421 367.991 65.9501 368.972L117.249 398.626C145.078 412.529 162.124 396.141 162.124 379.67V166.309C162.124 163.292 164.547 160.913 167.563 160.913H191.31C194.279 160.913 196.739 163.291 196.739 166.309V379.671C196.739 416.817 176.503 438.125 141.287 438.125C130.471 438.125 121.94 438.125 98.1491 426.412L49.0511 398.125C36.9181 391.13 29.4131 378.008 29.4131 363.982V147.869C29.4131 133.826 36.9181 120.719 49.0511 113.734L236.307 5.52575C248.157 -1.17525 263.915 -1.17525 275.664 5.52575L462.912 113.734C475.038 120.748 482.584 133.826 482.584 147.869ZM321.17 343.367C265.29 343.367 252.995 329.319 248.876 301.531C248.399 298.565 245.858 296.356 242.813 296.356H215.507C212.125 296.356 209.411 299.059 209.411 302.46C209.411 338.02 228.765 380.431 321.17 380.431C388.076 380.431 426.439 354.092 426.439 308.088C426.439 262.465 395.612 250.328 330.73 241.738C265.151 233.06 258.487 228.591 258.487 213.23C258.487 200.569 264.13 183.649 312.703 183.649C356.077 183.649 372.068 192.998 378.643 222.225C379.222 224.98 381.726 226.99 384.566 226.99H411.975C413.675 226.99 415.29 226.26 416.445 225.047C417.603 223.767 418.218 222.1 418.056 220.352C413.815 169.975 380.343 146.508 312.702 146.508C252.493 146.508 216.584 171.922 216.584 214.51C216.584 260.727 252.313 273.51 310.084 279.212C379.222 285.994 384.588 296.095 384.588 309.7C384.588 333.299 365.654 343.367 321.17 343.367Z"diff --git a/packages/sdks/_info/icons/python-icon.tsx b/packages/sdks/_info/icons/python-icon.tsxindex 8de951c0d..155099e84 100644--- a/packages/sdks/_info/icons/python-icon.tsx+++ b/packages/sdks/_info/icons/python-icon.tsx@@ -3,24 +3,24 @@ import type { IconProps } from './types';export function PythonIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><g clipPath="url(#clip0_367_173)"><path- fillRule="evenodd"clipRule="evenodd"d="M326.246 472.525C313.907 472.525 303.923 462.491 303.923 450.088C303.923 437.684 313.907 427.675 326.246 427.675C338.585 427.675 348.57 437.684 348.57 450.088C348.57 462.491 338.585 472.525 326.246 472.525ZM257.843 512C387.84 512 379.725 455.338 379.725 455.338L379.571 396.638H255.539V379.013H428.826C428.826 379.013 512 388.509 512 256.675C512 124.841 439.424 129.488 439.424 129.488H396.083V190.688C396.083 190.688 398.413 263.638 324.659 263.638H201.626C201.626 263.638 132.505 262.541 132.505 330.813V443.675C132.505 443.675 122.009 512 257.843 512ZM185.779 39.475C198.118 39.475 208.077 49.5088 208.077 61.9125C208.077 74.3162 198.118 84.325 185.779 84.325C173.44 84.325 163.456 74.3162 163.456 61.9125C163.456 49.5088 173.44 39.475 185.779 39.475ZM254.157 0C124.186 0 132.301 56.6625 132.301 56.6625L132.455 115.363H256.487V132.988H83.1742C83.1742 132.988 0 123.491 0 255.325C0 387.159 72.6016 382.513 72.6016 382.513H115.917V321.313C115.917 321.313 113.587 248.363 187.366 248.363H310.374C310.374 248.363 379.495 249.459 379.495 181.188V68.325C379.495 68.325 389.991 0 254.157 0Z"fill="currentColor"+ fillRule="evenodd"/></g><defs><clipPath id="clip0_367_173">- <rect width="512" height="512" fill="white" />+ <rect fill="white" height="512" width="512" /></clipPath></defs></svg>diff --git a/packages/sdks/_info/icons/react-icon.tsx b/packages/sdks/_info/icons/react-icon.tsxindex 8340b9c13..250e9799e 100644--- a/packages/sdks/_info/icons/react-icon.tsx+++ b/packages/sdks/_info/icons/react-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function ReactIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><pathd="M229.008 355.376C237.808 355.776 246.8 356.064 255.904 356.064C265.104 356.064 274.192 355.872 283.104 355.376C274.192 366.896 265.392 377.088 256.08 386.8L256.208 386.672C246.944 377.072 238.048 366.864 229.664 356.24L229.008 355.376ZM137.84 342.576C155.168 346.976 176.304 350.72 197.872 353.024L199.968 353.2C213.168 371.328 226.512 387.28 240.832 402.288L240.656 402.096C219.68 425.504 191.376 441.952 159.36 447.856L158.48 447.984C158.416 447.984 158.352 447.984 158.288 447.984C154.32 447.984 150.576 447.008 147.296 445.28L147.424 445.344C134.112 437.744 128.336 408.672 132.832 371.312C133.904 362.112 135.664 352.432 137.824 342.56L137.84 342.576ZM374.368 342.368C376.256 349.952 378.032 359.616 379.296 369.44L379.44 370.816C384.032 408.16 378.368 437.2 365.168 444.96C362.224 446.592 358.704 447.552 354.96 447.552C354.592 447.552 354.224 447.536 353.856 447.52H353.904C321.056 441.52 292.768 425.184 271.84 402.064L271.728 401.936C285.792 387.168 299.04 371.248 311.184 354.496L312.112 353.152C335.728 350.688 356.896 346.88 377.52 341.68L374.368 342.352V342.368ZM156.544 282.656C160.544 290.496 164.736 298.304 169.344 306.144C173.941 313.942 178.64 321.558 183.44 328.992C169.552 326.96 156.144 324.4 143.328 321.28C146.928 308.688 151.44 295.648 156.528 282.624L156.544 282.656ZM355.392 282.256C360.688 295.392 365.184 308.496 368.912 321.2C356.112 324.336 342.592 326.992 328.608 328.992C333.408 321.488 338.208 313.76 342.704 305.84C347.2 298.048 351.408 290.08 355.424 282.24L355.392 282.256ZM121.904 196.672C128.88 220.32 136.368 240.096 145.088 259.168L143.888 256.256C136.432 272.336 129.056 292 123.008 312.24L122.176 315.52C110.88 312.048 101.792 308.64 92.9441 304.816L94.7841 305.52C60.1601 290.784 37.7601 271.408 37.7601 256.048C37.7601 240.688 60.1601 221.216 94.7841 206.544C103.184 202.944 112.4 199.696 121.904 196.672ZM389.728 196.592C399.408 199.584 408.608 202.928 417.216 206.544C451.84 221.344 474.24 240.688 474.24 256.048C474.144 271.408 451.744 290.832 417.12 305.536C408.72 309.136 399.52 312.368 390.032 315.392C382.992 291.664 375.504 271.904 366.816 252.8L368.032 255.808C375.456 239.744 382.848 220.08 388.88 199.84L389.728 196.544V196.592ZM328.48 183.104C342.384 185.168 355.776 187.696 368.592 190.848C364.992 203.488 360.496 216.48 355.392 229.504C351.392 221.712 347.2 213.856 342.592 206.032C338.096 198.192 333.296 190.56 328.496 183.12L328.48 183.104ZM183.328 183.104C178.528 190.64 173.728 198.352 169.248 206.304C164.752 214.096 160.544 221.936 156.544 229.776C151.248 216.656 146.752 203.584 143.024 190.848C155.824 187.856 169.312 185.184 183.312 183.136L183.328 183.104ZM256 178.016C270.8 178.016 285.536 178.688 300.032 179.872C308.149 191.51 316.032 203.904 323.68 217.056C331.115 229.856 337.899 242.827 344.032 255.968C337.872 269.072 331.12 282.16 323.776 294.96C316.176 308.16 308.32 320.72 300.176 332.352C285.616 333.616 270.864 334.304 255.984 334.304C241.184 334.304 226.448 333.6 211.952 332.448C203.84 320.816 195.92 308.368 188.304 295.264C180.869 282.464 174.085 269.494 167.952 256.352C174.016 243.216 180.864 230.096 188.208 217.28C195.808 204.08 203.664 191.568 211.808 179.936C226.368 178.656 241.12 177.984 256 177.984V178.016ZM255.696 125.52C264.976 135.12 273.872 145.312 282.24 155.936L282.88 156.784C274.08 156.384 265.088 156.112 255.984 156.112C246.784 156.112 237.696 156.304 228.784 156.784C237.68 145.264 246.48 135.072 255.808 125.36L255.68 125.488L255.696 125.52ZM158.08 64.5282C190.928 70.5442 219.2 86.8802 240.144 109.984L240.256 110.112C226.192 124.896 212.944 140.816 200.8 157.6L199.872 158.944C176.272 161.392 155.104 165.168 134.496 170.368L137.632 169.696C135.392 159.904 133.728 150.416 132.56 141.312C127.968 103.968 133.632 74.9282 146.832 67.2002C150.128 65.6482 153.984 64.6882 158.048 64.5602H158.096L158.08 64.5282ZM353.44 64.1282V64.2562C353.648 64.2562 353.888 64.2402 354.144 64.2402C357.968 64.2402 361.568 65.1842 364.736 66.8482L364.608 66.7842C377.92 74.4162 383.696 103.472 379.2 140.848C378.128 150.048 376.368 159.744 374.208 169.632C356.848 165.184 335.712 161.424 314.144 159.136L312.096 158.96C298.88 140.816 285.536 124.864 271.216 109.84L271.408 110.032C292.384 86.6722 320.64 70.2242 352.592 64.2882L353.488 64.1442L353.44 64.1282ZM353.536 42.3362C314.464 48.2722 280.64 67.2482 255.936 94.6242L255.808 94.7682C230.928 67.4082 197.104 48.5602 158.992 42.8482L158.096 42.7362C157.888 42.7362 157.632 42.7362 157.376 42.7362C149.52 42.7362 142.144 44.8002 135.76 48.4162L135.984 48.3042C108.496 64.1602 102.336 113.568 116.528 175.568C55.6641 194.368 16.0801 224.416 16.0801 256.08C16.0801 287.872 55.8721 318 116.912 336.656C102.832 398.896 109.12 448.384 136.672 464.224C142.72 467.696 149.984 469.728 157.712 469.728C158.064 469.728 158.416 469.728 158.752 469.712H158.704C197.776 463.776 231.6 444.784 256.304 417.392L256.432 417.248C281.312 444.624 315.136 463.472 353.248 469.184L354.144 469.296C354.384 469.296 354.688 469.296 354.976 469.296C362.784 469.296 370.128 467.248 376.48 463.68L376.256 463.792C403.728 447.952 409.904 398.544 395.712 336.528C456.352 317.888 495.936 287.776 495.936 256.064C495.936 224.272 456.144 194.144 395.104 175.44C409.184 113.264 402.896 63.7282 375.344 47.8722C369.232 44.3682 361.904 42.3042 354.096 42.3042C353.888 42.3042 353.68 42.3042 353.472 42.3042H353.504L353.536 42.3362ZM300.592 256.08C300.592 280.768 280.576 300.784 255.888 300.784C231.2 300.784 211.184 280.768 211.184 256.08C211.184 231.392 231.2 211.376 255.888 211.376C268.24 211.376 279.408 216.384 287.504 224.464C295.6 232.56 300.592 243.728 300.592 256.08Z"diff --git a/packages/sdks/_info/icons/remix-icon.tsx b/packages/sdks/_info/icons/remix-icon.tsxindex 24e7689f8..6c714d2bd 100644--- a/packages/sdks/_info/icons/remix-icon.tsx+++ b/packages/sdks/_info/icons/remix-icon.tsx@@ -3,19 +3,19 @@ import type { IconProps } from './types';export function RemixIcon({ className }: IconProps) {return (<svg- width="445"+ className={className}+ fill="none"height="512"viewBox="0 0 445 512"- fill="none"+ width="445"xmlns="http://www.w3.org/2000/svg"- className={className}><g clipPath="url(#clip0_367_139)"><path- fillRule="evenodd"clipRule="evenodd"d="M425.345 394.844C429.951 454 429.951 481.73 429.951 512H293.08C293.08 505.407 293.198 499.375 293.318 493.26C293.688 474.247 294.074 454.421 290.994 414.383C286.922 355.766 261.681 342.741 215.268 342.741H174.148H0V236.093H221.783C280.408 236.093 309.722 218.258 309.722 171.039C309.722 129.52 280.408 104.359 221.783 104.359H0V0H246.21C378.933 0 444.888 62.6867 444.888 162.822C444.888 237.721 398.476 286.567 335.778 294.709C388.704 305.292 419.646 335.414 425.345 394.844Z"fill="currentColor"+ fillRule="evenodd"/><pathd="M0 512V432.497H144.721C168.894 432.497 174.143 450.426 174.143 461.118V512H0Z"@@ -24,7 +24,7 @@ export function RemixIcon({ className }: IconProps) {</g><defs><clipPath id="clip0_367_139">- <rect width="444.888" height="512" fill="white" />+ <rect fill="white" height="512" width="444.888" /></clipPath></defs></svg>diff --git a/packages/sdks/_info/icons/rest-icon.tsx b/packages/sdks/_info/icons/rest-icon.tsxindex 5edba4742..7a2fb2e14 100644--- a/packages/sdks/_info/icons/rest-icon.tsx+++ b/packages/sdks/_info/icons/rest-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function RestIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="513"viewBox="0 0 512 513"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><pathd="M346.706 381.093H140.062C134.263 381.093 129.513 376.342 129.513 370.544V164.459C129.513 160.616 126.369 157.473 122.527 157.473C118.685 157.473 115.541 160.616 115.541 164.459V370.544C115.541 384.097 126.509 395.065 140.062 395.065H346.706C350.548 395.065 353.692 391.921 353.692 388.079C353.692 384.236 350.618 381.093 346.706 381.093Z"diff --git a/packages/sdks/_info/icons/ruby-icon.tsx b/packages/sdks/_info/icons/ruby-icon.tsxindex c96d53acd..a205b19ec 100644--- a/packages/sdks/_info/icons/ruby-icon.tsx+++ b/packages/sdks/_info/icons/ruby-icon.tsx@@ -3,16 +3,14 @@ import type { IconProps } from './types';export function RubyIcon({ className }: IconProps) {return (<svg+ className={className}fill="#000000"version="1.1"- xmlns="http://www.w3.org/2000/svg"viewBox="0 0 512 512"- className={className}+ xmlns="http://www.w3.org/2000/svg"><g id="5151e0c8492e5103c096af88a51e4c6f"><path- fill="currentColor"- display="inline"d="M365.281,386.936l108.635,96.416l-213.754-16.794c41.878-25.3,76.426-55.513,102.294-79.567c0.426,0.083,0.879,0.129,1.332,0.129C364.283,387.119,364.782,387.06,365.281,386.936z M485.518,444.55l20.008-262.045c-9.898,25.284-25.557,54.73-45.857,86.172L485.518,444.55z M372.547,380.983l108.384,96.196l-28.936-196.865@@ -39,6 +37,8 @@ export function RubyIcon({ className }: IconProps) {c14.234,18.62,33.252,26.935,61.528,26.935c2.848,0,5.806-0.078,8.978-0.233l-4.995-12.412C78.996,467.845,48.152,391.248,34.284,361.407z M506.144,60.604c-2.056-6.289-4.68-12.096-7.811-17.306c-12.632-21.015-34.452-34.461-64.871-39.976l-67.961,37.531L506.144,60.604z"+ display="inline"+ fill="currentColor"/></g></svg>diff --git a/packages/sdks/_info/icons/rust-icon.tsx b/packages/sdks/_info/icons/rust-icon.tsxindex 4e7242271..d41b78c0e 100644--- a/packages/sdks/_info/icons/rust-icon.tsx+++ b/packages/sdks/_info/icons/rust-icon.tsx@@ -3,13 +3,13 @@ import type { IconProps } from './types';export function RustIcon({ className }: IconProps) {return (<svg+ className={className}fill="currentColor"- width="800px"height="800px"- viewBox="0 0 32 32"version="1.1"+ viewBox="0 0 32 32"+ width="800px"xmlns="http://www.w3.org/2000/svg"- className={className}><path d="M25.763 12.291c0.099-0.098 0.235-0.159 0.385-0.159 0.301 0 0.545 0.244 0.545 0.545s-0.244 0.545-0.545 0.545c-0.301 0-0.545-0.244-0.545-0.545 0-0.15 0.061-0.286 0.159-0.385v0zM15.342 3.906c0.163-0.171 0.392-0.278 0.647-0.278 0.493 0 0.892 0.399 0.892 0.892s-0.399 0.892-0.892 0.892c-0.413 0-0.76-0.28-0.862-0.661l-0.001-0.006c-0.018-0.068-0.029-0.145-0.029-0.225 0-0.238 0.093-0.454 0.245-0.614l-0 0zM26.965 15.901c0 0.273-0.010 0.545-0.030 0.814h-1.125c-0.112 0-0.158 0.073-0.158 0.185v0.516c0 1.216-0.686 1.48-1.287 1.547-0.572 0.065-1.206-0.239-1.284-0.589-0.089-1.265-0.773-2.353-1.772-2.994l-0.015-0.009c1.206-0.593 2.062-1.736 2.246-3.093l0.002-0.021c-0.049-1.229-0.72-2.29-1.705-2.884l-0.016-0.009c-0.667-0.438-1.472-0.719-2.339-0.773l-0.014-0.001h-11.63c1.569-1.749 3.678-2.987 6.063-3.45l0.069-0.011 1.371 1.438c0.148 0.155 0.356 0.252 0.587 0.252 0.218 0 0.415-0.086 0.561-0.226l-0 0 1.533-1.467c3.233 0.622 5.913 2.593 7.475 5.291l0.028 0.053-1.050 2.372c-0.044 0.097-0.069 0.21-0.069 0.329 0 0.329 0.195 0.613 0.477 0.742l0.005 0.002 2.022 0.898c0.035 0.359 0.053 0.721 0.053 1.089zM13.522 14.044v-2.063h3.699c0.191 0 1.349 0.221 1.349 1.087 0 0.719-0.888 0.977-1.618 0.977zM5.106 14.723l1.918-0.853c0.287-0.13 0.483-0.413 0.483-0.742 0-0.12-0.026-0.233-0.072-0.335l0.002 0.005-0.395-0.893h1.554v7.001h-3.134c-0.266-0.899-0.418-1.931-0.418-3 0-0.417 0.023-0.829 0.069-1.234l-0.005 0.050zM6.15 12.247c-0-0.295-0.239-0.534-0.534-0.534s-0.534 0.239-0.534 0.534c0 0.295 0.239 0.534 0.534 0.534s0.534-0.239 0.534-0.534v0zM9.548 26.027c-0.061 0.015-0.13 0.023-0.202 0.023-0.493 0-0.892-0.399-0.892-0.892s0.399-0.892 0.892-0.892c0.493 0 0.892 0.399 0.892 0.892 0 0.096-0.015 0.189-0.043 0.276l0.002-0.006c-0.097 0.3-0.34 0.526-0.643 0.599l-0.006 0.001zM21.937 23.178c-0.051-0.012-0.11-0.018-0.171-0.018-0.388 0-0.713 0.273-0.792 0.638l-0.001 0.005-0.447 2.085c-1.329 0.615-2.884 0.974-4.523 0.974-1.675 0-3.263-0.375-4.684-1.046l0.067 0.028-0.447-2.085c-0.080-0.369-0.404-0.642-0.792-0.642-0.061 0-0.12 0.007-0.177 0.019l0.005-0.001-1.841 0.395c-0.332-0.341-0.644-0.707-0.931-1.093l-0.021-0.029h8.957c0.101 0 0.169-0.018 0.169-0.11v-3.169c0-0.092-0.067-0.11-0.169-0.11h-2.62v-2.009h2.834c0.881 0.009 1.607 0.656 1.741 1.5l0.001 0.010c0.113 0.441 0.359 1.88 0.529 2.34 0.168 0.516 0.854 1.547 1.585 1.547h4.463c0.058-0.001 0.114-0.007 0.168-0.017l-0.006 0.001c-0.326 0.44-0.658 0.828-1.016 1.192l0.001-0.001zM22.365 26.070c1.13-0 2.046-0.917 2.046-2.047s-0.916-2.047-2.047-2.047-2.047 0.916-2.047 2.047c0 1.13 0.916 2.046 2.046 2.047h0zM30.789 15.629l-1.259-0.779q-0.016-0.184-0.035-0.367l1.082-1.008c0.084-0.079 0.136-0.192 0.136-0.316 0-0.184-0.115-0.342-0.277-0.406l-0.003-0.001-1.383-0.517q-0.051-0.179-0.109-0.357l0.863-1.198c0.051-0.070 0.082-0.158 0.082-0.253 0-0.215-0.156-0.393-0.361-0.427l-0.003-0-1.458-0.237q-0.085-0.165-0.176-0.328l0.612-1.345c0.025-0.053 0.039-0.114 0.039-0.18 0-0.090-0.027-0.173-0.075-0.242l0.001 0.001c-0.079-0.117-0.212-0.193-0.362-0.193-0.005 0-0.010 0-0.015 0l0.001-0-1.48 0.052q-0.114-0.144-0.234-0.283l0.34-1.441c0.007-0.030 0.011-0.064 0.011-0.099 0-0.24-0.194-0.434-0.434-0.434-0.035 0-0.069 0.004-0.102 0.012l0.003-0.001-1.441 0.34q-0.141-0.119-0.285-0.234l0.052-1.48c0-0.006 0-0.013 0-0.021 0-0.238-0.193-0.43-0.43-0.43-0.066 0-0.129 0.015-0.185 0.042l0.003-0.001-1.345 0.614c-0.109-0.059-0.218-0.119-0.328-0.176l-0.238-1.459c-0.036-0.207-0.215-0.362-0.429-0.362-0.094 0-0.182 0.030-0.253 0.081l0.001-0.001-1.199 0.863q-0.177-0.057-0.357-0.107l-0.517-1.383c-0.064-0.165-0.222-0.28-0.407-0.28-0.124 0-0.236 0.052-0.316 0.136l-0 0-1.008 1.083q-0.183-0.021-0.367-0.035l-0.779-1.259c-0.078-0.124-0.213-0.205-0.368-0.205s-0.291 0.081-0.367 0.204l-0.001 0.002-0.779 1.259q-0.184 0.016-0.367 0.035l-1.010-1.083c-0.079-0.085-0.192-0.138-0.317-0.138-0.185 0-0.343 0.116-0.405 0.279l-0.001 0.003-0.517 1.383c-0.12 0.034-0.238 0.071-0.357 0.107l-1.198-0.863c-0.070-0.050-0.157-0.080-0.252-0.080-0.215 0-0.393 0.155-0.429 0.36l-0 0.003-0.238 1.459q-0.165 0.085-0.328 0.176l-1.345-0.614c-0.053-0.025-0.115-0.039-0.18-0.039-0.239 0-0.433 0.194-0.433 0.433 0 0.006 0 0.012 0 0.017l-0-0.001 0.052 1.48q-0.144 0.114-0.285 0.234l-1.441-0.341c-0.030-0.007-0.064-0.011-0.099-0.011-0.24 0-0.434 0.194-0.434 0.434 0 0.035 0.004 0.069 0.012 0.102l-0.001-0.003 0.339 1.441c-0.078 0.094-0.157 0.189-0.233 0.283l-1.48-0.052c-0.005-0-0.011-0-0.017-0-0.239 0-0.433 0.194-0.433 0.433 0 0.065 0.014 0.127 0.040 0.183l-0.001-0.003 0.614 1.345q-0.091 0.162-0.176 0.328l-1.457 0.237c-0.207 0.036-0.362 0.214-0.362 0.429 0 0.094 0.030 0.182 0.081 0.253l-0.001-0.001 0.863 1.198q-0.056 0.178-0.109 0.357l-1.383 0.517c-0.165 0.064-0.28 0.222-0.28 0.407 0 0.124 0.052 0.236 0.135 0.316l0 0 1.082 1.008q-0.021 0.183-0.035 0.367l-1.259 0.779c-0.125 0.077-0.208 0.213-0.208 0.368s0.082 0.292 0.206 0.367l0.002 0.001 1.259 0.779c0.010 0.123 0.023 0.245 0.035 0.367l-1.082 1.010c-0.085 0.079-0.138 0.192-0.138 0.317 0 0.185 0.116 0.343 0.279 0.405l0.003 0.001 1.383 0.517c0.034 0.12 0.071 0.239 0.109 0.357l-0.863 1.198c-0.052 0.070-0.083 0.159-0.083 0.254 0 0.215 0.158 0.394 0.364 0.426l0.002 0 1.457 0.237c0.057 0.11 0.115 0.219 0.176 0.328l-0.614 1.345c-0.025 0.053-0.039 0.115-0.039 0.18 0 0.239 0.194 0.433 0.433 0.433 0.006 0 0.012-0 0.017-0l-0.001 0 1.479-0.052c0.077 0.096 0.154 0.191 0.234 0.285l-0.339 1.442c-0.007 0.030-0.011 0.064-0.011 0.099 0 0.239 0.194 0.433 0.433 0.433 0.036 0 0.070-0.004 0.103-0.012l-0.003 0.001 1.441-0.339c0.094 0.080 0.189 0.157 0.285 0.233l-0.052 1.48c-0 0.006-0 0.012-0 0.019 0 0.238 0.193 0.43 0.43 0.43 0.066 0 0.129-0.015 0.185-0.042l-0.003 0.001 1.345-0.612c0.109 0.061 0.218 0.119 0.328 0.176l0.238 1.457c0.036 0.207 0.214 0.363 0.429 0.363 0.094 0 0.181-0.030 0.253-0.081l-0.001 0.001 1.198-0.863q0.178 0.057 0.357 0.109l0.517 1.383c0.062 0.167 0.22 0.283 0.405 0.283 0.125 0 0.238-0.053 0.317-0.139l0-0 1.010-1.082c0.121 0.014 0.244 0.025 0.367 0.037l0.779 1.259c0.078 0.123 0.214 0.204 0.368 0.204s0.29-0.081 0.367-0.203l0.001-0.002 0.779-1.259c0.123-0.011 0.245-0.023 0.367-0.037l1.008 1.082c0.079 0.084 0.192 0.136 0.316 0.136 0.184 0 0.342-0.115 0.406-0.277l0.001-0.003 0.517-1.383q0.179-0.051 0.357-0.109l1.198 0.863c0.070 0.052 0.159 0.083 0.254 0.083 0.215 0 0.394-0.158 0.426-0.364l0-0.002 0.238-1.457c0.11-0.057 0.219-0.116 0.328-0.176l1.345 0.612c0.052 0.024 0.114 0.038 0.179 0.038 0.24 0 0.434-0.194 0.434-0.434 0-0.005-0-0.009-0-0.014l0 0.001-0.052-1.48q0.144-0.113 0.283-0.233l1.441 0.339c0.030 0.007 0.064 0.011 0.098 0.011 0.24 0 0.434-0.194 0.434-0.434 0-0.035-0.004-0.068-0.012-0.1l0.001 0.003-0.339-1.442c0.078-0.094 0.157-0.188 0.233-0.285l1.48 0.052c0.006 0 0.013 0 0.020 0 0.238 0 0.43-0.193 0.43-0.43 0-0.066-0.015-0.129-0.042-0.185l0.001 0.003-0.612-1.345c0.059-0.109 0.119-0.218 0.176-0.328l1.457-0.237c0.207-0.036 0.362-0.215 0.362-0.429 0-0.094-0.030-0.182-0.081-0.253l0.001 0.001-0.863-1.198 0.109-0.357 1.383-0.517c0.166-0.063 0.282-0.221 0.282-0.406 0-0.125-0.053-0.238-0.138-0.317l-0-0-1.082-1.010c0.013-0.121 0.025-0.244 0.035-0.367l1.259-0.779c0.125-0.077 0.208-0.213 0.208-0.368s-0.082-0.291-0.206-0.367l-0.002-0.001z" /></svg>diff --git a/packages/sdks/_info/icons/swift-icon.tsx b/packages/sdks/_info/icons/swift-icon.tsxindex 5291d9f4d..d1e1fce2d 100644--- a/packages/sdks/_info/icons/swift-icon.tsx+++ b/packages/sdks/_info/icons/swift-icon.tsx@@ -3,18 +3,18 @@ import type { IconProps } from './types';export function SwiftIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><path- fillRule="evenodd"clipRule="evenodd"d="M315.443 25.6001C540.493 179.828 467.712 349.888 467.712 349.888C467.712 349.888 531.712 422.712 505.83 486.4C505.83 486.4 479.437 441.8 435.174 441.8C392.499 441.8 367.437 486.4 281.574 486.4C90.3934 486.4 0 325.438 0 325.438C172.237 439.632 289.843 358.763 289.843 358.763C212.249 313.364 47.1805 96.2501 47.1805 96.2501C190.924 219.576 253.056 252.1 253.056 252.1C215.987 221.198 111.974 70.2001 111.974 70.2001C195.174 155.117 360.499 273.588 360.499 273.588C407.45 142.472 315.443 25.6001 315.443 25.6001Z"fill="currentColor"+ fillRule="evenodd"/></svg>);diff --git a/packages/sdks/_info/icons/vue-icon.tsx b/packages/sdks/_info/icons/vue-icon.tsxindex 51bc6f8d9..18eb3f30c 100644--- a/packages/sdks/_info/icons/vue-icon.tsx+++ b/packages/sdks/_info/icons/vue-icon.tsx@@ -3,12 +3,12 @@ import type { IconProps } from './types';export function VueIcon({ className }: IconProps) {return (<svg- width="512"+ className={className}+ fill="none"height="512"viewBox="0 0 512 512"- fill="none"+ width="512"xmlns="http://www.w3.org/2000/svg"- className={className}><pathd="M407.772 42.6665H320L256 147.2L201.143 42.6665H0L256 490.667L512 42.6665H407.772ZM64 79.9998H126.172L256 311.467L385.828 79.9998H448L256 416L64 79.9998Z"diff --git a/packages/sdks/astro/src/IdentifyComponent.astro b/packages/sdks/astro/src/IdentifyComponent.astroindex 180002dbf..d542f2e1e 100644--- a/packages/sdks/astro/src/IdentifyComponent.astro+++ b/packages/sdks/astro/src/IdentifyComponent.astro@@ -1,6 +1,6 @@---import type { IdentifyPayload } from '@openpanel/web';-import { filterProps } from './asto-utils';+interface Props extends IdentifyPayload {}const props = Astro.props as Props;diff --git a/packages/sdks/astro/src/SetGlobalPropertiesComponent.astro b/packages/sdks/astro/src/SetGlobalPropertiesComponent.astroindex 90eb25f44..1604a1161 100644--- a/packages/sdks/astro/src/SetGlobalPropertiesComponent.astro+++ b/packages/sdks/astro/src/SetGlobalPropertiesComponent.astro@@ -1,6 +1,4 @@----import { filterProps } from './asto-utils';-type Props = Record<string, unknown>;const props = Astro.props as Props;diff --git a/packages/sdks/nextjs/createNextRouteHandler.ts b/packages/sdks/nextjs/createNextRouteHandler.tsindex a5115eac4..184f7a4b8 100644--- a/packages/sdks/nextjs/createNextRouteHandler.ts+++ b/packages/sdks/nextjs/createNextRouteHandler.ts@@ -87,8 +87,8 @@ async function handleScriptProxyRoute(req: Request): Promise<NextResponse> {try {const res = await fetch(scriptUrl, {- // @ts-ignore- next: { revalidate: 86400 },+ // @ts-expect-error+ next: { revalidate: 86_400 },});const text = await res.text();const etag = `"${createHash('md5')diff --git a/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].ts b/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].tsindex 320382d74..c4528192b 100644--- a/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].ts+++ b/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].ts@@ -1,11 +1,11 @@import {- type EventHandlerRequest,- type H3Event,createError,defineEventHandler,+ type EventHandlerRequest,getHeader,getRequestIP,getRequestURL,+ type H3Event,readBody,setResponseStatus,} from 'h3';diff --git a/packages/sdks/sdk/src/api.ts b/packages/sdks/sdk/src/api.tsindex fef7dc4ac..e8f6be325 100644--- a/packages/sdks/sdk/src/api.ts+++ b/packages/sdks/sdk/src/api.ts@@ -55,7 +55,9 @@ export class Api {...options,});- if (response.status === 401) return null;+ if (response.status === 401) {+ return null;+ }if (response.status !== 200 && response.status !== 202) {throw new Error(`HTTP error! status: ${response.status}`);diff --git a/packages/sdks/web/index.ts b/packages/sdks/web/index.tsindex 551626a85..9c19ffc9d 100644--- a/packages/sdks/web/index.ts+++ b/packages/sdks/web/index.ts@@ -1,3 +1,3 @@export * from './src/index';-export * from './src/types.d';export { getInitSnippet } from './src/init-snippet';+export * from './src/types.d';diff --git a/packages/sdks/web/src/replay/index.ts b/packages/sdks/web/src/replay/index.tsindex 2dbe32113..2b8406536 100644--- a/packages/sdks/web/src/replay/index.ts+++ b/packages/sdks/web/src/replay/index.ts@@ -1,2 +1,2 @@-export { startReplayRecorder, stopReplayRecorder } from './recorder';export type { ReplayChunkPayload, ReplayRecorderConfig } from './recorder';+export { startReplayRecorder, stopReplayRecorder } from './recorder';diff --git a/packages/sdks/web/src/replay/recorder.ts b/packages/sdks/web/src/replay/recorder.tsindex 70cb486f5..9b914ed19 100644--- a/packages/sdks/web/src/replay/recorder.ts+++ b/packages/sdks/web/src/replay/recorder.ts@@ -46,7 +46,9 @@ export function startReplayRecorder(let flushTimer: ReturnType<typeof setInterval> | null = null;function flush(isFullSnapshot: boolean): void {- if (buffer.length === 0) return;+ if (buffer.length === 0) {+ return;+ }const payloadJson = JSON.stringify(buffer);const payloadBytes = new TextEncoder().encode(payloadJson).length;@@ -114,7 +116,9 @@ export function startReplayRecorder(maskTextFn:maskAllText && unmaskTextSelector? (text, element) => {- if (element?.closest(unmaskTextSelector)) return text;+ if (element?.closest(unmaskTextSelector)) {+ return text;+ }return text.replace(/\S/g, '*');}: undefined,diff --git a/scripts/add-internal-links.mjs b/scripts/add-internal-links.mjsindex 9d017e7e0..42a8494ab 100644--- a/scripts/add-internal-links.mjs+++ b/scripts/add-internal-links.mjs@@ -109,48 +109,57 @@ function getSkipZones(text) {// Fenced code blocks ```…```const codeBlock = /```[\s\S]*?```/g;- while ((m = codeBlock.exec(text)))+ while ((m = codeBlock.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// Inline code `…`const inlineCode = /`[^`\n]+`/g;- while ((m = inlineCode.exec(text)))+ while ((m = inlineCode.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// Existing markdown links [text](url)const mdLink = /\[[^\]]*\]\([^)]*\)/g;- while ((m = mdLink.exec(text)))+ while ((m = mdLink.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// Headings # … (entire line)const heading = /^#{1,6}\s+.+$/gm;- while ((m = heading.exec(text)))+ while ((m = heading.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// JSX / HTML tags (attributes may contain feature words)const jsxTag = /<[^>]+>/g;- while ((m = jsxTag.exec(text)))+ while ((m = jsxTag.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// import statementsconst imp = /^import\s+.+$/gm;- while ((m = imp.exec(text)))+ while ((m = imp.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// Frontmatter blockconst fm = /^---[\s\S]*?---/;- if ((m = fm.exec(text)))+ if ((m = fm.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// Markdown table rows (| … |)const tableRow = /^\|.+\|$/gm;- while ((m = tableRow.exec(text)))+ while ((m = tableRow.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }// > blockquote lines that contain linksconst bqLink = /^>\s.*\[.*\]\(.*\).*$/gm;- while ((m = bqLink.exec(text)))+ while ((m = bqLink.exec(text))) {zones.push({ start: m.index, end: m.index + m[0].length });+ }return zones;}@@ -174,34 +183,42 @@ function processFile(filePath, dir) {for (const feature of FEATURES) {// If the file already links to this feature URL, skip entirely- if (content.includes(feature.url)) continue;+ if (content.includes(feature.url)) {+ continue;+ }let linked = false;for (const pattern of feature.patterns) {- if (linked) break;+ if (linked) {+ break;+ }const re = new RegExp(`\\b${escapeRegex(pattern)}\\b`, 'gi');let m;while ((m = re.exec(content))) {// In a skip zone?- if (overlapsSkipZone(m.index, m[0].length, skipZones)) continue;+ if (overlapsSkipZone(m.index, m[0].length, skipZones)) {+ continue;+ }// Check excludeBefore / excludeAfterif (feature.excludeBefore) {const before = content.slice(Math.max(0, m.index - 20), m.index).toLowerCase();- if (feature.excludeBefore.some((w) => before.endsWith(w + ' ')))+ if (feature.excludeBefore.some((w) => before.endsWith(w + ' '))) {continue;+ }}if (feature.excludeAfter) {const after = content.slice(m.index + m[0].length, m.index + m[0].length + 20).toLowerCase();- if (feature.excludeAfter.some((w) => after.startsWith(' ' + w)))+ if (feature.excludeAfter.some((w) => after.startsWith(' ' + w))) {continue;+ }}// Build replacement@@ -228,7 +245,9 @@ function processFile(filePath, dir) {}}- if (changes.length === 0) return null;+ if (changes.length === 0) {+ return null;+ }// Add / update the `updated` frontmatter field for articles & guidesif (DIRS_WITH_UPDATED.includes(dir)) {@@ -257,8 +276,11 @@ function walk(dir) {const files = [];for (const e of entries) {const full = path.join(dir, e.name);- if (e.isDirectory()) files.push(...walk(full));- else if (e.name.endsWith('.mdx')) files.push(full);+ if (e.isDirectory()) {+ files.push(...walk(full));+ } else if (e.name.endsWith('.mdx')) {+ files.push(full);+ }}return files;}@@ -269,7 +291,9 @@ const results = [];for (const dir of DIRS) {const dirPath = path.join(CONTENT_DIR, dir);- if (!fs.existsSync(dirPath)) continue;+ if (!fs.existsSync(dirPath)) {+ continue;+ }for (const file of walk(dirPath)) {const changes = processFile(file, dir);diff --git a/scripts/seed-events.mjs b/scripts/seed-events.mjsindex 223bf6eb5..ad82d24c8 100644--- a/scripts/seed-events.mjs+++ b/scripts/seed-events.mjs@@ -42,12 +42,12 @@ const TRACK_URL = `${BASE_URL}/track`;// ---------------------------------------------------------------------------function mulberry32(seed) {- return function () {+ return () => {seed |= 0;- seed = (seed + 0x6d2b79f5) | 0;+ seed = (seed + 0x6d_2b_79_f5) | 0;let t = Math.imul(seed ^ (seed >>> 15), 1 | seed);t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;- return ((t ^ (t >>> 14)) >>> 0) / 4294967296;+ return ((t ^ (t >>> 14)) >>> 0) / 4_294_967_296;};}@@ -168,7 +168,7 @@ function makeIP(index) {];const base = ranges[index % ranges.length];const a = base[0];- const b = Math.floor(index / 65025) % 256;+ const b = Math.floor(index / 65_025) % 256;const c = Math.floor(index / 255) % 256;const d = (index % 255) + 1;return `${a}.${b}.${c}.${d}`;@@ -185,14 +185,14 @@ const PRODUCTS = [category: 'Electronics',price: 8999,},- { id: 'prod_002', name: 'Running Shoes', category: 'Sports', price: 12999 },+ { id: 'prod_002', name: 'Running Shoes', category: 'Sports', price: 12_999 },{ id: 'prod_003', name: 'Coffee Maker', category: 'Kitchen', price: 5499 },{ id: 'prod_004', name: 'Yoga Mat', category: 'Sports', price: 2999 },{id: 'prod_005',name: 'Smart Watch',category: 'Electronics',- price: 29999,+ price: 29_999,},{ id: 'prod_006', name: 'Blender', category: 'Kitchen', price: 7999 },{ id: 'prod_007', name: 'Backpack', category: 'Travel', price: 4999 },@@ -207,7 +207,7 @@ const PRODUCTS = [id: 'prod_010',name: 'Standing Desk',category: 'Furniture',- price: 45999,+ price: 45_999,},];@@ -1142,9 +1142,15 @@ function generateIdentity(sessionIndex, sessionRng) {// Which sessions belong to which group (roughly 1/6 each)function getGroupForSession(sessionIndex) {- if (sessionIndex % 6 === 0) return GROUPS[0];- if (sessionIndex % 6 === 1) return GROUPS[1];- if (sessionIndex % 6 === 2) return GROUPS[2];+ if (sessionIndex % 6 === 0) {+ return GROUPS[0];+ }+ if (sessionIndex % 6 === 1) {+ return GROUPS[1];+ }+ if (sessionIndex % 6 === 2) {+ return GROUPS[2];+ }return null;}@@ -1319,7 +1325,7 @@ async function main() {await withConcurrency(sessionTasks, CONCURRENCY);- console.log(`\nDone!`);+ console.log('\nDone!');console.log(` Sessions: ${SESSION_COUNT}`);console.log(` Events sent: ${totalEvents}`);console.log(` Errors: ${errors}`);diff --git a/self-hosting/import-to-cloud.mjs b/self-hosting/import-to-cloud.mjsindex f1f495c66..b27e2bc01 100755--- a/self-hosting/import-to-cloud.mjs+++ b/self-hosting/import-to-cloud.mjs@@ -1,4 +1,5 @@#!/usr/bin/env node+import { createHash } from 'node:crypto';/*** Import an `export-for-cloud.sh` dump into another OpenPanel ClickHouse.*@@ -38,16 +39,15 @@* state rather than silently skipping files the previous mapping had filtered.*/import {+ appendFileSync,createReadStream,existsSync,- appendFileSync,readFileSync,} from 'node:fs';import { readdir } from 'node:fs/promises';-import { createHash } from 'node:crypto';+import path from 'node:path';import { createInterface } from 'node:readline';import { createGunzip } from 'node:zlib';-import path from 'node:path';const IMPORT_ORDER = ['profiles',@@ -81,22 +81,37 @@ function parseArgs(argv) {for (let i = 0; i < argv.length; i++) {const arg = argv[i];const next = () => argv[++i];- if (arg === '--dir') args.dir = next();- else if (arg === '--url') args.url = next();- else if (arg === '--db') args.db = next();- else if (arg === '--user') args.user = next();- else if (arg === '--password') args.password = next();- else if (arg === '--batch') args.batch = Number.parseInt(next(), 10);- else if (arg === '--tables') args.tables = next().split(',');- else if (arg === '--dry-run') args.dryRun = true;- else if (arg === '--no-map') args.noMap = true;- else if (arg === '--map') {+ if (arg === '--dir') {+ args.dir = next();+ } else if (arg === '--url') {+ args.url = next();+ } else if (arg === '--db') {+ args.db = next();+ } else if (arg === '--user') {+ args.user = next();+ } else if (arg === '--password') {+ args.password = next();+ } else if (arg === '--batch') {+ args.batch = Number.parseInt(next(), 10);+ } else if (arg === '--tables') {+ args.tables = next().split(',');+ } else if (arg === '--dry-run') {+ args.dryRun = true;+ } else if (arg === '--no-map') {+ args.noMap = true;+ } else if (arg === '--map') {const [from, to] = next().split('=');- if (!from || !to) throw new Error('--map expects <old>=<new>');+ if (!(from && to)) {+ throw new Error('--map expects <old>=<new>');+ }args.map.set(from, to);- } else throw new Error(`Unknown flag: ${arg}`);+ } else {+ throw new Error(`Unknown flag: ${arg}`);+ }+ }+ if (!args.url) {+ throw new Error('Missing --url (or CLICKHOUSE_URL)');}- if (!args.url) throw new Error('Missing --url (or CLICKHOUSE_URL)');if (!args.noMap && args.map.size === 0) {throw new Error('Pass --map <old>=<new> to remap project_id, or --no-map to keep it'@@ -122,11 +137,17 @@ function parseArgs(argv) {}async function insert(args, table, rows) {- if (args.dryRun || rows.length === 0) return;+ if (args.dryRun || rows.length === 0) {+ return;+ }const url = new URL(args.url);- if (args.user) url.username = args.user;- if (args.password) url.password = args.password;+ if (args.user) {+ url.username = args.user;+ }+ if (args.password) {+ url.password = args.password;+ }const headers = { 'Content-Type': 'application/json' };if (url.username || url.password) {@@ -147,7 +168,9 @@ async function insert(args, table, rows) {for (let attempt = 1; attempt <= 5; attempt++) {const res = await fetch(url, { method: 'POST', headers, body });- if (res.ok) return;+ if (res.ok) {+ return;+ }const text = await res.text();// 4xx means the payload is wrong — retrying will not help.if (res.status < 500 || attempt === 5) {@@ -184,7 +207,9 @@ function remapLine(line, table, args) {}// A collapsed session export only contains live rows.- if (table === 'sessions') row.sign = 1;+ if (table === 'sessions') {+ row.sign = 1;+ }// A self-hosted install older than the 20260504 profiles restructure has no// `last_seen_at`. The target column is the ReplacingMergeTree version and has@@ -219,7 +244,9 @@ async function importFile(args, table, file, state) {let dropped = 0;for await (const line of lines) {- if (!line.trim()) continue;+ if (!line.trim()) {+ continue;+ }const row = remapLine(line, table, args);if (row === null) {dropped++;@@ -234,7 +261,9 @@ async function importFile(args, table, file, state) {}await insert(args, table, batch);- if (!args.dryRun) appendFileSync(state.file, `${key}\n`);+ if (!args.dryRun) {+ appendFileSync(state.file, `${key}\n`);+ }state.add(key);const suffix = dropped > 0 ? ` (${dropped} dropped — unmapped project)` : '';console.log(` ✅ ${path.basename(file)} — ${total} rows${suffix}`);@@ -273,18 +302,26 @@ async function main() {if (existsSync(metaPath)) {console.log(`📄 ${readFileSync(metaPath, 'utf8').trim()}\n`);}- if (args.dryRun) console.log('🧪 Dry run — nothing will be written\n');+ if (args.dryRun) {+ console.log('🧪 Dry run — nothing will be written\n');+ }const totals = {};for (const table of IMPORT_ORDER) {- if (args.tables && !args.tables.includes(table)) continue;+ if (args.tables && !args.tables.includes(table)) {+ continue;+ }const dir = path.join(args.dir, table);- if (!existsSync(dir)) continue;+ if (!existsSync(dir)) {+ continue;+ }const files = (await readdir(dir)).filter((f) => f.includes('.jsonl')).sort();- if (files.length === 0) continue;+ if (files.length === 0) {+ continue;+ }console.log(`▶️ ${table} (${files.length} files)`);let rows = 0;diff --git a/self-hosting/verify-export.mjs b/self-hosting/verify-export.mjsindex 45a488385..13ce93159 100755--- a/self-hosting/verify-export.mjs+++ b/self-hosting/verify-export.mjs@@ -11,9 +11,9 @@* ./op-export && node import-to-cloud.mjs --dir ./op-export ...`*/import { createReadStream, existsSync, readFileSync } from 'node:fs';+import path from 'node:path';import { createInterface } from 'node:readline';import { createGunzip } from 'node:zlib';-import path from 'node:path';const dir = process.argv[2] ?? './op-export';const manifestPath = path.join(dir, 'manifest.jsonl');@@ -35,7 +35,9 @@ async function countRows(file) {});let rows = 0;for await (const line of lines) {- if (line.trim()) rows++;+ if (line.trim()) {+ rows++;+ }}return rows;}@@ -95,12 +97,16 @@ for (const [table, rows] of Object.entries(totals)) {if (notes.length > 0) {console.log(`\nℹ️ ${notes.length} file(s) grew during the export:`);- for (const note of notes) console.log(` ${note}`);+ for (const note of notes) {+ console.log(` ${note}`);+ }}if (problems.length > 0) {console.error(`\n❌ ${problems.length} problem(s):`);- for (const problem of problems) console.error(` ${problem}`);+ for (const problem of problems) {+ console.error(` ${problem}`);+ }console.error('\n Re-run your rsync — it will fetch just the bad files.');process.exit(1);}diff --git a/tooling/gates/conformance/cli.ts b/tooling/gates/conformance/cli.tsindex 0db49e912..b23b33990 100644--- a/tooling/gates/conformance/cli.ts+++ b/tooling/gates/conformance/cli.ts@@ -8,8 +8,7 @@*/import { readFileSync } from 'node:fs';-import { basename, dirname, join } from 'node:path';-+import { dirname, join } from 'node:path';import {API_SOURCE_ROOT,CORE_SOURCE_ROOT,diff --git a/tooling/gates/conformance/cruiser.ts b/tooling/gates/conformance/cruiser.tsindex 88db1e57c..b0e4835f8 100644--- a/tooling/gates/conformance/cruiser.ts+++ b/tooling/gates/conformance/cruiser.ts@@ -16,7 +16,6 @@import { spawnSync } from 'node:child_process';import { dirname, join, posix } from 'node:path';import * as ts from 'typescript';-import { lineOf, type ParsedSource, visit } from './sources';const CRUISER_BINARY = 'node_modules/.bin/depcruise';diff --git a/tooling/gates/conformance/rules.test.ts b/tooling/gates/conformance/rules.test.tsindex 5a70730ed..cd83bb065 100644--- a/tooling/gates/conformance/rules.test.ts+++ b/tooling/gates/conformance/rules.test.ts@@ -16,7 +16,6 @@*/import { describe, expect, test } from 'bun:test';-import { ASSET_LOADER_ALLOWLIST } from './conformance.constants';import {checkCreateServicesCallSites,diff --git a/tooling/gates/conformance/rules.ts b/tooling/gates/conformance/rules.tsindex 457bdf5d0..eaffde16d 100644--- a/tooling/gates/conformance/rules.ts+++ b/tooling/gates/conformance/rules.ts@@ -24,7 +24,6 @@import { existsSync, readFileSync } from 'node:fs';import { basename, join } from 'node:path';-import {ACCESS_CHECK_FUNCTION_NAMES,ASSET_LOADER_ALLOWLIST,@@ -47,8 +46,8 @@ import {isAtModuleScope,isExported,lineOf,- namedFunctions,type NamedFunction,+ namedFunctions,type Offender,type ParsedSource,ts,@@ -728,7 +727,8 @@ export function checkModuleLayout(offenders.push({file,line: 1,- detail: `root file is not <name>.{rpc,service,routes,jobs,constants}.ts`,+ detail:+ 'root file is not <name>.{rpc,service,routes,jobs,constants}.ts',});continue;}diff --git a/tooling/gates/conformance/sources.ts b/tooling/gates/conformance/sources.tsindex 8955d94e2..1afc870a5 100644--- a/tooling/gates/conformance/sources.ts+++ b/tooling/gates/conformance/sources.ts@@ -12,7 +12,6 @@ import { join, relative, sep } from 'node:path';// A namespace import rather than ~30 named ones: `ts.isCallExpression` is the// compiler API's own idiom and reads far better at 30 call sites.import * as ts from 'typescript';-import { IGNORED_DIRECTORY_NAMES } from './conformance.constants';export interface ParsedSource {diff --git a/tooling/publish/generate-readme.ts b/tooling/publish/generate-readme.tsindex cd99bcabd..349d7574b 100644--- a/tooling/publish/generate-readme.ts+++ b/tooling/publish/generate-readme.ts@@ -1,6 +1,5 @@import fs from 'node:fs';-import { join, resolve } from 'node:path';-import { dirname } from 'node:path';+import { dirname, join, resolve } from 'node:path';import { fileURLToPath } from 'node:url';const __filename = fileURLToPath(import.meta.url);@@ -13,7 +12,9 @@ const workspacePath = (relativePath: string) =>const dedentContent = (text: string): string => {const lines = text.split('\n');- if (lines.length === 0) return text;+ if (lines.length === 0) {+ return text;+ }// Find the minimum indentation (excluding empty lines)// We'll dedent code blocks too, so include them in the calculation@@ -21,19 +22,27 @@ const dedentContent = (text: string): string => {for (const line of lines) {const trimmed = line.trim();// Skip empty lines- if (trimmed.length === 0) continue;+ if (trimmed.length === 0) {+ continue;+ }const indent = line.match(/^(\s*)/)?.[1]?.length ?? 0;- if (indent < minIndent) minIndent = indent;+ if (indent < minIndent) {+ minIndent = indent;+ }}// If no indentation found, return as-is- if (minIndent === Number.POSITIVE_INFINITY || minIndent === 0) return text;+ if (minIndent === Number.POSITIVE_INFINITY || minIndent === 0) {+ return text;+ }// Remove the common indentation from all linesreturn lines.map((line) => {// For lines shorter than minIndent, just return them as-is (preserves empty lines)- if (line.length < minIndent) return line;+ if (line.length < minIndent) {+ return line;+ }// Remove the common indentationconst dedented = line.slice(minIndent);// If the line was all whitespace, return empty string to preserve the line@@ -84,8 +93,12 @@ const transformMdxToReadme = (const frontmatter = frontmatterMatch[1];const titleMatch = frontmatter.match(/^title:\s*(.+)$/m);const descMatch = frontmatter.match(/^description:\s*(.+)$/m);- if (titleMatch?.[1]) title = titleMatch[1].trim();- if (descMatch?.[1]) description = descMatch[1].trim();+ if (titleMatch?.[1]) {+ title = titleMatch[1].trim();+ }+ if (descMatch?.[1]) {+ description = descMatch[1].trim();+ }// Remove frontmattercontent = content.replace(/^---\n[\s\S]*?\n---\n/, '');@@ -125,7 +138,7 @@ const transformMdxToReadme = (// Handle Tabs component specially - convert to markdown sections// Extract tabs items from items prop- const tabsItemsMatch = content.match(/<Tabs\s+items=\{([^\}]+)\}>/);+ const tabsItemsMatch = content.match(/<Tabs\s+items=\{([^}]+)\}>/);const tabsItems = tabsItemsMatch?.[1]? tabsItemsMatch[1].replace(/['"]/g, '')@@ -185,7 +198,7 @@ const transformMdxToReadme = (// Convert internal links (starting with /) to absolute URLscontent = content.replace(- /\[([^\]]+)\]\((\/[^\)]+)\)/g,+ /\[([^\]]+)\]\((\/[^)]+)\)/g,'[$1](https://openpanel.dev$2)');