Skip to content

feat: add front hot-reload development mode - #232

Open
Alex-Arsys wants to merge 1 commit into
mainfrom
feat/front-hot-reload
Open

feat: add front hot-reload development mode#232
Alex-Arsys wants to merge 1 commit into
mainfrom
feat/front-hot-reload

Conversation

@Alex-Arsys

Copy link
Copy Markdown
Contributor

Adds source-mode serving for web-apps and sdkjs so UI changes are visible with a browser reload (no grunt build). Includes auto-reload via a livereload server for web-apps (polling mode, reliable on WSL/Windows).

  • develop/Makefile: add front-dev, front-prod, front-dev-live, sdkjs-dev targets with SDK sentinel guard, nginx validate-before-swap with rollback to .prod.bak, and automatic npm ci bootstrap on first run
  • develop/setup/ds-docservice-dev.conf: nginx dev config serving web-apps and sdkjs from source (/develop), livereload injection via sub_filter, service worker neutralised, graceful fallback when livereload server is not running
  • develop/setup/livereload-tools/: Node livereload server (polling 1s) with versioned lockfile for reproducible installs across machines

Adds source-mode serving for web-apps and sdkjs so UI changes are visible
with a browser reload (no grunt build). Includes auto-reload via a livereload
server for web-apps (polling mode, reliable on WSL/Windows).

- develop/Makefile: add front-dev, front-prod, front-dev-live, sdkjs-dev targets
  with SDK sentinel guard, nginx validate-before-swap with rollback to .prod.bak,
  and automatic npm ci bootstrap on first run
- develop/setup/ds-docservice-dev.conf: nginx dev config serving web-apps and
  sdkjs from source (/develop), livereload injection via sub_filter, service
  worker neutralised, graceful fallback when livereload server is not running
- develop/setup/livereload-tools/: Node livereload server (polling 1s) with
  versioned lockfile for reproducible installs across machines

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Alex Hernández <ahmartin@arsys.es>
@Alex-Arsys
Alex-Arsys force-pushed the feat/front-hot-reload branch from 6560c23 to b509578 Compare June 23, 2026 11:56
@MonaAghili

MonaAghili commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@moodyjmz — status check on feat/front-hot-reload against the two webpack migrations (web-apps, done; sdkjs, in flight).

TL;DR

Works today, no action needed. One known, already-scoped break coming when sdkjs's webpack migration merges — a one-line Makefile fix, not a redesign.

web-apps: still fine, verified

develop/setup/ds-docservice-dev.conf serves /web-apps/ straight from the source tree (alias /develop/web-apps/). That depends on the un-built index.html loading require.jsapp_dev.js — a plain RequireJS require.config/require([...]) listing every individual source module.

web-apps' Grunt→webpack migration (74a13d1515, already merged) only touches the production/deploy path: it builds index.html.deploy into a bundled app.js under BUILD_ROOT. The dev entry point (index.html/app_dev.js) and the production entry point (index.html.deploy) are separate files — webpack landing never touched the one hot-reload depends on. Nothing to change here.

sdkjs: fine today, breaks on merge — fix already known

develop/Makefile:199 (sdkjs-dev target) calls grunt develop to generate the SDK's unbundled dev loader (sdkjs/develop/sdkjs/*/scripts.js + AllFonts.js). That's correct as long as sdkjs main still has Grunt — but feature/migration-to-webpack-sdkjs removes it, so once that branch merges, sdkjs-dev fails outright (grunt: command not found).

I checked what that branch actually ships before flagging this as a real problem, and it isn't one — it's a rename, not a redesign:

  • build/package.json on that branch: "develop": "node scripts/build-develop.cjs"
  • Same output path: develop/sdkjs/{word,cell,slide,visio}/scripts.js
  • Its own build/DEVELOPER-GUIDE.md documents pairing npm run develop with our make front-dev / front-dev-live / front-prod directly — the migration was written with this hot-reload workflow in mind, not against it.

So the fix, to land in the same PR that merges sdkjs's webpack migration:

  # develop/Makefile:199
- cd $(EO_REPO)/sdkjs/build && npm install --no-audit --no-fund && grunt develop
+ cd $(EO_REPO)/sdkjs/build && npm install --no-audit --no-fund && npm run develop

No other changes needed — SDK_SENTINEL and the [s]erver.js livereload-process check both key off paths that don't move.

Ask

Can you (or whoever merges feature/migration-to-webpack-sdkjs) carry that one-line Makefile change along with it? I can open it as a follow-up PR once that branch is closer to merging, or fold it into the same PR — whichever's easier for you.

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

Labels

None yet

Projects

Status: 📄 To do

Development

Successfully merging this pull request may close these issues.

2 participants