Skip to content

feat(upload): keep uploads running in the background with a progress ring - #15

Merged
mlapaglia merged 1 commit into
mainfrom
feat/012-background-uploads
Oct 20, 2026
Merged

mlapaglia merged 1 commit into
mainfrom
feat/012-background-uploads

Conversation

@mlapaglia

Copy link
Copy Markdown
Collaborator

Uploads keep going while the user is in other apps, and a progress ring in the title bar shows them.

The ring sits in every page's toolbar while files are uploading and fills with the current run's progress by bytes; it shows a check for a few seconds after a clean run and a warning while failed files remain. Tapping it opens the upload sheet, which no longer opens by itself, and it replaces the count badge on the + button.

The queue and uploader stay in TypeScript; a small native UploadKeepAlive plugin holds the app up while a run lasts. On Android it runs a foreground service of type dataSync with a quiet "Uploading N of M" notification and progress bar, which keeps the WebView's queue running in the background; the notification permission is asked when the first upload starts, and refusing only hides the notification. On iOS it asks for background time, about 30 seconds; a file cut off when it expires is retried automatically when the user returns. Capacitor keeps the WebView's JavaScript running in the background on Android, which is why no second uploader is needed.

Every queued file now stays in the pending list until Lychee accepted it, with a cleanup kind: taken photos are deleted, iOS keeps a copy of picked files in Library/pending and deletes it afterwards, and Android keeps persistable read access to picked items and releases it afterwards. Closing the app mid-upload loses nothing; unfinished files continue on the next start. A picked file that can't upload can be removed from the sheet.

No new dependency. New Android permissions: FOREGROUND_SERVICE, FOREGROUND_SERVICE_DATA_SYNC and POST_NOTIFICATIONS; the Play Console declaration is noted in the release runbook. 707 Vitest tests. The owner checked it on devices.

Spec impact: adds feature 012 spec, plan, tasks, open questions Q-012-01 and Q-012-02 and ADR-012-01, amends features 005 and 011, and updates the knowledge map, roadmap and release runbook.

🤖 Generated with Claude Code

…ring

A progress ring in every toolbar shows the current upload run and opens the upload sheet. While a run lasts, a keep-alive holds the app up: an Android foreground service with a progress notification, iOS background time with retry on return. Every queued file stays pending until Lychee accepted it, with persistable access on Android and app copies on iOS, so closing the app loses nothing.

Spec impact: adds feature 012 spec, plan, tasks, open questions Q-012-01 and Q-012-02 and ADR-012-01, amends features 005 and 011, and updates the knowledge map, roadmap and release runbook

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mlapaglia
mlapaglia merged commit 4e83464 into main Oct 20, 2026
4 checks passed
@mlapaglia
mlapaglia deleted the feat/012-background-uploads branch October 20, 2026 19:05
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