From cf6ff3852869f05c829538fcac7a8e920093b813 Mon Sep 17 00:00:00 2001 From: Rodrigo Alves da Silva Matos Date: Thu, 13 Aug 2026 16:19:48 -0300 Subject: [PATCH] feat(platform): add loading states for every tenant route + fix the window filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every page under [tenant]/ is an async Server Component doing direct Supabase/session fetches with zero Suspense boundary and zero loading.tsx — clicking a nav link, a repo row, or a settings tab just sat there frozen until the new RSC payload streamed back, with nothing to signal the click registered (and nothing stopping a second click). - Added loading.tsx to every route segment that fetches data on the server: dashboard, repos, repos/[repoName], compare, ai-exposure, audit-log, team, settings, settings/integrations, settings/integrations/[provider], connect. Next's built-in mechanism — the nearest loading.tsx renders automatically as a Suspense fallback while a route segment's data is still resolving, on both navigation and router.push/replace. - Added a shared shadcn-style Skeleton primitive (components/ui/skeleton.tsx) each loading.tsx composes into a rough match of its page's real layout (header + card grid / table rows), not just a generic spinner. - WindowSelector (the org/window filter used on dashboard, compare, and repo-detail) had literally no pending feedback: it calls router.replace on change, which reruns the whole server page, and the +