Skip to content

feat(ffi): upload progress on wallet path + distinct timeout/disk-space errors #214

Open
Nic-dorman wants to merge 1 commit into
mainfrom
feat/ffi-error-handling-progress-0.0.8
Open

feat(ffi): upload progress on wallet path + distinct timeout/disk-space errors #214
Nic-dorman wants to merge 1 commit into
mainfrom
feat/ffi-error-handling-progress-0.0.8

Conversation

@Nic-dorman

Copy link
Copy Markdown
Collaborator

FFI-only mobile error-handling + progress improvements for the next AntFfi 0.0.8 release. No ant-core bump — still ant-core 0.3.1 (ant-cli-v0.2.11), so nothing on the payment/security surface moves.

Changes

Ticket Change
V2-597 Add fileUploadPublicWithProgress / fileUploadPrivateWithProgress — the wallet-backed (built-in payment) counterparts of fileUploadPublic/Private. They bridge ant-core's file_upload_with_progress UploadEvents to the existing ProgressListener (encrypting/quoting/storing phases). The external-signer path already had progress via prepare/finalize_*_with_progress; this closes the gap on the wallet path.
V2-599 fileDownloadPublic no longer flattens every ant-core error into NetworkError. It now propagates through the From<ant_core::data::Error> mapping, so a timeout / out-of-disk failure surfaces as its own variant instead of a misleading "network error".
V2-600 Map ant-core Error::InsufficientDiskSpace → new ClientError::InsufficientDiskSpace (previously swallowed by the catch-all InternalError).
V2-601 (timeout half) Error::Timeout now maps to a dedicated ClientError::Timeout variant instead of being folded into NetworkError with a "timeout:" prefix.

Out of scope (need upstream ant-client work)

  • V2-601 insufficient-funds half — ant-core wraps low balance in a generic Payment(String) with no distinct variant. Needs a core InsufficientFunds variant; V2-601 stays open for it.
  • V2-598 cancellation — no CancellationToken on core's data upload/download path (only implicit receiver-drop). Rescoped to a download-only investigation.

Verification

  • cargo fmt --all + cargo clippy --all-targets --all-features -D warnings clean
  • cargo test --all — 8 passed
  • Regenerated Swift + Kotlin bindings and confirmed both expose fileUploadPublicWithProgress/fileUploadPrivateWithProgress and the Timeout / InsufficientDiskSpace error variants.

Additive uniffi enum change (new variants), so bindings and Rust stay in lockstep per-release; consumers pick it up on the 0.0.8 rebuild.

🤖 Generated with Claude Code

…ce errors

Mobile error-handling + progress improvements for the next AntFfi release
(no ant-core bump — still 0.3.1 / ant-cli-v0.2.11).

- V2-597: add file_upload_public_with_progress / file_upload_private_with_progress,
  the wallet-backed (built-in payment) counterparts of file_upload_public/private.
  They bridge ant-core's file_upload_with_progress UploadEvents to the existing
  ProgressListener (encrypting/quoting/storing phases). The external-signer path
  already had progress via prepare/finalize_*_with_progress.
- V2-599: file_download_public no longer flattens every ant-core error into
  NetworkError. It now propagates via the From<ant_core::data::Error> mapping,
  so a timeout / out-of-disk-space failure surfaces as its own ClientError.
- V2-600: map ant-core Error::InsufficientDiskSpace to a new
  ClientError::InsufficientDiskSpace variant (was a catch-all InternalError).
- V2-601 (timeout half): Error::Timeout now maps to a dedicated
  ClientError::Timeout variant instead of being folded into NetworkError with a
  "timeout:" prefix. The insufficient-funds half needs an upstream ant-client
  variant (core wraps it in generic Payment) and stays open on V2-601.

fmt + clippy -D + 8 tests green; Swift and Kotlin bindings regenerated and
verified to expose the new methods and error variants.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Nic-dorman Nic-dorman changed the title feat(ffi): upload progress on wallet path + distinct timeout/disk-space errors (V2-597/599/600/601a) feat(ffi): upload progress on wallet path + distinct timeout/disk-space errors Jul 14, 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.

1 participant