WIP: fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its place #304

Draft
snaildev99 wants to merge 3 commits from snaildev99/Longshot:fix/menu-restart-note into main
Contributor

Why

In the Insert menu you cannot tell which rows take a restart before you change one: "Takes effect after a restart" shows in the help only once the row is changed. And when it shows, the help box grows and its title jumps up, so the change is hard to follow with the eye. Both were found by a player going through the menu by hand.

What changed

  • the note (gpu/vk/vk_menu.cpp, restart_note, help_box): the help of every row that takes a restart says "Takes effect after a restart" before the row is changed, in the tone of the hint's bar (ui::kAccent), and in gold (ui::kGoldHi) once it is changed, as before. restart_note gives 0 (not such a row), 1 or 2 where restart_changed gave a yes or no.
  • the box's height (help_box): the box keeps the height of the tallest help (min_h) so that it does not jump, but added the note (30) and the "Restart needed" line (52) on top of it; where it then passed the prompt strip, the whole box moved up. Both now stand in the height the box keeps, the line at the box's foot. The box grows only when the help itself leaves them no room. The narrow window's estimate of the box is its kept height.
  • the line (restart_line_shown): with the note in gold on a changed row, the "Restart needed" line under it said the same a second time. It shows when something other than the selected row waits for a restart, and then lists all of it: it is for keeping track of what else waits.
  • tests: tests/test_menu_restart.py reads the three; the README's paragraph on the rows that take a restart says them.

Flags and settings

Flag What it does Default now Recommendation Helps on Doesn't help on Untested on
The help of a row that takes a restart (Insert menu; no new row or switch) says "Takes effect after a restart" before the row is changed; the "Restart needed" line only when more than the selected row waits always on every system - a narrow window (the help under the rows); a language other than English

Measurements

main: 514591a3 (2026-11-13)
this PR: fix/menu-restart-note @ ea668e00
Hardware: RTX 3090, Windows 11
Scene: the Insert menu's Graphics tab over the game in play, 2048x1152; the Output resolution and Profile rows
Method: this PR's tests/test_menu_restart.py on main's sources and on this PR's (the same file copied over main's), twice each, the same result both times; and the menu by hand, with the two pictures below
How to reproduce: python -I -B tests/test_menu_restart.py --cxx clang++ --cc clang; in the game, F1, the Graphics tab, select Output resolution, then change it

main @ 514591a3 this PR @ ea668e00
tests/test_menu_restart.py (this PR's) fails: vk_menu.cpp: the help does not say that a row takes a restart before the row is changed passes
The help of Output resolution before it is changed no word of a restart but the help's last sentence "Takes effect after a restart", in the hint bar's tone
The help box when the row is changed 82 units taller (the note's 30 and the line's 52), and moved up by what passes the prompt strip the same height and place
The "Restart needed" line with one row changed and selected shown under the note that says the same not shown; shown from another row, and with two rows changed
main @ 514591a3:     vk_menu.cpp: the help does not say that a row takes a restart before the row is changed   (exit 1)
this PR @ ea668e00:  menu restart: all checks passed
                     PASS: the restart rows and Restart now   (exit 0)

Testing

Tested:

  • python -I -B tests/run_all.py on Windows 11 at ea668e00, with llvm-mingw's bin on the path: 495 passed, 33 skipped, 5 failed. The same five fail on main @ 514591a3 on this PC: test_menu_i18n (a stale key in the tables, #273's), test_check_third_party, test_portable_builder_home, test_portable_builder_startup (no .NET SDK here), test_release.
  • vk_menu.cpp compiled alone at ea668e00 with the build's flags and include folders (llvm-mingw's clang, -fsyntax-only): no error, no new warning.
  • In the game, by hand (a player, Windows 11, RTX 3090, 2048x1152, a wide window), in a build that carries these three commits on top of #134 and of the follow-up for the Mods tab's texts, #305 (a local test branch, since that is the copy the tester plays): the note stands on Output resolution before a change and turns gold with it; the box's title stays in place when the row is changed and when a second row is changed; with one row changed and selected there is no "Restart needed" line, from another row and with two rows changed it stands at the box's foot and lists them.

