refactor: extract cli command context factory wiring

This commit is contained in:
2026-02-20 02:06:42 -08:00
parent f56de54c10
commit b6b81a72f5
5 changed files with 95 additions and 10 deletions

View File

@@ -9,6 +9,10 @@
## Current Work (newest first)
- [2026-02-20T10:06:15Z] progress: extracted CLI command-context composition from `src/main.ts` into `src/main/runtime/cli-command-context-factory.ts`; `main.ts` now creates context via `createCliCommandContextFactory(...)`.
- [2026-02-20T10:06:15Z] progress: added `src/main/runtime/cli-command-context-factory.test.ts` to validate composed factory behavior.
- [2026-02-20T10:06:15Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + focused suites pass for `cli-command-context-factory*`, `cli-command-context*`, `ipc-runtime-handlers*`, `ipc-bridge-actions*`, `overlay-visibility-runtime*`, and `yomitan-extension-runtime*` (12/12).
- [2026-02-20T10:06:15Z] scope: staging `src/main.ts`, new CLI context factory module/tests, and subagent bookkeeping only.
- [2026-02-20T10:04:27Z] progress: extracted IPC bridge composition from `src/main.ts` into `src/main/runtime/ipc-runtime-handlers.ts`; `main.ts` now builds `handleMpvCommandFromIpc` and `runSubsyncManualFromIpc` via one `createIpcRuntimeHandlers(...)` factory.
- [2026-02-20T10:04:27Z] progress: added `src/main/runtime/ipc-runtime-handlers.test.ts` for composed IPC handler wiring behavior.
- [2026-02-20T10:04:27Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + focused suites pass for `ipc-runtime-handlers*`, `ipc-bridge-actions*`, `cli-command-context*`, `yomitan-extension-runtime*`, and `overlay-visibility-runtime*` (11/11).