refactor(panel): move the renderer runtime and app state into @luke/panel
Merged
DA
11d ago+193+193+012345678901234567890123456789-170-170-012345678901234567890123456789
Summary
This is the second band of step 16 of the web plan ("๐ฑ Web support", Refactors to land first), which moves the desktop panel into @luke/panel bottom-up. The first band was #3655.
It moves these files as-is. Only the import specifiers change:
renderer-runtime.ts, the renderer's atom runtime and registryuse-app-state.ts- the modules the logic-lives-in-packages check would otherwise leave behind importing only packages:
markdown-html-parser.tsdesktop/automation-words.ts,desktop/use-automation-runs.ts,desktop/use-automations.ts,desktop/use-issues.tsfactory-world/use-factory-world.tstasks/chat-gate.ts,tasks/file-view-settings.ts,tasks/task-time.ts,tasks/use-link-standing.ts
Git records all 12 files as renames. The desktop files that imported them now import @luke/panel/<path>. Two tests stay in the desktop for now, because they also draw desktop modules: markdown-html-parser.test.ts and tasks/task-time.test.ts. They import their subjects from the package.
Beyond renames and import rewrites:
- Root
AGENTS.md(approved by the developer): the Effect-idioms paragraph namesrenderer-runtime.tsat its new path,packages/panel/src/renderer-runtime.ts.tools/anti-slop/effect-edges.json'sruntimeEdgesrow moves with it. The repository check holds the two to each other. - rehype-raw redirect:
apps/desktop/scripts/build.mjs(markdownHtmlParserOnDemand) andapps/desktop/vitest.config.tsanswerrehype-rawwith the parser's new path. - Dependencies:
rehype-rawmoves from the desktop's devDependencies to the panel's dependencies, since the parser is what imports it. The panel also gainseffectand@effect/atom-react(bothcatalog:).
The desktop's behavior is unchanged.
Evidence
./scripts/repository-checks.sh: passed.tscfor@luke/paneland@luke/desktop: passed.lint,knip: passed.@luke/desktopvitest: 218 files passed. No test was added or removed.@luke/desktopbuild, bundle budget included: passed. The HTML parser still lands in its own chunk, outsidepanel.js's up-front load.- I booted the built app on Linux under
xvfb-run -awith--disable-gpu --disable-dev-shm-usage --fixture smoke. The panel drew Home, the hidden voice window mountedVoiceHost, andcall.htmldrew the call card. The only console errors were Sentry'ssentry-ipc://requests, which also appear onmain. Not run on a Mac.
Invariants
-
./scripts/check.shgreen. (CI) - JSON Schema goldens unchanged.
- No behavior change, so no new test is needed; no change-detector test added.
- Gateway envelope goldens unchanged.
- No new
astype assertion. - No
Effect.run*outside the runtime edges (the edge row moved with its file). - No new raw async primitives.
- No dropped Effect, Stream, or Layer statement.
- Test count unchanged.
- No hand-rolled file replaced.
- Every
CLAUDE.md/AGENTS.mdsentence naming a changed part is edited (rootAGENTS.md;CLAUDE.mdis its symlink). -
PRIVACY.mdunchanged. - Package
package.jsondeps match what the sources import by bare specifier. - Barrel/door rule unchanged.
Notes
- Next: the leaf bands, renames and import rewrites only.
Made with Luke