refactor: extract numeric and overlay shortcuts runtime wiring

This commit is contained in:
2026-02-20 03:35:47 -08:00
parent eef8a7eb41
commit 12c5d956bc
7 changed files with 203 additions and 138 deletions

View File

@@ -9,6 +9,11 @@
## Current Work (newest first)
- [2026-02-20T11:35:21Z] progress: extracted numeric shortcut session composition from `src/main.ts` into `src/main/runtime/numeric-shortcut-session-runtime-handlers.ts`; `main.ts` now gets `cancel/start` handlers for multi-copy and mine-sentence sessions from one runtime factory.
- [2026-02-20T11:35:21Z] progress: extracted overlay shortcuts lifecycle composition from `src/main.ts` into `src/main/runtime/overlay-shortcuts-runtime-handlers.ts`; `main.ts` now gets register/unregister/sync/refresh handlers via one runtime factory.
- [2026-02-20T11:35:21Z] progress: added parity tests `src/main/runtime/numeric-shortcut-session-runtime-handlers.test.ts` and `src/main/runtime/overlay-shortcuts-runtime-handlers.test.ts`.
- [2026-02-20T11:35:21Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + focused suites pass for `numeric-shortcut-session-runtime-handlers*`, `overlay-shortcuts-runtime-handlers*`, `numeric-shortcut-session-*`, and `overlay-shortcuts-lifecycle-*` (10/10).
- [2026-02-20T11:35:21Z] scope: staging `src/main.ts`, new numeric/overlay-shortcuts runtime handler modules/tests, and subagent bookkeeping only.
- [2026-02-20T11:32:45Z] progress: extracted MPV OSD composition from `src/main.ts` into `src/main/runtime/mpv-osd-runtime-handlers.ts`; `main.ts` now receives `appendToMpvLog` and `showMpvOsd` from one runtime factory.
- [2026-02-20T11:32:45Z] progress: extracted secondary subtitle mode composition from `src/main.ts` into `src/main/runtime/secondary-sub-mode-runtime-handler.ts`; `main.ts` now builds `cycleSecondarySubMode` via one runtime handler factory.
- [2026-02-20T11:32:45Z] progress: added parity tests `src/main/runtime/mpv-osd-runtime-handlers.test.ts` and `src/main/runtime/secondary-sub-mode-runtime-handler.test.ts`.