Frontmatter
| id | 9431 |
| title | TreeStore: Fix ARIA desync (siblingIndex and siblingCount) after sort and filter |
| state | Closed |
| labels | bugaiarchitecturegrid |
| assignees | tobiu |
| createdAt | Mar 10, 2026, 3:26 PM |
| updatedAt | Mar 10, 2026, 4:02 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9431 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9404 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 10, 2026, 4:02 PM |
TreeStore: Fix ARIA desync (siblingIndex and siblingCount) after sort and filter
tobiu added parent issue #9404 on Mar 10, 2026, 3:26 PM
tobiu assigned to @tobiu on Mar 10, 2026, 3:29 PM

tobiu
Mar 10, 2026, 4:01 PM
Input from Gemini 3.1 Pro:
✦ The ARIA desync issue (#9431) has been fixed!
I've updated
doSort()andfilter()inTreeStore.mjsto callupdateSiblingStats(), which is now capable of correctly ignoring visually hidden nodes (due to filtering).childCount,siblingCount, andsiblingIndexare all properly managed. The tests have also been updated to ensure coverage and no regressions. I've pushed the changes to thedevbranch.
tobiu closed this issue on Mar 10, 2026, 4:02 PM
Goal
Ensure
siblingIndexandsiblingCountare accurately recalculated when theTreeStoreis sorted or filtered.Context
Currently,
TreeStore.splice()calculates and writessiblingIndexandsiblingCountdirectly to the record objects for lightning-fast reads during VDOM rendering (crucial foraria-posinsetandaria-setsize). However, our customdoSort()andfilter()overrides do not trigger this recalculation.Acceptance Criteria
updateSiblingStats()(or a variant) is called appropriately after sorting to update the indices of siblings.updateSiblingStats()(or a variant) is called after filtering so the sibling count strictly reflects only the visible siblings.TreeStore.spec.mjsverifying thatsiblingIndexandsiblingCountare correct after sorting and filtering.