Skip to content

Conversation

@vivaxy
Copy link
Owner

@vivaxy vivaxy commented Feb 1, 2026

  • Add SetAttrItem class that can set:
    • deleted flag on any item
    • attrs on OpeningTagItem and NodeItem
    • targetId on OpeningTagItem and ClosingTagItem
  • Replace DeleteItem with SetAttrItem in replaceItemsInner for deletions
  • Add findSetAttrItemsByTargetId to Document for pending attribute lookup
  • Apply pending SetAttrItems when target item is integrated
  • Update forwardToDeletionEnd to skip SetAttrItems
  • Add comprehensive tests for SetAttrItem functionality

https://claude.ai/code/session_01EPwA8AWwKymaWyzVTsks8p

…getIds

- Add SetAttrItem class that can set:
  - deleted flag on any item
  - attrs on OpeningTagItem and NodeItem
  - targetId on OpeningTagItem and ClosingTagItem
- Replace DeleteItem with SetAttrItem in replaceItemsInner for deletions
- Add findSetAttrItemsByTargetId to Document for pending attribute lookup
- Apply pending SetAttrItems when target item is integrated
- Update forwardToDeletionEnd to skip SetAttrItems
- Add comprehensive tests for SetAttrItem functionality

https://claude.ai/code/session_01EPwA8AWwKymaWyzVTsks8p
…changes

- Remove DeleteItem class entirely from item.ts
- Remove DeleteItemJSON interface and 'delete' type from types.ts
- Remove findDeleteItemByTargetId from Document
- Update Item.putIntoDocument to only use SetAttrItem for pending changes
- SetAttrItem with setDeleted: true now handles all deletion operations
- Update tests to use SetAttrItem instead of DeleteItem
- Simplifies the CRDT by having a single item type for attribute changes

https://claude.ai/code/session_01EPwA8AWwKymaWyzVTsks8p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants