From 1f3bc2acf498b79bf36ab41c7d91b8c812675288 Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Thu, 11 Jun 2026 10:22:34 +0300 Subject: [PATCH] fix(frontend): open pool files in an overlay so back returns to the pool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tapping a file in a pool did a full goto('/files/') to the standalone viewer route, whose close button always routes to /files — so returning from a file viewed inside a pool dropped the user on the global files list instead of back in the pool. Open the viewer as an overlay over the still-mounted pool grid via shallow routing, mirroring the files grid: pushState keeps the pool URL (the overlay is driven by page.state.fileId), and the back button / close does history.back(), returning to the pool with its list and scroll intact. Neighbours follow the pool's own order, paging in more pool files near the end, and closing scrolls the grid back to the last-viewed file. Co-Authored-By: Claude Opus 4.8 --- frontend/src/routes/pools/[id]/+page.svelte | 83 ++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/pools/[id]/+page.svelte b/frontend/src/routes/pools/[id]/+page.svelte index dd62930..7b641b9 100644 --- a/frontend/src/routes/pools/[id]/+page.svelte +++ b/frontend/src/routes/pools/[id]/+page.svelte @@ -1,9 +1,10 @@