Skip to content

Collect Dropbox inventory on demand and preserve cached results - #14917

Closed
thebytorsnowdog wants to merge 1 commit into
omacom:quattrofrom
thebytorsnowdog:codex/os-audit-dropbox
Closed

thebytorsnowdog wants to merge 1 commit into
omacom:quattrofrom
thebytorsnowdog:codex/os-audit-dropbox

Conversation

@thebytorsnowdog

Copy link
Copy Markdown
Contributor

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 25 interface 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:

bash test/shell.d/dropbox-collection-test.sh
bash test/shell.d/dropbox-collection-runtime-test.sh
bash test/shell.d/dropbox-test.sh
bash test/shell.d/qml-text-format-test.sh
git diff --check

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.

@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Dropbox panel inventory collection and caching logic.

The PR appears safe to merge, with a non-blocking cache-preservation issue when the same account folder becomes temporarily unavailable.

Findings

  1. P2 Cached files disappear ▶

Summary

Separates cheap Dropbox status checks from file inventory scans.

  • Dropbox checks status separately from scanning its files.
  • The Dropbox panel keeps good inventory when a scan cannot replace it.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Status refresh] --> B[Cheap daemon status]
  B --> C{Panel open and account available?}
  C -->|Yes, inventory pending| D[Inventory with separate deadline]
  C -->|No| E[No scan]
  D --> F{Successful matching account?}
  F -->|Yes| G[Replace cached inventory]
  F -->|No| H[Keep cached inventory]
  I[Panel closes] --> J[Cancel inventory]
Loading

Reviews (1) · Last reviewed commit: "Collect Dropbox inventory on demand and ..." · Reviewed by Greptile

Comment on lines +110 to +117
if (nextPath !== accountPath || !authenticated) {
cancelInventory()
inventoryLoaded = false
inventoryError = ""
usedBytes = 0
usagePercent = 0
files = []
inventoryPending = inventoryRequested && authenticated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Cached files disappear

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.

@omarchybot

Copy link
Copy Markdown
Collaborator

Looked at this, but it is not classified yet, so it has no bug label and has not been verified. Two models classify each item separately, and only the first one ran: Claude Opus 5.5 read it as a bug. The second, Codex Medium, did not run because the bot used up its daily review budget, so this is waiting for that second classification.

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 quattro, reproducing the background scan on a worker, and running the Dropbox tests and the second opinion there.

@thebytorsnowdog thebytorsnowdog closed this by deleting the head repository Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants