Closed general

Move the Adom Babylon 3D viewer out of the ah build into a wiki app (models gone in 1.0.209; code sweep pending)

John Lauer · 1mo ago ·closed by John Lauer

John's decision (2026-09-05, in the #56 build-time thread): the Adom Babylon 3D viewer (workcell, scaffolds, molecules, the machine-pin models) becomes a normal wiki app, installed with adom-wiki pkg install and run as a dashboard in a webview. Nothing for it goes into the ah build any more.

Why it came up: generate_context! embeds the whole frontend dist into the app crate and brotli-compresses it at compile time; the 82.5 MB dist was about 100 s of every 173 s app-crate compile, and 46.6 MB of that was .glb models (measured: holding them out took the crate from 173 s to 117 s).

Done in 1.0.209 (commit 689ea5c): the model assets under static/ (scaffolds, molecules, workcell, babylon-assets; 48.6 MB) are removed from the build. They remain in git history at 708764f for the wiki app to take.

Left to do, in order:

  1. The Babylon code sweep. About 190 files import @babylonjs or src/lib/adom-babylon: src/lib/adom-babylon (1.7 MB), src/lib/editor (tools, workspaces, operations, actions), the workcell/molecule routes under src/routes/(app)/[owner]/..., and a set of panels under src/lib/components/editor (which also holds ah's own shell components, so this needs a careful per-file sweep, not a directory delete). Removing them also drops the Babylon inspector (6.6 MB) and XR chunks from the JS bundle, another ~30 MB of embedded assets.
  2. The @babylonjs/* dependencies leave package.json once nothing imports them.
  3. The new wiki app: a package carrying the viewer, its models, and a dashboard page; the dock launches it into a webview like the other bridges' dashboards.
  4. Web Hydrogen: confirm whether the cloud build serves the same routes; if so the wiki app replaces them there too.

Not started; step 1 is a multi-hour change that wants a quiet day and a full ah smoke test, since components/editor is shared with the shell.

2 Replies

John Lauer · 1mo ago

The code sweep is done and shipped in Hydrogen 1.0.210 (insiders, 2026-09-05), installed on AdomLapper and smoke-tested: setup state complete, /workspace/exec on the container route, health and updater ok, and the shell renders (VS Code pane with a live thread, the wiki webview, container stats).

What left (commit 80ded7a, 247 files, 90.9k lines deleted): src/lib/adom-babylon, the threedlayout/bosch/xrp/liveworkcell/workcell workspaces and tools, the 3D panels, the [owner]/[repo] landing, edit and popout routes, the molecule routes, and six packages (@babylonjs/gui, gui-editor, inspector, loaders, materials, babylonjs-gltf2interface). Deletion was driven by an import-graph walk from the remaining routes, so only what became unreachable went.

What stayed and how it was cut loose:

  • Lithium, the machine client, moved to src/lib/lithium (57 importers repointed); the block exposing the 3D scene objects on window is gone.
  • GlobalChatTool keeps its five 3D handlers (load molecule, duplicate molecules, apply/save layout, unique names) as stubs that log and return, so every dispatch site compiles; the wiki app owns those actions now.
  • GlobalChatPanel no longer constructs the 3D or Bosch workspaces.
  • PanelWorkspace has no toolbar (it was the workcell camera/gantry/scaffold set); the 3D viewer panel id left the picker and the toolbar map.
  • The 2D schematic editor keeps @babylonjs/core for Vector2/Vector3 math and the Nullable type (tree-shaken); the two enums it shared with the viewer moved under the schematic.

Numbers: frontend dist 82.5 MB to 21 MB, JS chunks 29.5 MB to 9.6 MB, installer 37.5 MB (1.0.208) to 17.1 MB. svelte-check 639 errors to 310, none new in the edited files. The models themselves stayed in git history at 708764f and the code at fd1b206^ for the wiki app.

Left on this issue: the wiki app itself (package, dashboard page, dock launch), and whether Web Hydrogen served the same routes. Also found by the same walk and left untouched: about 100 other files under src/ that no route reaches (not Babylon); listed for a quiet day.

John Lauer · 1mo ago

Closing. The sweep shipped in 1.0.210: the Babylon viewer, its workspaces and models are out of the ah build, and the viewer lives on as a wiki app.

Log in to reply.