From 71ba9fdd21683818513eb6326d79f00c6fed4d50 Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Tue, 28 Jul 2026 13:40:45 +0200 Subject: [PATCH] fix: show synthesized ancestors and leave the spinner to the current load Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_011HeHeGLWDuu62fxjBZA15P --- frontend/src/lib/components/S3FilePickerInner.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/lib/components/S3FilePickerInner.svelte b/frontend/src/lib/components/S3FilePickerInner.svelte index e5c2655f95..31dfaba484 100644 --- a/frontend/src/lib/components/S3FilePickerInner.svelte +++ b/frontend/src/lib/components/S3FilePickerInner.svelte @@ -259,6 +259,11 @@ // loading each level of its ancestor chain if (selectedFileKey !== undefined && !emptyString(selectedFileKey.s3)) { await expandAncestors(selectedFileKey.s3) + // Clearing the flags below belongs to whichever load is current: + // a reload that started meanwhile owns the spinner now. + if (generation !== loadGeneration) { + return + } } } displayedFileKeys = [...new Set(displayedFileKeys)].sort() @@ -571,6 +576,10 @@ return } folder.collapsed = false + // The whole chain is being opened, so the folder belongs on screen + // itself — a synthesized one below the root level is not covered by + // the reveal loops, and its children would render with no row above. + displayedFileKeys.push(prefix) for (const file_key in allFilesByKey) { if (allFilesByKey[file_key].parentPath === prefix) { displayedFileKeys.push(file_key)