Repository navigation
Collect Dropbox inventory on demand and preserve cached results - #14917
thebytorsnowdog wants to merge 1 commit into
Conversation
|
| if (nextPath !== accountPath || !authenticated) { | ||
| cancelInventory() | ||
| inventoryLoaded = false | ||
| inventoryError = "" | ||
| usedBytes = 0 | ||
| usagePercent = 0 | ||
| files = [] | ||
| inventoryPending = inventoryRequested && authenticated |
There was a problem hiding this comment.
If the same Dropbox folder becomes temporarily unavailable, read_status() reports authenticated: false without changing accountPath. This branch then clears files, usedBytes, and inventoryLoaded, so the last successful results are lost until another scan succeeds.
Keep the cache when the account path is unchanged. Cancel the scan without treating a temporarily missing folder as an account change.
|
Looked at this, but it is not classified yet, so it has no What I checked, by reading only (no tests ran, no worker used):
Next: once the classification is settled, this goes through the full review. That means porting it onto |
The panel's background status checks recursively scan the sync folder even while the panel is closed. Separate daemon status from file inventory: background checks use the cheap status path, and inventory runs only while the panel is open. The existing combined
status.py 25interface remains available.Status and inventory processes have separate deadlines; closing the panel cancels inventory. Failed, timed-out, unreadable or unauthenticated inventories preserve the last successful cache. Account changes discard unrelated results, and the initial loading/error state no longer implies a successful empty inventory.
Passed:
Helper tests prove closed-panel checks avoid traversal, preserve the combined interface, reject incomplete inventories, and exercise actual timeout escalation and cancellation against fixture processes. Qt 6.8.2 offscreen tests exercise panel-open collection, cache preservation, cancellation/reopening, account changes and late-result rejection using real QML with mocked external processes.
Inventory remains a full traversal while the panel is open. Its 15-second budget can leave very large or slow folders unavailable while retaining cached data. Real Dropbox/Quickshell cancellation and panel layout transitions still need desktop acceptance testing.