fix(widescreen): the system overlay's header and prompts follow the mod switched off and on #3281

Merged
HumanBean merged 4 commits from dyst/Longshot:fix/widescreen-squeeze-restart into main 2026-12-06 03:22:13 +00:00
Member

Summary

Follow-up to #3218, from BeanBot's review of it (L1 and its question). #3218 draws the system overlay's header and button prompts (N_Header_00, N_Footer_00 of SystemOverlay_00) at their own shape in the middle 16:9 when Ultrawide menus is Centred on a picture wider than 16:9. Switching the Widescreen mod off and on while the game runs (Mods tab, Built in > Widescreen) broke that both ways:

  • Switched off, the header and prompts stayed squeezed. The mod's stop marks only the panes it notes for their transforms to be made again (the overlay's root), and the game did not remake the header and footer from it.
  • Switched on again, they were stretched across the whole picture. The mod noted them only as the layout is built (ui.layoutBuilt), and the overlay, built once at boot, gets no build after a restart.

This fixes both:

  • Ui::placed notes a layout's squeezed panes the first time it places the layout's root. The start's forced pass places the root before the panes made from it.
  • Ui::release marks every pane of a layout with squeezed panes for its transform to be made again, as the start's forced pass does.

Read first: placed, note_squeezed and release in game/mods/widescreen/src/panes.rs.

Testing

Tested: Windows 11, RTX 3080 (NVIDIA 621.47), 21:9 (HOS_ASPECT=2.3889), Ultrawide menus at its default (Centred), headless through the control bridge, on f359e2621 + #3218's commit, with and without this PR's commits (the same diff as this branch). Title screen > Continue, the Load list open; a local copy of the mod inspector (HOS_SYSTEM_MODS_DIR) switched the Widescreen mod off and on again with setEnabled, as the Mods tab's switch does; a shot with the mod on, one 3 s after it was switched off, one 3 s after it was switched on again.

  • #3218 alone: switched off, the header and Back stayed squeezed in the middle 16:9 (the blurred sides gone); switched on again, the header spanned the whole picture and Back sat at its right edge.
  • Here: switched off, the header and Back at the game's own shape, across the whole picture; switched on again, in the middle 16:9 as at the start.

