From 8e381b0f84249d327b30c05830809e1f3cd0ead0 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Tue, 11 Aug 2026 19:04:11 +0200 Subject: [PATCH 1/3] fix(files): update loading behavior when changing location Signed-off-by: Luka Trovic --- apps/files/src/components/FilesListVirtual.vue | 6 ++++++ apps/files/src/components/VirtualList.vue | 8 +++++++- apps/files/src/views/FilesList.vue | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 813e014b04254..0e5afa372d6b3 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -8,6 +8,7 @@ :data-component="userConfig.grid_view ? FileEntryGrid : FileEntry" data-key="source" :data-sources="nodes" + :loading="loading" :grid-mode="userConfig.grid_view" :extra-props="{ isMimeAvailable, @@ -118,6 +119,11 @@ export default defineComponent({ type: String, required: true, }, + + loading: { + type: Boolean, + default: false, + }, }, setup(props) { diff --git a/apps/files/src/components/VirtualList.vue b/apps/files/src/components/VirtualList.vue index 9121f55e105e1..f09cccc714019 100644 --- a/apps/files/src/components/VirtualList.vue +++ b/apps/files/src/components/VirtualList.vue @@ -18,12 +18,13 @@
| null, @@ -410,6 +412,7 @@ export default defineComponent({ return this.currentFolder !== undefined && !this.isEmptyDir && this.loading + && !this.changingLocation }, /** @@ -476,12 +479,14 @@ export default defineComponent({ } logger.debug('View changed', { newView, oldView }) + this.changingLocation = true this.selectionStore.reset() this.fetchContent() }, directory(newDir, oldDir) { logger.debug('Directory changed', { newDir, oldDir }) + this.changingLocation = true // TODO: preserve selection on browsing? this.selectionStore.reset() this.sidebar.close() @@ -608,6 +613,7 @@ export default defineComponent({ this.error = humanizeWebDAVError(error) } finally { this.loading = false + this.changingLocation = false } }, From df1224e002f1664b41122f2216ff10c8c1156aa0 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Mon, 24 Aug 2026 09:43:32 +0200 Subject: [PATCH 2/3] test(files): add test case for loading indicator during folder navigation Signed-off-by: Luka Trovic --- apps/files/src/views/FilesList.vue | 1 + .../e2e/files/files-navigation.spec.ts | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index e095d710373d2..c3e4c81bedcb6 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -99,6 +99,7 @@ diff --git a/tests/playwright/e2e/files/files-navigation.spec.ts b/tests/playwright/e2e/files/files-navigation.spec.ts index b2114d00cd728..bf653e016e977 100644 --- a/tests/playwright/e2e/files/files-navigation.spec.ts +++ b/tests/playwright/e2e/files/files-navigation.spec.ts @@ -48,4 +48,46 @@ test.describe('Files: Navigation', () => { await expect(filesListPage.getRowForFile('baz')).toBeVisible() await expect(filesListPage.getRowForFile('baz')).toBeActiveRow() }) + + test('show loading indicator when navigating', async ({ page, filesListPage }) => { + await filesListPage.navigateToFolder('foo/bar/baz') + await expect(page.locator('[data-cy-files-list-row-fileid]')).toHaveCount(0) + + // Block the PROPFIND request to simulate a slow network and show the loading indicator + let releaseNavigation!: () => void + const navigationBlocked = new Promise((resolve) => { + releaseNavigation = resolve + }) + let blockedNavigationRequest = false + await page.route(/remote\.php\/dav\/files\//, async (route) => { + const request = route.request() + if (!blockedNavigationRequest && request.method() === 'PROPFIND' && request.url().includes('/foo/bar')) { + blockedNavigationRequest = true + await navigationBlocked + } + + await route.continue() + }) + + // Navigate back to the parent folder — the PROPFIND request will be blocked + const navigationResponse = page.waitForResponse((response) => response.url().includes('/remote.php/dav/files/') + && response.request().method() === 'PROPFIND' + && response.url().includes('/foo/bar')) + + await page.goBack() + + await expect.poll(() => new URL(page.url()).searchParams.get('dir')).toBe('/foo/bar') + await expect(page.locator('[data-cy-files-loading]')).toBeVisible() + expect(blockedNavigationRequest).toBe(true) + + // Release the blocked navigation request and wait for it to complete + releaseNavigation() + await navigationResponse + await page.unroute(/remote\.php\/dav\/files\//) + + // Wait for the loading indicator to disappear and the folder to be rendered + await expect(page.locator('[data-cy-files-loading]')).not.toBeVisible() + await expect(filesListPage.getRowForFile('baz')).toBeVisible() + await expect(filesListPage.getRowForFile('baz')).toBeActiveRow() + }) }) From d778f074539711fa766fd6458cb50d121e57382e Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Tue, 1 Sep 2026 10:38:45 +0200 Subject: [PATCH 3/3] fix(files): update loading indicator behavior during folder navigation Signed-off-by: Luka Trovic --- apps/files/src/components/VirtualList.vue | 15 +++++-- apps/files/src/views/FilesList.vue | 8 +--- .../e2e/files/files-navigation.spec.ts | 42 ------------------- 3 files changed, 13 insertions(+), 52 deletions(-) diff --git a/apps/files/src/components/VirtualList.vue b/apps/files/src/components/VirtualList.vue index f09cccc714019..9287f0d181ff8 100644 --- a/apps/files/src/components/VirtualList.vue +++ b/apps/files/src/components/VirtualList.vue @@ -5,7 +5,10 @@