feat: network connection UX, download-by-datamap, and connect/upload simplification - #22
Merged
Merged
Conversation
…timeouts Simplified listener setup to prevent race conditions and unified timeout handling. Removed unnecessary timeouts for long-running backend operations, ensuring reliability on slow networks or large uploads. Delegated shared logic to `getUploadQuote` for consistency.
Streamlined connection status handling by removing per-attempt tracking and retries. Eliminated redundant timeouts, aligning behavior with `ant-cli` for consistency. Updated frontend logic to reflect the simplified state transitions and adjusted backend connection loop accordingly.
…ction detection Adjusted `waitForTransactionReceipt` in payment processing to use a 2s polling interval, minimizing the chance of `TransactionReceiptNotFoundError` by better aligning with Arbitrum's block time.
Added `waitForConnection` logic to ensure network connectivity before initiating downloads. Updated `handleDownload` to retry connection and handle failures gracefully, improving reliability in offline scenarios.
Implemented connection state indicators (connecting, connected, failed) in the header with retry logic for failed connections. Integrated `connectionStore` to manage network status display.
Introduced a new dialog and workflow for users to download files using `.datamap` files directly. Updated file store logic to handle datamap paths, lazy-load JSON from disk, and support re-downloads of known datamaps. Integrated backend methods to persist, read, and process datamap files securely while ensuring reliable download initiation.
Install the `connection-status` listener before fetching the initial status so the Idle → Connecting transition can't be lost to a race, and treat `idle` the same as `connecting` in `isConnecting` so the header spinner shows from cold start until a real state arrives. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Downloads are now a distinct in-memory table that starts fresh each session, so re-downloading a file no longer mutates its upload-history row. Each table has its own sort state and clear control. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The download-by-datamap flow now mirrors download-by-address: after picking a previous upload or browsing for a .datamap file, a small "Save as" dialog lets the user edit the filename before the transfer starts. Default is the upload's original name for list picks, and the datamap's basename (minus .datamap) for browsed files. Also drops the redundant Source column from the downloads table — the "Saved to" column already conveys where the bytes landed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Splitting uploads/downloads into separate tables dropped the implicit address→datamap lookup, so pasting a known address created an empty download row and failed with "No data map available". Now startDownload reuses a matching upload's datamap when found, and startRealDownload falls back to a new download_public command that fetches the DataMap chunk from the network by address via ant-core's data_map_fetch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Introduced a backend command to determine the OS-specific default downloads directory and integrated it into the settings store. Updated file handling to use the default directory as a fallback if no custom download directory is set.
…launch Backfill the platform's default downloads directory into the user's config when none is set, so it's visible in settings and used by downloads without a runtime fallback. Old configs missing the field migrate automatically on next load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nect-and-upload # Conflicts: # src-tauri/src/autonomi_ops.rs
This was referenced Apr 16, 2026
jacderida
pushed a commit
to jacderida/ant-ui
that referenced
this pull request
Apr 27, 2026
- Add get_dir_size Tauri command for recursive directory size calculation
- Add nodeDetail API method (GET /api/v1/nodes/{id}) from ant-client PR WithAutonomi#22
- Enrich nodes with data_dir and storage_bytes on 30s interval
- Fix storage display to show "0 B" for empty dirs instead of "-"
- Replace payment mode card selector with compact text label
Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
This PR bundles several related connection, upload, and download improvements:
Connection
autonomi_ops.rs, align withant-clibehavior.connecting/connected/failed) with retry-on-failure, backed by a newconnectionStore.connection-statuslistener before fetching initial status so theIdle → Connectingtransition can't be lost to a race, and treatidlelikeconnectingso the header spinner shows from cold start.Uploads
stores/files.ts: unify listener setup to prevent race conditions, remove redundant timeouts on long-running backend ops, and delegate shared logic togetUploadQuote.Downloads
.datamapfiles; file store lazy-loads JSON from disk and supports re-downloading known datamaps.Sourcecolumn from the downloads table.Payment
waitForTransactionReceiptpolling interval to 2s to better match Arbitrum block time and avoid spuriousTransactionReceiptNotFoundError.Test plan
.datamapfile, confirm download starts and completes; re-download a known datamap.🤖 Generated with Claude Code