perf(webui): inline the default home route

This commit is contained in:
joshpatra committed 2026-07-27 06:17:54 -04:00
1 parent 03d7af12b6
commit d9573ef4d7
2 files changed
+4 -1

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@
import { page } from "$app/state";
import { auth, onboarding, type OnboardingState, type Session } from "$lib/api";
import { liveUpdates } from "$lib/live-updates.svelte";
import HomeView from "$lib/components/HomeView.svelte";
import SegmentedNav from "$lib/components/SegmentedNav.svelte";
const destinations = [
@@ -101,7 +102,7 @@
}
function viewLoader(path: string) {
if (path === "/") return import("$lib/components/HomeView.svelte");
if (path === "/") return Promise.resolve({ default: HomeView });
if (path === "/library/playlists") return import("$lib/components/PlaylistsView.svelte");
if (path === "/library/mappings") return import("$lib/components/MappingView.svelte");
if (path === "/library/cached" || path === "/library/kept") {
+2
View File
@@ -493,6 +493,8 @@ test("Home stays inside runtime and request budgets", async ({ page }) => {
await mockApi(page);
await page.goto("#/");
await expect(page.getByLabel("Loading Home")).toBeHidden();
await expect(page.getByText("Managed", { exact: true })).toBeVisible();
await expect(page.getByText("Unmanaged", { exact: true })).toBeVisible();
const apiRequests = requests.filter((path) => path.startsWith("/api/admin/"));
const jsRequests = requests.filter((path) => path.endsWith(".js"));