Ship the 3D field viewer's web content in the installers - #1854
Merged
Conversation
Closes the gap in #1851: the client could already serve the viewer page from <installDir>/webviewer, but nothing put anything there, so on an installed client "View in 3D" opened a page that could not load. Three pieces, following how bionetgen already ships: - VCell.install4j gains a webviewer mount point, a source-path variable and a dirEntry. Note maven-jars is the wrong template to copy here — its mountPoint 719 is "lib", not the install root. A rootless mount point is relative to the install root, which is what -Dvcell.installDir=${launcher:sys.launcherDirectory} resolves to and what FieldViewerServer.staticRoot() looks under. - Dockerfile-clientgen-dev copies the content into /vcellclient/webviewer. site_deploy.yml needs no change: it pulls this prebuilt image and runs install4j inside it, so everything the installer ships is baked in here. Only what the browser loads is copied — the fetch script, package.json and README stay behind. - CI-full fetches the wasm bundle before that image builds, since it is a pinned release asset rather than a repo file. Doing it here instead of in the maven build keeps a 12 MB download off every developer's machine for a feature that is disabled by default. If the fetch is skipped the COPY fails and the image build stops, which is deliberate: an installer carrying the page without the bundle would 404 exactly when a user clicks "View in 3D". Verified the copy layout and the fail-fast behaviour with real docker builds — 12 MB, and a missing assets/ stops the build with "/webapp-viewer/assets": not found. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the packaging gap tracked in #1851. Stacked on #1829 — base is
vtk/field-viewer, so the diff here is just the four files below; retarget tomasteronce #1829 lands.FieldViewerServeralready serves the viewer page from<installDir>/webviewer, but nothing ever put content there. On an installed client the directory is absent, so "View in 3D" opens a page that cannot load. This ships it.The three pieces
VCell.install4jwebviewermount point, a source-path variable, adirEntry(3 lines)Dockerfile-clientgen-dev/vcellclient/webviewerCI-full.ymlsite_deploy.ymlneeds no change — worth stating, because #1851 originally claimed otherwise. It stages nothing: it pulls the prebuiltvcell-clientgenimage and runsbuild_installers.shinside it, wheremavenRootDir=/vcellclientrefers to paths baked into the image. So everything an installer ships isCOPYd in when CI-full builds clientgen.Two things a reviewer should check
maven-jarsis the wrong template, and it is the obvious one to reach for. ItsmountPoint="719"islib, not the install root.bionetgenis the right precedent: a rootless mount point, relative to the install root, which is what-Dvcell.installDir=${launcher:sys.launcherDirectory}resolves to and whatstaticRoot()looks under.Why the fetch is in CI rather than the maven build. The
localsolversprecedent argues for adownload-maven-pluginexecution, and that would work — but solvers are downloaded because developers actually run them locally, whereas this bundle is only needed to build an installer. Putting it in maven would impose a 12 MB download on every developer for a feature that is off by default. Developers who want the viewer locally already run the same script themselves.Verified
Both claims in the Dockerfile comment were checked with real docker builds, not reasoned about:
index.html,viewer.js,vendor/vtk.umd.jsandassets/vtk-wasm/*.tar.gz— 12 MB, with the fetch script,package.jsonandREADMEleft behind.assets/absent (a skipped fetch), the build fails with"/webapp-viewer/assets": not foundrather than silently producing an installer whose viewer 404s.What this does not do, and the risk it adds
The feature stays behind
vcell.fieldViewer.enabled, still defaulting to false, so this changes nothing a user sees. It does not pre-seed the flag in the install4j vmoptions templates; testers still add the line themselves.The real cost is that the release build gains a network dependency: the bundle is fetched from the pinned
virtualcell/vcell-vtk-wasmv1.0.0release, and clientgen blocks release. If that release is unreachable, the release build fails. That is the argument for merging this early in a cycle rather than next to a release. It also adds ~12 MB to all five media, and the.tar.gzwill not compress further under install4j's LZMA.Note this cannot be fully exercised outside a real
site_deployrun — the installer build needs the install4j license and both code-signing keystores.🤖 Generated with Claude Code