Apps and extension: show and drop vault changes that can't be sent (#1005) #31

Open
backmeupplz wants to merge 37 commits from board/1005-d25258 into main
Owner

Ticket: https://agentboard.icefish-betta.ts.net/#1005

Merge order: this is stacked on PR #25 (#999), which adds Session::discard_changes and Session::unsendable. Merge #25 first, then run git merge origin/main --no-edit here, and the diff shrinks to this ticket. Until then, review it against board/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 call discard_changes.

  • client: each unsendable entry now also holds the index of its warning in problems. A UI ties the action to the warning by that index, not by its text, because vault names are member-controlled. discard_changes also 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.
  • ffi:
    • AccountInfo.problem_unsent runs parallel to problems and 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.
  • wasm:
    • sync returns {text, unsent} per problem.
    • New unsentChanges(vault) and discardChanges(vault).
    • The vault id travels with the problem, so the action still works after the browser suspends the background and the session is restored (the restored session has an empty unsendable).
  • Extension:
    • The background tags problems {text, key, unsent} and handles the new unsentChanges and discardChanges messages. It saves the device copy after a discard, so a restore can't bring the changes back.
    • In the popup, the warning's banner expands in place into the list, with Keep and Drop changes buttons.
  • Apple and Android:
    • The banner shows one problem at a time, so a warning with an action now comes first.
    • On Apple, a banner with an action stays until it's used or dismissed instead of fading after 8 seconds.
    • The confirm dialog is held at the root, so it survives the banner going away.
  • PARITY.md row updated.

Hidden vaults (unlisted by the server) are #1000's (PR #27) and are left out here. PR #29 (#1003) reshapes problems into Problem { text, leave } in the same places. This PR keeps Vec<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 both pending and problems. 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.
  • Client test: the warning index, and that the warning is removed on discard.
  • cargo clippy --all-targets -D warnings and cargo test pass. The extension crate is checked for wasm32-unknown-unknown.
  • Builds: PROFILE=dev apple/build-rust.sh plus a macOS xcodebuild build, and PROFILE=dev ABIS=x86_64 TASK=assembleDebug android/build.sh.
  • Not covered: nothing ran the UIs on a device or simulator, and the extension popup wasn't driven in a browser.

🤖 Generated with Claude Code

