fix: drop a refused discard's parked delete so a page close keeps it

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ViTUkt4czrvZdxdWwxqRAQ
This commit is contained in:
Diego Imbert
2026-09-11 19:24:17 +02:00
co-authored by Claude Opus 5
parent 763e853980
commit 185d0fcd37
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -390,6 +390,9 @@ class Entry<V> {
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()
+1
View File
@@ -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 () => {