Make the server actually able to read the theme path

Fixkamo-marketing
Ya
20 Agosti 2026, 02:06 UTC
Mwandishi
Kamo
Ahadi ya
f160472

Completes the change 48493ae shipped half of. That commit swept four in-flight files — layout.tsx, DynamicMetaLoader, TouchOptimized and ThemedBackground — into an unrelated tracking fix, without the module they depend on. Main has been building and rendering fine since, and inlining nothing, which is the whole problem with this class of bug. `CANONICAL_THEME_PATH` is exported from `components/theme/Theme.tsx`, which carries `"use client"`. A server module importing a value from a client module does not get the value — it gets a client reference. So `lib/theme-config.ts` was building the URL `undefined/css/globals.css`, the fetch failed, and both helpers returned their fallbacks. Nothing logged, nothing failed: the theme simply never inlined, and the slideshow config silently used the same three frames the fallback provides, which is why it looked correct. The path helpers move to `lib/theme-path.ts`, which carries no directive, and Theme.tsx re-exports them so every existing client call site is unchanged. Two guards come with it, because these run in the locale layout and therefore render for all 190 prerendered pages: · `cache()` so repeat calls within a render collapse to one fetch. · A timeout, expressed as a race around the promise rather than an `AbortSignal` on the fetch. Passing `signal` alongside `next: { revalidate }` makes Next's patched fetch fail — and since both callers swallow errors into a fallback, the only symptom was, again, a successful build that inlined nothing. The race leaves the fetch untouched so Next still caches it. The bound is not theoretical: without one, a page timed out at the builder's 60-second limit while the theme host was slow. The accessible accent is resolved here too, and that is now load-bearing rather than a nicety. The guard exists because the live theme's greens measure 1.15:1, 1.79:1 and 2.84:1 against this canvas; it was previously safe to correct them after hydration only because the failing colours arrived after hydration as well. Inlining the theme without inlining the correction would put unreadable text into the first paint. It resolves to 4.69:1 in the markup. Image quality gains a 20 in the allow-list, which the backdrop now uses.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei