Commit 5d8bf4c
committed
Suggestions: Skip staleness prompt when applying a block-insert-after
The conflict check compares each attribute-set op's `before` against the
live block's current attribute. For an inserted block the overlay
baseline is `{}`, so every attribute-set op rides on `before: null`.
On the accepting client the inserted block already carries the typed
content, so the comparison reads as a divergence and the apply flow
opens a 'This block has changed' dialog before every Insert apply.
Inserted blocks have no pre-existing attributes to overwrite — the
attribute-set ops describe the new block's content, not concurrent
edits. Short-circuit `hasAttributeConflict` to false when the payload
carries a `block-insert-after` structural op, and add a regression
test.1 parent 203de58 commit 5d8bf4c
2 files changed
Lines changed: 41 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
268 | 278 | | |
269 | 279 | | |
270 | 280 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
298 | 329 | | |
299 | 330 | | |
300 | 331 | | |
| |||
0 commit comments