Webgui project persistence#27
Merged
Merged
Conversation
fvsOL's project model is a "master" dir holding one sub-folder per project; you
run INSIDE a project, and "New Project" does setwd("..") + dir.create -- i.e. it
creates a SIBLING of the current project, and getProjectList() lists
../*/projectId.txt. The launcher ran fvsOL with /work (the bind mount) AS the
project dir, so "New Project" escaped to /work's parent -- the container's
ephemeral root (/) -- and every new project was lost when the --rm container
stopped (confirmed: a project created in the GUI landed at /<name>, not under
~/fvs-projects).
Fix: launch inside a project sub-folder of the master. webgui-app.R now treats
the master as /work (FVS_WORK override for the dev loop), resumes the
most-recently-used project under it or seeds a fresh "MyProject" (fvsOL fills an
empty project dir with its bundled training FVS_Data.db). New projects then land
beside it under /work and persist on the host. run_webgui.sh points FVS_WORK at
gitignored outputs/ so dev-loop projects stay out of the repo root.
Verified: dir-math (new project lands under master, not the parent; switcher
lists both) and a headless boot (HTTP 200, master/MyProject created).
This is container-internal directory logic -- platform-independent (the host
only supplies the writable bind mount at /work).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ersistence Pull the project-selection logic out of webgui-app.R into webgui-launch.R as a pure, testable function (webgui_project_dir(master)), sourced by both the real launcher and the smoke test. webgui-app.R now sources it; the Dockerfile copies it next to webgui-app.R into the image. Add smoke_test.R guard "webgui/project-persistence": asserts the launcher's invariant -- webgui_project_dir() returns a CHILD of the master -- so if anyone regresses it to launch in the master itself (the bug this branch fixes), new projects would escape the mount and CI goes red. Runs in a tempdir (no /work mount needed); webgui-only (webgui-launch.R is absent in the cluster image, so the guard self-skips). Verified: positive (real fn returns master/MyProject) PASS, negative (simulated return-of-master) FAIL, and a headless boot (HTTP 200, master/MyProject created) through the sourced helper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What & why
Checklist
tests/unitortests/integration), or N/A.data/README.md).