From c25856ee5336debaecaa8f20d212f3a2e4e52a30 Mon Sep 17 00:00:00 2001 From: Boris Rybalkin Date: Thu, 20 Aug 2026 19:19:02 +0100 Subject: [PATCH 1/3] fix: land on device source and stop indexing mounted disks New users get their scopes in config source order (settings builds DefaultScopes by iterating Server.Sources) and the UI lands on scopes[0], so a fresh login opened the empty /data/files source and showed "nothing to show here". The old app started at /, so this read as a regression. Put device first, and assert the landing source in the UI journey instead of clicking past it. The device source is rooted at / and its usage bar divides an index-walk sum by a statfs of the root partition. The walk descends into /opt/disk, so on a device with an external disk the whole disk was counted against the system partition -- a user reported 1.8 TB / 118.8 GB (1580%) -- and every scan re-walked terabytes of content the files source already covers. Exclude the mount point and its /data symlink from indexing, viewable so browsing still works. Refs https://syncloud.discourse.group/t/files-nothing-to-show-here/670 --- config/config.yaml | 14 +++++++++----- web/e2e/specs/01-files.spec.ts | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index e2948de..e6141d8 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -6,11 +6,6 @@ server: - levels: "info|warning|error" output: "stdout" sources: - - path: "{{ .StorageDir }}" - name: files - config: - defaultEnabled: true - defaultUserScope: "/" - path: "/" name: device config: @@ -23,6 +18,15 @@ server: - folderPath: "/dev" - folderPath: "/run" - folderPath: "/var/cache" + - folderPath: "/opt/disk" + viewable: true + - folderPath: "/data" + viewable: true + - path: "{{ .StorageDir }}" + name: files + config: + defaultEnabled: true + defaultUserScope: "/" auth: tokenExpirationHours: 2 diff --git a/web/e2e/specs/01-files.spec.ts b/web/e2e/specs/01-files.spec.ts index c90b5b7..e228ae2 100644 --- a/web/e2e/specs/01-files.spec.ts +++ b/web/e2e/specs/01-files.spec.ts @@ -5,7 +5,7 @@ import { loginViaAuthelia } from '../helpers/auth' const username = process.env.PLAYWRIGHT_USER! const password = process.env.PLAYWRIGHT_PASSWORD! -test('browse read-only system source, create dir and file in writable source', async ({ page, baseURL }, info) => { +test('land on device source, create dir and file in writable source', async ({ page, baseURL }, info) => { const stamp = Date.now() const dir = `e2e-dir-${stamp}` const file = `note-${stamp}.txt` @@ -19,7 +19,7 @@ test('browse read-only system source, create dir and file in writable source', a await acknowledge.click() await shoot(page, info, '02-logged-in') - await page.locator('a.source-button[aria-label="device"]').click() + await page.waitForURL((url) => url.pathname.startsWith('/files/device')) await page.locator('a[aria-label="etc"]').waitFor({ state: 'visible' }) await shoot(page, info, '03-device-root') From eea4c92649b2cf47f25cc7c2f49660adf6317963 Mon Sep 17 00:00:00 2001 From: Boris Rybalkin Date: Thu, 20 Aug 2026 19:44:22 +0100 Subject: [PATCH 2/3] test: tolerate missing first-login prompt after upgrade The welcome prompt is gated on ShowFirstLogin, set at user creation to IsFirstLoad && admin, and IsFirstLoad is true only when filebrowser had no database file at startup. After an upgrade the store version has already created the database, so the user created at first login never gets the prompt and the unconditional wait times out. This only started biting now: the upgrade test installs the released app from the store, and until that became FileBrowser Quantum the old side was the legacy python app, which creates no filebrowser database. The spec would fail on master untouched. Dismiss the prompt through a locator handler so the run works whether or not it appears, instead of racing its arrival. --- web/e2e/specs/01-files.spec.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/e2e/specs/01-files.spec.ts b/web/e2e/specs/01-files.spec.ts index e228ae2..b851645 100644 --- a/web/e2e/specs/01-files.spec.ts +++ b/web/e2e/specs/01-files.spec.ts @@ -13,13 +13,17 @@ test('land on device source, create dir and file in writable source', async ({ p await loginViaAuthelia(page, baseURL!, username, password) + // welcome prompt only appears when filebrowser created its database on this + // start (ShowFirstLogin = IsFirstLoad && admin), so it is absent after an upgrade const acknowledge = page.locator('button[aria-label^="Acknowledge"]') - await acknowledge.waitFor({ state: 'visible' }) - await shoot(page, info, '01-first-login-welcome') - await acknowledge.click() - await shoot(page, info, '02-logged-in') + await page.addLocatorHandler(acknowledge, async (button) => { + await shoot(page, info, '01-first-login-welcome') + await button.click() + }, { times: 1 }) await page.waitForURL((url) => url.pathname.startsWith('/files/device')) + await shoot(page, info, '02-logged-in') + await page.locator('a[aria-label="etc"]').waitFor({ state: 'visible' }) await shoot(page, info, '03-device-root') From 5f84db11b4e60eab117ca96e73d367bfec8b588f Mon Sep 17 00:00:00 2001 From: Boris Rybalkin Date: Sat, 22 Aug 2026 10:53:19 +0100 Subject: [PATCH 3/3] test: drop comment from spec --- web/e2e/specs/01-files.spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/e2e/specs/01-files.spec.ts b/web/e2e/specs/01-files.spec.ts index b851645..9b25855 100644 --- a/web/e2e/specs/01-files.spec.ts +++ b/web/e2e/specs/01-files.spec.ts @@ -13,8 +13,6 @@ test('land on device source, create dir and file in writable source', async ({ p await loginViaAuthelia(page, baseURL!, username, password) - // welcome prompt only appears when filebrowser created its database on this - // start (ShowFirstLogin = IsFirstLoad && admin), so it is absent after an upgrade const acknowledge = page.locator('button[aria-label^="Acknowledge"]') await page.addLocatorHandler(acknowledge, async (button) => { await shoot(page, info, '01-first-login-welcome')