Frontmatter
| id | 8561 |
| title | Remove arbitrary delay in TreeList afterSetCurrentPageRecord |
| state | Closed |
| labels | airefactoringperformance |
| assignees | tobiu |
| createdAt | Jan 11, 2026, 11:45 PM |
| updatedAt | Jan 11, 2026, 11:56 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8561 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8398 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 11, 2026, 11:56 PM |
Remove arbitrary delay in TreeList afterSetCurrentPageRecord
tobiu added parent issue #8398 on Jan 11, 2026, 11:55 PM
tobiu assigned to @tobiu on Jan 11, 2026, 11:55 PM

tobiu
Jan 11, 2026, 11:56 PM
Input from Gemini 3 Pro:
✦ I have removed the arbitrary 20ms delay in
afterSetCurrentPageRecordas part of the refactoring in #8560.This change assumes that the selection model and VDOM update cycle will correctly handle the selection state without needing an artificial pause. If issues arise with selection not being applied visually, we may need to re-evaluate this or implement a more deterministic wait (like
waitForDomRectorpromiseUpdate).
tobiu closed this issue on Jan 11, 2026, 11:56 PM
In
apps/portal/view/shared/content/TreeList.mjs,afterSetCurrentPageRecorduses a hardcoded 20ms delay:async afterSetCurrentPageRecord(value, oldValue) { if (value) { await this.timeout(20); this.selectionModel.select(value) } }This delay seems arbitrary. If
value(the record) is available, selection should be possible immediately. If the list items need to be rendered first to reflect the selection visually, theSelectionModelshould handle the state update, and the List should reflect it in the next VDOM update.Task: Investigate why this delay exists and remove it if possible, or replace it with a deterministic wait (e.g.
promiseUpdateor waiting for store load if not ready).