fa491487b7
The viewer was a separate /files/[id] route, so returning tore down and reloaded the whole grid. Now opening a file uses SvelteKit shallow routing (pushState + page.state.fileId): the list stays mounted and the viewer renders as a full-screen overlay on top of it, like Immich. The URL still becomes /files/<id> and the back button (or Escape/close) dismisses the overlay via history.back(), revealing the untouched grid — no reload — then scrolls it to the last-viewed file instantly. - Extract the viewer UI/logic into a reusable FileViewer component (file fetch, preview, lazy tags, save, prev/next, keyboard). - List: neighbours come straight from its own files[]; paging past the loaded set pulls the next page by cursor (prefetch near the end). - Paging uses replaceState so one back press returns to the grid. - /files/[id] remains as a thin standalone fallback for deep links / hard reloads, resolving neighbours via the anchor API and returning to the grid with ?anchor=<id>. - Remove the now-unused filesCache snapshot store (the list is never unmounted, so there's nothing to snapshot/restore). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sv
Everything you need to build a Svelte project, powered by sv.
Creating a project
If you're seeing this, you've probably already done this step. Congrats!
# create a new project
npx sv create my-app
To recreate this project with the same configuration:
# recreate this project
npx sv@0.13.2 create --template minimal --types ts --install npm frontend
Developing
Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Building
To create a production version of your app:
npm run build
You can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.