Skip to content

Apply architecture recommendations #7–12 - #7

Merged
veillette merged 1 commit into
mainfrom
claude/review-architecture-EeypT
Feb 18, 2026
Merged

Apply architecture recommendations #7–12#7
veillette merged 1 commit into
mainfrom
claude/review-architecture-EeypT

Conversation

@veillette

Copy link
Copy Markdown
Collaborator

Issue 7 — Remove dead videoUrlProperty from SimModel; the video URL was
managed entirely inside VideoPlayerNode and the model property was never
read or written.

Issue 8 — Avoid full node reconstruction on every playback frame:
• TrackListPanel: skip row rebuild when track IDs are unchanged (i.e. only
points were added, not tracks added/removed).
• DataTableNode: separate structure rebuild (track add/remove) from value
update (time/unit change). Time changes now mutate Text.string in-place
instead of creating new SceneryStack nodes, and VBox children are only
reassigned when the set of visible tracks changes.

Issue 9 — Simplify TrackRowNode binding: remove the manual
if (value !== shouldBeChecked) guard in the model→checkbox link.
Axon Properties deduplicate same-value writes natively, so the guard was
both redundant and an implicit documentation debt.

Issue 10 — Add dispose() to AutoTrackerNode. The timeupdate and
seeked listeners added to the video element were never removed, causing
a leak if the node were ever reconstructed. Fields boundVideoElement
and boundOnFrame are stored so dispose() can call removeEventListener.

Issue 11 — Replace the magic > 0.016 threshold in VideoPlayerNode.step()
with a strict !== equality check. HTMLVideoElement.currentTime is stable
when paused, and Axon deduplication handles same-value writes during
playback, so the arbitrary 16 ms threshold was unnecessary.

Issue 12 — Document the intentional non-reuse of track symbols (A–Z) in
SimModel with a comment explaining the rationale (stable labels for data
export and user recognition).

https://claude.ai/code/session_01VtzmsYvk3TJFGNX9Hk9AEm

Issue 7 — Remove dead `videoUrlProperty` from SimModel; the video URL was
managed entirely inside VideoPlayerNode and the model property was never
read or written.

Issue 8 — Avoid full node reconstruction on every playback frame:
  • TrackListPanel: skip row rebuild when track IDs are unchanged (i.e. only
    points were added, not tracks added/removed).
  • DataTableNode: separate structure rebuild (track add/remove) from value
    update (time/unit change). Time changes now mutate Text.string in-place
    instead of creating new SceneryStack nodes, and VBox children are only
    reassigned when the set of visible tracks changes.

Issue 9 — Simplify TrackRowNode binding: remove the manual
`if (value !== shouldBeChecked)` guard in the model→checkbox link.
Axon Properties deduplicate same-value writes natively, so the guard was
both redundant and an implicit documentation debt.

Issue 10 — Add `dispose()` to AutoTrackerNode.  The `timeupdate` and
`seeked` listeners added to the video element were never removed, causing
a leak if the node were ever reconstructed.  Fields `boundVideoElement`
and `boundOnFrame` are stored so `dispose()` can call removeEventListener.

Issue 11 — Replace the magic `> 0.016` threshold in VideoPlayerNode.step()
with a strict `!==` equality check.  HTMLVideoElement.currentTime is stable
when paused, and Axon deduplication handles same-value writes during
playback, so the arbitrary 16 ms threshold was unnecessary.

Issue 12 — Document the intentional non-reuse of track symbols (A–Z) in
SimModel with a comment explaining the rationale (stable labels for data
export and user recognition).

https://claude.ai/code/session_01VtzmsYvk3TJFGNX9Hk9AEm
@veillette
veillette merged commit 46f86a9 into main Feb 18, 2026
1 check failed
@veillette
veillette deleted the claude/review-architecture-EeypT branch February 19, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants