Commit graph

5,547 commits

Author SHA1 Message Date
cda1d784ff Fix CMMS-embedded loads freezing on the boot curtain forever
restore_space() (the normal boot path, restoring a previous IndexedDB
session) is intentionally skipped for a CMMS-scoped launch - but its
finalization tail (hide the loading curtain via boot_done(), enable
handles, publish app_ready) only ever ran inside restore_space() itself.
Skipping it meant the curtain never went away even after cmms_load_from_url
fetched and loaded the file successfully underneath it. app_ready
subscribers never fired either - mesh/history.js's undo-tracking enable,
mesh/build.js's doc-name label - a second, less visible bug from the same
cause.

Wrapped in try/finally so this always runs, even on a failed fetch -
a file that can't load shouldn't leave the user stuck behind the
curtain either. Also calls api.document.restoreOrCreate() first, since
restore_space() always does that before any file-load in normal use.
2026-08-27 20:15:28 +10:00
69e3bced7c Skip COOP for iframe-embedded requests (fixes CMMS Kiri:Moto/Mesh:Tool postMessage integration)
Cross-Origin-Opener-Policy describes a top-level document's opener
relationship and has no defined meaning for a nested document, but
addCorsHeaders() set it unconditionally on every response - including
when this app is loaded inside an iframe by a host like CMMS. That
turned out to silently break postMessage delivery into the frame: a
well-formed same-origin message with a correct explicit targetOrigin
simply never arrived, with zero error anywhere. Confirmed via CMMS's
cam-edit.php/mesh-edit.php integration: worked perfectly visited
directly (top-level), never worked embedded - consistent across
multiple browsers and devices, ruling out a client-side cause.

Both Chrome and Firefox send Sec-Fetch-Dest: iframe on a request for an
embed, so COOP is now skipped only for that case. COEP (what
SharedArrayBuffer actually needs) stays on unconditionally either way,
and a direct top-level visit (this app's other real use, e.g. as an
installable PWA) keeps full cross-origin isolation - no regression to
the working case, fixes the broken one.
2026-08-27 18:44:42 +10:00
0acf40cac2 Fix CMMS config timing: read from URL params, not window.MESH_TOOL_CONFIG
A parent iframe cannot inject window.MESH_TOOL_CONFIG into this app's
window before init() runs - by the time the iframe's load event fires
(the only cross-frame signal available for a same-origin page this app's
own server generates, not the CMMS), init() has already executed and
already decided to call restore_space() instead. Query params are read
synchronously during init() itself, before the existing 'hide url params'
cleanup strips them - self.MESH_TOOL_CONFIG is still set from them so
util.download() (src/mesh/build.js) has one stable place to read from.
2026-08-23 17:21:11 +10:00
ee5b863f02 CMMS embedding: load-from-URL on boot, POST-save instead of download
Additive only, gated entirely on window.MESH_TOOL_CONFIG being present (set
by the CMMS's public/mesh-edit.php host page, absent everywhere else -
standalone use is unaffected).

- src/main/mesh.js: cmms_load_from_url() fetches bytes from the
  host-provided loadUrl and feeds them through the existing load_files()
  path (same one drag-and-drop and the Import button use) - skips
  restore_space() when embedded, since job-scoped launch means "load this
  exact file", not whatever was last open in this browser's IndexedDB.
- src/mesh/build.js: util.download() calls cmms_save_to_host() instead of
  triggering a browser download when embedded - POSTs to the same
  job/manufacturing_project-scoped save endpoint pattern as the CAD editor
  fork's post_bytes_to_host().
