Skip to content

Persist GUI settings - #1252

Merged
louis-e merged 2 commits into
mainfrom
persist-settings
Aug 9, 2026
Merged

louis-e merged 2 commits into
mainfrom
persist-settings

Conversation

@louis-e

@louis-e louis-e commented Aug 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings August 9, 2026 21:42
@github-actions

github-actions Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

⏱️ Benchmark run finished in 0m 32s
🏗️ Generation time: 15s (excl. data fetching)
🧠 Peak memory usage: 1183 MB

📈 Compared against baseline: 18s time, 1160 MB memory
🧮 Delta: 14s time, 23 MB memory
🔢 Commit: 67c371f

🟢 Generation time is unchanged.
🟢 Peak memory is unchanged.

📅 Last benchmark: 2026-08-09 21:57:36 UTC

You can retrigger the benchmark by commenting retrigger-benchmark.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a GUI settings persistence layer with per-setting “reset to default” controls and a global “reset all settings” action, while also fixing spawn-Y adjustment to use the post-rotation X/Z bounding box so terrain sampling is correct for rotated (and terrain-only) worlds.

Changes:

  • Added settings-store.js to persist settings (via a single localStorage blob), inject per-setting revert buttons, and implement a two-step “reset all settings” flow.
  • Integrated the settings store into the GUI lifecycle (restore after initSettings(), flush on modal close, and refresh UI state when controls are changed programmatically).
  • Updated spawn-Y postprocessing to use the post-rotation XZBBox, and ensured terrain-only generation applies the same transform/rotation pipeline so the spawn point remains consistent.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/gui/locales/zh-CN.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/ua.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/sv.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/sl.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/ru.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/pt-BR.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/pl.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/lv.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/lt.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/ko.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/ja.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/hu.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/fr-FR.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/fi.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/es.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/en-US.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/de.json Adds localization strings for per-setting reset and global reset UI.
src/gui/locales/ar.json Adds localization strings for per-setting reset and global reset UI.
src/gui/js/settings-store.js New module implementing settings persistence, revert buttons, and global reset behavior.
src/gui/js/main.js Wires settings-store into startup/localization, flushes on modal close, and refreshes state on programmatic changes.
src/gui/index.html Marks the segmented-control default and adds a “Reset all settings” row/button in the settings modal.
src/gui/css/styles.css Styles the new reset button and per-setting revert icon/button (including focus/hover behavior).
src/gui.rs Fixes spawn-Y update to use post-rotation XZBBox; applies transform/rotation in terrain-only mode for consistency.
src/data_processing.rs Passes post-rotation xzbbox into spawn-Y adjustment (removes pre-rotation bbox reconstruction).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@louis-e
louis-e merged commit 9a6e3bb into main Aug 9, 2026
3 checks passed
@louis-e
louis-e deleted the persist-settings branch August 9, 2026 21:55
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.

2 participants