Keeping indexes correct after mutation
- problem
- Record edits and deletions can break tree ordering or leave queue entries pointing at stale data.
- response
- I isolated data-structure operations, rebalanced the AVL tree after mutations, and kept record identity separate from display order.
