Skip to content

feat(ui): improve cross-game configuration editor - #76

Open
IOHelpMe wants to merge 2 commits into
highcard-dev:masterfrom
IOHelpMe:codex/config-editor-ui-scrollbar
Open

feat(ui): improve cross-game configuration editor#76
IOHelpMe wants to merge 2 commits into
highcard-dev:masterfrom
IOHelpMe:codex/config-editor-ui-scrollbar

Conversation

@IOHelpMe

Copy link
Copy Markdown
Contributor

Summary

  • stage runtime-relative configuration manifests and non-empty fallback files for every supported Scroll family
  • move Save and restart-required feedback into the top header and remove the right-side Changes/Validation inspector
  • fix internal scrolling and apply one shared Druid scrollbar theme to form, file rail, raw editor, and mobile navigation
  • show declared defaults without dirtying files and accept canonical configuration boolean/integer representations while preserving unknown/raw settings

Verification

  • npm.cmd test: 12 files, 103 tests passed
  • npm.cmd run type-check: passed
  • npm.cmd run build: passed
  • Go test ./scripts/stage-scroll-ui: passed
  • live Minecraft and ARK QA: scrolled to the end, Save remained disabled, no restart notice was introduced, and browser consoles had 0 warnings/errors

Scope note

The restart bridge is intentionally not included. A repository-wide Windows go test ./... still encounters the unchanged origin/master scripts/prebuild use of Linux-only syscall.Statfs; the changed staging package passes its focused Go suite.

@druid-infra

Copy link
Copy Markdown
Collaborator
Error: This repo is not allowlisted for Atlantis.

@IOHelpMe

Copy link
Copy Markdown
Contributor Author

@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.

Comment on lines +246 to +254
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),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to destination/data/<manifest path> (ensureConfigFiles), so the packaged source remains under data/.
  • Druid's procedure mount defaults an empty mount sub_path to data, and the druid-dev command mounts that at /app/resources/deployment. Its file API then joins the requested path directly to that root. Therefore server.properties maps to PVC data/server.properties; data/server.properties would map to data/data/server.properties.
  • The OCI packer also treats explicit chunk paths as relative to <scroll>/data: it resolves them against dataDir and still creates OCI layer titles as data/<chunk>. Keeping data/ 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 resulting data/<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.

@IOHelpMe

Copy link
Copy Markdown
Contributor Author

@MarcStdt I proactively re-audited this PR for scope and removed the parts that were no longer needed in commit 86ac1b53.

The follow-up is net smaller (16 source lines added / 65 removed):

  • deleted the dormant Inspector component, its barrel export, and its exclusive copy/CSS now that Changes & Validation is intentionally no longer rendered;
  • kept only numeric string forms found in real game configuration (5000.000000 remains valid, speculative 5e3 is rejected);
  • added content-visibility for off-screen field sections so large ARK/Cuberite forms do less rendering work;
  • rebuilt the repository-tracked ui/dist/app.wasm.

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:

  • config editor: 12 test files / 104 tests passed
  • TypeScript tsc --noEmit: passed
  • Druid UI build: passed
  • generated component WIT extraction: passed
  • go test ./scripts/stage-scroll-ui: passed, including all 124 checked-in game-server Scrolls
  • git diff --check: passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants