Skip to content

Sweep abandoned OPFS partial transfers - #48

Merged
Androtim merged 1 commit into
mainfrom
feat/opfs-orphan-sweep
Jul 2, 2026
Merged

Androtim merged 1 commit into
mainfrom
feat/opfs-orphan-sweep

Conversation

@Androtim

@Androtim Androtim commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Closes the last 'smaller debt' roadmap item that doesn't need design input or an external account.

Resumable transfers keep their partial files in OPFS so progress survives reloads — which also meant a transfer that never completed left its parts on disk forever. On app start, sweepOrphanedTransfers() removes .part files whose lastModified is over a week old. Age is the only criterion on purpose: an in-flight or recently paused transfer always has a fresh mtime, so resume is untouched (verified by the resume spec).

Verified: full Playwright suite green (36 passed), including loopback resume with SHA-256 byte-identity.

🤖 Generated with Claude Code

Partial transfers persist on disk so resume works across reloads,
but parts from transfers that never finish stayed forever. On app
start, delete part-files untouched for 7 days — anything actively
written or recently paused has a fresh lastModified and survives.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Androtim
Androtim merged commit 5a0fda4 into main Jul 2, 2026
1 check passed
@Androtim
Androtim deleted the feat/opfs-orphan-sweep branch July 2, 2026 22:44
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.

1 participant