Apply architecture recommendations #7–12 - #7
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue 7 — Remove dead
videoUrlPropertyfrom SimModel; the video URL wasmanaged 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. Thetimeupdateandseekedlisteners added to the video element were never removed, causinga leak if the node were ever reconstructed. Fields
boundVideoElementand
boundOnFrameare stored sodispose()can call removeEventListener.Issue 11 — Replace the magic
> 0.016threshold in VideoPlayerNode.step()with a strict
!==equality check. HTMLVideoElement.currentTime is stablewhen 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