2026-08-23 17:17:33 +10:00
Stewart Allen
d138275bbe update docs workflow 2026-07-26 13:52:55 -04:00
Stewart Allen
5f1f77add9 update docs workflow 2026-07-26 13:52:55 -04:00
Stewart Allen
ed1009fd15 update release notes 2026-07-26 13:52:55 -04:00
Stewart Allen
ff29a8c221 fix tool change dwell time 2026-07-26 13:52:55 -04:00
Stewart Allen
3be111af43 add volume rendering and use that for sla by default now 2026-07-26 13:52:55 -04:00
Stewart Allen
41629b2c76 improve sla supports 2026-07-26 13:52:55 -04:00
Stewart Allen
a0c9428d6c change sla supports 2026-07-26 13:52:55 -04:00
Stewart Allen
7e105f255e update .ctb options 2026-07-26 13:52:55 -04:00
Stewart Allen
b65d4ae57e add tilt tray for .goo and new elegoo targets 2026-07-26 13:52:55 -04:00
Stewart Allen
f32af7eeb1 fix widget + tab assignment when slicing 2026-07-26 13:52:55 -04:00
Stewart Allen
9299a99288 update sla wasm to allow for mem growth 2026-07-26 13:52:55 -04:00
Stewart Allen
806c4fb70b wasm grow and fallback for sla 2026-07-26 13:52:55 -04:00
Stewart Allen
3255ce7bb7 add msla .goo .prz support 2026-07-26 13:52:55 -04:00
Stewart Allen
db37c13100 update and enable photon profiles, stub creality, elegoo 2026-07-26 13:52:55 -04:00
Stewart Allen
682f2b0a48 merge addendum into main format reference 2026-07-26 13:52:55 -04:00
Stewart Allen
50e0758f99 more msla corrections 2026-07-26 13:52:55 -04:00
Stewart Allen
50e0a4674b msla deltas and file format normalization 2026-07-26 13:52:55 -04:00
Stewart Allen
1cc56311f7 msla format addendum 2026-07-26 13:52:55 -04:00
Stewart Allen
abd274205e update msla format guide 2026-07-26 13:52:55 -04:00
Stewart Allen
78106a14dc add doc refs 2026-07-26 13:52:55 -04:00
Stewart Allen
6e3a34f6b9 add base .pm4n output 2026-07-26 13:52:55 -04:00
Stewart Allen
fa7bc3db15 stub in anycubic photon mono 2026-07-26 13:52:55 -04:00
Stewart Allen
304a2a4e24 register photon extensions. add more .ctb target machines 2026-07-26 13:52:55 -04:00
Stewart Allen
a1af70b496 add sla .ctb format and a few related printer targets 2026-07-26 13:52:55 -04:00
Stewart Allen
95eadc60df add .rsla and .vsla generic raster and vector sla output formats 2026-07-26 13:52:55 -04:00
Stewart Allen
61d977e169 add units scaling to z on dxf import 2026-07-26 13:52:55 -04:00
Stewart Allen
cc60537985 patch tabs record format change 2026-07-26 13:52:55 -04:00
Stewart Allen
bf0f698a4b fix slice setPoints() in SLA mode 2026-07-26 13:52:55 -04:00
Stewart Allen
4d8ca0cdcf remove metric/imperial scaling factor or A axis 2026-07-26 13:52:55 -04:00
Stewart Allen
faf92873e7 prevent cached vertex mutation 2026-07-26 13:52:55 -04:00
Stewart Allen
13420592dd proxy print start command when needed 2026-07-26 13:52:55 -04:00
Gary Ingle
c572f2b096 fix: add missing build steps and update Node in Dockerfile
- Update base image from node:18-slim to node:22-slim (matching
  package.json engines requirement)
- Add git to apt-get install (needed by npm dependencies)
- Add webpack-ext step (builds external bundles)
- Add mkdir -p src/pack (prevents race condition)
- Add pack-prod step (builds application bundles)
- Reorder: build steps before gs-app-server install

Tested on ARM64 (Raspberry Pi 4, Docker 29.4.0) and x86_64 (Ubuntu
24.04, Docker 28.0.4). Without these changes, the container starts
but serves an incomplete app that never finishes loading.
2026-07-26 13:52:55 -04:00
Gary Ingle
6ba7507938 fix: add missing await on mkdir and node:module external in esbuild config
- Add await to fs.mkdir() call in generateDevices() (line 60). Without
  this, writeFile can race ahead of directory creation, causing ENOENT
  on clean builds or slower machines.
- Add 'node:module' to the externals array. Node.js treats 'module' and
  'node:module' as distinct specifiers; esbuild fails to resolve the
  prefixed form when bundling for the browser target.

Discovered during Docker builds on ARM64 where the race window is wider
due to slower I/O. Also reproduces on x86_64 with a clean src/pack/.
2026-07-26 13:52:55 -04:00
Stewart Allen
a678925d42 add model option to bambu ssdp broadcast 2026-07-26 13:52:55 -04:00
Stewart Allen
cc8bca0993 force tool lift between drills 2026-07-26 13:52:55 -04:00
Stewart Allen
94c932e8f9 fix drill marking with latent thru setting 2026-07-26 13:52:55 -04:00
Stewart Allen
c2eca07ed2 Merge branch 'rel-next' 2026-04-08 10:50:55 -04:00
Stewart Allen
6d5370f3e2 add LANG entries for PR #467 2026-03-25 18:33:22 -04:00
Stewart Allen
9efd855003
Merge pull request #467 from 1bardesign/feature/finish-cut
Basic Finish Cut Capability
2026-03-25 18:16:58 -04:00
Max Cahill
8369d5fada finish cut only shows up in clear, not trace 2026-03-26 09:02:11 +11:00
Max Cahill
b80232fd8e actually use offsets for finish cut 2026-03-25 22:28:48 +11:00
Max Cahill
6d95474acf added basic finish cut capability to op area, must be used cutting inner first. 2026-03-25 22:17:12 +11:00
Stewart Allen
d33c6636f7 add auto dxf units import 2026-03-20 19:21:36 -04:00
Stewart Allen
c14ea71c8c fix dxf open line reconnects with shared endpoints 2026-03-20 19:16:18 -04:00
Stewart Allen
3593be43b5 normalize dxf import dialog 2026-03-20 12:37:59 -04:00
Stewart Allen
17574f76b9 add dxf spline support 2026-03-20 12:21:54 -04:00