Files
SubMiner/backlog/tasks/task-238.4 - Decompose-character-dictionary-runtime-into-fetch-build-and-cache-modules.md

1.8 KiB

id, title, status, assignee, created_date, labels, milestone, dependencies, references, parent_task_id, priority
id title status assignee created_date labels milestone dependencies references parent_task_id priority
TASK-238.4 Decompose character dictionary runtime into fetch, build, and cache modules To Do
2026-03-26 20:49
tech-debt
runtime
anilist
maintainability
m-0
TASK-238.3
src/main/character-dictionary-runtime.ts
src/main/runtime/character-dictionary-auto-sync.ts
docs/architecture/README.md
TASK-238 medium

Description

src/main/character-dictionary-runtime.ts is now one of the largest live production files in the repo and combines AniList transport, name normalization, snapshot/image shaping, cache management, and zip packaging. That file will keep growing as character-dictionary features evolve. Split it into focused modules so the runtime surface becomes orchestration instead of a catch-all implementation blob.

Acceptance Criteria

  • #1 AniList fetch/parsing logic, dictionary-entry building, and snapshot/cache/zip persistence no longer live in one giant file.
  • #2 The public runtime API stays behavior-compatible for current callers.
  • #3 The top-level runtime/orchestration file becomes materially smaller and easier to review.
  • #4 Existing character-dictionary tests still pass, and new focused tests cover the extracted modules where needed.

Implementation Plan

  1. Identify the dominant concern boundaries inside src/main/character-dictionary-runtime.ts.
  2. Extract fetch/transform/persist modules with narrow interfaces, keeping data-shape ownership explicit.
  3. Leave the exported runtime API stable for current main-process callers.
  4. Verify with the maintained character-dictionary/runtime test lane plus bun run typecheck.