Skip to content

Commit c4b8080

Browse files
icecrasher321claude
andcommitted
fix(realtime): refresh the error flag on a block upsert
`BATCH_ADD_BLOCKS` wrote `errorEnabled` on insert but left it out of the conflict clause, so re-adding an existing block id kept whatever the row already held while every sibling flag — enabled, advancedMode, triggerMode, retry, locked — was refreshed from `excluded`. The client's value was silently discarded and the old error-output state came back on the next load. Mine: the insert side gained the field when the column landed and the conflict set did not. The other two block writers delete before inserting, so no stale row survives them; this upsert was the only path that merged into one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1263662 commit c4b8080

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/realtime/src/database/operations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ async function handleBlocksOperationTx(
10111011
horizontalHandles: sql`excluded.horizontal_handles`,
10121012
advancedMode: sql`excluded.advanced_mode`,
10131013
triggerMode: sql`excluded.trigger_mode`,
1014+
errorEnabled: sql`excluded.error_enabled`,
10141015
retry: sql`excluded.retry`,
10151016
locked: sql`excluded.locked`,
10161017
height: sql`excluded.height`,

0 commit comments

Comments
 (0)