Fix 0.1.13 static-export build (broken by PR #276) - #280
Merged
Conversation
PR #276 broke the Tauri static-export build in two places: - 6 tool pages (base64, jwt-decoder, hash-generator, url-encode, json-formatter, qr-code) read useSearchParams() with no Suspense ancestor → CSR-bailout prerender error. Wrap the /app page content in a Suspense boundary. - /dashboard crashed on usePinnedToolsStore.persist.hasHydrated() because .persist is undefined during prerender → guard the access (hydrated=false on the server, real value on the client). Verified: full static export now emits all 88 pages with Next 16.2.10. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
PR #276 (remove accounts / open-source refactor) broke the Tauri static-export build — the desktop bundle can't be produced, which blocks both local releases and the CI release workflow (it runs the same
next buildexport). This only surfaces in a production/export build, notpnpm dev, so it wasn't caught in review.Two distinct prerender failures:
base64,jwt-decoder,hash-generator,url-encode,json-formatter,qr-code— readuseSearchParams()with no Suspense ancestor → CSR-bailout prerender error./dashboard—usePinnedToolsStore.persist.hasHydrated()throwsCannot read properties of undefinedbecause.persistis absent during static prerender.Fix (2 files)
app/app/layout.tsx— wrap the shared/apppage content in a<Suspense>boundary, covering all 6 tool pages at once.store/pinned-tools-store.ts— guard the.persistaccess (?.hasHydrated?.() ?? false); "not hydrated" on the server, real value on the client.Verification
Full static export now emits all 88 pages cleanly, tested against the team's actual
next@16.2.10. No dependency changes.🤖 Generated with Claude Code