Ticket: https://agentboard.icefish-betta.ts.net/#1005 **Merge order:** this is stacked on PR #25 (#999), which adds `Session::discard_changes` and `Session::unsendable`. Merge #25 first, then run `git merge origin/main --no-edit` here, and the diff shrinks to this ticket. Until then, review it against `board/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 call `discard_changes`. - **client:** each `unsendable` entry now also holds the index of its warning in `problems`. A UI ties the action to the warning by that index, not by its text, because vault names are member-controlled. `discard_changes` also 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. - **ffi:** - `AccountInfo.problem_unsent` runs parallel to `problems` and 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. - **wasm:** - `sync` returns `{text, unsent}` per problem. - New `unsentChanges(vault)` and `discardChanges(vault)`. - The vault id travels with the problem, so the action still works after the browser suspends the background and the session is restored (the restored session has an empty `unsendable`). - **Extension:** - The background tags problems `{text, key, unsent}` and handles the new `unsentChanges` and `discardChanges` messages. It saves the device copy after a discard, so a restore can't bring the changes back. - In the popup, the warning's banner expands in place into the list, with **Keep** and **Drop changes** buttons. - **Apple and Android:** - The banner shows one problem at a time, so a warning with an action now comes first. - On Apple, a banner with an action stays until it's used or dismissed instead of fading after 8 seconds. - The confirm dialog is held at the root, so it survives the banner going away. - `PARITY.md` row updated. Hidden vaults (unlisted by the server) are #1000's (PR #27) and are left out here. PR #29 (#1003) reshapes `problems` into `Problem { text, leave }` in the same places. This PR keeps `Vec<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 both `pending` and `problems`. 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. - Client test: the warning index, and that the warning is removed on discard. - `cargo clippy --all-targets -D warnings` and `cargo test` pass. The extension crate is checked for `wasm32-unknown-unknown`. - Builds: `PROFILE=dev apple/build-rust.sh` plus a macOS `xcodebuild build`, and `PROFILE=dev ABIS=x86_64 TASK=assembleDebug android/build.sh`. - Not covered: nothing ran the UIs on a device or simulator, and the extension popup wasn't driven in a browser. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Apps and extension: show and drop vault changes that can't be sent (#1005)
Some checks failed
Apple / Apple (pull_request) Successful in 31s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
547c087f47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes: the dialog closes on lock, stale banners go, no drop offer for a writer
Some checks failed
Apple / Apple (pull_request) Successful in 36s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
bb2e28d9b9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lock during the preview call opens no dialog
All checks were successful
Apple / Apple (pull_request) Successful in 35s
CI / check (pull_request) Successful in 4m3s
CI / wasm (pull_request) Successful in 4m18s
Android / android (pull_request) Successful in 21m51s
2fdaaaffdc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
backmeupplz changed target branch from board/999-5d4440 to main 2026-11-28 06:12:49 +00:00
Merge remote-tracking branch 'origin/main' into HEAD
Some checks failed
Apple / Apple (pull_request) Successful in 37s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
b961cb2f1f
# Conflicts:
#	PARITY.md
#	cli/src/state.rs
#	client/src/lib.rs
#	client/src/tests.rs
A drop asks the server whether you can write again; Keep waits for the drop
Some checks failed
Apple / Apple (pull_request) Successful in 35s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
fea096927c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge origin/main (#1000: vaults no longer listed) into the drop-changes branch
Some checks failed
Apple / Apple (pull_request) Successful in 35s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
974725ab9f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The apps' drop checks with the server and handles vaults no longer shared
Some checks failed
Apple / Apple (pull_request) Successful in 37s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
7ea2e62158
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problems keep the client's order; a Review click survives a sync; no error over the lock screen
Some checks failed
Apple / Apple (pull_request) Successful in 19s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
bfa3814520
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The banner shows each sync problem in turn, so neither Review nor another warning is hidden
Some checks failed
Apple / Apple (pull_request) Successful in 30s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
2b885e93b1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Banner turns by count, so problems with the same text can't stick it
All checks were successful
Apple / Apple (pull_request) Successful in 20s
CI / check (pull_request) Successful in 4m2s
CI / wasm (pull_request) Successful in 6m13s
Android / android (pull_request) Successful in 20m31s
13b8cfbb12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge origin/main (#18: leaving vaults, quotas) into the drop-changes branch
All checks were successful
Apple / Apple (pull_request) Successful in 33s
CI / check (pull_request) Successful in 5m13s
CI / wasm (pull_request) Successful in 5m26s
Android / android (pull_request) Successful in 23m30s
01e49959e8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review closes when its vault's warning changes; no Review error over the lock screen
Some checks failed
Apple / Apple (pull_request) Successful in 30s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
1a86e950b8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A review opens only while its vault still has the warning
All checks were successful
Apple / Apple (pull_request) Successful in 38s
CI / check (pull_request) Successful in 6m14s
CI / wasm (pull_request) Successful in 6m33s
Android / android (pull_request) Successful in 27m24s
ea583bfb3f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refuse the drop when the fresh download makes you a writer; no popup status over the lock screen
Some checks failed
Apple / Apple (pull_request) Successful in 29s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
637dcddf0d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Popup: hold the drop's message back only on the lock screen; test keeps the warning
All checks were successful
Apple / Apple (pull_request) Successful in 30s
CI / check (pull_request) Successful in 7m50s
CI / wasm (pull_request) Successful in 6m45s
Android / android (pull_request) Successful in 33m9s
45d07cbc67
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apple: a Review banner goes when its vault's warning now reads differently
All checks were successful
Apple / Apple (pull_request) Successful in 32s
CI / check (pull_request) Successful in 6m0s
CI / wasm (pull_request) Successful in 7m3s
Android / android (pull_request) Successful in 25m41s
a69ef2a04d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge origin/main (#998) into board/1005-d25258
Some checks failed
Apple / Apple (pull_request) Successful in 30s
CI / check (pull_request) Successful in 6m48s
Android / android (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
06de3dfe31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Popup: clear the status line on the lock screen; full-sentence 'vault changed meanwhile' refusal
All checks were successful
Apple / Apple (pull_request) Successful in 33s
CI / wasm (pull_request) Successful in 4m21s
CI / check (pull_request) Successful in 4m53s
Android / android (pull_request) Successful in 24m40s
ea40e62af1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge origin/main (#1003, leave a vault) into board/1005-d25258
Some checks failed
Apple / Apple (pull_request) Successful in 38s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
bc09041580
A sync problem now carries the vault whose unsent changes it is about
(Problem::unsent) instead of an index into problems: main inserts a
storage warning ahead of a vault's other problems, which shifted the
indices. Apps and popup offer Leave… and Review… side by side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into w1005-a0a587
All checks were successful
Apple / Apple (pull_request) Successful in 41s
release / build (macos-latest, true, aarch64-apple-darwin) (pull_request) Successful in 3m58s
release / build (macos-latest, true, x86_64-apple-darwin) (pull_request) Successful in 4m9s
CI / check (pull_request) Successful in 7m57s
CI / wasm (pull_request) Successful in 6m34s
release / build (ubuntu-24.04, false, x86_64-pc-windows-gnu) (pull_request) Successful in 8m56s
release / build (ubuntu-24.04, true, aarch64-unknown-linux-musl) (pull_request) Successful in 8m35s
release / build (ubuntu-24.04, true, x86_64-unknown-linux-musl) (pull_request) Successful in 7m59s
release / release (pull_request) Has been skipped
release / homebrew (pull_request) Has been skipped
release / docker (pull_request) Has been skipped
Android / android (pull_request) Successful in 23m22s
b3cedbf23f
Merge origin/main (#1002: a removed creator stops paying) into #1005
Some checks are pending
Android / android (pull_request) Waiting to run
CI / check (pull_request) Waiting to run
CI / wasm (pull_request) Waiting to run
Apple / Apple (pull_request) Successful in 43s
d38a648adb
The Kept test no longer gets a storage warning there, so the check that the
storage warning goes ahead of the unsent one moves to the hidden own vault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some checks are pending
Android / android (pull_request) Waiting to run
CI / check (pull_request) Waiting to run
CI / wasm (pull_request) Waiting to run
Apple / Apple (pull_request) Successful in 43s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'board/1005-d25258:board/1005-d25258'
git switch 'board/1005-d25258'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
backmeupplz/plaintext!31
No description provided.