feat: wire public-visibility uploads through the external-signer flow - #32
Merged
Merged
Conversation
5 tasks
Nic-dorman
force-pushed
the
feat/public-uploads-external-signer
branch
from
April 30, 2026 09:57
5ebf3a4 to
5d5fd83
Compare
Nic-dorman
marked this pull request as ready for review
April 30, 2026 09:59
Nic-dorman
force-pushed
the
feat/public-uploads-external-signer
branch
from
April 30, 2026 10:52
5d5fd83 to
f70a0b0
Compare
Threads a visibility flag through start_upload -> file_prepare_upload_with_visibility (ant-core PR #39), carries data_map_address out of finalize_upload and finalize_upload_merkle, persists it in upload_history.json, and re-enables the previously disabled "Public" button in the upload dialog. Public uploads now yield a single shareable on-network chunk address that appears in the uploads table with a "Public" badge; clicking copies it. The dialog re-quotes when the user toggles visibility because the payment batch differs (public adds one chunk for the DataMap itself). Requires bumping the ant-core git dep to a commit containing WithAutonomi/ant-client#39. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman
force-pushed
the
feat/public-uploads-external-signer
branch
from
April 30, 2026 11:35
f70a0b0 to
bd39024
Compare
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
Re-enables the Public visibility option in the upload dialog (currently disabled with "Coming soon") by threading a
visibilityflag through the external-signer flow. Public uploads yield a single shareable on-network chunk address (the published DataMap); thepublic_addressis surfaced onUploadResultso the UI can show / copy it.data_map_storeafterfinalize_upload? That path hard-requiresrequire_wallet()?; ant-gui has no Rust-side wallet on the WalletConnect path — all signing goes via the frontend.store_paid_chunksand friends arepub(crate). Upstream'sfile_prepare_upload_with_visibilitybundles the DataMap chunk into the existing one-signature payment batch, which is what lets ant-gui thread avisibilityflag through its existing code path.Changes
Backend (
src-tauri)autonomi_ops.rsant_core::data::Visibility.StartUploadRequestgets an optionalvisibility: Option<String>(serde default →Private).start_uploadcallsclient.file_prepare_upload_with_visibility(&path, visibility).confirm_uploadandconfirm_upload_merkleextractresult.data_map_addressintoUploadResult.public_address(hex-encoded,0x…, orNonefor private uploads).wallet_upload(direct-key path) also populatesUploadResult.public_addressdefensively fromresult.data_map_address. Today this is alwaysNonebecause direct-key mode doesn't thread visibility yet — wiring it throughwallet_uploadis a small follow-up if you want devnet/direct-key Public uploads too.config.rs—UploadHistoryEntry.public_address: Option<String>persisted toupload_history.json.Frontend
stores/files.tsgetUploadQuote(path, visibility = 'private')accepts visibility and forwards it tostart_upload. Docstring explains the prepared-batch / visibility-pinning constraint.FileEntry.visibilityandUploadHistoryEntry.public_addresspropagated through history load/save.components/files/UploadConfirmDialog.vuevisibility-changeemit fires on toggle so the parent can re-quote (public batches cost one extra chunk).pages/files.vueonVisibilityChange(visibility)updates each selected entry'svisibilityin the store. The store-driven scheduler / Approve handler already pass visibility through, so the per-entry state stays synced when the user toggles in the dialog.public_address; clicking copies the address.Test plan
cargo check --all-targetsclean againstant-core-v0.2.2cargo clippy --all-targets -- -D warningscleancargo fmt --checkcleanvitestis hitting a known npm optional-deps flake unrelated to this PR.download_publicfetches the DataMap off-network and decrypts correctly.Rebase notes
This branch was rebased onto post-bump main (which now includes the live-progress work from #65 + the ant-core 0.2.2 dep bump) and lost a couple of segments that were superseded:
pendingUploadFiles,pendingQuotes,quotedVisibility,startQuoting, thewatch(autonomiConnected)re-quote trigger) was dropped in favour of main's store-driven scheduler.effectivePaymentModein the dialog now uses main's per-entry estimate; theAVG_CHUNK_SIZE/MERKLE_THRESHOLDheuristic from this branch was removed.fix(nodes): …commits that were sitting on this branch locally were dropped during rebase — they're already on main via fix(nodes): honour storage dir setting + show real storage usage #34.