feat(ui): improve cross-game configuration editor - #76
Conversation
|
|
@adrianmxb @MarcStdt could one of you please review this generalized Druid configuration editor update? It covers cross-game manifest staging, top save/restart feedback, internal scrolling, and the shared Druid scrollbar theme. |
| managedFile("settings.ini", "settings.ini", "ini", "Cuberite server-wide settings.", docs), | ||
| rawFile("webadmin.ini", "webadmin.ini", "ini", "Cuberite WebAdmin settings.", docs), | ||
| rawFile("world/world.ini", "world/world.ini", "ini", "Cuberite overworld settings.", docs), | ||
| rawFile("world_nether/world.ini", "world_nether/world.ini", "ini", "Cuberite Nether world settings.", docs), | ||
| rawFile("world_the_end/world.ini", "world_the_end/world.ini", "ini", "Cuberite End world settings.", docs), | ||
| rawFile("monsters.ini", "monsters.ini", "ini", "Cuberite monster behaviour settings.", docs), | ||
| rawFile("motd.txt", "motd.txt", "raw", "Cuberite message of the day.", docs), | ||
| rawFile("crafting.txt", "crafting.txt", "raw", "Cuberite crafting recipes.", docs), | ||
| rawFile("brewing.txt", "brewing.txt", "raw", "Cuberite brewing recipes.", docs), |
There was a problem hiding this comment.
why did you move this out of data? This was done on purpose i believe and can break how we e.g. package our OCI images and the deduplication inside and push these up then.
There was a problem hiding this comment.
I traced this end-to-end before deciding whether to revert it. The files were not moved out of the Scroll data/ directory; only the paths exposed in the editor manifest were changed to be relative to the runtime file API root.
The two path spaces are intentionally different:
stage()still resolves every manifest entry todestination/data/<manifest path>(ensureConfigFiles), so the packaged source remains underdata/.- Druid's procedure mount defaults an empty mount
sub_pathtodata, and thedruid-devcommand mounts that at/app/resources/deployment. Its file API then joins the requested path directly to that root. Thereforeserver.propertiesmaps to PVCdata/server.properties;data/server.propertieswould map todata/data/server.properties. - The OCI packer also treats explicit chunk paths as relative to
<scroll>/data: it resolves them againstdataDirand still creates OCI layer titles asdata/<chunk>. Keepingdata/in the chunk path would resolve to<scroll>/data/data/...and the packer would skip it as missing. - Registry deduplication is unchanged: uploads are still skipped by descriptor digest via
dst.Exists(ctx, desc); neither the physical content nor the resultingdata/<chunk>layer path is changed by the manifest reference.
I also verified this against the running ARK deployment:
/app/resources/deployment -> PVC subPath=data
EXISTS /app/resources/deployment/serverfiles/.../GameUserSettings.ini
EXISTS /app/resources/deployment/serverfiles/.../Game.ini
MISSING /app/resources/deployment/data/serverfiles/.../GameUserSettings.ini
Focused verification is green:
go test ./scripts/stage-scroll-ui
ok highcard.dev/scroll-builder/scripts/stage-scroll-ui
go test ./internal/utils ./internal/core/services/registry
ok github.com/highcard-dev/daemon/internal/utils
ok github.com/highcard-dev/daemon/internal/core/services/registry
The Scroll staging test additionally checks all 124 checked-in game-server Scrolls: manifest paths must not start with data/, while each referenced file/template/default must exist physically below the staged data/ directory. So I am keeping the runtime-relative manifest paths; restoring the prefix would break the actual file API and explicit chunk resolution.
|
@MarcStdt I proactively re-audited this PR for scope and removed the parts that were no longer needed in commit The follow-up is net smaller (
I did not add a restart bridge, service/API changes, or another abstraction. The staging/runtime-path work remains in this PR because it is required for this same editor to load and save the packaged files across all supported Scroll families; the UI-only fixes are not useful if those paths are absent from the runtime artifact. Verification on the pushed commit:
|
Summary
Verification
npm.cmd test: 12 files, 103 tests passednpm.cmd run type-check: passednpm.cmd run build: passedtest ./scripts/stage-scroll-ui: passedScope note
The restart bridge is intentionally not included. A repository-wide Windows
go test ./...still encounters the unchangedorigin/masterscripts/prebuilduse of Linux-onlysyscall.Statfs; the changed staging package passes its focused Go suite.