chore(web): upgrade to SvelteKit 2.70 and clear v3 deprecations#114
Note
🤖 Claude Opus 5.5 on behalf of Oliver
Layer 1 of 4 in the infra stack (#114 → #115 → #116 → #117). This moves the dashboard to the latest SvelteKit 2 release and clears the deprecations SvelteKit 3 rejects, so #115 stays small.
What changed
@sveltejs/kit2.70.3,svelte5.57.1, Vite 7.3.6,vite-plugin-svelte6, plus patch bumps to vitest andsvelte-check.- The 14 API routes return
Response.json()instead of kit's deprecatedjson(). Status codes and bodies are unchanged; JSON responses no longer set an explicitContent-Length. - The five-minute chart drill-down calls
resolve('/netflow/files/[slug]', { slug }), the route-ID form SvelteKit 3 requires.
The rest of the v3 migration ($env/dynamic/private removal, runed removal, Vite 8, build-time DB driver) is in #115.
How to review
Setup: cp datasets.json.example datasets.json, point it at any local pipeline database (or set LOCAL_SQLITE_PATH), then bun run dev:web.
- Open
/, a dataset dashboard, and/netflow/files. All render without console errors. - Five-minute drill-down: on a dataset dashboard, narrow the range until the traffic chart shows 5-minute buckets and click a point. The browser navigates to
/netflow/files/<YYYYMMDDHHmm>and the file details page loads. - Expected error responses, each with a JSON
{ "error": ... }body:- 400:
/api/netflow/coverage?granularity=5m(no routers), or/api/netflow/files/abc/details(bad slug). - 404:
/api/netflow/files/<12-digit slug with no data, e.g. 200001010000>/details. - 500: point
LOCAL_SQLITE_PATHat an empty SQLite file and request/api/netflow/files/<valid slug>/details; the body is{"error":"Failed to fetch file details"}.
- 400:
Verification
- Automated:
bun run format,bun run lint,bun run typecheck,bun run test:web,bun run build:web, andbun run test:e2epass; CI is green. - Manual (remaining): steps 1–3 above against a real dataset.
Claude Opus 5.5 · Claude Code (T3 Code)
Rebased onto the merged MAAD stack
Now on main after #107–#120 merged. Response.json() now covers all 16 API routes, including the new dimension-stats and maad-status routes. No dependency changes came from the MAAD stack.
Checks
- SuccessfulPlaywright E2EGitHub
- SuccessfulRust Pipeline ChecksGitHub
- SuccessfulWeb ChecksGitHub
Added 1 commit
- chore(web): upgrade to SvelteKit 2.70 and clear v3 deprecationse9dbda7