feat(web): "Restart without saving" button on the config page - #165
Merged
Merged
Conversation
The config page had "Salvar e Reiniciar" (commit_all: save + reboot) but no
way to restart the device WITHOUT writing config — i.e. dropping the staged,
uncommitted edits. The backend already existed: POST /api/action?op=reboot
reaches LogManager::safeReboot() without a saveConfiguration(), gated by
PERM_SYS_CONFIG, logged as SYS_REBOOT_USER, and already on the authorization
matrix. This wires a button to it — no new route, handler, or authz change.
safeReboot()'s pre-reboot hook still flushes the open history block, so a plain
restart discards unsaved config edits but never costs a measurement.
- WebUI.h (CFG_PAGE): a "Restart" section after Touch Calibration with the
reboot_nosave_btn (danger style) and rebootNoSave(), reusing the page's
sensAction('reboot') helper. Same guards as commit_all: 503 while the panel
is mid touch-calibration; a socket dropped after the 200 is treated as the
reboot having started, same as the topbar restart.
- data/lang/{pt-BR,es-ES}.lng: 5 cfg_reboot_* keys in @webdict (the
check_lang_packs gate requires each key in both packs). They sit after the
@webdict marker, so they do not touch the resident RAM ceiling.
Flash: +472 B on pico_w_release (998,324 of 1,000,852 budget); all six images
build under budget, no flash_budget.json bump needed.
Verified on hardware (rig, pico_w_test): the button renders in English (source
fallback) and pt-BR ("Reiniciar sem salvar") after deploying the pack; click ->
pt confirm -> "Reiniciando..." toast -> reboot (uptime 852,470 -> 24,058 ms).
Log proves nothing was saved: SYS_REBOOT_USER (code 2) in the WEB family at the
reboot, no SEC_CONFIG_CHANGED (303), config CRC 839F3612 unchanged across it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jq4auDQppGzmAx1gLKn1z3
Owner
Author
Hardware test — together with #166Tested on the bench Pico W as one release candidate with #166 (
|
angeloINTJ
pushed a commit
that referenced
this pull request
Sep 25, 2026
SIMUT_VERSION 2.7.2 -> 2.7.3, and everything that names the current release catches up: CHANGELOG (en, pt-BR), the three READMEs, both user manuals, the docs index, the landing page in its three languages, and the product manual (chapters 1, 3, 4, 5, 9, 13, 14 and 28, appendix C), regenerated. v2.7.3 is #165 (Restart without saving on /config) and #166 (the Ângulo standard; the firmware version on the login page). The manuals gain both: the Restart section in chapter 5 and the user manuals' commit section, the version line in chapter 13 and the authentication section. Stale since v2.7.2, fixed here: - the READMEs' "On main, not yet released" row still listed three things v2.7.2 shipped; it is gone, and the alpha LCD bullet that carried the same label is named for what it does; - tools/build_manual.py had VERSION typed as "v2.7.1", so the product manual's cover and <meta> said v2.7.1 through the whole v2.7.2 release. It now reads SIMUT_VERSION from src/SystemDefs_Limits.h, as build_webui_gz.py already does; - the pt-BR and es-ES READMEs counted 61 HTTP routes; check_authz.py counts 62, as the English one says. All three said 408 host test cases; CI run 36115353101 on main ran 410 (185+63+33+45+39+16+29). Flash, all six built locally at this commit: used 998,220 release, 1,003,764 test, 1,011,388 test_https, 1,000,396 asserts, 963,476 alpha, 1,003,328 air. flash_budget.json 'measured' moves to these (#165 had not moved it); budgets unchanged. Against the published v2.7.2 .bin: release +168 B, alpha and air the same size to the byte. The images carry the new version (WebUI_GZ.h stamp ver=2.7.3). Gates run locally: scan_secrets, gen_logcodes --check, check_authz, check_license, check_angulo, check_fsguard, check_air_consistency, test_h5_day_merge; the product manual builds with 1,724 internal links and none broken. Not flashed at this commit: the version bump is one digit, and the published .uf2 is flashed on the bench after the release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jq4auDQppGzmAx1gLKn1z3
Merged
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
Adds a Restart without saving button to the web config page (
/config) — thecounterpart to the topbar's "Salvar e Reiniciar". It restarts the device without
writing config: the staged, uncommitted edits on the page are dropped and the
saved configuration is kept.
Why it's small
The backend already existed:
POST /api/action?op=rebootreachesLogManager::safeReboot()without asaveConfiguration(), is gated byPERM_SYS_CONFIG, logged asSYS_REBOOT_USER, and is already on theauthorization matrix. So this only wires a button to it — no new route,
handler, or
check_authz.py/AUTHORIZATION.mdchange.safeReboot()'s pre-reboot hook still flushes the open history block, so a plainrestart drops unsaved config edits but never loses a measurement.
Changes
WebUI.h(CFG_PAGE): a "Restart" section after Touch Calibration withreboot_nosave_btn(danger style) andrebootNoSave(), reusing the page'ssensAction('reboot')helper. Same guards ascommit_all: 503 while the panelis mid touch-calibration; a socket dropped after the 200 is treated as the
reboot having started (same as the topbar restart).
data/lang/language_pt-BR.lng,language_es-ES.lng: 5cfg_reboot_*keys in
@WEBDICT(thecheck_lang_packsgate requires each key in bothpacks). They sit after the
@WEBDICTmarker, so they do not touch the residentRAM ceiling.
Flash budget
+472 B on
pico_w_release(998,324 of 1,000,852). All six images build underbudget — no
flash_budget.jsonbump.Testing
Local gates: 6 firmware envs build under budget; 7 native suites 410/410;
lang-pack + WebUI-gen gates pass.
On hardware (rig,
pico_w_test):deploying the updated pack.
24,058 ms).
SYS_REBOOT_USER(code 2) in the WEB family atthe reboot, no
SEC_CONFIG_CHANGED(303); config CRC839F3612unchangedacross the reboot.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Jq4auDQppGzmAx1gLKn1z3