Skip to content

Commit db563cd

Browse files
author
Carl
committed
Clarify Canvas restore exact-event retry semantics
Signed-off-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
1 parent 9789c0f commit db563cd

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎docs/plugin-architecture.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,14 @@ new signed revision through the existing Canvas save/outbox owner. Its precondit
304304
is the displayed head, never the historical revision or a silently substituted
305305
newer head. Clean editors adopt the confirmed result. Edited or stale recovered
306306
drafts keep their content and original base until explicit reload; browsing and
307-
cancelling never replace drafts. Failed/uncertain restores retain drafts and show
308-
the actual error without automatically retrying. Empty revisions can be restored;
309-
revisions exceeding the existing 24 KiB save limit remain previewable but cannot
310-
be restored here. No diff viewer or new delivery owner is introduced.
307+
cancelling never replace drafts. Restore inherits Save's delivery confirmation,
308+
which may automatically replay the exact signed event with its original
309+
`expected-revision`. It never creates a fresh event or substitutes a newer
310+
precondition to retry. If confirmation ultimately fails or remains uncertain,
311+
the dialog retains drafts and shows the error without starting another restore.
312+
Empty revisions can be restored; revisions exceeding the existing 24 KiB save
313+
limit remain previewable but cannot be restored here. No diff viewer or new
314+
delivery owner is introduced.
311315

312316
### Top-bar launchers and the companion slot
313317

‎src/bundled/channels/ChannelCanvasDialog.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ export function ChannelCanvasDialog({
106106
setError("");
107107
}
108108
} catch (reason) {
109-
// Even an error may follow a delivered write. Never adopt content or
110-
// rebase a draft on that uncertain outcome, and never retry automatically.
109+
// Save may replay the same signed event with its original precondition.
110+
// Even an error may follow a delivered write. Never adopt content, rebase
111+
// a draft, or start another restore on that uncertain outcome.
111112
try {
112113
const event = await canvas.read(channelId);
113114
if (generation === operation.current) setHead(event);

0 commit comments

Comments
 (0)