diff --git a/frontend/src/lib/itemStore.svelte.ts b/frontend/src/lib/itemStore.svelte.ts index db2c37f26c..b2cb1561bd 100644 --- a/frontend/src/lib/itemStore.svelte.ts +++ b/frontend/src/lib/itemStore.svelte.ts @@ -390,6 +390,9 @@ class Entry { await this.settleRows([this.key]) // The row is the item: while its delete has not landed, the item is still there. if (this.rowRefused(this.key)) { + // The syncer keeps a failed payload for its page-close flush; that delete would + // remove the item this reports as kept. + this.ports.dropPending(this.key) this.row = keptRow this.replaceValue(kept) this.reconcile() diff --git a/frontend/src/lib/itemStore.test.ts b/frontend/src/lib/itemStore.test.ts index 2c69e1c72a..166e146011 100644 --- a/frontend/src/lib/itemStore.test.ts +++ b/frontend/src/lib/itemStore.test.ts @@ -395,6 +395,7 @@ describe('item store: origins', () => { expect(item.value).toEqual(draft) expect(item.status).toBe('failed') expect(rows.hints.get('u/me/r')).toBe(true) + expect(rows.dropped).toContain('u/me/r') }) it('creates under a temporary path, then moves to the real one and clears any row there', async () => {