mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-27 06:12:05 -07:00
Add backlog tasks and launcher time helper tests
- Track follow-up cleanup work in Backlog.md - Replace Date.now usage with shared nowMs helper - Add launcher args/parser and core regression tests
This commit is contained in:
194
Backlog.md
Normal file
194
Backlog.md
Normal file
@@ -0,0 +1,194 @@
|
||||
# Backlog
|
||||
|
||||
Purpose: lightweight repo-local task board. Seeded with current testing / coverage work.
|
||||
|
||||
Status keys:
|
||||
|
||||
- `todo`: not started
|
||||
- `doing`: in progress
|
||||
- `blocked`: waiting
|
||||
- `done`: shipped
|
||||
|
||||
Priority keys:
|
||||
|
||||
- `P0`: urgent / release-risk
|
||||
- `P1`: high value
|
||||
- `P2`: useful cleanup
|
||||
- `P3`: 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.ts`
|
||||
- `launcher/config/args-normalizer.ts`
|
||||
Acceptance:
|
||||
- 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-*.ts`
|
||||
Targets:
|
||||
- headword helpers
|
||||
- anime/media detail helpers not covered by existing wrapper tests
|
||||
- lexical detail / appearance helpers
|
||||
- maintenance helpers beyond `deleteSession` and `upsertCoverArt`
|
||||
Acceptance:
|
||||
- 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.ts`
|
||||
- `src/anki-integration/field-grouping-merge.ts`
|
||||
Acceptance:
|
||||
- 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` / `createDeps` helpers
|
||||
- common `waitForCondition`
|
||||
Acceptance:
|
||||
- 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.ts`
|
||||
- `src/core/services/ipc.test.ts`
|
||||
Acceptance:
|
||||
- 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.ts`
|
||||
- `src/renderer/modals/subtitle-sidebar.test.ts`
|
||||
Acceptance:
|
||||
- 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.ts`
|
||||
Acceptance:
|
||||
- capacity-window wait behavior covered
|
||||
- `x-ratelimit-remaining` + reset handling covered
|
||||
- `retry-after` handling covered
|
||||
|
||||
### SM-008
|
||||
|
||||
Title: Add core subtitle-position persistence/path tests
|
||||
Priority: P3
|
||||
Status: todo
|
||||
Scope:
|
||||
|
||||
- `src/core/services/subtitle-position.ts`
|
||||
Acceptance:
|
||||
- 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.ts`
|
||||
Acceptance:
|
||||
- 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.ts`
|
||||
- `src/core/database/storage/schema.ts`
|
||||
- `src/core/database/storage/cover-blob.ts`
|
||||
- `src/core/database/storage/records.ts`
|
||||
- `src/core/database/storage/write-path.ts`
|
||||
- `src/core/services/immersion-tracker/youtube.ts`
|
||||
- `src/core/services/immersion-tracker/youtube-manager.ts`
|
||||
- `src/core/services/immersion-tracker/write-queue.ts`
|
||||
- `src/core/services/immersion-tracker/immersion-tracker-service.ts`
|
||||
|
||||
Acceptance:
|
||||
|
||||
- behavior and public API remain unchanged for all callers
|
||||
- `storage.ts` responsibilities split into DDL/migrations, cover blob helpers, record CRUD, and write-path execution
|
||||
- `immersion-tracker-service.ts` reduces 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.ts` is replaced with focused modules and updated imports
|
||||
- no API or migration regressions; existing tests for trackers/storage coverage remain green or receive focused updates
|
||||
Reference in New Issue
Block a user