Skip to content

emrg: gui renderer Batch 5 final switch — main.js loads React renderer dist - #1023

Merged
argszero merged 2 commits into
masterfrom
feature/batch5-final-switch
Aug 26, 2026
Merged

emrg: gui renderer Batch 5 final switch — main.js loads React renderer dist#1023
argszero merged 2 commits into
masterfrom
feature/batch5-final-switch

Conversation

@argszero

Copy link
Copy Markdown
Owner

The Batch 5 final switch (part 1): production GUI now runs the React renderer.

Changes:

  • emrg/gui/main.js: both loadFile calls (initial load + render-process-gone reload) now point to renderer/dist/index.html instead of the vanilla renderer/index.html.
  • Agent.md: Batch 5 bullet updated (final switch part 1; vanilla files retained for revert).

Context:

  • emrg: gui renderer Batch 5 final-switch CI prep — build renderer/dist in release pipeline #1022 already added the Vite renderer build step to the release pipeline (build-release.yml) and removed the dist exclusion from the electron-builder files whitelist, so renderer/dist is now built + packaged on all 4 release runners.
  • The React app is self-contained (own shell.css bundled into dist/assets/*.css); dist/index.html uses CSP-safe relative assets (Vite base './').
  • Vanilla renderer files (renderer/js, renderer/css, renderer/index.html) and the vm.runInContext smoke tests are deliberately KEPT in this PR for instant revert — they become inert; a follow-up cleanup PR removes them (design doc D6).
  • preload.js bridge (52 invoke + onEvent) untouched; React components use the same window.emrg surface.

Verification: pytest 1106+1, GUI 265 (257 pass/0 fail), renderer typecheck + vite build → dist/index.html present, import + CLI OK, doc-count 4/4, actionlint clean (no workflow change).

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 2026-08-27T03:37:50

Independent review of the full diff (head 46edc0a, after the prestart addition):

  • main.js: both loadFile calls (initial window + render-process-gone reload) now point to renderer/dist/index.html — consistent with the #1022 pipeline change that builds + whitelists dist.
  • gui package.json: added prestartnpm --prefix renderer run build, so the documented npm start flow works on a fresh clone (dist is gitignored; previously a fresh npm start would white-screen). Verified: npm --prefix renderer run build produces dist/index.html; GUI npm test 257 pass / 0 fail / 8 skip.
  • Agent.md: Batch 5 bullet documents the switch + prestart.
  • Vanilla renderer files + vm.runInContext tests deliberately retained for instant revert; cleanup deferred to a follow-up PR (design doc D6).
    CI: run 33006377939 — test 2m0s + test-windows 2m5s, both SUCCESS. Local: pytest 1106 passed + 1 skipped; import + CLI OK. mergeable: MERGEABLE / CLEAN.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 2026-08-27T03:49:04

Re-review of head 46edc0a (unchanged since previous vote): full diff confirmed — main.js both loadFile calls → renderer/dist/index.html; gui package.json prestartnpm --prefix renderer run build (fresh-clone npm start safety); Agent.md Batch 5 bullet documents switch + prestart. No issues found; vanilla files retained for revert as designed. CI run 33006377939: test 2m0s + test-windows 2m5s both SUCCESS. LGTM 2/3.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 2026-08-27T03:55:17

Third independent review (LGTM 3/3). Head 46edc0a unchanged; full diff re-verified: main.js both loadFile calls → renderer/dist/index.html, gui package.json prestart build hook, Agent.md Batch 5 note. CI run 33006377939 double-green (test + test-windows). mergeable: MERGEABLE / CLEAN. Approving for merge.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero