mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
2.5 KiB
2.5 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ordinal |
|---|---|---|---|---|---|---|---|---|---|
| TASK-24 | Add N+1 word highlighting using Anki-known-word cache with initial sync and periodic refresh | Done | 2026-02-13 16:45 | 2026-02-18 04:11 | high | 37000 |
Description
Implement subtitle highlighting for words already known in Anki (N+1 workflow support) by introducing a one-time bootstrap query of the user’s Anki known-word set, storing it locally, and refreshing it periodically to reflect deck updates. The feature should allow fast in-session lookups to determine known words and visually distinguish them in subtitle rendering.
Acceptance Criteria
- #1 Add an opt-in setting/feature flag for N+1 highlighting and default it to disabled for backward-compatible behavior.
- #2 Implement a one-time import/sync that queries known-word data from Anki into a local store on first enable or explicit refresh.
- #3 Store known words locally in an efficient structure for fast lookup during subtitle rendering.
- #4 Run periodic refresh on a configurable interval and expose a manual refresh action.
- #5 Ensure local cache updates replace or merge safely without corrupting in-flight subtitle rendering queries.
- #6 Known/unknown lookup decisions are applied consistently to subtitle tokens for highlighting without impacting tokenization performance.
- #7 Non-targeted words remain visually unchanged and all existing subtitle interactions remain unaffected.
- #8 Add tests/validation for initial sync success, refresh update, and disabled-mode no-lookup behavior.
- #9 Document Anki data source expectations, failure handling, and update policy/interval behavior.
- #10 If full Anki query integration is not possible in this environment, define deterministic fallback behavior with clear user-visible messaging.
Final Summary
Implemented in refactor via merge from task-24-known-word-refresh (commits 854b8fb, e8f2431, ed5a249). Includes manual/periodic known-word cache refresh, opt-in N+1 highlighting path, cache persistence behavior, CLI refresh command, and related tests/docs updates.
Definition of Done
- #1 N+1 known-word highlighting is configurable, performs local cached lookups, and is demonstrated to update correctly after periodic/manual refresh.