Files
SubMiner/docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md

59 KiB

Agent: codex-task85-20260219T233711Z-46hc

  • alias: codex-task85
  • mission: Resume TASK-85 maintainability refactor from latest handoff point
  • status: in_progress
  • branch: main
  • started_at: 2026-02-19T23:37:11Z
  • heartbeat_minutes: 5

Current Work (newest first)

  • [2026-02-20T03:27:35Z] progress: extracted CLI context deps builder into src/main/runtime/cli-command-context-deps.ts (createBuildCliCommandContextDepsHandler) and rewired handleCliCommand to build deps through the helper.
  • [2026-02-20T03:27:35Z] progress: extracted overlay runtime options builder into src/main/runtime/overlay-runtime-options.ts (createBuildInitializeOverlayRuntimeOptionsHandler) and rewired initializeOverlayRuntime buildOptions; extracted Yomitan extension load wrappers into src/main/runtime/yomitan-extension-loader.ts (createLoadYomitanExtensionHandler, createEnsureYomitanExtensionLoadedHandler) and rewired loadYomitanExtension + ensureYomitanExtensionLoaded.
  • [2026-02-20T03:27:35Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/cli-command-context-deps.test.js dist/main/runtime/overlay-runtime-options.test.js dist/main/runtime/yomitan-extension-loader.test.js dist/main/runtime/tray-main-actions.test.js dist/main/runtime/overlay-window-factory.test.js dist/main/runtime/ipc-bridge-actions.test.js dist/main/runtime/overlay-main-actions.test.js dist/main/runtime/overlay-visibility-actions.test.js dist/main/runtime/mining-actions.test.js dist/main/runtime/anki-actions.test.js dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (116/116).
  • [2026-02-20T03:19:44Z] progress: extracted tray wrappers into src/main/runtime/tray-main-actions.ts (createResolveTrayIconPathHandler, createBuildTrayMenuTemplateHandler) and rewired resolveTrayIconPath + buildTrayMenu.
  • [2026-02-20T03:19:44Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/tray-main-actions.test.js dist/main/runtime/overlay-window-factory.test.js dist/main/runtime/ipc-bridge-actions.test.js dist/main/runtime/overlay-main-actions.test.js dist/main/runtime/overlay-visibility-actions.test.js dist/main/runtime/mining-actions.test.js dist/main/runtime/anki-actions.test.js dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (110/110).
  • [2026-02-20T03:17:35Z] progress: extracted overlay window creation wrappers into src/main/runtime/overlay-window-factory.ts (createCreateOverlayWindowHandler, createCreateMainWindowHandler, createCreateInvisibleWindowHandler) and rewired createOverlayWindow, createMainWindow, createInvisibleWindow.
  • [2026-02-20T03:17:35Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/overlay-window-factory.test.js dist/main/runtime/ipc-bridge-actions.test.js dist/main/runtime/overlay-main-actions.test.js dist/main/runtime/overlay-visibility-actions.test.js dist/main/runtime/mining-actions.test.js dist/main/runtime/anki-actions.test.js dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (108/108).
  • [2026-02-20T03:14:23Z] progress: extracted thin wrapper cluster into src/main/runtime/overlay-main-actions.ts (createSetOverlayVisibleHandler, createToggleOverlayHandler, createHandleOverlayModalClosedHandler, createAppendClipboardVideoToQueueHandler) and rewired setOverlayVisible, toggleOverlay, handleOverlayModalClosed, appendClipboardVideoToQueue.
  • [2026-02-20T03:14:23Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/overlay-main-actions.test.js dist/main/runtime/overlay-visibility-actions.test.js dist/main/runtime/mining-actions.test.js dist/main/runtime/anki-actions.test.js dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (103/103).
  • [2026-02-20T03:11:11Z] progress: extracted overlay visibility set/toggle wrappers into src/main/runtime/overlay-visibility-actions.ts (createSetVisibleOverlayVisibleHandler, createSetInvisibleOverlayVisibleHandler, createToggleVisibleOverlayHandler, createToggleInvisibleOverlayHandler) and rewired corresponding main.ts functions.
  • [2026-02-20T03:11:11Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/overlay-visibility-actions.test.js dist/main/runtime/mining-actions.test.js dist/main/runtime/anki-actions.test.js dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (99/99).
  • [2026-02-20T02:56:34Z] progress: extracted subtitle copy/mine wrapper cluster into src/main/runtime/mining-actions.ts (createHandleMultiCopyDigitHandler, createCopyCurrentSubtitleHandler, createHandleMineSentenceDigitHandler) and rewired handleMultiCopyDigit, copyCurrentSubtitle, handleMineSentenceDigit.
  • [2026-02-20T02:56:34Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mining-actions.test.js dist/main/runtime/anki-actions.test.js dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (95/95).
  • [2026-02-20T02:55:17Z] progress: extracted Anki action wrappers into src/main/runtime/anki-actions.ts (createUpdateLastCardFromClipboardHandler, createRefreshKnownWordCacheHandler, createTriggerFieldGroupingHandler, createMarkLastCardAsAudioCardHandler, createMineSentenceCardHandler) and rewired main.ts handlers.
  • [2026-02-20T02:55:17Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/anki-actions.test.js dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (92/92).
  • [2026-02-20T02:52:42Z] progress: extracted overlay shortcut lifecycle wrappers into src/main/runtime/overlay-shortcuts-lifecycle.ts (createRegisterOverlayShortcutsHandler, createUnregisterOverlayShortcutsHandler, createSyncOverlayShortcutsHandler, createRefreshOverlayShortcutsHandler) and rewired registerOverlayShortcuts/unregisterOverlayShortcuts/syncOverlayShortcuts/refreshOverlayShortcuts.
  • [2026-02-20T02:52:42Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/overlay-shortcuts-lifecycle.test.js dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (88/88).
  • [2026-02-20T02:51:23Z] progress: extracted numeric shortcut session wrappers into src/main/runtime/numeric-shortcut-session-handlers.ts (createCancelNumericShortcutSessionHandler, createStartNumericShortcutSessionHandler) and rewired pending multi-copy/mine-sentence helper functions in main.ts.
  • [2026-02-20T02:51:23Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/numeric-shortcut-session-handlers.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (84/84).
  • [2026-02-20T02:50:30Z] progress: extracted MPV OSD + log helpers into src/main/runtime/mpv-osd-log.ts (createAppendToMpvLogHandler, createShowMpvOsdHandler) and rewired showMpvOsd + appendToMpvLog.
  • [2026-02-20T02:50:30Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (82/82).
  • [2026-02-20T02:49:09Z] progress: extracted global shortcut helpers into src/main/runtime/global-shortcuts.ts (createGetConfiguredShortcutsHandler, createRegisterGlobalShortcutsHandler, createRefreshGlobalAndOverlayShortcutsHandler); rewired getConfiguredShortcuts, registerGlobalShortcuts, and refreshGlobalAndOverlayShortcuts in main.ts.
  • [2026-02-20T02:49:09Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/global-shortcuts.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (79/79).
  • [2026-02-20T02:45:53Z] progress: extracted Yomitan settings window opener wrapper into src/main/runtime/yomitan-settings-opener.ts (createOpenYomitanSettingsHandler); rewired openYomitanSettings in main.ts.
  • [2026-02-20T02:45:53Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (76/76).
  • [2026-02-20T02:44:31Z] progress: extracted overlay runtime bootstrap wrapper into src/main/runtime/overlay-runtime-bootstrap.ts (createInitializeOverlayRuntimeHandler) and rewired initializeOverlayRuntime orchestration; plus tray lifecycle extraction into src/main/runtime/tray-lifecycle.ts (createEnsureTrayHandler, createDestroyTrayHandler).
  • [2026-02-20T02:44:31Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (74/74).
  • [2026-02-20T02:41:26Z] progress: extracted tray lifecycle orchestration into src/main/runtime/tray-lifecycle.ts (createEnsureTrayHandler, createDestroyTrayHandler); rewired ensureTray/destroyTray in main.ts with existing behavior preserved.
  • [2026-02-20T02:41:26Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (72/72).
  • [2026-02-20T02:33:47Z] progress: extracted tray icon resolution + tray menu template construction into src/main/runtime/tray-runtime.ts (resolveTrayIconPathRuntime, buildTrayMenuTemplateRuntime); rewired resolveTrayIconPath and buildTrayMenu in main.ts.
  • [2026-02-20T02:33:47Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/tray-runtime.test.js dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (69/69).
  • [2026-02-20T02:08:55Z] progress: extracted overlay bounds/window-level helpers into src/main/runtime/overlay-window-layout.ts (createUpdateVisibleOverlayBoundsHandler, createUpdateInvisibleOverlayBoundsHandler, createEnsureOverlayWindowLevelHandler, createEnforceOverlayLayerOrderHandler); rewired corresponding main.ts helpers.
  • [2026-02-20T02:08:55Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/overlay-window-layout.test.js dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (66/66).
  • [2026-02-20T01:16:52Z] progress: extracted startup warmup orchestration into src/main/runtime/startup-warmups.ts (createLaunchBackgroundWarmupTaskHandler, createStartBackgroundWarmupsHandler); rewired launchBackgroundWarmupTask + startBackgroundWarmups in main.ts.
  • [2026-02-20T01:16:52Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/startup-warmups.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (62/62).
  • [2026-02-20T01:15:36Z] progress: extracted subtitle render metrics state-update+broadcast slice into src/main/runtime/mpv-subtitle-render-metrics.ts (createUpdateMpvSubtitleRenderMetricsHandler); rewired updateMpvSubtitleRenderMetrics through a stable runtime handler.
  • [2026-02-20T01:15:36Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-subtitle-render-metrics.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (59/59).
  • [2026-02-20T01:07:32Z] progress: extracted MPV runtime service construction/wiring from createMpvClientRuntimeService into src/main/runtime/mpv-client-runtime-service.ts (createMpvClientRuntimeServiceFactory); rewired main.ts to use factory with explicit options bundle.
  • [2026-02-20T01:07:32Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (57/57).
  • [2026-02-20T01:05:38Z] progress: extracted MPV client event binding orchestration from bindMpvClientEventHandlers into src/main/runtime/mpv-client-event-bindings.ts (createBindMpvClientEventHandlers, createHandleMpvConnectionChangeHandler, createHandleMpvSubtitleTimingHandler); rewired main.ts binding setup.
  • [2026-02-20T01:05:38Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (56/56).
  • [2026-02-20T00:59:30Z] progress: extracted CLI command context composition from handleCliCommand into src/main/runtime/cli-command-context.ts; rewired main.ts to build cliContext via factory before handleCliCommandRuntimeServiceWithContext.
  • [2026-02-20T00:59:30Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/cli-command-context.test.js dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (53/53).
  • [2026-02-20T00:47:26Z] progress: extracted CLI runtime prechecks + initial arg orchestration into src/main/runtime/cli-command-prechecks.ts and src/main/runtime/initial-args-handler.ts; rewired handleCliCommand texthooker-only transition and handleInitialArgs.
  • [2026-02-20T00:47:26Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/cli-command-prechecks.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (50/50).
  • [2026-02-20T00:45:18Z] progress: extracted setup-window lifecycle/focus bookkeeping helpers into runtime modules (createMaybeFocusExistingAnilistSetupWindowHandler, createHandleAnilistSetupWindowClosedHandler, createHandleAnilistSetupWindowOpenedHandler, createMaybeFocusExistingJellyfinSetupWindowHandler, createHandleJellyfinSetupWindowClosedHandler, createHandleJellyfinSetupWindowOpenedHandler); rewired openAnilistSetupWindow + openJellyfinSetupWindow.
  • [2026-02-20T00:45:18Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (43/43).
  • [2026-02-20T00:41:54Z] progress: extracted AniList setup fallback load-event callbacks into src/main/runtime/anilist-setup-window.ts (createAnilistSetupDidFailLoadHandler, createAnilistSetupDidFinishLoadHandler); rewired did-fail-load and did-finish-load hooks in openAnilistSetupWindow.
  • [2026-02-20T00:41:54Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (37/37).
  • [2026-02-20T00:40:53Z] progress: extracted AniList setup URL event handlers from openAnilistSetupWindow into src/main/runtime/anilist-setup-window.ts (createAnilistSetupWindowOpenHandler, createAnilistSetupWillNavigateHandler, createAnilistSetupWillRedirectHandler, createAnilistSetupDidNavigateHandler); rewired main.ts callbacks.
  • [2026-02-20T00:40:53Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (34/34).
  • [2026-02-20T00:35:26Z] progress: extracted Jellyfin setup window navigation interception into createHandleJellyfinSetupNavigationHandler in src/main/runtime/jellyfin-setup-window.ts; rewired openJellyfinSetupWindow will-navigate branch in src/main.ts.
  • [2026-02-20T00:35:26Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (26/26).
  • [2026-02-20T00:34:12Z] progress: extracted Jellyfin remote lifecycle orchestration from src/main.ts into src/main/runtime/jellyfin-remote-session-lifecycle.ts (createStartJellyfinRemoteSessionHandler, createStopJellyfinRemoteSessionHandler); rewired start/stop call sites and callbacks; src/main.ts now 2731 LOC.
  • [2026-02-20T00:34:12Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-remote-session-lifecycle.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (20/20).
  • [2026-02-20T00:32:07Z] progress: extracted remaining runJellyfinCommand action branches into src/main/runtime/jellyfin-cli-play.ts and src/main/runtime/jellyfin-cli-remote-announce.ts; rewired main command router; src/main.ts now 2773 LOC.
  • [2026-02-20T00:32:07Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (16/16).
  • [2026-02-20T00:29:07Z] progress: extracted Jellyfin CLI listing branches (--jellyfin-libraries, --jellyfin-items, --jellyfin-subtitles) from runJellyfinCommand into src/main/runtime/jellyfin-cli-list.ts; rewired through createHandleJellyfinListCommands; src/main.ts now 2820 LOC.
  • [2026-02-20T00:29:07Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-auth.test.js pass (9/9).
  • [2026-02-20T00:19:13Z] progress: extracted AniList post-watch + queue orchestration into src/main/runtime/anilist-post-watch.ts, subtitle position state wrappers into src/main/runtime/subtitle-position.ts, and app protocol URL event wiring into src/main/runtime/protocol-url-handlers.ts; rewired main.ts; src/main.ts now 2853 LOC.
  • [2026-02-20T00:19:13Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/protocol-url-handlers.test.js dist/main/runtime/subtitle-position.test.js dist/main/runtime/anilist-post-watch.test.js dist/main/runtime/anilist-media-guess.test.js dist/main/runtime/anilist-token-refresh.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/anilist-setup-protocol.test.js dist/main/runtime/jellyfin-remote-connection.test.js dist/main/runtime/jellyfin-remote-playback.test.js dist/main/runtime/jellyfin-remote-commands.test.js dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (52/52).
  • [2026-02-20T00:12:40Z] progress: extracted AniList token/media resolution helpers from src/main.ts into src/main/runtime/anilist-token-refresh.ts and src/main/runtime/anilist-media-guess.ts; rewired refreshAnilistClientSecretState, maybeProbeAnilistDuration, and ensureAnilistMediaGuess; src/main.ts now 2892 LOC.
  • [2026-02-20T00:12:40Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/anilist-media-guess.test.js dist/main/runtime/anilist-token-refresh.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/anilist-setup-protocol.test.js dist/main/runtime/jellyfin-remote-connection.test.js dist/main/runtime/jellyfin-remote-playback.test.js dist/main/runtime/jellyfin-remote-commands.test.js dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (45/45).
  • [2026-02-20T00:08:57Z] progress: extracted Jellyfin setup window form/submission logic from src/main.ts into src/main/runtime/jellyfin-setup-window.ts (buildJellyfinSetupFormHtml, parseJellyfinSetupSubmissionUrl, createHandleJellyfinSetupSubmissionHandler); kept window lifecycle in main.
  • [2026-02-20T00:08:57Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/anilist-setup-protocol.test.js dist/main/runtime/jellyfin-remote-connection.test.js dist/main/runtime/jellyfin-remote-playback.test.js dist/main/runtime/jellyfin-remote-commands.test.js dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (39/39).
  • [2026-02-20T00:00:55Z] progress: extracted AniList setup/protocol handlers (notifyAnilistSetup, consumeAnilistSetupTokenFromUrl, handleAnilistSetupProtocolUrl, registerSubminerProtocolClient) from src/main.ts into src/main/runtime/anilist-setup-protocol.ts; rewired protocol registration and callback wiring; src/main.ts now 2988 LOC.
  • [2026-02-20T00:00:55Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/anilist-setup-protocol.test.js dist/main/runtime/jellyfin-remote-connection.test.js dist/main/runtime/jellyfin-remote-playback.test.js dist/main/runtime/jellyfin-remote-commands.test.js dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (35/35).
  • [2026-02-19T23:58:32Z] progress: extracted Jellyfin MPV connection/bootstrap handlers (waitForMpvConnected, launchMpvIdleForJellyfinPlayback, ensureMpvConnectedForJellyfinPlayback) from src/main.ts into src/main/runtime/jellyfin-remote-connection.ts; rewired call sites; src/main.ts now 2996 LOC.
  • [2026-02-19T23:58:32Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-remote-connection.test.js dist/main/runtime/jellyfin-remote-playback.test.js dist/main/runtime/jellyfin-remote-commands.test.js dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (31/31).
  • [2026-02-19T23:50:09Z] progress: extracted Jellyfin remote playback reporting logic (secondsToJellyfinTicks, reportJellyfinRemoteProgress, reportJellyfinRemoteStopped) from src/main.ts into src/main/runtime/jellyfin-remote-playback.ts; rewired main runtime handlers.
  • [2026-02-19T23:50:09Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-remote-playback.test.js dist/main/runtime/jellyfin-remote-commands.test.js dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (28/28).
  • [2026-02-19T23:48:01Z] progress: extracted Jellyfin remote command/session parsing handlers from src/main.ts into src/main/runtime/jellyfin-remote-commands.ts (getConfiguredJellyfinSession, handleJellyfinRemotePlay, handleJellyfinRemotePlaystate, handleJellyfinRemoteGeneralCommand factories); rewired src/main.ts to use handler factories.
  • [2026-02-19T23:48:01Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-remote-commands.test.js dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (24/24).
  • [2026-02-19T23:40:59Z] progress: extracted config hot-reload apply/message callbacks from src/main.ts into src/main/runtime/config-hot-reload-handlers.ts; src/main.ts now 3096 LOC (down from 3116 at session start).
  • [2026-02-19T23:40:59Z] test: bun run build pass (expected macOS helper Swift cache fallback in sandbox) + node --test dist/main/runtime/config-hot-reload-handlers.test.js dist/core/services/app-ready.test.js dist/core/services/startup-bootstrap.test.js pass (19/19).
  • [2026-02-19T23:37:11Z] intent: review TASK-85 state + subagent handoff, then continue next refactor slice from prior checkpoint.
  • [2026-02-19T23:37:11Z] planned files: src/main.ts, src/main/runtime/*, src/main/runtime/*.test.ts, docs/subagents/INDEX.md, docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md.
  • [2026-02-19T23:37:11Z] assumptions: backlog MCP not initialized in this workspace; continue using existing backlog/tasks/task-85 - Refactor-large-files-for-maintainability-and-readability.md as source of truth.

Files Touched

  • docs/subagents/INDEX.md
  • docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md
  • src/main.ts
  • src/main/runtime/config-hot-reload-handlers.ts
  • src/main/runtime/config-hot-reload-handlers.test.ts
  • src/main/runtime/jellyfin-remote-commands.ts
  • src/main/runtime/jellyfin-remote-commands.test.ts
  • src/main/runtime/jellyfin-remote-playback.ts
  • src/main/runtime/jellyfin-remote-playback.test.ts
  • src/main/runtime/jellyfin-remote-connection.ts
  • src/main/runtime/jellyfin-remote-connection.test.ts
  • src/main/runtime/anilist-setup-protocol.ts
  • src/main/runtime/anilist-setup-protocol.test.ts
  • src/main/runtime/jellyfin-setup-window.ts
  • src/main/runtime/jellyfin-setup-window.test.ts
  • src/main/runtime/initial-args-handler.ts
  • src/main/runtime/initial-args-handler.test.ts
  • src/main/runtime/cli-command-prechecks.ts
  • src/main/runtime/cli-command-prechecks.test.ts
  • src/main/runtime/cli-command-context.ts
  • src/main/runtime/cli-command-context.test.ts
  • src/main/runtime/mpv-client-event-bindings.ts
  • src/main/runtime/mpv-client-event-bindings.test.ts
  • src/main/runtime/mpv-client-runtime-service.ts
  • src/main/runtime/mpv-client-runtime-service.test.ts
  • src/main/runtime/mpv-subtitle-render-metrics.ts
  • src/main/runtime/mpv-subtitle-render-metrics.test.ts
  • src/main/runtime/startup-warmups.ts
  • src/main/runtime/startup-warmups.test.ts
  • src/main/runtime/overlay-window-layout.ts
  • src/main/runtime/overlay-window-layout.test.ts
  • src/main/runtime/tray-runtime.ts
  • src/main/runtime/tray-runtime.test.ts
  • src/main/runtime/tray-lifecycle.ts
  • src/main/runtime/tray-lifecycle.test.ts
  • src/main/runtime/overlay-runtime-bootstrap.ts
  • src/main/runtime/overlay-runtime-bootstrap.test.ts
  • src/main/runtime/yomitan-settings-opener.ts
  • src/main/runtime/yomitan-settings-opener.test.ts
  • src/main/runtime/global-shortcuts.ts
  • src/main/runtime/global-shortcuts.test.ts
  • src/main/runtime/mpv-osd-log.ts
  • src/main/runtime/mpv-osd-log.test.ts
  • src/main/runtime/numeric-shortcut-session-handlers.ts
  • src/main/runtime/numeric-shortcut-session-handlers.test.ts
  • src/main/runtime/overlay-shortcuts-lifecycle.ts
  • src/main/runtime/overlay-shortcuts-lifecycle.test.ts
  • src/main/runtime/anki-actions.ts
  • src/main/runtime/anki-actions.test.ts
  • src/main/runtime/mining-actions.ts
  • src/main/runtime/mining-actions.test.ts
  • src/main/runtime/overlay-visibility-actions.ts
  • src/main/runtime/overlay-visibility-actions.test.ts
  • src/main/runtime/overlay-main-actions.ts
  • src/main/runtime/overlay-main-actions.test.ts
  • src/main/runtime/ipc-bridge-actions.ts
  • src/main/runtime/ipc-bridge-actions.test.ts
  • src/main/runtime/overlay-window-factory.ts
  • src/main/runtime/overlay-window-factory.test.ts
  • src/main/runtime/tray-main-actions.ts
  • src/main/runtime/tray-main-actions.test.ts
  • src/main/runtime/yomitan-extension-loader.ts
  • src/main/runtime/yomitan-extension-loader.test.ts
  • src/main/runtime/overlay-runtime-options.ts
  • src/main/runtime/overlay-runtime-options.test.ts
  • src/main/runtime/cli-command-context-deps.ts
  • src/main/runtime/cli-command-context-deps.test.ts
  • src/main/runtime/anilist-token-refresh.ts
  • src/main/runtime/anilist-token-refresh.test.ts
  • src/main/runtime/anilist-media-guess.ts
  • src/main/runtime/anilist-media-guess.test.ts
  • src/main/runtime/anilist-post-watch.ts
  • src/main/runtime/anilist-post-watch.test.ts
  • src/main/runtime/subtitle-position.ts
  • src/main/runtime/subtitle-position.test.ts
  • src/main/runtime/protocol-url-handlers.ts
  • src/main/runtime/protocol-url-handlers.test.ts
  • src/main/runtime/jellyfin-cli-auth.ts
  • src/main/runtime/jellyfin-cli-auth.test.ts
  • src/main/runtime/jellyfin-cli-list.ts
  • src/main/runtime/jellyfin-cli-list.test.ts
  • src/main/runtime/jellyfin-cli-play.ts
  • src/main/runtime/jellyfin-cli-play.test.ts
  • src/main/runtime/jellyfin-cli-remote-announce.ts
  • src/main/runtime/jellyfin-cli-remote-announce.test.ts
  • src/main/runtime/jellyfin-remote-session-lifecycle.ts
  • src/main/runtime/jellyfin-remote-session-lifecycle.test.ts
  • src/main/runtime/anilist-setup-window.ts
  • src/main/runtime/anilist-setup-window.test.ts
  • src/main/runtime/jellyfin-setup-window.ts
  • src/main/runtime/jellyfin-setup-window.test.ts
  • src/main/runtime/app-runtime-main-deps.ts
  • src/main/runtime/app-runtime-main-deps.test.ts
  • src/main/runtime/global-shortcuts-main-deps.ts
  • src/main/runtime/global-shortcuts-main-deps.test.ts
  • src/main/runtime/mpv-osd-log-main-deps.ts
  • src/main/runtime/mpv-osd-log-main-deps.test.ts
  • src/main/runtime/app-lifecycle-main-activate.ts
  • src/main/runtime/app-lifecycle-main-activate.test.ts
  • src/main/runtime/initial-args-main-deps.ts
  • src/main/runtime/initial-args-main-deps.test.ts
  • src/main/runtime/mpv-main-event-main-deps.ts
  • src/main/runtime/mpv-main-event-main-deps.test.ts

Open Questions / Blockers

  • none

Next Step

  • extract next src/main.ts runtime-deps assembly cluster (global shortcuts and/or MPV OSD bindings) into focused *-main-deps helper(s) with parity tests.
  • [2026-02-20T04:04:21Z] progress: extracted MPV main event action callbacks into src/main/runtime/mpv-main-event-actions.ts and rewired bindMpvClientEventHandlers to delegate through focused handlers.
  • [2026-02-20T04:04:21Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-main-event-actions.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-subtitle-render-metrics.test.js pass (14/14).
  • [2026-02-20T04:06:41Z] progress: extracted Jellyfin setup-window orchestration into createOpenJellyfinSetupWindowHandler in src/main/runtime/jellyfin-setup-window.ts; rewired openJellyfinSetupWindow in src/main.ts to thin wrapper.
  • [2026-02-20T04:06:41Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/mpv-main-event-actions.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/mpv-client-runtime-service.test.js pass (23/23).
  • [2026-02-20T04:09:21Z] progress: extracted AniList setup-window orchestration into createOpenAnilistSetupWindowHandler in src/main/runtime/anilist-setup-window.ts; rewired openAnilistSetupWindow in src/main.ts to thin wrapper.
  • [2026-02-20T04:09:21Z] progress: src/main.ts reduced to 2883 LOC after this slice.
  • [2026-02-20T04:09:21Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/mpv-main-event-actions.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/mpv-client-runtime-service.test.js pass (39/39).
  • [2026-02-20T04:11:27Z] progress: extracted Jellyfin external subtitle preload/track-picking from playJellyfinItemInMpv into new src/main/runtime/jellyfin-subtitle-preload.ts (createPreloadJellyfinExternalSubtitlesHandler) and rewired main.ts.
  • [2026-02-20T04:11:27Z] progress: src/main.ts reduced to 2785 LOC after subtitle-preload extraction.
  • [2026-02-20T04:11:27Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-subtitle-preload.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/anilist-setup-window.test.js dist/main/runtime/jellyfin-setup-window.test.js dist/main/runtime/mpv-main-event-actions.test.js pass (41/41).
  • [2026-02-20T04:17:41Z] progress: extracted playJellyfinItemInMpv orchestration into src/main/runtime/jellyfin-playback-launch.ts (createPlayJellyfinItemInMpvHandler) + tests; rewired main.ts playback handler wiring.
  • [2026-02-20T04:17:41Z] progress: extracted runJellyfinCommand command routing into src/main/runtime/jellyfin-command-dispatch.ts (createRunJellyfinCommandHandler) + tests; rewired main.ts dispatcher wiring.
  • [2026-02-20T04:17:41Z] progress: src/main.ts reduced to 2696 LOC after Jellyfin playback/dispatch extraction.
  • [2026-02-20T04:17:41Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/jellyfin-command-dispatch.test.js dist/main/runtime/jellyfin-playback-launch.test.js dist/main/runtime/jellyfin-subtitle-preload.test.js dist/main/runtime/jellyfin-cli-auth.test.js dist/main/runtime/jellyfin-cli-list.test.js dist/main/runtime/jellyfin-cli-play.test.js dist/main/runtime/jellyfin-cli-remote-announce.test.js pass (24/24).
  • [2026-02-20T04:32:30Z] progress: extracted AniList media-state helpers to src/main/runtime/anilist-media-state.ts (createGetCurrentAnilistMediaKeyHandler, createResetAnilistMediaTrackingHandler, createGetAnilistMediaGuessRuntimeStateHandler, createSetAnilistMediaGuessRuntimeStateHandler, createResetAnilistMediaGuessStateHandler) + tests; rewired main AniList guess-state callbacks.
  • [2026-02-20T04:32:30Z] progress: extracted MPV main event binder orchestration from bindMpvClientEventHandlers into src/main/runtime/mpv-main-event-bindings.ts (createBindMpvMainEventHandlersHandler) + tests; rewired main.ts to dependency-only binder setup.
  • [2026-02-20T04:32:30Z] progress: src/main.ts reduced to 2665 LOC.
  • [2026-02-20T04:32:30Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-main-event-bindings.test.js dist/main/runtime/mpv-main-event-actions.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/anilist-media-state.test.js dist/main/runtime/anilist-media-guess.test.js dist/main/runtime/jellyfin-command-dispatch.test.js dist/main/runtime/jellyfin-playback-launch.test.js pass (23/23).
  • [2026-02-20T04:33:17Z] progress: extracted main MPV event binding orchestration from src/main.ts into src/main/runtime/mpv-main-event-bindings.ts (createBindMpvMainEventHandlersHandler) with unit tests in src/main/runtime/mpv-main-event-bindings.test.ts; rewired main.ts bind setup to dependency map.
  • [2026-02-20T04:33:17Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-main-event-bindings.test.js dist/main/runtime/mpv-main-event-actions.test.js dist/main/runtime/mpv-client-event-bindings.test.js dist/main/runtime/anilist-media-state.test.js dist/main/runtime/anilist-media-guess.test.js dist/main/runtime/jellyfin-command-dispatch.test.js dist/main/runtime/jellyfin-playback-launch.test.js pass (23/23).
  • [2026-02-20T05:00:15Z] progress: extracted on-will-quit cleanup dependency assembly to src/main/runtime/app-lifecycle-main-cleanup.ts (createBuildOnWillQuitCleanupDepsHandler) + tests; rewired onWillQuitCleanupHandler wiring in src/main.ts.
  • [2026-02-20T05:00:15Z] progress: extracted overlay runtime options dependency assembly to src/main/runtime/overlay-runtime-options-main-deps.ts + tests; rewired buildInitializeOverlayRuntimeOptionsHandler wiring in src/main.ts.
  • [2026-02-20T05:00:15Z] progress: extracted CLI command context dependency assembly to src/main/runtime/cli-command-context-main-deps.ts + tests; rewired buildCliCommandContextDepsHandler wiring in src/main.ts.
  • [2026-02-20T05:00:15Z] progress: src/main.ts reduced to 2617 LOC.
  • [2026-02-20T05:00:15Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/cli-command-context-main-deps.test.js dist/main/runtime/cli-command-context-deps.test.js dist/main/runtime/overlay-runtime-options-main-deps.test.js dist/main/runtime/overlay-runtime-options.test.js dist/main/runtime/app-lifecycle-main-cleanup.test.js dist/main/runtime/mpv-main-event-bindings.test.js pass (6/6).
  • [2026-02-20T05:01:42Z] progress: extracted MPV runtime-service dependency assembly into src/main/runtime/mpv-client-runtime-service-main-deps.ts + tests; rewired createMpvClientRuntimeService in src/main.ts to use builder before createMpvClientRuntimeServiceFactory.
  • [2026-02-20T05:01:42Z] progress: src/main.ts currently 2618 LOC.
  • [2026-02-20T05:01:42Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/mpv-client-runtime-service-main-deps.test.js dist/main/runtime/mpv-client-runtime-service.test.js dist/main/runtime/mpv-main-event-bindings.test.js dist/main/runtime/cli-command-context-main-deps.test.js dist/main/runtime/overlay-runtime-options-main-deps.test.js dist/main/runtime/app-lifecycle-main-cleanup.test.js pass (7/7).
  • [2026-02-20T05:06:04Z] progress: extracted overlay-window factory dependency assembly into src/main/runtime/overlay-window-factory-main-deps.ts + tests; rewired createOverlayWindowHandler, createMainWindowHandler, and createInvisibleWindowHandler wiring in src/main.ts.
  • [2026-02-20T05:06:04Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/overlay-window-factory-main-deps.test.js dist/main/runtime/overlay-window-factory.test.js dist/main/runtime/mpv-client-runtime-service-main-deps.test.js dist/main/runtime/cli-command-context-main-deps.test.js dist/main/runtime/overlay-runtime-options-main-deps.test.js dist/main/runtime/app-lifecycle-main-cleanup.test.js pass (8/8).
  • [2026-02-20T05:10:14Z] progress: extracted tray/overlay-bootstrap/Yomitan opener dependency assembly into src/main/runtime/app-runtime-main-deps.ts (createBuildEnsureTrayMainDepsHandler, createBuildDestroyTrayMainDepsHandler, createBuildInitializeOverlayRuntimeBootstrapMainDepsHandler, createBuildOpenYomitanSettingsMainDepsHandler); rewired ensureTray, destroyTray, initializeOverlayRuntime, and openYomitanSettings to thin handlers in src/main.ts.
  • [2026-02-20T05:10:14Z] progress: src/main.ts currently 2652 LOC after this slice (line-count bump from import/deps constant growth while inline wrapper bodies were removed).
  • [2026-02-20T05:10:14Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/app-runtime-main-deps.test.js dist/main/runtime/tray-lifecycle.test.js dist/main/runtime/overlay-runtime-bootstrap.test.js dist/main/runtime/yomitan-settings-opener.test.js dist/main/runtime/tray-main-deps.test.js dist/main/runtime/overlay-runtime-options-main-deps.test.js pass (13/13).
  • [2026-02-20T05:12:29Z] progress: extracted global-shortcuts dependency assembly into src/main/runtime/global-shortcuts-main-deps.ts (createBuildGetConfiguredShortcutsMainDepsHandler, createBuildRegisterGlobalShortcutsMainDepsHandler, createBuildRefreshGlobalAndOverlayShortcutsMainDepsHandler) and rewired corresponding handler setup in src/main.ts.
  • [2026-02-20T05:12:29Z] progress: extracted MPV OSD/log dependency assembly into src/main/runtime/mpv-osd-log-main-deps.ts (createBuildAppendToMpvLogMainDepsHandler, createBuildShowMpvOsdMainDepsHandler) and rewired appendToMpvLogHandler + showMpvOsdHandler setup in src/main.ts.
  • [2026-02-20T05:12:29Z] progress: src/main.ts currently 2672 LOC after this slice (net increase from imports and explicit deps builders).
  • [2026-02-20T05:12:29Z] test: initial bun run build failed with type mismatch in global-shortcuts-main-deps (unknown options type); fixed by tightening to RegisterGlobalShortcutsServiceOptions.
  • [2026-02-20T05:12:29Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/global-shortcuts-main-deps.test.js dist/main/runtime/global-shortcuts.test.js dist/main/runtime/mpv-osd-log-main-deps.test.js dist/main/runtime/mpv-osd-log.test.js dist/main/runtime/app-runtime-main-deps.test.js pass (15/15).
  • [2026-02-20T05:15:40Z] progress: extracted activate-lifecycle deps assembly into src/main/runtime/app-lifecycle-main-activate.ts (createBuildShouldRestoreWindowsOnActivateMainDepsHandler, createBuildRestoreWindowsOnActivateMainDepsHandler) and rewired shouldRestoreWindowsOnActivateHandler + restoreWindowsOnActivateHandler setup in src/main.ts.
  • [2026-02-20T05:15:40Z] progress: extracted initial-args deps assembly into src/main/runtime/initial-args-main-deps.ts (createBuildHandleInitialArgsMainDepsHandler) and rewired handleInitialArgs setup in src/main.ts.
  • [2026-02-20T05:15:40Z] progress: extracted MPV main-event deps assembly into src/main/runtime/mpv-main-event-main-deps.ts (createBuildBindMpvMainEventHandlersMainDepsHandler) and rewired bindMpvClientEventHandlers setup in src/main.ts.
  • [2026-02-20T05:15:40Z] progress: src/main.ts currently 2653 LOC after this slice.
  • [2026-02-20T05:15:40Z] test: bun run build pass (expected macOS helper Swift cache fallback) + node --test dist/main/runtime/app-lifecycle-main-activate.test.js dist/main/runtime/initial-args-main-deps.test.js dist/main/runtime/app-lifecycle-actions.test.js dist/main/runtime/initial-args-handler.test.js dist/main/runtime/app-runtime-main-deps.test.js dist/main/runtime/mpv-main-event-main-deps.test.js dist/main/runtime/mpv-main-event-bindings.test.js dist/main/runtime/mpv-main-event-actions.test.js dist/main/runtime/mpv-client-event-bindings.test.js pass (27/27).