- Track follow-up cleanup work in Backlog.md - Replace Date.now usage with shared nowMs helper - Add launcher args/parser and core regression tests
6.1 KiB
Backlog
Purpose: lightweight repo-local task board. Seeded with current testing / coverage work.
Status keys:
todo: not starteddoing: in progressblocked: waitingdone: shipped
Priority keys:
P0: urgent / release-riskP1: high valueP2: useful cleanupP3: nice-to-have
Active
None.
Ready
| ID | Pri | Status | Area | Title |
|---|---|---|---|---|
| SM-001 | P1 | todo | launcher | Add tests for CLI parser and args normalizer |
| SM-002 | P1 | todo | immersion-tracker | Backfill tests for uncovered query exports |
| SM-003 | P1 | todo | anki | Add focused field-grouping service + merge edge-case tests |
| SM-004 | P2 | todo | tests | Extract shared test utils for deps factories and polling helpers |
| SM-005 | P2 | todo | tests | Strengthen weak assertions in app-ready and IPC tests |
| SM-006 | P2 | todo | tests | Break up monolithic youtube-flow and subtitle-sidebar tests |
| SM-007 | P2 | todo | anilist | Add tests for AniList rate limiter |
| SM-008 | P3 | todo | subtitles | Add core subtitle-position persistence/path tests |
| SM-009 | P3 | todo | tokenizer | Add tests for JLPT token filter |
| SM-010 | P1 | todo | immersion-tracker | Refactor storage + immersion-tracker service into focused modules |
Icebox
None.
Ticket Details
SM-001
Title: Add tests for CLI parser and args normalizer Priority: P1 Status: todo Scope:
launcher/config/cli-parser-builder.tslauncher/config/args-normalizer.tsAcceptance:- root options parsing covered
- subcommand routing covered
- invalid action / invalid log level / invalid backend cases covered
- target classification covered: file, directory, URL, invalid
SM-002
Title: Backfill tests for uncovered query exports Priority: P1 Status: todo Scope:
src/core/services/immersion-tracker/query-*.tsTargets:- headword helpers
- anime/media detail helpers not covered by existing wrapper tests
- lexical detail / appearance helpers
- maintenance helpers beyond
deleteSessionandupsertCoverArtAcceptance: - every exported query helper either directly tested or explicitly justified as covered elsewhere
- at least one focused regression per complex SQL branch / aggregation branch
SM-003
Title: Add focused field-grouping service + merge edge-case tests Priority: P1 Status: todo Scope:
src/anki-integration/field-grouping.tssrc/anki-integration/field-grouping-merge.tsAcceptance:- auto/manual/disabled flow branches covered
- duplicate-card preview failure path covered
- merge edge cases covered: empty fields, generated media fallback, strict grouped spans, audio synchronization
SM-004
Title: Extract shared test utils for deps factories and polling helpers Priority: P2 Status: todo Scope:
- common
makeDeps/createDepshelpers - common
waitForConditionAcceptance: - shared helper module added
- at least 3 duplicated polling helpers removed
- at least 5 duplicated deps factories consolidated or clearly prepared for follow-up migration
SM-005
Title: Strengthen weak assertions in app-ready and IPC tests Priority: P2 Status: todo Scope:
src/core/services/app-ready.test.tssrc/core/services/ipc.test.tsAcceptance:- replace broad
assert.ok(...)presence checks with exact value / order assertions where expected value known - handler registration tests assert channel-specific behavior, not only existence
SM-006
Title: Break up monolithic youtube-flow and subtitle-sidebar tests Priority: P2 Status: todo Scope:
src/main/runtime/youtube-flow.test.tssrc/renderer/modals/subtitle-sidebar.test.tsAcceptance:- reduce single-test breadth
- split largest tests into focused cases by behavior
- keep semantics unchanged
SM-007
Title: Add tests for AniList rate limiter Priority: P2 Status: todo Scope:
src/core/services/anilist/rate-limiter.tsAcceptance:- capacity-window wait behavior covered
x-ratelimit-remaining+ reset handling coveredretry-afterhandling covered
SM-008
Title: Add core subtitle-position persistence/path tests Priority: P3 Status: todo Scope:
src/core/services/subtitle-position.tsAcceptance:- save/load persistence covered
- fallback behavior covered
- path normalization behavior covered for URL vs local target
SM-009
Title: Add tests for JLPT token filter Priority: P3 Status: todo Scope:
src/core/services/jlpt-token-filter.tsAcceptance:- excluded term membership covered
- ignored POS1 membership covered
- exported list / entry consistency covered
SM-010
Title: Refactor storage + immersion-tracker service into focused layers without API changes Priority: P1 Status: todo Scope:
src/core/database/storage/storage.tssrc/core/database/storage/schema.tssrc/core/database/storage/cover-blob.tssrc/core/database/storage/records.tssrc/core/database/storage/write-path.tssrc/core/services/immersion-tracker/youtube.tssrc/core/services/immersion-tracker/youtube-manager.tssrc/core/services/immersion-tracker/write-queue.tssrc/core/services/immersion-tracker/immersion-tracker-service.ts
Acceptance:
- behavior and public API remain unchanged for all callers
storage.tsresponsibilities split into DDL/migrations, cover blob helpers, record CRUD, and write-path executionimmersion-tracker-service.tsreduces to session state, media change orchestration, query proxies, and lifecycle- YouTube code split into pure utilities, a stateful manager (
YouTubeManager), and a dedicated write queue (WriteQueue) - removed
storage.tsis replaced with focused modules and updated imports - no API or migration regressions; existing tests for trackers/storage coverage remain green or receive focused updates