Skip to content

Claude/refactor mvc violations r887u - #74

Merged
veillette merged 3 commits into
mainfrom
claude/refactor-mvc-violations-r887u
Mar 1, 2026
Merged

Claude/refactor mvc violations r887u#74
veillette merged 3 commits into
mainfrom
claude/refactor-mvc-violations-r887u

Conversation

@veillette

Copy link
Copy Markdown
Collaborator

No description provided.

… models

1.1 Frame-number computation: add VideoPlaybackModel.timeToFrame(),
currentFrameProperty, and seekByFrames(). All views now delegate to the
model instead of inlining Math.round(time * frameRate) / division-by-
frameDuration formulas. DigitizingOverlayNode reads currentFrameProperty;
PlaybackControlsNode calls playback.timeToFrame(); AutoTrackerNode receives
a timeToFrame callback through its options.

1.2 Frame-seeking logic: move seekByFrames() body from VideoPlayerNode into
VideoPlaybackModel.seekByFrames(direction). The view now calls
playback.seekByFrames() and syncs videoElement.currentTime to the updated
model property.

1.3 Async tracker staleness: move initVersion counter from AutoTrackerNode
into TrackingModel. resetTracker() increments the counter; initTracker()
returns Promise<boolean> (true = ready, false = superseded). The view no
longer needs a private initVersion field or captured-version checks.

1.4 Duplicate-frame deduplication: move the recordedFrames Set out of
AutoTrackerNode into TrackingModel.addPointToTrack(), which now skips
(rather than overwrites) an existing point for the same frame. The view
calls addPointToTrack unconditionally and lets the model enforce the policy.

1.5 Video metadata extraction: add extractVideoFileMetadata() to webcam.ts
(alongside the existing countWebmFrames / getAnimatedWebPInfo helpers).
VideoSourceControlNode replaces its three-branch file-upload handler (WebP
detection, WebM frame counting, generic duration probe) with a single await.

https://claude.ai/code/session_01ExhrdqGJEXwHoYSzvQBQML
Replace info!.frameCount with info?.frameCount in extractVideoFileMetadata
to satisfy Biome's noNonNullAssertion rule.

https://claude.ai/code/session_01ExhrdqGJEXwHoYSzvQBQML
Use conditional spread (...(count > 0 ? { frameCount: count } : {})) instead
of assigning number | undefined to an optional number property, which is
rejected by TypeScript's exactOptionalPropertyTypes compiler option.

https://claude.ai/code/session_01ExhrdqGJEXwHoYSzvQBQML
@veillette
veillette merged commit 703a177 into main Mar 1, 2026
2 checks passed
@veillette
veillette deleted the claude/refactor-mvc-violations-r887u branch March 1, 2026 01:19
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