chore: gitignore dev_docs and remove from tracking (#7)

* chore: gitignore dev_docs and remove from tracking

Internal reference docs — not needed in the public repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: skip env validation during builds when vars are absent

The build-time guard only checked for Docker placeholder sentinels
but not for completely absent vars (CI/Vercel builds). This caused
page collection to fail in environments without env vars.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: handle absent env vars in Supabase browser client during builds

The build-time guard only checked for Docker placeholder sentinels
but crashed on undefined when env vars are completely absent (CI).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove core import from @/extensions/ in describe route

Inline the DescriptionAnalysisInput/Result types instead of importing
from the ai-categorization extension. Core code must not import from
extensions directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-03-09 15:50:56 +01:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 42534a6328
commit d696e0282b
13 changed files with 33 additions and 4790 deletions
+5 -6
View File
@@ -30,12 +30,11 @@ const OPTIONAL_VARS = [
] as const
function validateEnvironment(): void {
// During Docker builds, NEXT_PUBLIC_* vars are placeholder sentinels
// replaced at runtime by docker-entrypoint.sh. Server-only vars like
// SUPABASE_SERVICE_ROLE_KEY are not available at build time at all.
// Skip validation so Next.js page collection doesn't fail.
const isBuildPlaceholder = process.env.NEXT_PUBLIC_SUPABASE_URL?.startsWith('__')
if (isBuildPlaceholder) return
// During builds (CI, Docker, Vercel), env vars may be absent or set to
// placeholder sentinels. Skip validation so Next.js page collection
// doesn't fail — real validation happens at runtime.
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL
if (!supabaseUrl || supabaseUrl.startsWith('__')) return
const missing: string[] = []
+3 -3
View File
@@ -4,9 +4,9 @@ import { createBrowserClient } from '@supabase/ssr'
// (e.g. __NEXT_PUBLIC_SUPABASE_URL__) that get replaced at runtime by
// docker-entrypoint.sh. Provide a dummy URL so the client constructor
// doesn't throw during Next.js static page generation.
const url = process.env.NEXT_PUBLIC_SUPABASE_URL!
const key = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
const isBuildPlaceholder = url.startsWith('__')
const url = process.env.NEXT_PUBLIC_SUPABASE_URL ?? ''
const key = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ?? ''
const isBuildPlaceholder = !url || url.startsWith('__')
export function createClient() {
return createBrowserClient(