Thinkmill / Thinkmill/keystatic
Bug: GitHub storage admin UI renders blank on Next.js 16 (local mode works)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 159
- Avg merge
- 21h 41m
- Merged PRs (30d)
- 2
Description
Summary
With storage.kind: 'github', the Keystatic admin UI at /keystatic renders completely blank on Next.js 16 — no admin DOM, no console error, no pageerror, no Next error overlay. The same app with storage.kind: 'local' renders the full admin UI correctly. The GitHub OAuth endpoints themselves work; it's specifically the client UI that never mounts in the GitHub code path — including the /keystatic/setup wizard, so the app can't even be bootstrapped.
Environment
@keystatic/core: 0.5.50@keystatic/next: 5.0.4@keystar/ui: 0.7.21 (latest)next: 16.2.9 (App Router)react/react-dom: 19.2.7- Node: 22.17.1 · pnpm: 10.27 · macOS
Reproduction
- Next 16 App Router app with the standard Keystatic Next wiring:
keystatic.config.tswithstorage: { kind: 'github', repo: { owner, name } }app/keystatic/keystatic.tsx→makePage(config)app/keystatic/[[...params]]/page.tsxapp/api/keystatic/[...params]/route.ts→makeRouteHandler({ config })
pnpm dev, open/keystatic.
Expected
The admin UI loads — either the GitHub sign-in/setup screen (when unconfigured) or the authenticated collections view.
Actual
/keystatic returns 200 but the <body> contains only the framework/theme scripts — no Keystatic DOM at all. /keystatic/setup (the KeystaticSetup wizard) is likewise blank. No error is logged anywhere (console, pageerror, server, or Next overlay).
What I verified / ruled out
- Local mode works: switching only
storage.kindto'local'renders the full admin UI (Dashboard/Collections/editor) in the exact same app — so it's specific to the GitHub path, not a general@keystar/ui/Spectrum mount failure. - Bundler: blank on both
next dev(Turbopack) andnext dev --webpack. - OAuth endpoints work:
GET /api/keystatic/github/login307-redirects correctly tohttps://github.com/login/oauth/authorize?client_id=…&redirect_uri=…, and following it reaches GitHub's auth page. So env vars (KEYSTATIC_GITHUB_CLIENT_ID/_SECRET,KEYSTATIC_SECRET,NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG) are loaded and valid. - Auth completed: after creating a real GitHub App and completing the OAuth sign-in,
/keystaticis still blank — so it's not gated on missing auth. - Not stale
.next, not a routing/basePath issue (/keystatic/setupis reached butKeystaticSetupmounts nothing), and no middleware touching/keystatic.
Notes / hypothesis
Because local mode renders and only the GitHub path is blank — with no thrown error — it looks like a component in the GitHub auth/AppShell path (e.g. a urql/Suspense boundary or a silent null return) that doesn't mount under Next 16 + React 19.2. Possibly related to the Next 16 work in #1501, but the symptom here is a silent blank rather than a thrown error, and it reproduces on webpack too.
Happy to provide a minimal repro repo or test any patch.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using app/keystatic/keystatic.tsx, app/keystatic/[[...params]]/page.tsx, and app/api/keystatic/[...params]/route.ts with GitHub storage, then compare it with local mode. Inspect the makePage and KeystaticSetup paths first and test both Turbopack and webpack. Done means the GitHub sign-in/setup or authenticated collections UI mounts at /keystatic and /keystatic/setup without blank pages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, next.js, react, typescript
- Domain
- authentication, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100