You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "colaforniaw (via GitHub)" <gi...@apache.org> on 2026/09/19 13:20:02 UTC
[PR] refactor(desktop): centralize auxiliary window lifecycle [maka]
colaforniaw opened a new pull request, #5507:
URL: https://github.com/apache/maka/pull/5507
## Summary
Five auxiliary window types each implemented the same hidden creation, reveal, theme, focus, and teardown rules. This change declares the permission overlay, startup progress, WorkHub, cursor overlay, and PiP windows in one registry and routes their lifecycle through it.
The registry receives the run reveal mode from `startup-context.ts`, preserves hidden E2E behavior, and owns auxiliary renderer parents. Browser IPC now resolves embedded-browser parents with the registry, while the main window keeps its dedicated controller.
Fixes #5379
## Verification
- 64 focused Node tests passed for the registry, browser IPC, startup progress, WorkHub, cursor overlay, and permission overlay
- Biome passed for all 13 changed files
- esbuild bundled the registry and all five auxiliary window entry points
- `git diff --check` passed
- Main-process TypeScript checking remains blocked by missing existing `packages/runtime-host/dist` transcript modules; no changed file reported a type error
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Codex implemented, simplified, reviewed, and verified the auxiliary window registry refactor.
## Checklist
- [x] 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
- [x] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] refactor(desktop): centralize auxiliary window lifecycle [maka]
Posted by "Colafornia (via GitHub)" <gi...@apache.org>.
Colafornia merged PR #5507:
URL: https://github.com/apache/maka/pull/5507
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] refactor(desktop): centralize auxiliary window lifecycle [maka]
Posted by "colaforniaw (via GitHub)" <gi...@apache.org>.
colaforniaw commented on PR #5507:
URL: https://github.com/apache/maka/pull/5507#issuecomment-5870582777
Thanks for the reviews. Rebased onto `main`; the `runtime-host-boot.ts` conflict is resolved and `test` is green.
On @me2seeks's findings:
1. **`declarations`/`id`** — keeping as-is. The declaration table is the shape #5379 asks for. `size` is empty everywhere because all four windows compute bounds at runtime, so there's nothing static to hoist yet; the `id` starts mattering once an entry diverges. `focus`/`destroy` take the window because they don't need declaration data.
2. **`loadElectron`** — verified, but `createRequire(import.meta.url)` can't work here: `workhub-presentation.test.ts` esbuild-bundles this module and evaluates it in a `vm` sandbox where `import.meta` doesn't exist — it throws `ERR_INVALID_ARG_VALUE` (confirmed by running the suite). Indirect eval picks up the sandbox's injected `require`. Documented the constraint in d95e6ae.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] refactor(desktop): centralize auxiliary window lifecycle [maka]
Posted by "colaforniaw (via GitHub)" <gi...@apache.org>.
colaforniaw commented on PR #5507:
URL: https://github.com/apache/maka/pull/5507#issuecomment-5870575098
Thanks for the reviews.
Rebased onto current `main` — the `runtime-host-boot.ts` conflict @hqhq1025's agent flagged is resolved; `test` is green on the new head (`package` still running).
On @me2seeks's findings:
**1. `declarations` table / `id` parameter** — keeping as-is. The declaration table is the shape #5379 asks for ("auxiliary windows are declared once — identifier, parent, size, keep-alive, reveal behavior"). Every `size` is `{}` because all four windows compute size/position at runtime (WorkHub sizes to the cursor's display, the permission overlay takes caller bounds, PiP fits the target display) — there is nothing static to hoist today. `focus`/`destroy` take the window rather than the `id` deliberately: they act on the instance, not the declaration. Once an entry diverges (different reveal, size, keep-alive), the `id` on `create`/`show` is what selects it.
**2. `loadElectron`** — verified why this diverges, and the repo idiom cannot apply here. This module is esbuild-bundled and evaluated inside a `vm` sandbox by `workhub-presentation.test.ts`, where `import.meta` does not exist and `require` is a sandbox-injected global returning the fake electron. `createRequire(import.meta.url)` throws `ERR_INVALID_ARG_VALUE` on that path — confirmed by running the suite. The indirect eval picks up the sandbox (and Electron main's) global `require`; the `createRequire(process.execPath)` fallback covers plain-node contexts. Added a comment explaining the constraint in d95e6ae.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org