Repository navigation
feat(upload): keep uploads running in the background with a progress ring - #15
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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