From 51829159f2f08ab0ba7ddb5bf9c4ac9ac44bc9f6 Mon Sep 17 00:00:00 2001 From: sudacode Date: Sat, 14 Feb 2026 23:21:57 -0800 Subject: [PATCH] update tasks --- ...e-naming-conventions-and-barrel-exports.md | 10 +++- ...eparate-protocol-from-application-logic.md | 9 +++- ...-trivial-wrapper-functions-from-main.ts.md | 10 +++- ...titleLayoutFromMpvMetrics-mega-function.md | 10 +++- ...-complexity-and-split-oversized-modules.md | 4 +- ...es-field-grouping-card-creation-polling.md | 48 +++++++++++++++++++ ...nnection-logs-to-debug-mode-in-Electron.md | 3 +- 7 files changed, 84 insertions(+), 10 deletions(-) rename backlog/{tasks => completed}/task-10 - Consolidate-service-naming-conventions-and-barrel-exports.md (83%) rename backlog/{tasks => completed}/task-8 - Reduce-MpvIpcClient-deps-interface-and-separate-protocol-from-application-logic.md (79%) rename backlog/{tasks => completed}/task-9 - Remove-trivial-wrapper-functions-from-main.ts.md (82%) create mode 100644 backlog/tasks/task-27.7 - Decompose-anki-integration.ts-core-into-domain-modules-field-grouping-card-creation-polling.md diff --git a/backlog/tasks/task-10 - Consolidate-service-naming-conventions-and-barrel-exports.md b/backlog/completed/task-10 - Consolidate-service-naming-conventions-and-barrel-exports.md similarity index 83% rename from backlog/tasks/task-10 - Consolidate-service-naming-conventions-and-barrel-exports.md rename to backlog/completed/task-10 - Consolidate-service-naming-conventions-and-barrel-exports.md index fbb2054..3613a3b 100644 --- a/backlog/tasks/task-10 - Consolidate-service-naming-conventions-and-barrel-exports.md +++ b/backlog/completed/task-10 - Consolidate-service-naming-conventions-and-barrel-exports.md @@ -1,10 +1,10 @@ --- id: TASK-10 title: Consolidate service naming conventions and barrel exports -status: To Do +status: Done assignee: [] created_date: '2026-02-11 08:21' -updated_date: '2026-02-14 00:50' +updated_date: '2026-02-15 07:00' labels: - refactor - services @@ -45,3 +45,9 @@ Establish consistent naming: Naming convention consolidation should be addressed as part of TASK-27.2 (split main.ts) and TASK-27.3 (anki-integration split). As modules are extracted and given clear boundaries, naming will be standardized at each boundary. No need to do a standalone naming pass — it's wasted effort if the module structure is about to change. + +## Final Summary + + +Subsumed by TASK-27.2 and TASK-27.3. Naming conventions were standardized at module boundaries during extraction. A standalone global naming pass would be churn with no structural benefit now that modules have clear ownership boundaries. + diff --git a/backlog/tasks/task-8 - Reduce-MpvIpcClient-deps-interface-and-separate-protocol-from-application-logic.md b/backlog/completed/task-8 - Reduce-MpvIpcClient-deps-interface-and-separate-protocol-from-application-logic.md similarity index 79% rename from backlog/tasks/task-8 - Reduce-MpvIpcClient-deps-interface-and-separate-protocol-from-application-logic.md rename to backlog/completed/task-8 - Reduce-MpvIpcClient-deps-interface-and-separate-protocol-from-application-logic.md index eb84644..e652abf 100644 --- a/backlog/tasks/task-8 - Reduce-MpvIpcClient-deps-interface-and-separate-protocol-from-application-logic.md +++ b/backlog/completed/task-8 - Reduce-MpvIpcClient-deps-interface-and-separate-protocol-from-application-logic.md @@ -3,9 +3,10 @@ id: TASK-8 title: >- Reduce MpvIpcClient deps interface and separate protocol from application logic -status: To Do +status: Done assignee: [] created_date: '2026-02-11 08:20' +updated_date: '2026-02-15 07:00' labels: - refactor - mpv @@ -36,3 +37,9 @@ Separating these would let the protocol layer be simpler and testable, while app - [ ] #3 MpvIpcClient is testable without mocking 22 callbacks - [ ] #4 Existing behavior preserved + +## Final Summary + + +Superseded by TASK-27.4 which absorbed this task's full scope (protocol/application separation, deps interface reduction from 22 properties to protocol-level concerns, event-based app reactions). All acceptance criteria met by TASK-27.4. + diff --git a/backlog/tasks/task-9 - Remove-trivial-wrapper-functions-from-main.ts.md b/backlog/completed/task-9 - Remove-trivial-wrapper-functions-from-main.ts.md similarity index 82% rename from backlog/tasks/task-9 - Remove-trivial-wrapper-functions-from-main.ts.md rename to backlog/completed/task-9 - Remove-trivial-wrapper-functions-from-main.ts.md index 7b3fefc..751bbbb 100644 --- a/backlog/tasks/task-9 - Remove-trivial-wrapper-functions-from-main.ts.md +++ b/backlog/completed/task-9 - Remove-trivial-wrapper-functions-from-main.ts.md @@ -1,10 +1,10 @@ --- id: TASK-9 title: Remove trivial wrapper functions from main.ts -status: To Do +status: Done assignee: [] created_date: '2026-02-11 08:21' -updated_date: '2026-02-14 00:48' +updated_date: '2026-02-15 07:00' labels: - refactor - main @@ -52,3 +52,9 @@ After TASK-7 (AppState container), many of these can be eliminated by having ser Priority changed from medium to low: this work is largely subsumed by TASK-27.2 (split main.ts). When main.ts is decomposed into composition-root modules, trivial wrappers will naturally be eliminated or inlined. Recommend folding remaining wrapper cleanup into TASK-27.2 rather than tracking separately. Keep this ticket as a checklist reference but don't execute independently. + +## Final Summary + + +Subsumed by TASK-27.2 (main.ts split). Trivial wrappers were eliminated or inlined as composition-root modules were extracted. main.ts reduced from ~2000+ LOC to 1384 with state routed through appState container. Standalone wrapper removal pass no longer needed. + diff --git a/backlog/tasks/task-11 - Break-up-the-applyInvisibleSubtitleLayoutFromMpvMetrics-mega-function.md b/backlog/tasks/task-11 - Break-up-the-applyInvisibleSubtitleLayoutFromMpvMetrics-mega-function.md index 9979863..8cff349 100644 --- a/backlog/tasks/task-11 - Break-up-the-applyInvisibleSubtitleLayoutFromMpvMetrics-mega-function.md +++ b/backlog/tasks/task-11 - Break-up-the-applyInvisibleSubtitleLayoutFromMpvMetrics-mega-function.md @@ -4,12 +4,14 @@ title: Break up the applyInvisibleSubtitleLayoutFromMpvMetrics mega function status: To Do assignee: [] created_date: '2026-02-11 08:21' +updated_date: '2026-02-15 07:00' labels: - refactor - renderer - complexity milestone: Codebase Clarity & Composability -dependencies: [] +dependencies: + - TASK-27.5 references: - src/renderer/renderer.ts priority: medium @@ -36,3 +38,9 @@ This can be done independently of or as part of TASK-6 (renderer split). - [ ] #3 Platform-specific branches isolated into dedicated helpers - [ ] #4 Invisible overlay positioning still works correctly on Linux and macOS + +## Implementation Notes + + +Reparented as a dependency of TASK-27.5: the mega-function lives in positioning.ts (513 LOC), which is the exact file TASK-27.5 targets for splitting. Decomposing this function is a natural part of that file split. Should be executed together with TASK-27.5. + diff --git a/backlog/tasks/task-27 - Refactor-project-structure-to-reduce-architectural-complexity-and-split-oversized-modules.md b/backlog/tasks/task-27 - Refactor-project-structure-to-reduce-architectural-complexity-and-split-oversized-modules.md index 355726d..0c26ed1 100644 --- a/backlog/tasks/task-27 - Refactor-project-structure-to-reduce-architectural-complexity-and-split-oversized-modules.md +++ b/backlog/tasks/task-27 - Refactor-project-structure-to-reduce-architectural-complexity-and-split-oversized-modules.md @@ -3,10 +3,10 @@ id: TASK-27 title: >- Refactor project structure to reduce architectural complexity and split oversized modules -status: To Do +status: In Progress assignee: [] created_date: '2026-02-13 17:13' -updated_date: '2026-02-13 21:07' +updated_date: '2026-02-15 07:00' labels: - 'owner:architect' - 'owner:backend' diff --git a/backlog/tasks/task-27.7 - Decompose-anki-integration.ts-core-into-domain-modules-field-grouping-card-creation-polling.md b/backlog/tasks/task-27.7 - Decompose-anki-integration.ts-core-into-domain-modules-field-grouping-card-creation-polling.md new file mode 100644 index 0000000..9ea25d2 --- /dev/null +++ b/backlog/tasks/task-27.7 - Decompose-anki-integration.ts-core-into-domain-modules-field-grouping-card-creation-polling.md @@ -0,0 +1,48 @@ +--- +id: TASK-27.7 +title: >- + Decompose anki-integration.ts core into domain modules (field-grouping, + card-creation, polling) +status: To Do +assignee: [] +created_date: '2026-02-15 07:00' +labels: + - refactor + - anki + - architecture +dependencies: + - TASK-27.3 +references: + - src/anki-integration.ts + - src/anki-integration-duplicate.ts + - src/anki-integration-ui-feedback.ts + - src/anki-integration/ai.ts +parent_task_id: TASK-27 +priority: high +--- + +## Description + + +TASK-27.3 extracted leaf clusters (duplicate-detection 102 LOC, ai-translation 158 LOC, ui-feedback 107 LOC) but the core class remains at 2935 LOC. The heavy decomposition from the original TASK-27.3 plan was never executed. + +Remaining extractions from the original plan: +1. **field-grouping** (~900 LOC) — `triggerFieldGroupingForLastAddedCard`, `applyFieldGrouping`, `computeFieldGroupingMergedFields`, `buildFieldGroupingPreview`, `performFieldGroupingMerge`, `handleFieldGroupingAuto`, `handleFieldGroupingManual`, plus ~15 span/parse/normalize helpers +2. **card-creation** (~350 LOC) — `createSentenceCard`, `setCardTypeFields`, `extractFields`, `processSentence`, field resolution helpers +3. **polling/lifecycle** (~250 LOC) — `start`, `stop`, `poll`, `pollOnce`, `processNewCard` + +Also consolidate the scattered extraction files into `src/anki-integration/`: +- `src/anki-integration-duplicate.ts` → `src/anki-integration/duplicate.ts` +- `src/anki-integration-ui-feedback.ts` → `src/anki-integration/ui-feedback.ts` +- `src/anki-integration/ai.ts` (already there) + + +## Acceptance Criteria + +- [ ] #1 anki-integration.ts reduced below 800 LOC (facade + private state wiring only) +- [ ] #2 Field-grouping cluster (~900 LOC) extracted as its own module under src/anki-integration/ +- [ ] #3 Card-creation and polling/lifecycle extracted as separate modules +- [ ] #4 All extracted modules consolidated under src/anki-integration/ directory +- [ ] #5 Existing facade API preserved — external callers unchanged +- [ ] #6 All existing tests pass; build compiles cleanly + diff --git a/backlog/tasks/task-33 - Restrict-mpv-socket-connection-logs-to-debug-mode-in-Electron.md b/backlog/tasks/task-33 - Restrict-mpv-socket-connection-logs-to-debug-mode-in-Electron.md index 85d377a..f252404 100644 --- a/backlog/tasks/task-33 - Restrict-mpv-socket-connection-logs-to-debug-mode-in-Electron.md +++ b/backlog/tasks/task-33 - Restrict-mpv-socket-connection-logs-to-debug-mode-in-Electron.md @@ -10,8 +10,7 @@ labels: - mpv - frontend - quality -dependencies: - - TASK-28 +dependencies: [] priority: high ---