You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/06 04:19:23 UTC
[I] test(desktop): give the renderer a per-file unit seam [maka]
Astro-Han opened a new issue, #4892:
URL: https://github.com/apache/maka/issues/4892
`apps/desktop` has no way to unit-test a renderer file. Its `test:dist` glob is `dist/main/**/*.test.js`, and the renderer is bundled by Vite rather than compiled to `dist`, so the only automated signal available to renderer logic is a Storybook `play` function running in real Chromium.
This came out of #4761, which moved every test that did not need Electron down a tier. That work is done — the Electron tier is 30 tests in 16 files, held by `apps/desktop/e2e-budget.json` and `check:e2e-budget`. What it exposed is that the tier below Electron is a single tier, not two: renderer state machines land in the browser next to genuine geometry and paint, because there is nowhere cheaper for them to go.
Two concrete costs today:
- `composer-mentions.tsx:132` guards against a stale catalog by keying the cached value on `contextKey` and returning a loading placeholder when the context has moved. It is a pure synchronous derivation with no DOM in it, and it is currently unprotected — nothing fails if the ternary is inverted.
- `composer-slash-menu.stories.tsx`'s `ContextSwitchStartsWithALoadingCatalog` asserts only ARIA attributes, menu presence and editor text. It has no geometry and no computed style, yet it pays for a browser, and it flakes there.
Not settled yet: which seam. Vitest with the existing Vite config, a `tsc` target that emits renderer tests to `dist`, and extracting the logic into a framework-free module tested by `node --test` are all plausible and have different costs for the architecture ratchet (`check:architecture`) to absorb. Choosing among them is the first step here.
Non-goals: moving stories that assert geometry, computed style or paint — those belong in Chromium and stay. Adding a second renderer test runner alongside a seam that already works.
--
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.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: [I] test(desktop): pin the composer mention catalog's context guard [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #4892: test(desktop): pin the composer mention catalog's context guard
URL: https://github.com/apache/maka/issues/4892
--
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: [I] test(desktop): pin the composer mention catalog's context guard [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on issue #4892:
URL: https://github.com/apache/maka/issues/4892#issuecomment-5556884427
Correction to the original description: this issue first claimed `apps/desktop` had no per-file unit seam for renderer code and asked for one to be built. That was wrong. The seam exists and is in heavy use — `tsconfig.main.json` emits every renderer module the main test graph reaches into `dist/renderer/` (105 of them today), and `composer-mentions.js` is already among them. The issue has been rewritten to the actual gap, which is one missing test.
--
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: [I] test(desktop): pin the composer mention catalog's context guard [maka]
Posted by "Totoro-qaq (via GitHub)" <gi...@apache.org>.
Totoro-qaq commented on issue #4892:
URL: https://github.com/apache/maka/issues/4892#issuecomment-5556895909
take
--
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