Repository navigation
Deploy and self-host the dashboard with Void - #222
Merged
Merged
Conversation
Void, which will own the Cloudflare build and deploy, requires Vite 8. TanStack Start 1.169 is the first release on Vite 8 and renames createServerFn's .inputValidator() to .validator(); error components now receive the thrown value as unknown. Vitest 4 no longer constructs arrow-function mocks with new, and reuses an existing spy on repeated vi.spyOn, so the Octokit/App mocks are function expressions and the token tests restore spies after each case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
void.config.ts now declares the Worker: its D1, KV and R2 bindings, the cron trigger and compatibility settings. Void creates missing resources on deploy and applies db/migrations (moved from drizzle/, same filenames, so the d1_migrations history carries over) in dev and on deploy. 0007 gains Void's allow-destructive pragma; its statements are unchanged. env.ts lists every value the Worker reads, so a missing production secret stops the deploy instead of failing at runtime. Local values move from .dev.vars to .env, the example to env.example, and the demo credentials to apps/emulator/dashboard.env, which dev:demo and the e2e suite pass through the shell. DIFFKIT_DEMO=1 replaces CLOUDFLARE_ENV=demo, because Void reads CLOUDFLARE_ENV to pick a named environment it does not support. Removed: wrangler.jsonc.example, wrangler.demo.jsonc, the generated worker-configuration.d.ts (bindings are declared in src/env.d.ts) and resolve-wrangler-config-path.mts. Void needs Node 24.22, now pinned in .node-version and used by every workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The deploy workflow now runs void deploy, which applies migrations after saving a D1 restore point and checks /__void/ready, then keeps our /login and /api/health gate with a Wrangler rollback. generate-wrangler-dashboard-config and run-d1-migrations are gone. Rehearsed on a copy of production in the same account: the first Void deploy kept the existing Worker, D1, KV, R2, secrets and data and re-ran no migration. It also showed that a deploy without the resources named binds a new, empty R2 bucket, so void.config.ts takes DIFFKIT_D1_DATABASE_NAME, DIFFKIT_D1_DATABASE_ID, DIFFKIT_KV_ID and DIFFKIT_R2_BUCKET together or not at all, and CI refuses to deploy without them. DIFFKIT_DOMAIN declares the custom domain. A fresh account needs none of them: void deploy creates everything (docs/self-hosting.md). Void only deploys cron schedules declared in crons/, so the maintenance job moves there from the entry's scheduled export, and the Drizzle journal now lists the hand-written migrations 0002-0007, which Void requires. docs/runbooks/void-handoff.md is the one-time production checklist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds, runs and deploys the dashboard with Void instead of hand-made Wrangler configs, so anyone can self-host DiffKit in their own Cloudflare account with three commands (
void connect,void secret sync,pnpm run deploy). Seedocs/self-hosting.md.Production keeps its existing
diffkitWorker,quickhub-dbD1, KV namespace,diffkit-comment-mediaR2 bucket anddiff-kit.comdomain. CI pins all four resource IDs through repository variables (DIFFKIT_*, already set) and refuses to deploy without them. Without the pins, Void would bind a new, empty R2 bucket.Changes
.inputValidator()→.validator()in 25 files; a few test mocks updated for Vitest 4.void.config.ts+env.tsreplacewrangler.jsonc.example,wrangler.demo.jsonc, the config generator scripts andworker-configuration.d.ts. Local secrets move from.dev.varsto.env.drizzle/todb/migrations/with the same file names, so production's applied history still matches. Journal entries added for 0002–0007, which Void requires.crons/maintenance.ts. Void only schedules crons declared there.void deployand keeps the/login+/api/healthgate with rollback on failure. All workflows read Node 24.22 from.node-version.docs/self-hosting.mdanddocs/runbooks/void-handoff.md; README, local dev, demo mode, e2e and rollback docs updated.migration-destructive: approved. The only destructive statement is in
0007_drop_legacy_cache_tables.sql, which production already applied. The folder move makes the check see it as new. Nothing in this PR drops data.Test Plan
main.pnpm dev,pnpm dev:demoand the cron work locally.94d55cd6); partial pins are refused.docs/runbooks/void-handoff.mdstep 4: bindings unchanged,diff-kit.comstill attached,maintenance.status: "recent"within 5 minutes.🤖 Generated with Claude Code