Stop retrying changes for a strategy the server no longer has (#189)

A strategy deleted on the server (by another device, or by this one while
edits were still queued) left its outbox retrying forever: every applyBatch
failed with NOT_FOUND, and the account-wide "Sync needs attention" held the
chip of whatever healthy strategy the user was editing.

applyBatch raises NOT_FOUND only for the strategy itself (a missing page or
element is a per-op result; pinned by a Convex contract test), and a
strategy's shell query confirms it is gone. On a NOT_FOUND the client asks;
only a confirmation counts, so offline or auth trouble keeps the ordinary
retry. A confirmed deletion settles the strategy's outbox:

- If any change carries something the user authored (adds and patches),
  the records stay on this device marked "strategy was deleted", are never
  retried, and the library's outbox card offers Discard. The user is told;
  nothing is dropped in silence.
- If every change only removes or reorders things in the deleted strategy,
  there is nothing to keep: they are dropped with a logged warning.

Deleted strategies sit apart from live work in the account summary, so they
no longer count as work, syncing, or attention for other strategies. The
media queue confirms the same way and drops a deleted strategy's image jobs
(the image came from the user's own file; the change that placed it is in
the strategy outbox). Deleting a strategy on this device now discards its
unsent edits and image jobs.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dd5141c246Dara Adedeji committed on 9/25/2026, 5:29:49 PM· committed by GitHubparent8c27add
12 files changedLine totals unavailable