Skip to content

fix(dashboard): support custom-domain self-host onboarding - #806

Draft
izadoesdev wants to merge 6 commits into
stagingfrom
codex/selfhost-dashboard-onboarding
Draft

izadoesdev wants to merge 6 commits into
stagingfrom
codex/selfhost-dashboard-onboarding

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 15, 2026

Copy link
Copy Markdown
Member

Self-hosted production dashboards blocked requests to custom API origins, could not share sessions across explicitly configured subdomains, and generated tracking snippets that sent events to hosted ingestion. This change uses the configured origins and ingestion URL—including the copied AI installation prompt—honors BETTER_AUTH_COOKIE_DOMAIN, and skips automatic verification email when verification is disabled.

Rebased onto current staging (c88bc6d1f), preserving the new hosted Dub attribution while disabling it in self-host mode. Signup keeps a sign-in link available. SELFHOST=true omits the dashboard's first-party tracker and advertising/attribution scripts; Turbo includes that setting in its build environment and cache key. Hosted authentication, cookie security, verification, and telemetry defaults remain unchanged. Self-host signup also skips internal Dub and Slack notifications, and the build clears copied OpenAI pixel IDs so the direct registration handler cannot initialize tracking. The AI installation prompt reuses the existing React, Vue, and HTML snippet generators, removing duplicated options and cloud-only instructions.

Validation

  • bun run lint and bun run check-types pass; the pre-push test hook completed all 27 tasks successfully.
  • 17 targeted regressions cover custom CSP origins, all four SDK snippets and the copied AI prompt, real Better Auth cookie settings, verification opt-in/out, hosted/self-hosted/E2E telemetry behavior, and signup attribution with copied credentials. CI runs these checks explicitly.
  • Combined validation on c88bc6d1f: all eight slices pass lint, all 33 typecheck tasks, all 27 root test tasks, and a production dashboard build. The built config sets NEXT_PUBLIC_SELFHOST=true and clears a copied advertising key; the key is absent from browser JavaScript.
  • Earlier combined Docker browser smoke passed: signup without email, login, authenticated website creation, pageview ingestion, and a real analytics query/display for /selfhost-smoke, with no email, Autumn, AI, or Kafka credentials.
  • The browser receives the configured API/Basket CSP origins and no Databuddy/OpenAI tracking script tags in self-host mode.

Scope and overlaps

Based directly on staging. The self-host quick start in #804 depends on this fix alongside #803 (email senders) and #805 (optional ingestion integrations). The auth changes touch the configuration surface also used by #656 and #692; dependency upgrades and session storage are unchanged.

#816 handles local feature access without Autumn, and #814 keeps omitted self-host URL defaults local. When integrating #816, retain both CI test steps and both Next env entries (NEXT_PUBLIC_SELFHOST and NEXT_PUBLIC_OPENAI_ADS_PIXEL_ID).

@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
dashboard Ready Ready Preview Sep 16, 2026 8:16pm UTC
databuddy-status Ready Ready Preview Sep 16, 2026 8:16pm UTC
documentation Ready Ready Preview Sep 16, 2026 8:16pm UTC

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9ba3a89b-5e3e-4176-9a9a-1e932c4a1585

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unkey-deploy

unkey-deploy Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Sep 16, 2026 8:15pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant