Skip to content

refactor(desktop): centralize auxiliary window lifecycle - #5507

Open
colaforniaw wants to merge 2 commits into
apache:mainfrom
colaforniaw:refactor/desktop-auxiliary-window-registry
Open

colaforniaw wants to merge 2 commits into
apache:mainfrom
colaforniaw:refactor/desktop-auxiliary-window-registry

Conversation

@colaforniaw

@colaforniaw colaforniaw commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Five auxiliary window types each implemented parts of the same hidden creation, reveal, focus, theme, and guarded teardown lifecycle. This change declares the permission overlay, startup progress, WorkHub, cursor overlay, and PiP windows in one registry and routes those operations through it.

The final registry is deliberately narrow: declarations, create/show/focus/destroy, theme following, and the auxiliary renderer-to-parent map required by browser presentation. Run reveal mode flows from startup-context.ts, preserving hidden and inactive E2E behavior. Browser IPC owns session selection and passes its parent resolver into the BrowserView factory; the main-window controller no longer owns auxiliary renderer or parent-resolution state.

The ablation pass removed batch teardown and keep-alive policy execution, the active/inactive reveal branch, parent validation, public interface boilerplate, renderer forwarding methods, and stored session-resolver callbacks. Production code is now +218/-99 (net +119); the remaining net +78 is focused test coverage.

Fixes #5379

Verification

  • 87 focused Node tests passed against a fresh Desktop main build for the registry, browser IPC, startup progress, WorkHub, cursor overlay, permission overlay, and related computer-use behavior
  • npm run lint passed (3,745 files); npm run format:check passed (2,197 files)
  • npm run typecheck passed across all workspaces after rebuilding Desktop's workspace dependencies
  • npm --workspace @maka/desktop run build:main and git diff --check passed
  • Electron E2E and native-window smoke were not run locally

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex implemented, simplified, reviewed, and verified the auxiliary window registry refactor.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes - described under Summary above
  • No

@github-actions github-actions Bot added the effort/L Under 1000 readable lines label Sep 19, 2026
@colaforniaw
colaforniaw force-pushed the refactor/desktop-auxiliary-window-registry branch 2 times, most recently from 95e4193 to 271498e Compare September 19, 2026 13:56
@colaforniaw
colaforniaw force-pushed the refactor/desktop-auxiliary-window-registry branch 3 times, most recently from 2dbab07 to 254c8cb Compare September 20, 2026 02:54
@github-actions github-actions Bot added effort/M Under 500 readable lines and removed effort/L Under 1000 readable lines labels Sep 20, 2026
@colaforniaw
colaforniaw force-pushed the refactor/desktop-auxiliary-window-registry branch from 254c8cb to e39b2a8 Compare September 20, 2026 05:16
@colaforniaw
colaforniaw force-pushed the refactor/desktop-auxiliary-window-registry branch from e39b2a8 to 6a6f70f Compare September 20, 2026 06:29
@colaforniaw
colaforniaw marked this pull request as ready for review September 20, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(desktop): auxiliary window registry

1 participant