Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 6eaaca3c45198b27645fd618002538259ca86092
parent 4dae378d2e1b6b400a64de6b092bac4b566b3c5e
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue,  4 Aug 2026 23:59:04 -0400

Wrap AutoRefresh in Suspense — it broke the production build

`pnpm build` failed on /widget/builder with "useSearchParams() should be
wrapped in a suspense boundary".

Two of my own changes combined to cause it. Stage 3 added useSearchParams() to
AutoRefresh (to avoid starting a refresh on top of an in-flight navigation),
and the root app/loading.tsx happened to be providing the Suspense boundary
that made it legal. Removing the loading skeletons took that boundary away and
exposed it. /widget/builder is the ONLY route in the app without
force-dynamic — the one page Next prerenders — so it was the only one to fail.

AutoRefresh was the single item in the layout's `extras` not already wrapped;
SiteScopeSelect and CommandPalette have had the same treatment for the same
reason. Comment added so it doesn't get "tidied" away.

My fault for not re-running `pnpm build` after removing the loading files — I
verified that change with dev-mode e2e and a direct status-code check, neither
of which prerenders anything. Verified now: build exits 0, and auto-refresh,
navigation (incl. the 404 guards), pulse and widget specs all pass (27/27).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/app/layout.tsx | 15++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/editor/app/layout.tsx b/editor/app/layout.tsx @@ -175,9 +175,18 @@ export default async function RootLayout({ <CommandPalette /> </Suspense> <Toaster position="bottom-right" /> - <AutoRefresh - intervalMs={settings.autoRefreshIntervalSeconds * 1000} - /> + {/* Suspense is REQUIRED, not stylistic: AutoRefresh calls + useSearchParams() (to avoid starting a refresh on top of an + in-flight navigation), and an unwrapped useSearchParams() + fails the production build on any statically prerendered + route — "/widget/builder" is the one that has no + force-dynamic. Same treatment SiteScopeSelect and + CommandPalette above already get, and for the same reason. */} + <Suspense fallback={null}> + <AutoRefresh + intervalMs={settings.autoRefreshIntervalSeconds * 1000} + /> + </Suspense> </> } >