From db97a8895636797a5885f9610b4c6ec699c80ed0 Mon Sep 17 00:00:00 2001 From: DioCrafts Date: Sun, 21 Jun 2026 12:08:29 +0200 Subject: [PATCH] feat(upload): skip unreadable files (FIFOs/sockets) + auto-reload on new deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two robustness fixes behind the recurring "folder upload stuck at ~93%" reports. 1. Skip non-regular files up front. A copied s6/runit service tree contains FIFOs (e.g. supervise/control named pipes) that report a size but BLOCK FOREVER when the browser reads them — the deterministic ~8-files-short that no retry/watchdog tweak could fix. uploadBatch/uploadTree now probe each file's first chunk against a 3 s timeout (partitionReadable), upload only the readable ones, and report the rest: "N uploaded · M skipped (not regular files)". Progress runs over the uploadable count, so it reaches 100% instead of parking at 93% while a lane hangs on a pipe. 2. Auto-reload on a new deploy. svelte.config.js polls _app/version.json (60 s); the root layout reloads itself when the deployed build changes — unless an upload is in flight — so an open tab can't keep running stale code after a rebuild (the recurring "my fix isn't applied" trap). npm run check: 0 errors, 58 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/routes/+layout.svelte | 14 +- .../src/routes/files/[...path]/+page.svelte | 148 +++++++++++++++--- frontend/static/locales/en.json | 1 + frontend/static/locales/es.json | 1 + frontend/svelte.config.js | 6 + 5 files changed, 144 insertions(+), 26 deletions(-) diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 68c3b8c5..a28f6a20 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -1,16 +1,28 @@