cargo fmt --check clean; On main de6fb7b5d: cargo test -p sysmod-widescreen: 68 passed, 1 failed, sides::tests::the_renderer_names_no_program_of_ours, which fails the same on main (#2966's gpu/vk/vk_rt_*.cpp name the fog composite's hash 1a7482c0ec9991ea); cargo clippy -p sysmod-widescreen --all-targets: nothing in this crate.

Still to test:

  • Linux, AMD, 21:9: the same switch off and on (by hand)
  • Windows, a real window rather than a headless run, the Mods tab's own switch (by hand)

Measurements

Not measured: a layout's root placed for the first time costs one more look at its root's name (the overlay's panes are noted only for an overlay); stopping the mod marks one layout's panes once.

Risks

The Widescreen mod only, and only when the mod starts with layouts already built or stops. No setting, save or cache changes; a revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). Not run whole yet: the crate's checks above.
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here (a_system_overlay_built_before_the_mod_started_has_its_prompts_squeezed_from_its_root_s_first_placing, the_mod_stopped_has_the_squeezed_overlay_s_panes_remade_at_the_game_s_shape).
  • Screenshots of the same spot on main and here, for a change that shows on screen. The before and after shots are game pictures, kept on the PC; Tested describes them.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary Follow-up to #3218, from BeanBot's review of it (L1 and its question). #3218 draws the system overlay's header and button prompts (`N_Header_00`, `N_Footer_00` of `SystemOverlay_00`) at their own shape in the middle 16:9 when **Ultrawide menus** is Centred on a picture wider than 16:9. Switching the Widescreen mod off and on while the game runs (Mods tab, Built in > Widescreen) broke that both ways: - **Switched off,** the header and prompts stayed squeezed. The mod's stop marks only the panes it notes for their transforms to be made again (the overlay's root), and the game did not remake the header and footer from it. - **Switched on again,** they were stretched across the whole picture. The mod noted them only as the layout is built (`ui.layoutBuilt`), and the overlay, built once at boot, gets no build after a restart. This fixes both: - `Ui::placed` notes a layout's squeezed panes the first time it places the layout's root. The start's forced pass places the root before the panes made from it. - `Ui::release` marks every pane of a layout with squeezed panes for its transform to be made again, as the start's forced pass does. Read first: `placed`, `note_squeezed` and `release` in `game/mods/widescreen/src/panes.rs`. ## Testing **Tested:** Windows 11, RTX 3080 (NVIDIA 621.47), 21:9 (`HOS_ASPECT=2.3889`), Ultrawide menus at its default (Centred), headless through the control bridge, on `f359e2621` + #3218's commit, with and without this PR's commits (the same diff as this branch). Title screen > Continue, the Load list open; a local copy of the mod inspector (`HOS_SYSTEM_MODS_DIR`) switched the Widescreen mod off and on again with `setEnabled`, as the Mods tab's switch does; a shot with the mod on, one 3 s after it was switched off, one 3 s after it was switched on again. - #3218 alone: switched off, the header and Back stayed squeezed in the middle 16:9 (the blurred sides gone); switched on again, the header spanned the whole picture and Back sat at its right edge. - Here: switched off, the header and Back at the game's own shape, across the whole picture; switched on again, in the middle 16:9 as at the start. `cargo fmt --check` clean; On `main` de6fb7b5d: `cargo test -p sysmod-widescreen`: 68 passed, 1 failed, `sides::tests::the_renderer_names_no_program_of_ours`, which fails the same on `main` (#2966's `gpu/vk/vk_rt_*.cpp` name the fog composite's hash `1a7482c0ec9991ea`); `cargo clippy -p sysmod-widescreen --all-targets`: nothing in this crate. **Still to test:** - Linux, AMD, 21:9: the same switch off and on (by hand) - Windows, a real window rather than a headless run, the Mods tab's own switch (by hand) ## Measurements Not measured: a layout's root placed for the first time costs one more look at its root's name (the overlay's panes are noted only for an overlay); stopping the mod marks one layout's panes once. ## Risks The Widescreen mod only, and only when the mod starts with layouts already built or stops. No setting, save or cache changes; a revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). Not run whole yet: the crate's checks above. - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here (`a_system_overlay_built_before_the_mod_started_has_its_prompts_squeezed_from_its_root_s_first_placing`, `the_mod_stopped_has_the_squeezed_overlay_s_panes_remade_at_the_game_s_shape`). - [x] Screenshots of the same spot on `main` and here, for a change that shows on screen. The before and after shots are game pictures, kept on the PC; Tested describes them. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Widescreen mod notes the system overlay's header and prompt bar (Rule::Squeeze) only as a layout is built
(ui.layoutBuilt). Switched off and on again while SystemOverlay_00 stays built, it gets no build for it, and the
prompts stay stretched on a wider picture with the menus Centred until the layout is built again. This fails on main:
the overlay's root placed first, then its footer, which stays at the whole picture's width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
#3218 noted the system overlay's header and prompt bar only as its layout is built (ui.layoutBuilt), so a mod
started while SystemOverlay_00 stays built (switched off and on in the Mods tab) left them stretched on a wider
picture with the menus Centred. A layout's root, the first time it is placed, now has its layout's squeezed panes noted
as a build does; the start's forced pass places the root before the panes made from it. A layout built while the mod
runs is noted twice at most (the second replaces the first).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Switched off, the Widescreen mod marks only the panes it notes for their transforms to be made again. The system
overlay's header and prompt bar, which #3218 squeezes, are not noted panes, and marking the overlay's root did not have
the game remake them: in game they stayed squeezed with the mod off. This fails on main: release() leaves them unmarked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(widescreen): the mod switched off puts the system overlay's header and prompts back at the game's shape
Some checks are pending
CI / What the change needs (pull_request) Waiting to run
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Waiting to run
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Waiting to run
dd65726d0f
#3218 squeezes the system overlay's header and prompt bar into the middle 16:9. They are no panes the mod notes, so
when the mod stopped, release() marked the overlay's root alone, and the game did not remake them: switched off in the
Mods tab, the header and prompts stayed squeezed. Every pane of a layout with squeezed panes is now marked for its
transform to be made again, as the start's forced pass does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 3080 (NVIDIA 621.47), 21:9, Ultrawide menus Centred, headless through the control bridge, f359e2621 + #3218's commit with and without these commits: title > Continue, the Load list open while the Widescreen mod is switched off and on (setEnabled, as the Mods tab). #3218 alone: off, the header and Back stayed squeezed; on again, stretched across the picture. Here: off, the game's own shape; on again, in the middle 16:9.

Tested in game: Windows 11, RTX 3080 (NVIDIA 621.47), 21:9, Ultrawide menus Centred, headless through the control bridge, f359e2621 + #3218's commit with and without these commits: title > Continue, the Load list open while the Widescreen mod is switched off and on (setEnabled, as the Mods tab). #3218 alone: off, the header and Back stayed squeezed; on again, stretched across the picture. Here: off, the game's own shape; on again, in the middle 16:9.
Owner
@review
BeanBot left a comment

Recommendation: Approve. The reported Windows run shows the header and prompts returning to the intended shape after switching the mod off and on. The pull request is still WIP, its checks are running, and the requested real-window test remains outstanding. Nothing blocking is left. Recommend approval; not approved on the forge.

Restores the system overlay’s header and prompts when Widescreen is stopped and rediscovers them when it restarts. The change adds one layout scan when a root is first seen and marks the affected layout’s panes on shutdown.

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes. The reported Windows 11, RTX 3080 run at 21:9 reproduced both incorrect states before the change and showed the expected result after it; this is a correctness fix, not a performance claim.

Other systems: The change affects Widescreen’s layout handling on Windows and Linux, including other menu modes and aspect ratios. The existing squeeze test covers centred, full-width and 16:9 cases; a real-window run through the Mods tab is still planned. Linux/AMD testing is also listed by the author.

Switches: None added, changed or removed.

Reviewed: dd65726d0f against de6fb7b5d8: Read the changed panes.rs in full, its diff and commits, repository rules, standards and pull request template. Read the relevant layout memory, planner, hook and mod lifecycle code; skimmed the remaining widescreen code. The referenced Tooling checkout and docs/review-checklist.md were not present. No generated files or recorded runs were changed.; nothing run (a code review).

Checked and fine:

  • Both new tests exercise behavior that the corresponding fix changes.
  • Planner access is protected by the existing mutex; the new code introduces no shared state or switches.
  • The commits carry AI-assistance trailers, and the diff contains no game-derived output or generated files.
  • The change does not alter the renderer API, shaders, dependencies or third-party code.

Testing: Read-only review; no commands from the project or tests were run. The author reports a game run and crate checks; CI is still running.

Overlaps and merge order: The description identifies this as a follow-up to #3218; other open pull requests could not be checked with the network closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The reported Windows run shows the header and prompts returning to the intended shape after switching the mod off and on. The pull request is still WIP, its checks are running, and the requested real-window test remains outstanding. Nothing blocking is left. Recommend approval; not approved on the forge. Restores the system overlay’s header and prompts when Widescreen is stopped and rediscovers them when it restarts. The change adds one layout scan when a root is first seen and marks the affected layout’s panes on shutdown. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. The reported Windows 11, RTX 3080 run at 21:9 reproduced both incorrect states before the change and showed the expected result after it; this is a correctness fix, not a performance claim. **Other systems:** The change affects Widescreen’s layout handling on Windows and Linux, including other menu modes and aspect ratios. The existing squeeze test covers centred, full-width and 16:9 cases; a real-window run through the Mods tab is still planned. Linux/AMD testing is also listed by the author. **Switches:** None added, changed or removed. **Reviewed:** dd65726d0f35 against de6fb7b5d8e4: Read the changed panes.rs in full, its diff and commits, repository rules, standards and pull request template. Read the relevant layout memory, planner, hook and mod lifecycle code; skimmed the remaining widescreen code. The referenced Tooling checkout and docs/review-checklist.md were not present. No generated files or recorded runs were changed.; nothing run (a code review). **Checked and fine:** - Both new tests exercise behavior that the corresponding fix changes. - Planner access is protected by the existing mutex; the new code introduces no shared state or switches. - The commits carry AI-assistance trailers, and the diff contains no game-derived output or generated files. - The change does not alter the renderer API, shaders, dependencies or third-party code. **Testing:** Read-only review; no commands from the project or tests were run. The author reports a game run and crate checks; CI is still running. **Overlaps and merge order:** The description identifies this as a follow-up to #3218; other open pull requests could not be checked with the network closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean changed title from WIP: fix(widescreen): the system overlay's header and prompts follow the mod switched off and on to fix(widescreen): the system overlay's header and prompts follow the mod switched off and on 2026-12-06 03:22:06 +00:00
HumanBean deleted branch fix/widescreen-squeeze-restart 2026-12-06 03:22:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!3281
No description provided.