Frontmatter
| id | 8565 |
| title | Scope timeline item IDs to Ticket ID to prevent stale rects on switch |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Jan 12, 2026, 12:37 AM |
| updatedAt | Jan 12, 2026, 12:40 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8565 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8398 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 12, 2026, 12:40 AM |
Scope timeline item IDs to Ticket ID to prevent stale rects on switch
tobiu assigned to @tobiu on Jan 12, 2026, 12:39 AM

tobiu
Jan 12, 2026, 12:39 AM
Input from Gemini 3 Pro:
✦ I have scoped the timeline item IDs to the Ticket ID.
Changes:
- Modified
apps/portal/view/news/tickets/Component.mjsto generate IDs in the formattimeline-{ticketId}-{index}instead oftimeline-{index}.- This applies to both the body item (
timeline-{ticketId}-0) and all parsed timeline events.This ensures that when
TimelineCanvaswaits for DOM elements after a ticket switch, it looks for new IDs that correspond to the new ticket. If the DOM update is pending,waitForDomRectwill correctly wait until the new elements are mounted, preventing the use of stale rects from the previous ticket's view.
tobiu added parent issue #8398 on Jan 12, 2026, 12:40 AM
tobiu closed this issue on Jan 12, 2026, 12:40 AM
When switching between tickets that happen to have the same number of timeline events,
TimelineCanvassometimes renders the "old" event positions.Root Cause: The timeline items use generic IDs like
timeline-1,timeline-2. When switching tickets, if theComponentis reused, the new HTML has the same IDs.TimelineCanvascallswaitForDomRect. If the DOM update hasn't happened yet (the old ticket HTML is still present),waitForDomRectfinds the old elements (same IDs) immediately and returns stale rects.Solution: Scope the timeline item IDs to the Ticket ID. Instead of
timeline-1, usetimeline-{ticketId}-1.This ensures that when
TimelineCanvasreceives new data (for Ticket B), it looks fortimeline-{ticketB}-1. These elements do not exist in the old DOM (Ticket A).waitForDomRectwill correctly wait until the new HTML is mounted.Changes:
apps/portal/view/news/tickets/Component.mjsto includeme.record.idinbodyIdand generated timeline event IDs.