Skip to content

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
veillette merged 4 commits into
mainfrom
claude/delete-point-plan-5grf2t
Jul 25, 2026

Conversation

@veillette

Copy link
Copy Markdown
Collaborator

Description

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Build / CI change

Related issues

Fixes #
Related to #

Testing

  • npm run lint
  • npm run check
  • npm run build
  • npm test (if applicable)

How to test

  1. Step 1
  2. Step 2
  3. Expected result

Checklist

  • Self-review completed
  • Documentation updated if needed
  • No unrelated changes included

claude added 4 commits July 25, 2026 03:10
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
@cursor

cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown

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.

@veillette
veillette merged commit c7e6498 into main Jul 25, 2026
6 of 7 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@veillette
veillette deleted the claude/delete-point-plan-5grf2t branch July 25, 2026 03:22
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