From e9a39c83523ead117f0531dd28bfdd346b5f49d3 Mon Sep 17 00:00:00 2001 From: Pedro Paulo Vezza Campos Date: Fri, 29 May 2026 10:45:35 -0700 Subject: [PATCH 1/2] Prerender content pages and drop client-side zod MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two changes that take the perf work from "fast when warm" to "fast and consistent", and cut the client JS for a content site down to analytics only. Prerender the content pages (index, about, work, briefs, legal, privacy, 404) to static HTML served from the Cloudflare CDN edge instead of an on-demand Worker render. This removes per-request Worker execution (and cold-start TTFB variance) from the content pages — the likely cause of the 5.1s LCP a mobile PageSpeed run reported while local Lighthouse with the same throttling scored 100. API + OIDC routes stay SSR. To make that possible, client telemetry no longer depends on per-request SSR config injection: the App Insights iKey + ingestion endpoint (already public — they ship in every page) move to a shared telemetry-config module, and the `environment` dimension is resolved from the hostname on each side (client from location, server from the request). The connection-string secret parse and the `__telemetryConfig`