Typecheck tests/ in npm run check
tests/ was in no tsconfig include path, so npm run check never looked
at it. Vitest transpiles without typechecking, so a green npm test said
nothing about whether the specs were type-correct — two type errors sat
in tests/memory-leak.test.ts undetected until the previous commit.
Adds tsconfig.tests.json, mirroring the existing tsconfig.scripts.json
pattern: extends the root config and adds node types for process and
globalThis.gc. Kept as a separate program rather than widening the root
include so node types do not leak into the src build.
Verified by planting a deliberate type error in tests/setup.ts and
confirming npm run check fails on it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gaCkV6CD5uR1SJpq3BPss - #103
Merged
Conversation
Closes the gap behind issue #48: there was no way to remove a single digitized point, and addPointToTrack's first-wins dedupe meant a user who misclicked and clicked again got silence. Rather than making the 2px mark dots clickable (they are batched into one Shape per track on a pickable:false layer, and the overlay already records a point on any click), deletion targets the point identified by (active track, current frame). That needs no hit-testing, no selection state, and no delete mode, and behaves the same on mouse, touch, and keyboard. Model: - removePointFromTrack / restoreLastDeletedPoint / canRestorePointProperty - addOrReplacePointOnTrack: manual digitizing now overwrites the point at a frame, so re-clicking corrects a misclick. AutoTracker keeps the first-wins policy so it never clobbers a hand-placed point. - Points are inserted in frame order. KinematicsComputer differentiates by array index assuming time increases along it; appending only held while digitizing ran forwards, and broke on restore or on digitizing after scrubbing backwards. View: - Eraser and restore buttons in the playback controls, beside the step buttons rather than next to TrackListPanel's per-track trash icon. The eraser is disabled until the current frame holds a point, which is how the interaction teaches itself. - The current frame's point is ringed on the video, so the erase target is visible before committing. - Delete/Backspace on the now-focusable digitizing overlay. - Data table: the current frame's row is outlined and scrolled into view, and clicking a row seeks the video there, making the table a navigation surface into the same erase action. Also fixes a latent bug the feature would have exposed: TableRenderer's incremental path could append rows but never remove them, so a deleted point left its <tr> behind showing stale coordinates. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gaCkV6CD5uR1SJpq3BPss
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gaCkV6CD5uR1SJpq3BPss
biome check now reports zero warnings (was 9). - fuzz.spec.ts: annotate the three env-derived constants (useExplicitType). - memory-leak.test.ts: name the two sample plottables so the Property constructions reference them directly instead of indexing SAMPLE_PLOTTABLES, which under noUncheckedIndexedAccess widened to `PlottableProperty | undefined` and needed non-null assertions. The named consts narrow to RecordPlottable from their initializers and Property<T> is invariant in T, so the type argument is given explicitly. Also switched the accessors to bracket access: `point` is a Record<string, number> and the project sets noPropertyAccessFromIndexSignature. Neither file is in a tsconfig include path, so these type errors were invisible to `npm run check`; both now typecheck under the project's own compiler options. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gaCkV6CD5uR1SJpq3BPss
tests/ was in no tsconfig include path, so `npm run check` never looked at it. Vitest transpiles without typechecking, so a green `npm test` said nothing about whether the specs were type-correct — two type errors sat in tests/memory-leak.test.ts undetected until the previous commit. Adds tsconfig.tests.json, mirroring the existing tsconfig.scripts.json pattern: extends the root config and adds `node` types for `process` and `globalThis.gc`. Kept as a separate program rather than widening the root include so node types do not leak into the src build. Verified by planting a deliberate type error in tests/setup.ts and confirming `npm run check` fails on it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gaCkV6CD5uR1SJpq3BPss
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
Description
Type of change
Related issues
Fixes #
Related to #
Testing
npm run lintnpm run checknpm run buildnpm test(if applicable)How to test
Checklist