fix(ui): disable public upload option until backend is wired - #12
Merged
Conversation
The backend has no public upload path implemented — data_map_store is never called, and the "visibility" flag passed from the dialog is silently ignored in stores/files.ts. Selecting "public" produced the same private upload while the returned address is a local SHA256 of the data map JSON (not a network-retrievable chunk address), so any shared address would be unresolvable by recipients. Grey out the Public button and mark it "Coming soon" until the backend wiring (data_map_store + visibility threading through start_upload / finalize_upload) lands on its own branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
Nic-dorman
added a commit
that referenced
this pull request
Apr 15, 2026
Notable changes since v0.5.0: - Disable public upload option in the UI until external-signer backend support lands (#12) - Bump evmlib from 0.4 to 0.8 (#11) - Add Vitest test suite + PR CI checks (typecheck, vitest, cargo fmt/clippy) (#8, #9) - Parallel CI builds with pre-built sidecar binaries (#8) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jacderida
pushed a commit
to jacderida/ant-ui
that referenced
this pull request
Apr 27, 2026
Implements the GUI side of merkle batch payments (ant-client PR WithAutonomi#12). Files with 64+ chunks now auto-select merkle payment (single tx) instead of wave-batch (per-batch txs), reducing gas costs for large uploads. Backend: match on ExternalPaymentInfo enum, serialize merkle params, add confirm_upload_merkle command. Frontend: payForMerkleTree() via unified PaymentVault contract, branch upload flow on payment mode. Updates contract ABI and address to evmlib 0.8.0 unified vault. 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 blocks the Public upload option in the ant-gui UI. The Public button in the upload-confirm dialog becomes disabled and labelled "Coming soon". Users can still upload files — every upload is now unambiguously private, which is exactly what Public was doing under the hood anyway.
Why block it
Before this PR, the dialog offered a Public/Private toggle that had no backend support:
stores/files.ts:235-240acceptsoptions.visibilityinstartRealUploadbut the parameter is never referenced in the function body.src-tauri/src/autonomi_ops.rsnever callsclient.data_map_store(), so the serialized DataMap is never published as a public chunk on the Autonomi network.Sha256::digest(data_map_json)computed locally (autonomi_ops.rs:305,:358). That's a fingerprint of the local data map JSON, not a retrievable network address. Sharing that address would give the recipient nothing.Picking Public today gives the user a false sense of having published the file. The data never actually leaks — the data map stays on the uploader's disk — but the UX promise is broken, and a toggle that silently does nothing is worse than no toggle at all.
Why not implement public here
Public uploads need an external-signer-compatible way to store the serialized DataMap as an additional paid chunk. That does not exist in
WithAutonomi/ant-clienttoday:client.data_map_storeinternally callspay_for_storage, which hard-requires a wallet. ant-gui has no wallet on the Rust side — all payments go via WalletConnect / direct-wallet on the frontend (external-signer flow).store_paid_chunks,chunk_put_to_close_group,merkle_upload_chunks) ispub(crate), so external callers cannot use it.An upstream PR is in flight on
WithAutonomi/ant-clientto add aVisibilityargument tofile_prepare_upload, bundling the serialized DataMap into the existing payment batch as one additional chunk. Once that lands and we bump the git dep, a follow-up PR on this repo will re-enable the Public button and thread the visibility flag throughstart_upload/confirm_upload.Changes
components/files/UploadConfirmDialog.vue— Public button becomes a real<button disabled>, with reduced opacity,cursor-not-allowed, a "Coming soon" pill, and explanatory subtext. Private remains selectable and is the only emitted value; thevisibilityref resets to'private'on every dialog open.Test plan
npx nuxi typecheckpassesnpm run test:run— 19/19 pass (no existing tests cover this component)