Apps and extension: show and drop vault changes that can't be sent (#1005) #31
Loading…
Reference in a new issue
No description provided.
Delete branch "board/1005-d25258"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ticket: https://agentboard.icefish-betta.ts.net/#1005
Merge order: this is stacked on PR #25 (#999), which adds
Session::discard_changesandSession::unsendable. Merge #25 first, then rungit merge origin/main --no-edithere, and the diff shrinks to this ticket. Until then, review it againstboard/999-5d4440.A device can have unsent changes to a vault where you're now only a reader. Every sync then warns that "this device's changes to it can't be sent". Until now only the CLI could drop them (
plaintext vault reset). The iPhone, Mac and Android apps and the browser extension now put a Review… action on that warning. It lists what would be dropped: the titles of added or edited items (the first 8, then "and N more"), how many items were deleted, and whether the vault's name changed. Only after you confirm does it calldiscard_changes.unsendableentry now also holds the index of its warning inproblems. A UI ties the action to the warning by that index, not by its text, because vault names are member-controlled.discard_changesalso removes that warning and shifts the other indices, so an app doesn't keep showing it until the next sync. It does this even when nothing was left to drop.AccountInfo.problem_unsentruns parallel toproblemsand gives, for each problem, the vault its unsent changes belong to.unsent_changes(account, vault)returns the preview: name, changed titles, deleted count, renamed.discard_changes(account, vault)returns how many changes were dropped and persists the result.syncreturns{text, unsent}per problem.unsentChanges(vault)anddiscardChanges(vault).unsendable).{text, key, unsent}and handles the newunsentChangesanddiscardChangesmessages. It saves the device copy after a discard, so a restore can't bring the changes back.PARITY.mdrow updated.Hidden vaults (unlisted by the server) are #1000's (PR #27) and are left out here. PR #29 (#1003) reshapes
problemsintoProblem { text, leave }in the same places. This PR keepsVec<String>and adds a parallel field, so whichever PR merges second has a mechanical merge.Tests
ffi::tests::unsendable_changes: two vaults are edited offline, then the user is demoted on both and syncs. The test checks the preview, then drops the first warning's vault and checks that the other warning still maps to its own vault. Dropping the second clears bothpendingandproblems. It survives a restart.wasm::extension::tests::changes_a_reader_cant_send_are_shown_and_dropped: the action goes through a session restored between the sync and the discard.cargo clippy --all-targets -D warningsandcargo testpass. The extension crate is checked forwasm32-unknown-unknown.PROFILE=dev apple/build-rust.shplus a macOSxcodebuild build, andPROFILE=dev ABIS=x86_64 TASK=assembleDebug android/build.sh.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.