Not tested:

  • This branch by itself in the game: it was played with #134's commits under it (see above). The three commits touch help_box, restart_note, restart_line_shown and their callers only.
  • A narrow window, where the help is under the rows: its estimate of the box changed with the box, and nobody has opened one.
  • A menu language other than English (the note's text is the one already translated), a gamepad, the Controls page's rows that take a restart, Linux.

Needs other testers:

  • Linux: the branch builds, and the Graphics tab shows the note before a change, gold after it, with the box in place, expecting the same as on Windows (T-FZGV)

Screenshots

Both are from the test build named under Testing (this PR's commits on top of #134), Windows 11, RTX 3090, taken by the tester. main has no build of the same spot to put beside them here: on main the first picture's note is not there.

this PR @ ea668e00, in the test build: a row that takes a restart, selected and not changed, its help saying so in the lighter tone

this PR @ ea668e00 (in the test build): a row that takes a restart selected and not changed. Its help says "Takes effect after a restart" in the lighter tone, so a player sees before a change that it will ask for a restart.

this PR @ ea668e00, in the test build: one setting changed and selected

this PR @ ea668e00 (in the test build): one setting changed and selected. In this build the note is then gold, the box and its title stay where they were, and with only this row waiting there is no "Restart needed" line.

Risk and rollback

Only the Insert menu's help box changes. A help as tall as the tallest one, on a row that takes a restart, with other rows waiting, makes the box grow as before (none does today: the tallest is the Bug report's line after a save). Reverting the three commits is enough; each also reverts alone.

Reviewer notes

  • The line's rule is a choice: "only with two or more rows changed" was the tester's wording; I kept the line when the one changed row is not the selected one, because nothing else on that row then says a restart waits. One condition in restart_line_shown if you prefer the stricter rule.
  • The blank room under a short help is untouched: the box is as tall as the tallest help of any row of the menu. A height per tab would shrink it and is another topic.
  • #305 (the Mods tab's restart texts, on top of #134) touches the same README paragraph and one help_box call; whichever goes in second I rebase.

Issues

None.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Screenshots for a change that shows on screen.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.

🤖 Generated with Claude Code

## Why In the Insert menu you cannot tell which rows take a restart before you change one: "Takes effect after a restart" shows in the help only once the row is changed. And when it shows, the help box grows and its title jumps up, so the change is hard to follow with the eye. Both were found by a player going through the menu by hand. ## What changed - the note (`gpu/vk/vk_menu.cpp`, `restart_note`, `help_box`): the help of every row that takes a restart says "Takes effect after a restart" before the row is changed, in the tone of the hint's bar (`ui::kAccent`), and in gold (`ui::kGoldHi`) once it is changed, as before. `restart_note` gives 0 (not such a row), 1 or 2 where `restart_changed` gave a yes or no. - the box's height (`help_box`): the box keeps the height of the tallest help (`min_h`) so that it does not jump, but added the note (30) and the "Restart needed" line (52) on top of it; where it then passed the prompt strip, the whole box moved up. Both now stand in the height the box keeps, the line at the box's foot. The box grows only when the help itself leaves them no room. The narrow window's estimate of the box is its kept height. - the line (`restart_line_shown`): with the note in gold on a changed row, the "Restart needed" line under it said the same a second time. It shows when something other than the selected row waits for a restart, and then lists all of it: it is for keeping track of what else waits. - tests: `tests/test_menu_restart.py` reads the three; the README's paragraph on the rows that take a restart says them. ## Flags and settings | Flag | What it does | Default now | Recommendation | Helps on | Doesn't help on | Untested on | |---|---|---|---|---|---|---| | The help of a row that takes a restart (Insert menu; no new row or switch) | says "Takes effect after a restart" before the row is changed; the "Restart needed" line only when more than the selected row waits | always | on | every system | - | a narrow window (the help under the rows); a language other than English | ## Measurements main: 514591a3 (2026-11-13) this PR: fix/menu-restart-note @ ea668e00 Hardware: RTX 3090, Windows 11 Scene: the Insert menu's Graphics tab over the game in play, 2048x1152; the Output resolution and Profile rows Method: this PR's `tests/test_menu_restart.py` on main's sources and on this PR's (the same file copied over main's), twice each, the same result both times; and the menu by hand, with the two pictures below How to reproduce: `python -I -B tests/test_menu_restart.py --cxx clang++ --cc clang`; in the game, F1, the Graphics tab, select Output resolution, then change it | | main @ 514591a3 | this PR @ ea668e00 | |---|---|---| | `tests/test_menu_restart.py` (this PR's) | fails: `vk_menu.cpp: the help does not say that a row takes a restart before the row is changed` | passes | | The help of Output resolution before it is changed | no word of a restart but the help's last sentence | "Takes effect after a restart", in the hint bar's tone | | The help box when the row is changed | 82 units taller (the note's 30 and the line's 52), and moved up by what passes the prompt strip | the same height and place | | The "Restart needed" line with one row changed and selected | shown under the note that says the same | not shown; shown from another row, and with two rows changed | ``` main @ 514591a3: vk_menu.cpp: the help does not say that a row takes a restart before the row is changed (exit 1) this PR @ ea668e00: menu restart: all checks passed PASS: the restart rows and Restart now (exit 0) ``` ## Testing **Tested:** - `python -I -B tests/run_all.py` on Windows 11 at ea668e00, with llvm-mingw's `bin` on the path: 495 passed, 33 skipped, 5 failed. The same five fail on main @ 514591a3 on this PC: `test_menu_i18n` (a stale key in the tables, #273's), `test_check_third_party`, `test_portable_builder_home`, `test_portable_builder_startup` (no .NET SDK here), `test_release`. - `vk_menu.cpp` compiled alone at ea668e00 with the build's flags and include folders (llvm-mingw's clang, `-fsyntax-only`): no error, no new warning. - In the game, by hand (a player, Windows 11, RTX 3090, 2048x1152, a wide window), in a build that carries these three commits on top of #134 and of the follow-up for the Mods tab's texts, #305 (a local test branch, since that is the copy the tester plays): the note stands on Output resolution before a change and turns gold with it; the box's title stays in place when the row is changed and when a second row is changed; with one row changed and selected there is no "Restart needed" line, from another row and with two rows changed it stands at the box's foot and lists them. **Not tested:** - This branch by itself in the game: it was played with #134's commits under it (see above). The three commits touch `help_box`, `restart_note`, `restart_line_shown` and their callers only. - A narrow window, where the help is under the rows: its estimate of the box changed with the box, and nobody has opened one. - A menu language other than English (the note's text is the one already translated), a gamepad, the Controls page's rows that take a restart, Linux. **Needs other testers:** - Linux: the branch builds, and the Graphics tab shows the note before a change, gold after it, with the box in place, expecting the same as on Windows (T-FZGV) ## Screenshots Both are from the test build named under Testing (this PR's commits on top of #134), Windows 11, RTX 3090, taken by the tester. main has no build of the same spot to put beside them here: on main the first picture's note is not there. ![this PR @ ea668e00, in the test build: a row that takes a restart, selected and not changed, its help saying so in the lighter tone](https://git.magicbean.dev/attachments/3976d407-4a19-43ed-a247-5b8aa9d2ea06) this PR @ ea668e00 (in the test build): a row that takes a restart selected and not changed. Its help says "Takes effect after a restart" in the lighter tone, so a player sees before a change that it will ask for a restart. ![this PR @ ea668e00, in the test build: one setting changed and selected](https://git.magicbean.dev/attachments/8e449553-fb7f-405f-b3f6-b47c009cae83) this PR @ ea668e00 (in the test build): one setting changed and selected. In this build the note is then gold, the box and its title stay where they were, and with only this row waiting there is no "Restart needed" line. ## Risk and rollback Only the Insert menu's help box changes. A help as tall as the tallest one, on a row that takes a restart, with other rows waiting, makes the box grow as before (none does today: the tallest is the Bug report's line after a save). Reverting the three commits is enough; each also reverts alone. ## Reviewer notes - The line's rule is a choice: "only with two or more rows changed" was the tester's wording; I kept the line when the one changed row is not the selected one, because nothing else on that row then says a restart waits. One condition in `restart_line_shown` if you prefer the stricter rule. - The blank room under a short help is untouched: the box is as tall as the tallest help of any row of the menu. A height per tab would shrink it and is another topic. - #305 (the Mods tab's restart texts, on top of #134) touches the same README paragraph and one `help_box` call; whichever goes in second I rebase. ## Issues None. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Screenshots for a change that shows on screen. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
"Takes effect after a restart" stood in the help only once the row was
changed, where the "Restart needed" line under it says the same; before a
change, only the last sentence of the row's help said it. The line now
stands in the help of every row that takes a restart: in the tone of the
hint's bar before a change, in gold once the row is changed, as before.

- vk_menu.cpp: restart_note (0 not such a row, 1 one that takes a restart,
  2 changed) in place of restart_changed for the help box; help_box draws
  the line in kAccent or kGoldHi.
- tests/test_menu_restart.py reads it; the README says it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The help box keeps the height of the tallest help so that it does not jump
from row to row, but it added the restart note (30) and the "Restart
needed" line (52) on top of that height. Changing a row that takes a
restart made the box taller, and where it then passed the prompt strip the
whole box moved up, the note with it, although the box had the room.

The note and the line now stand in the height the box keeps, the line at
the box's foot; the box grows only when the help itself leaves no room for
them. The narrow window's estimate of the box is its kept height.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
fix(menu): the Restart needed line only when more than the selected row waits
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
ea668e00fd
With the selected row's note turning gold once the row is changed, the
"Restart needed" line under it said the same thing a second time. The line
is for keeping track of what else waits: it shows when something other
than the selected row waits for a restart, and then lists all of it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
snaildev99 changed title from WIP: fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its place to fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its place 2026-11-13 20:53:28 +00:00
snaildev99 changed title from fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its place to WIP: fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its place 2026-11-13 20:54:15 +00:00
Author
Contributor

Back to work in progress for one box: I had marked this ready, and the check then pointed out that gpu/vk/vk_menu.cpp counts as host code, so "Host code builds on both Windows and Linux" applies. It is built on Windows only (our PC has no Linux). The box is in the checklist now, unticked, with a test request for a Linux build and a look at the Graphics tab: T-FZGV. It needs the "testing wanted" label from a maintainer before anyone can claim it. Nothing else changed; the description's other sections are as they were.

The Mods tab's half of the same tester's notes is #305, on top of #134.

Back to work in progress for one box: I had marked this ready, and the check then pointed out that `gpu/vk/vk_menu.cpp` counts as host code, so "Host code builds on both Windows and Linux" applies. It is built on Windows only (our PC has no Linux). The box is in the checklist now, unticked, with a test request for a Linux build and a look at the Graphics tab: T-FZGV. It needs the "testing wanted" label from a maintainer before anyone can claim it. Nothing else changed; the description's other sections are as they were. The Mods tab's half of the same tester's notes is #305, on top of #134.
HumanBean force-pushed fix/menu-restart-note from ea668e00fd
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 4d83422631
Some checks are pending
PR description / Description follows the template (pull_request_target) Waiting to run
CI / Conventional Commit title (pull_request) Waiting to run
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
CI / Workflow lint (actionlint) (pull_request) Waiting to run
Guide screenshots / Guide images and local UI source review (pull_request) Waiting to run
Third-party parts / As their notes say (pull_request) Waiting to run
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
2026-11-15 18:46:14 +00:00
Compare
Owner

Rebased onto main @ 7bacf846: no conflicts. No tests were run here; the test boxes stay yours.

Rebased onto `main` @ 7bacf846: no conflicts. No tests were run here; the test boxes stay yours.
Some checks are pending
PR description / Description follows the template (pull_request_target) Waiting to run
CI / Conventional Commit title (pull_request) Waiting to run
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
CI / Workflow lint (actionlint) (pull_request) Waiting to run
Guide screenshots / Guide images and local UI source review (pull_request) Waiting to run
Third-party parts / As their notes say (pull_request) Waiting to run
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/menu-restart-note:snaildev99-fix/menu-restart-note'
git switch 'snaildev99-fix/menu-restart-note'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!304
No description provided.