Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

24 changes: 12 additions & 12 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"pathe": "^2.0.3",
"pino": "^9.7.0",
"postgres": "^3.4.5",
"posthog-js": "^1.214.0",
"posthog-js": "^1.268.1",
"react": "^19.1.0",
"react-day-picker": "^9.9.0",
"react-dom": "^19.1.0",
Expand All @@ -102,8 +102,8 @@
"tw-animate-css": "^1.3.6",
"usehooks-ts": "^3.1.0",
"vaul": "^1.1.2",
"zod": "^3.24.1",
"zod-form-data": "^2.0.7",
"zod": "^4.1.11",
"zod-form-data": "^3.0.1",
"zustand": "^5.0.3",
"zustand-computed": "^2.0.2",
},
Expand Down Expand Up @@ -636,7 +636,7 @@

"@polka/url": ["@polka/[email protected]", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="],

"@posthog/core": ["@posthog/core@1.0.2", "", {}, "sha512-hWk3rUtJl2crQK0WNmwg13n82hnTwB99BT99/XI5gZSvIlYZ1TPmMZE8H2dhJJ98J/rm9vYJ/UXNzw3RV5HTpQ=="],
"@posthog/core": ["@posthog/core@1.1.0", "", {}, "sha512-igElrcnRPJh2nWYACschjH4OwGwzSa6xVFzRDVzpnjirUivdJ8nv4hE+H31nvwE56MFhvvglfHuotnWLMcRW7w=="],

"@preact/signals": ["@preact/[email protected]", "", { "dependencies": { "@preact/signals-core": "^1.7.0" }, "peerDependencies": { "preact": "10.x" } }, "sha512-naxcJgUJ6BTOROJ7C3QML7KvwKwCXQJYTc5L/b0eEsdYgPB6SxwoQ1vDGcS0Q7GVjAenVq/tXrybVdFShHYZWg=="],

Expand Down Expand Up @@ -868,19 +868,19 @@

"@supabase/auth-js": ["@supabase/[email protected]", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-mMIQHBRc+SKpZFRB2qtupuzulaUhFYupNyxqDj5Jp/LyPvcWvjaJzZzObv6URtL/O6lPxkanASnotGtNpS3H2Q=="],

"@supabase/functions-js": ["@supabase/[email protected].5", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-v5GSqb9zbosquTo6gBwIiq7W9eQ7rE5QazsK/ezNiQXdCbY+bH8D9qEaBIkhVvX4ZRW5rP03gEfw5yw9tiq4EQ=="],
"@supabase/functions-js": ["@supabase/[email protected].6", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-bhjZ7rmxAibjgmzTmQBxJU6ZIBCCJTc3Uwgvdi4FewueUTAGO5hxZT1Sj6tiD+0dSXf9XI87BDdJrg12z8Uaew=="],

"@supabase/node-fetch": ["@supabase/[email protected]", "", { "dependencies": { "whatwg-url": "^5.0.0" } }, "sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ=="],

"@supabase/postgrest-js": ["@supabase/[email protected].3", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-rg3DmmZQKEVCreXq6Am29hMVe1CzemXyIWVYyyua69y6XubfP+DzGfLxME/1uvdgwqdoaPbtjBDpEBhqxq1ZwA=="],
"@supabase/postgrest-js": ["@supabase/[email protected].4", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-TxZCIjxk6/dP9abAi89VQbWWMBbybpGWyvmIzTd79OeravM13OjR/YEYeyUOPcM1C3QyvXkvPZhUfItvmhY1IQ=="],

"@supabase/realtime-js": ["@supabase/[email protected].4", "", { "dependencies": { "@supabase/node-fetch": "^2.6.13", "@types/phoenix": "^1.6.6", "@types/ws": "^8.18.1", "ws": "^8.18.2" } }, "sha512-e/FYIWjvQJHOCNACWehnKvg26zosju3694k0NMUNb+JGLdvHJzEa29ZVVLmawd2kvx4hdbv8mxSqfttRnH3+DA=="],
"@supabase/realtime-js": ["@supabase/[email protected].5", "", { "dependencies": { "@supabase/node-fetch": "^2.6.13", "@types/phoenix": "^1.6.6", "@types/ws": "^8.18.1", "ws": "^8.18.2" } }, "sha512-/Rs5Vqu9jejRD8ZeuaWXebdkH+J7V6VySbCZ/zQM93Ta5y3mAmocjioa/nzlB6qvFmyylUgKVS1KpE212t30OA=="],

"@supabase/ssr": ["@supabase/[email protected]", "", { "dependencies": { "@types/cookie": "^0.6.0", "cookie": "^0.7.0" }, "peerDependencies": { "@supabase/supabase-js": "^2.43.4" } }, "sha512-n3plRhr2Bs8Xun1o4S3k1CDv17iH5QY9YcoEvXX3bxV1/5XSasA0mNXYycFmADIdtdE6BG9MRjP5CGIs8qxC8A=="],

"@supabase/storage-js": ["@supabase/storage-js@2.11.0", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-Y+kx/wDgd4oasAgoAq0bsbQojwQ+ejIif8uczZ9qufRHWFLMU5cODT+ApHsSrDufqUcVKt+eyxtOXSkeh2v9ww=="],
"@supabase/storage-js": ["@supabase/storage-js@2.12.1", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-QWg3HV6Db2J81VQx0PqLq0JDBn4Q8B1FYn1kYcbla8+d5WDmTdwwMr+EJAxNOSs9W4mhKMv+EYCpCrTFlTj4VQ=="],

"@supabase/supabase-js": ["@supabase/supabase-js@2.56.1", "", { "dependencies": { "@supabase/auth-js": "2.71.1", "@supabase/functions-js": "2.4.5", "@supabase/node-fetch": "2.6.15", "@supabase/postgrest-js": "1.21.3", "@supabase/realtime-js": "2.15.4", "@supabase/storage-js": "^2.10.4" } }, "sha512-cb/kS0d6G/qbcmUFItkqVrQbxQHWXzfRZuoiSDv/QiU6RbGNTn73XjjvmbBCZ4MMHs+5teihjhpEVluqbXISEg=="],
"@supabase/supabase-js": ["@supabase/supabase-js@2.57.4", "", { "dependencies": { "@supabase/auth-js": "2.71.1", "@supabase/functions-js": "2.4.6", "@supabase/node-fetch": "2.6.15", "@supabase/postgrest-js": "1.21.4", "@supabase/realtime-js": "2.15.5", "@supabase/storage-js": "2.12.1" } }, "sha512-LcbTzFhHYdwfQ7TRPfol0z04rLEyHabpGYANME6wkQ/kLtKNmI+Vy+WEM8HxeOZAtByUFxoUTTLwhXmrh+CcVw=="],

"@swc/counter": ["@swc/[email protected]", "", {}, "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ=="],

Expand Down Expand Up @@ -2454,7 +2454,7 @@

"postgres-interval": ["[email protected]", "", { "dependencies": { "xtend": "^4.0.0" } }, "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ=="],

"posthog-js": ["posthog-js@1.261.0", "", { "dependencies": { "@posthog/core": "1.0.2", "core-js": "^3.38.1", "fflate": "^0.4.8", "preact": "^10.19.3", "web-vitals": "^4.2.4" }, "peerDependencies": { "@rrweb/types": "2.0.0-alpha.17", "rrweb-snapshot": "2.0.0-alpha.17" }, "optionalPeers": ["@rrweb/types", "rrweb-snapshot"] }, "sha512-jyiXqyrCU+VlpbNNVRA6OQYAVut0XZMYNELCZH+XvTd981VqbE4jXn4XCBreo7XCL2gdPgDVxUVOuzNvEuKcmw=="],
"posthog-js": ["posthog-js@1.268.1", "", { "dependencies": { "@posthog/core": "1.1.0", "core-js": "^3.38.1", "fflate": "^0.4.8", "preact": "^10.19.3", "web-vitals": "^4.2.4" }, "peerDependencies": { "@rrweb/types": "2.0.0-alpha.17", "rrweb-snapshot": "2.0.0-alpha.17" }, "optionalPeers": ["@rrweb/types", "rrweb-snapshot"] }, "sha512-vkV8vFHUWtPsFeHZCCszGdnLxKJn93UVw7a7SZGTJyyQ3JBC1Sydy4DvolnDt2IhqIUZCs9ljwqaUXcITqLoEg=="],

"preact": ["[email protected]", "", {}, "sha512-V79raXEWch/rbqoNc7nT9E4ep7lu+mI3+sBmfRD4i1M73R3WLYcCtdI0ibxGVf4eQL8ZIz2nFacqEC+rmnOORQ=="],

Expand Down Expand Up @@ -2986,9 +2986,9 @@

"yocto-queue": ["[email protected]", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],

"zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
"zod": ["zod@4.1.11", "", {}, "sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg=="],

"zod-form-data": ["zod-form-data@2.0.8", "", { "dependencies": { "@rvf/set-get": "^7.0.0" }, "peerDependencies": { "zod": ">= 3.11.0" } }, "sha512-X31GkEc8uk5/L387L4TVI1z7obBbN/0MRHBHfHW3uMOWkVJeSsa+grvkTvY9qyFbNshKEnqK+jLJNlY+d7jpLw=="],
"zod-form-data": ["zod-form-data@3.0.1", "", { "dependencies": { "@rvf/set-get": "^7.0.0" }, "peerDependencies": { "zod": ">= 3.25.0" } }, "sha512-uwSrDzpLDoXeAxePjPHrjjMelE5pk5zL5JcwLFISvqidGjtPl7hcheH584xGcS76c9IRHq6tqdGkf+A4eKO6Cw=="],

"zrender": ["[email protected]", "", { "dependencies": { "tslib": "2.3.0" } }, "sha512-41dFXEEXuJpNecuUQq6JlbybmnHaqqpGlbH1yxnA5V9MMP4SbohSVZsJIwz+zdjQXSSlR1Vc34EgH1zxyTDvhg=="],

Expand Down
26 changes: 12 additions & 14 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,18 @@ const config = {
],
},
],
rewrites: async () => [
{
source: '/ingest/static/:path*',
destination: 'https://us-assets.i.posthog.com/static/:path*',
},
{
source: '/ingest/:path*',
destination: 'https://us.i.posthog.com/:path*',
},
{
source: '/ingest/decide',
destination: 'https://us.i.posthog.com/decide',
},
],
rewrites: async () => {
return [
{
source: "/ph-proxy/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/ph-proxy/:path*",
destination: "https://us.i.posthog.com/:path*",
},
]
},
redirects: async () => [
{
source: '/docs/api/cli',
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"pathe": "^2.0.3",
"pino": "^9.7.0",
"postgres": "^3.4.5",
"posthog-js": "^1.214.0",
"posthog-js": "^1.268.1",
"react": "^19.1.0",
"react-day-picker": "^9.9.0",
"react-dom": "^19.1.0",
Expand All @@ -136,8 +136,8 @@
"tw-animate-css": "^1.3.6",
"usehooks-ts": "^3.1.0",
"vaul": "^1.1.2",
"zod": "^3.24.1",
"zod-form-data": "^2.0.7",
"zod": "^4.1.11",
"zod-form-data": "^3.0.1",
"zustand": "^5.0.3",
"zustand-computed": "^2.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/auth/confirm/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const confirmSchema = z.object({
'email',
'email_change',
]),
next: z.string().url(),
next: z.url(),
})

const normalizeOrigin = (origin: string) =>
Expand Down
5 changes: 1 addition & 4 deletions src/app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ export default async function DashboardLayout({
<div className="flex h-full max-h-full min-h-0 w-full flex-1 overflow-hidden">
<Sidebar />
<SidebarInset>
<DashboardLayoutView
teamIdOrSlug={teamSlug}
headerInjectable={headerInjectable}
>
<DashboardLayoutView headerInjectable={headerInjectable}>
{page}
</DashboardLayoutView>
</SidebarInset>
Expand Down
30 changes: 1 addition & 29 deletions src/features/client-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import { Toaster } from '@/ui/primitives/sonner'
import { ToastProvider } from '@/ui/primitives/toast'
import { TooltipProvider } from '@/ui/primitives/tooltip'
import { ThemeProvider } from 'next-themes'
import posthog from 'posthog-js'
import { PostHogProvider as PHProvider } from 'posthog-js/react'
import { useEffect } from 'react'
import { PostHogProvider } from './posthog-provider'

interface ClientProvidersProps {
children: React.ReactNode
Expand All @@ -29,29 +27,3 @@ export default function ClientProviders({ children }: ClientProvidersProps) {
</PostHogProvider>
)
}

export function PostHogProvider({ children }: { children: React.ReactNode }) {
useEffect(() => {
if (!process.env.NEXT_PUBLIC_POSTHOG_KEY) {
return
}

posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, {
// Note that PostHog will automatically capture page views and common events
//
// This setup utilizes Next.js rewrites to act as a reverse proxy, to improve
// reliability of client-side tracking & make requests less likely to be intercepted by tracking blockers.
// https://posthog.com/docs/libraries/next-js#configuring-a-reverse-proxy-to-posthog
api_host: '/ingest',
ui_host: 'https://us.posthog.com',
disable_session_recording: process.env.NODE_ENV !== 'production',
advanced_disable_toolbar_metrics: true,
opt_in_site_apps: true,
loaded: (posthog) => {
if (process.env.NODE_ENV === 'development') posthog.debug()
},
})
}, [])

return <PHProvider client={posthog}>{children}</PHProvider>
}
2 changes: 1 addition & 1 deletion src/features/dashboard/account/email-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { useForm } from 'react-hook-form'
import { z } from 'zod'

const formSchema = z.object({
email: z.string().email('Invalid e-mail address'),
email: z.email('Invalid e-mail address'),
})

type FormValues = z.infer<typeof formSchema>
Expand Down
2 changes: 0 additions & 2 deletions src/features/dashboard/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import { usePathname } from 'next/navigation'

interface DashboardLayoutHeaderProps {
className?: string
teamIdOrSlug?: string
headerInjectable?: React.ReactNode
}

export default function DashboardLayoutHeader({
className,
teamIdOrSlug,
headerInjectable,
}: DashboardLayoutHeaderProps) {
const pathname = usePathname()
Expand Down
7 changes: 1 addition & 6 deletions src/features/dashboard/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@ import DashboardLayoutWrapper from './wrapper'

interface DashboardLayoutProps {
children: React.ReactNode
teamIdOrSlug?: string
headerInjectable?: React.ReactNode
}

export default function DashboardLayout({
children,
teamIdOrSlug,
headerInjectable,
}: DashboardLayoutProps) {
return (
<div className="max-h-dvh h-full relative flex flex-col min-h-0">
<DashboardLayoutHeader
teamIdOrSlug={teamIdOrSlug}
headerInjectable={headerInjectable}
/>
<DashboardLayoutHeader headerInjectable={headerInjectable} />
<DashboardLayoutWrapper>{children}</DashboardLayoutWrapper>
</div>
)
Expand Down
Loading
Loading