Improve detecting which items should be reconverted when using skip-level lists#20104
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4c5afd0. Configure here.
| .filter( ( [ key ] ) => attributeNames.includes( key ) ) | ||
| ), | ||
| listItemId: `list-item-skip-${ i }` | ||
| }; |
There was a problem hiding this comment.
Missing listIndent override in skip-level stack entries
Medium Severity
The synthetic modelAttributes for skip-level gap entries override listItemId to list-item-skip-${i} but do not override listIndent. When the fallback path is used (referenceItem is node at itemIndent), the listIndent retains itemIndent instead of i. The checkAttributes:list handler compares viewElement.id against getViewElementIdForListType(modelAttributes.listType, modelAttributes.listIndent), generating the wrong expected ID (e.g., list-numbered-2 instead of list-numbered-1). This causes a permanent false-positive mismatch, triggering unnecessary reconversion of skip-level items on every model change.
Reviewed by Cursor Bugbot for commit 4c5afd0. Configure here.


🚀 Summary
A brief summary of what this PR changes.
📌 Related issues
💡 Additional information
Optional: Notes on decisions, edge cases, or anything helpful for reviewers.
🧾 Checklists
Use the following checklists to ensure important areas were not overlooked.
This does not apply to feature-branch merges.
If an item is not relevant to this type of change, simply leave it unchecked.
Author checklist
Reviewer checklist
t()(if any).