diff --git a/docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md b/docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md index 338a5ef..0f2a7a5 100644 --- a/docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md +++ b/docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md @@ -414,3 +414,5 @@ - [2026-02-20T09:35:02Z] progress: extracted protocol URL registration dependency assembly to `protocol-url-handlers-main-deps.ts` and rewired main protocol registration call through builder. - [2026-02-20T09:35:02Z] progress: normalized `cycleSecondarySubMode` to use prebuilt deps builder constant (avoids per-call rebuild). - [2026-02-20T09:35:02Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + `protocol-url-handlers*` and `secondary-sub-mode-main-deps` tests pass. +- [2026-02-20T09:35:02Z] progress: prebuilt setup-window focus handlers (`maybeFocusExistingAnilistSetupWindow`, `maybeFocusExistingJellyfinSetupWindow`) and injected them into corresponding main deps builders in `main.ts`. +- [2026-02-20T09:35:02Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + setup-window suites pass (`anilist-setup-window*`, `jellyfin-setup-window*`). diff --git a/src/main.ts b/src/main.ts index 026d7c2..02f0d3f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1528,10 +1528,11 @@ const registerSubminerProtocolClient = createRegisterSubminerProtocolClientHandl buildRegisterSubminerProtocolClientMainDepsHandler(), ); +const maybeFocusExistingAnilistSetupWindow = createMaybeFocusExistingAnilistSetupWindowHandler({ + getSetupWindow: () => appState.anilistSetupWindow, +}); const buildOpenAnilistSetupWindowMainDepsHandler = createBuildOpenAnilistSetupWindowMainDepsHandler({ - maybeFocusExistingSetupWindow: createMaybeFocusExistingAnilistSetupWindowHandler({ - getSetupWindow: () => appState.anilistSetupWindow, - }), + maybeFocusExistingSetupWindow: maybeFocusExistingAnilistSetupWindow, createSetupWindow: () => new BrowserWindow({ width: 1000, @@ -1588,11 +1589,12 @@ function openAnilistSetupWindow(): void { createOpenAnilistSetupWindowHandler(buildOpenAnilistSetupWindowMainDepsHandler())(); } +const maybeFocusExistingJellyfinSetupWindow = createMaybeFocusExistingJellyfinSetupWindowHandler({ + getSetupWindow: () => appState.jellyfinSetupWindow, +}); const buildOpenJellyfinSetupWindowMainDepsHandler = createBuildOpenJellyfinSetupWindowMainDepsHandler({ - maybeFocusExistingSetupWindow: createMaybeFocusExistingJellyfinSetupWindowHandler({ - getSetupWindow: () => appState.jellyfinSetupWindow, - }), + maybeFocusExistingSetupWindow: maybeFocusExistingJellyfinSetupWindow, createSetupWindow: () => new BrowserWindow({ width: 520,