Skip to content

The tracker no longer checks that a path is a string - #100

Merged
Jackicus merged 1 commit into
mainfrom
fix/tracking-path-guards
Oct 7, 2026
Merged

Jackicus merged 1 commit into
mainfrom
fix/tracking-path-guards

Conversation

@Jackicus

@Jackicus Jackicus commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Tracker.isWatched, setWatched, covers and setPosition dropped their typeof path === 'string' checks (simplicity.md: no checks for values that cannot be anything else). Every caller already passes a string: detailView.js only with a truthy entry.path from the scanner's library.json, playback.js only after _following() checked player.path, which pathOf() makes a string or null. The enabled checks stay; the typeof checks on parsed JSON entries stay (outside data).

Fixes #97

Verified

  • make check
  • Seen in the nested shell (start --stand-in): a show's detail lists its episodes, the watched disc on a stand-in episode marks it (written to the stand-in watched.json) and the tick reads back on reopening; no errors in the log
  • Nested stop + start: not an enable-path change
  • CLAUDE.md, .claude/rules/, skills and docs/ still true

🤖 Generated with Claude Code

isWatched, setWatched, covers and setPosition each tested
typeof path === 'string', but every caller passes a string: the detail
rows only with a set entry.path, playback only after _following() checked
player.path, which pathOf() makes a string or null.

Fixes #97

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jackicus
Jackicus merged commit c4bb40e into main Oct 7, 2026
1 check passed
@Jackicus
Jackicus deleted the fix/tracking-path-guards branch October 7, 2026 03: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.

tracking.js guards paths that are always strings

1 participant