Today a block is saved as one unit. Every edit (fixing a typo, or changing the language of a code block) rewrites the whole block. If two people edit the same block at the same time, the last save wins and the other person's change is silently lost.
This is why I created this PR
This spike lets a block's settings (attributes like code language, image width, color) be saved one setting at a time, separately from its text. We reuse an operation we already have for document metadata (SetAttributes), now pointed at a single block. If the only thing you changed is a setting, we save just that setting, not the whole block. Each setting resolves on its own: the newest write wins, per setting.
What it fixes: two people changing different settings on the same block at the same time both keep their change. A settings change also survives a concurrent text edit that was made earlier.
What it doesn't fix yet: a text edit still rewrites every setting of its block at the moment it's saved. So if the text edit is the newer one, it can still undo someone's concurrent settings change. We reproduced that in the UI. Fixing it needs text edits that only touch the settings they actually changed.
Rollout risk: older daemons reject block-scoped SetAttributes, and when they do, the whole document fails to load, not just that change. So daemons must learn to read it first, and apps must only write it once every server they push to supports it.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime