From 0ac2b6103452dc69201fe8a7d1107095e10fac97 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 3 Nov 2026 03:53:05 +0100 Subject: [PATCH] perf: paint a snapshot of the last home in place of the boot splash (#12158) * perf: paint home from a per-user persisted cache while it refreshes Co-Authored-By: Claude Opus 5.5 * fix: keep a cached first page from offering load more after a failed refresh Co-Authored-By: Claude Opus 5.5 * fix: drop expired cache entries from disk when hydrating Co-Authored-By: Claude Opus 5.5 * perf: render home as the last confirmed user while whoami is in flight Co-Authored-By: Claude Opus 5.5 * perf: hydrate the home cache at boot; file answers only under their session Co-Authored-By: Claude Opus 5.5 * perf: paint home's cached data in its first frame from a synchronous snapshot Co-Authored-By: Claude Opus 5.5 * fix: show nothing rather than 'Loading user...' while rendering as the remembered user Co-Authored-By: Claude Opus 5.5 * fix: bind the cache identity to the session that confirmed the tab's user Co-Authored-By: Claude Opus 5.5 * fix: record the session confirmation before setting the user, so the cache hydrates Co-Authored-By: Claude Opus 5.5 * chore: cache immutable chunks on the cloudflare pages previews Co-Authored-By: Claude Opus 5.5 * perf: keep the cache snapshot's small entries when a large one exceeds its cap Co-Authored-By: Claude Opus 5.5 * perf: paint a snapshot of the last home in place of the boot splash Co-Authored-By: Claude Opus 5.5 * fix: clean the home snapshot when painted and cache favorites for its hand-over Co-Authored-By: Claude Opus 5.5 * fix: make home's first live frame match its boot snapshot Co-Authored-By: Claude Opus 5.5 * fix: save the home snapshot with its boot stylesheets and through keyboard reloads Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- frontend/src/app.html | 147 ++++++++++- .../src/lib/components/NavBreadcrumb.svelte | 31 ++- .../src/lib/components/PageHeaderBar.svelte | 3 + .../src/lib/components/home/HomeAIChat.svelte | 6 +- frontend/src/lib/homeSnapshot.dom.test.ts | 238 ++++++++++++++++++ frontend/src/lib/homeSnapshot.ts | 237 +++++++++++++++++ frontend/src/lib/logout.test.ts | 8 + frontend/src/lib/logout.ts | 2 + .../src/routes/(root)/(logged)/+layout.svelte | 25 +- .../src/routes/(root)/(logged)/+page.svelte | 15 +- frontend/src/routes/+layout.svelte | 9 + 11 files changed, 711 insertions(+), 10 deletions(-) create mode 100644 frontend/src/lib/homeSnapshot.dom.test.ts create mode 100644 frontend/src/lib/homeSnapshot.ts diff --git a/frontend/src/app.html b/frontend/src/app.html index d637491e74..29d55331c3 100644 --- a/frontend/src/app.html +++ b/frontend/src/app.html @@ -7,7 +7,15 @@ -