Skip to content

fix(desktop): warm and isolate Vite dev renderer - #4820

Closed
seekskyworld wants to merge 1 commit into
apache:mainfrom
seekskyworld:fix/4775-dev-cache-warmup
Closed

fix(desktop): warm and isolate Vite dev renderer#4820
seekskyworld wants to merge 1 commit into
apache:mainfrom
seekskyworld:fix/4775-dev-cache-warmup

Conversation

@seekskyworld

Copy link
Copy Markdown
Contributor

Summary

Fixes #4775

Dev launches now warm the Vite client entry and wait for its import graph to become idle before Electron starts. The main window clears the renderer session cache only for the Vite development entry, preventing stale immutable dependency generations from being combined with a fresh optimizer graph; packaged file:// launches keep their existing cache behavior.

Verification

  • node --test apps/desktop/scripts/dev-renderer-warmup.test.mjs (2 passed)
  • npm --workspace @maka/desktop run build:main (passed)
  • node --test apps/desktop/dist/main/__tests__/main-renderer-loader.test.js (1 passed)
  • npx tsc -p apps/desktop/tsconfig.main.json --noEmit (passed)
  • npx biome lint on all changed files (passed)
  • npm --workspace @maka/desktop run build:workspace-deps reaches the existing @maka/ui baseline type errors on current main; it is not green in this checkout.

AI use

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

Tool(s) and scope: OpenAI Codex authored the implementation and tests, then ran the focused checks listed above.

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 — development launches now clear stale renderer cache and wait for Vite warmup before opening Electron.
  • No

Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Generated-by: OpenAI Codex
@seekskyworld

Copy link
Copy Markdown
Contributor Author

Closing as duplicate after verifying the existing implementation in #4782. I will not compete with that PR.

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

1 participant