From 4df59fbc79cd1b509472b2e521b59d14014ea60d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 15 Sep 2026 17:41:04 +0200 Subject: [PATCH] docs: condense the patch rollback invariant to four lines Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/lib/itemStore.svelte.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/itemStore.svelte.ts b/frontend/src/lib/itemStore.svelte.ts index 7e96a68282..4c3c0a7d99 100644 --- a/frontend/src/lib/itemStore.svelte.ts +++ b/frontend/src/lib/itemStore.svelte.ts @@ -716,12 +716,10 @@ class Entry { this.serverDeployed = { ...this.serverDeployed, ...sent } as V } release() - // The value is the user's copy, so it is given back by hand, field by field, to the - // baseline as it stands now — the server's value or a later patch's, never this one's. - // Only a field still carrying what this patch put there, so an edit made meanwhile to - // any other field is left alone. And none of them once an outside write has landed: - // that wrote the value wholesale and is newer than this patch, and a field of it - // happening to match what this patch sent is not this patch's to take back. + // The value is the user's copy, given back by hand: a field still carrying what this + // patch put there goes to the baseline as it stands now, so an edit made meanwhile to + // another field stays. None of them once an outside write has landed — that wrote the + // value whole and is newer, and a field of it matching is not this patch's to reclaim. if (failed) { const base = (onTemplate ? this.template : this.deployed) as | Record