Skip to content

fix: add cancel button during file upload#188

Closed
dobby-coder[bot] wants to merge 1 commit into
mainfrom
fix/issue-182-cancel-on-upload
Closed

fix: add cancel button during file upload#188
dobby-coder[bot] wants to merge 1 commit into
mainfrom
fix/issue-182-cancel-on-upload

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Closes #182.

Summary

  • The encryption/upload progress UI in SendButton.svelte previously rendered only a spinner and progress bar during EncryptionState.Encrypting, leaving users no in-app way to abort an in-flight upload.
  • Adds a Cancel button to the upload info box that calls AbortController.abort() on the existing signal already wired into pg.encrypt({ ..., signal }).
  • Sets selfAborted = true before aborting so the existing catch path in startEncryption() resets state to FileSelection (instead of routing to the generic Error panel).
  • Replaces the now-spent AbortController with a fresh one so a subsequent send attempt is also cancellable.
  • Reuses the existing filesharing.cancel i18n key (already used by EncryptionProgress.svelte) — no translations need updating.

Test plan

  • Start a large upload, click Cancel → upload aborts, UI returns to file selection with files preserved.
  • Start another upload after cancelling → new attempt can also be cancelled.
  • Let a small upload complete normally → Done state still reached.
  • Server error during upload → still routes to Error panel (selfAborted is false).

Reviewer quickstart

`git fetch origin && git checkout fix/issue-182-cancel-on-upload && npm ci --legacy-peer-deps && npm run dev`

🤖 Generated with Claude Code

Closes #182. The encryption/upload progress UI rendered by SendButton
exposed only a spinner and progress bar; users had no in-app way to
abort a long upload. Adds a Cancel button to the upload-info-box that
calls AbortController.abort() on the existing encryption/upload signal,
flips selfAborted so the catch path resets to FileSelection, and
provisions a fresh AbortController for the next attempt.
@dobby-coder dobby-coder Bot requested a review from rubenhensen May 9, 2026 13:38
@dobby-coder dobby-coder Bot marked this pull request as ready for review May 9, 2026 13:40
@dobby-coder

dobby-coder Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #202 (consolidation per encryption4all/dobby#53). Closing to keep the queue tidy.

@dobby-coder dobby-coder Bot closed this May 9, 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.

There is no cancel button on upload

0 participants