docs(menu): the Insert menu's settings page describes the contract that exists #2888

Closed
HumanBean wants to merge 2 commits from cleanup/area10-stale-docs into mod-api
Owner

Summary

docs/dev/reference/settings-declarations.md still described the renderer declaring the Insert menu's rows: nine
renderer_setting_* members, MkwVkSettingDecl, gpu/vk/menu_model.h, menu_text.h and "step f", all gone since API
version 77. It is rewritten (269 lines to about 130) as what the code does on mod-api: the game owns every setting;
the renderer's part is settings_apply, capabilities, renderer_status, renderer_action, renderer_effects and
output_preview; longshot/settings-host and longshot/mods-host; a declaration's fields as service_decl_json
gives them; the menu and Mods tab system mods; the menu's frame and the fallback. Headings that other pages and the
schema link to are kept.

Also corrected: game/DESIGN.md's menu bullets (GameSettingRow, ImGui, renderer_setting_*), game/README.md and
game/mods/hdr/README.md (game_rows.cpp), and C++ comments in gpu/vk/vk_menu.cpp, vk_menu_i18n.cpp and two
gpu/vk/menu/*.cpp headers (gameplay, sprint) (and a comment in tests/test_menu_i18n.py) that named game_rows.cpp, mod_ui_menu.cpp or renderer_setting_*.

Read first: docs/dev/reference/settings-declarations.md.

Testing

Tested: docs and comments only; nothing the game runs changed. tests/test_doc_anchors.py,
tests/test_doc_commands.py, tests/test_menu_i18n.py and pre-commit on the changed files pass. Every statement was
checked against mod-api (and by a cold review).

Review fixes (08ea7100): what fires changed, what an idle open menu still costs, and where the Insert menu's rows come from. tests/run_all.py, the whole suite, once through the job queue on 05d26b1b: 733 passed, 1 failed, 114 skipped: the only failure, tests/test_lifter.py (build-core's control::tests::the_socket_is_made_private_and_a_client_handed_over, control.rs:428), fails the same way on mod-api @ 12f42db5; the final head 08ea7100 only reflows the same lines (doc tests and pre-commit pass on it). The C++ changes are comments only.

Still to test: None.

Measurements

Nothing to measure: docs and comments only.

Risks

None: no code changes. architecture.md's Insert menu section and AGENTS.md's menu rule are left to #2877. Merges after #2877, which deletes controller_speaker.cpp and detail.cpp (left alone here).

Checklist

Ready for review

  • One topic, on current mod-api; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (No game change.)
  • mise run test passes (any failure that also fails on main is named). (tests/test_lifter.py: build-core's socket hand-over test, failing on mod-api @ 12f42db5 too.)
  • 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 check under tests/ that reads changed source is updated, not weakened. (Only comments changed; tests/test_menu_i18n.py's comment updated.)
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

🤖 Generated with Claude Code

https://claude.ai/code/session_016o1k1SQVyAWsujjFVd8Wuc

## Summary `docs/dev/reference/settings-declarations.md` still described the renderer declaring the Insert menu's rows: nine `renderer_setting_*` members, `MkwVkSettingDecl`, `gpu/vk/menu_model.h`, `menu_text.h` and "step f", all gone since API version 77. It is rewritten (269 lines to about 130) as what the code does on `mod-api`: the game owns every setting; the renderer's part is `settings_apply`, `capabilities`, `renderer_status`, `renderer_action`, `renderer_effects` and `output_preview`; `longshot/settings-host` and `longshot/mods-host`; a declaration's fields as `service_decl_json` gives them; the menu and Mods tab system mods; the menu's frame and the fallback. Headings that other pages and the schema link to are kept. Also corrected: `game/DESIGN.md`'s menu bullets (`GameSettingRow`, ImGui, `renderer_setting_*`), `game/README.md` and `game/mods/hdr/README.md` (`game_rows.cpp`), and C++ comments in `gpu/vk/vk_menu.cpp`, `vk_menu_i18n.cpp` and two `gpu/vk/menu/*.cpp` headers (`gameplay`, `sprint`) (and a comment in `tests/test_menu_i18n.py`) that named `game_rows.cpp`, `mod_ui_menu.cpp` or `renderer_setting_*`. Read first: `docs/dev/reference/settings-declarations.md`. ## Testing **Tested:** docs and comments only; nothing the game runs changed. `tests/test_doc_anchors.py`, `tests/test_doc_commands.py`, `tests/test_menu_i18n.py` and pre-commit on the changed files pass. Every statement was checked against `mod-api` (and by a cold review). Review fixes (08ea7100): what fires `changed`, what an idle open menu still costs, and where the Insert menu's rows come from. `tests/run_all.py`, the whole suite, once through the job queue on 05d26b1b: 733 passed, 1 failed, 114 skipped: the only failure, `tests/test_lifter.py` (build-core's `control::tests::the_socket_is_made_private_and_a_client_handed_over`, control.rs:428), fails the same way on mod-api @ 12f42db5; the final head 08ea7100 only reflows the same lines (doc tests and pre-commit pass on it). The C++ changes are comments only. **Still to test:** None. ## Measurements Nothing to measure: docs and comments only. ## Risks None: no code changes. `architecture.md`'s Insert menu section and `AGENTS.md`'s menu rule are left to #2877. Merges after #2877, which deletes `controller_speaker.cpp` and `detail.cpp` (left alone here). ## Checklist ### Ready for review - [x] One topic, on current `mod-api`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. (No game change.) - [x] `mise run test` passes (any failure that also fails on `main` is named). (`tests/test_lifter.py`: build-core's socket hand-over test, failing on mod-api @ 12f42db5 too.) - [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 check under `tests/` that reads changed source is updated, not weakened. (Only comments changed; `tests/test_menu_i18n.py`'s comment updated.) - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016o1k1SQVyAWsujjFVd8Wuc
docs(menu): the Insert menu's settings page describes the contract that exists
Some checks failed
PR description / Title and description (pull_request_target) Failing after 8s
fa72fa338c
settings-declarations.md described renderer_setting_*, MkwVkSettingDecl and menu_model.h, gone since API 77. It now
describes the snapshot, capabilities, status and actions, settings-host and mods-host, and the system mods. Stale
citations of game_rows.cpp, mod_ui_menu.cpp and renderer_setting_* in game docs and gpu/vk comments are corrected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner
@review
BeanBot left a comment

Recommendation: Request changes. The rewrite replaces obsolete renderer declarations with the current settings-host contract, but a few statements misdescribe that contract. It also needs the stated dependency on #2877 and the failing description check resolved before merge. (It stands on L4: The check PR description / Title and description (pull_request_target) fails on this head and passes on the base branch: Failing after 8s.)

The change updates developer documentation and comments for the Insert menu. It improves the description of settings ownership and renderer responsibilities, with no runtime code changes.

Blocking (1): must change before merging.

  1. L4: The check PR description / Title and description (pull_request_target) fails on this head and passes on the base branch: Failing after 8s.

Should fix (3): not blocking, but worth doing before merging.

  • L1 docs/dev/reference/settings-declarations.md:40: changed also fires when the menu state or renderer status changes, not only when the declarations' generation moves. (more on the line) Do: Include menu-open and status changes among the triggers for changed.
  • L2 docs/dev/reference/settings-declarations.md:97: An idle open menu does not cost nothing per frame: the engine still checks its inputs and periodically compares watched rows. (more on the line) Do: Say that unchanged data does not trigger menu updates, while noting the engine's ongoing checks.
  • L3 game/README.md:29: Not every Insert menu row is a system mod setting. (more on the line) Do: Describe settings rows as coming through settings-host and distinguish the menu's own lines and recording rows.

@fix can do L1, L2, L3 and L4.

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

Does it help: Not a perf change. The documentation is substantially closer to the implementation, though the inaccuracies noted below remain.

Other systems: The change affects developer documentation and source comments only; it does not change game, renderer, launcher, or platform behavior.

Switches: None.

Reviewed: fa72fa338c against 12f42db5c1: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the rewritten settings reference, settingsHost schema, menu view and HDR README in full. Read the full diff and commit, and relevant excerpts of standards, settings-host, loader, settings storage and renderer API. Other changed files and surrounding code were skimmed; the sibling Tooling checkout and docs/review-checklist.md were absent.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance with a Co-Authored-By trailer.
  • The existing in-repository link to the hosting section retains its target.
  • The changed files contain no game-derived output, generated files, or runtime behavior changes.

Testing: No commands from the project were run, as requested. The author reports documentation checks and pre-commit passed; the supplied CI reports a description check failing on this head.

Overlaps and merge order: #2877 is identified in the pull request as a prerequisite; merge it first.


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

**Recommendation: Request changes.** The rewrite replaces obsolete renderer declarations with the current settings-host contract, but a few statements misdescribe that contract. It also needs the stated dependency on #2877 and the failing description check resolved before merge. (It stands on L4: The check `PR description / Title and description (pull_request_target)` fails on this head and passes on the base branch: Failing after 8s.) The change updates developer documentation and comments for the Insert menu. It improves the description of settings ownership and renderer responsibilities, with no runtime code changes. **Blocking (1)**: must change before merging. 1. **L4**: The check `PR description / Title and description (pull_request_target)` fails on this head and passes on the base branch: Failing after 8s. **Should fix (3)**: not blocking, but worth doing before merging. - **L1** `docs/dev/reference/settings-declarations.md:40`: `changed` also fires when the menu state or renderer status changes, not only when the declarations' generation moves. (more on the line) **Do:** Include menu-open and status changes among the triggers for `changed`. - **L2** `docs/dev/reference/settings-declarations.md:97`: An idle open menu does not cost nothing per frame: the engine still checks its inputs and periodically compares watched rows. (more on the line) **Do:** Say that unchanged data does not trigger menu updates, while noting the engine's ongoing checks. - **L3** `game/README.md:29`: Not every Insert menu row is a system mod setting. (more on the line) **Do:** Describe settings rows as coming through settings-host and distinguish the menu's own lines and recording rows. `@fix` can do L1, L2, L3 and L4. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Not a perf change. The documentation is substantially closer to the implementation, though the inaccuracies noted below remain. **Other systems:** The change affects developer documentation and source comments only; it does not change game, renderer, launcher, or platform behavior. **Switches:** None. **Reviewed:** fa72fa338c85 against 12f42db5c145: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the rewritten settings reference, settingsHost schema, menu view and HDR README in full. Read the full diff and commit, and relevant excerpts of standards, settings-host, loader, settings storage and renderer API. Other changed files and surrounding code were skimmed; the sibling Tooling checkout and docs/review-checklist.md were absent.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance with a Co-Authored-By trailer. - The existing in-repository link to the hosting section retains its target. - The changed files contain no game-derived output, generated files, or runtime behavior changes. **Testing:** No commands from the project were run, as requested. The author reports documentation checks and pre-commit passed; the supplied CI reports a description check failing on this head. **Overlaps and merge order:** #2877 is identified in the pull request as a prerequisite; merge it first. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -55,0 +37,4 @@
- **`longshot/settings-host`** (`api::services::settings_host`): the declarations (`decls(keys, pages)`), the rows'
states (`rows`), the values' texts (`texts`), the renderer's `status`, the changes (`set`, `press`, `putText`,
`answer`) and the Controls grid's bindings (`binding`, `bindQuestion`, `bind`). Every text is in the menu's language.
The engine keeps what each mod read and, at each acquire phase, fires `changed` (the generation moved on) or
Member

L1 (should fix): changed also fires when the menu state or renderer status changes, not only when the declarations' generation moves.

When: During the output-resolution preview, the countdown changes without a declarations generation change; the service compares status and fires changed so the menu can update it.

Do: Include menu-open and status changes among the triggers for changed.

**L1** (should fix): `changed` also fires when the menu state or renderer status changes, not only when the declarations' generation moves. *When:* During the output-resolution preview, the countdown changes without a declarations generation change; the service compares status and fires `changed` so the menu can update it. **Do:** Include menu-open and status changes among the triggers for `changed`.
@ -201,0 +94,4 @@
`system/menu` (`game/mods/menu`) lays the menu out: its tabs, the pages their links open, and their headings and own
lines (`src/layout.ts`). Every row goes where its declaration's place says, as a player's mod's row does (`view.ts`
`laidOut`). A link may show only with a row (`shownWith`). It reads the shown page's declarations when the page or the
generation changes, and its rows and the status with `useHost`: an open menu where nothing changes costs nothing a
Member

L2 (should fix): An idle open menu does not cost nothing per frame: the engine still checks its inputs and periodically compares watched rows.

When: While system/menu holds settings.host, settings_host_step reads the menu state and renderer status each frame and compares watched rows every quarter second even when nothing changes.

Do: Say that unchanged data does not trigger menu updates, while noting the engine's ongoing checks.

**L2** (should fix): An idle open menu does not cost nothing per frame: the engine still checks its inputs and periodically compares watched rows. *When:* While `system/menu` holds `settings.host`, `settings_host_step` reads the menu state and renderer status each frame and compares watched rows every quarter second even when nothing changes. **Do:** Say that unchanged data does not trigger menu updates, while noting the engine's ongoing checks.
game/README.md Outdated
@ -28,3 +28,2 @@
- **No C of the game's own:** the Insert menu's Mods tab is the mods-tab system mod's, over the loader's rows (`crates/api`'s
`loader`: the profile's `mods/` and `profile.json`, the ExeFS patches' state) through `longshot/mods-host`. The game's rows of the Insert menu are the system mods' settings, which the renderer draws
from `game_setting_*` (`gpu/vk/menu/game_rows.cpp`). What the mods serve is the Rust's (`content::layers`, published
`loader`: the profile's `mods/` and `profile.json`, the ExeFS patches' state) through `longshot/mods-host`. Every row of the Insert menu is a system mod's setting, which the menu system mod draws
Member

L3 (should fix): Not every Insert menu row is a system mod setting.

When: The Play recording page has rows supplied by the recordings service, and the menu layout supplies its own links and lines; neither comes from a system mod's setting declaration.

Do: Describe settings rows as coming through settings-host and distinguish the menu's own lines and recording rows.

**L3** (should fix): Not every Insert menu row is a system mod setting. *When:* The Play recording page has rows supplied by the recordings service, and the menu layout supplies its own links and lines; neither comes from a system mod's setting declaration. **Do:** Describe settings rows as coming through settings-host and distinguish the menu's own lines and recording rows.
docs(menu): what fires changed, what an idle menu still costs, where the rows come from
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s
08ea7100f4
changed also fires when the menu opens or closes or the renderer's status moves
(the Output resolution preview's countdown); an idle open menu is not updated
but the engine still reads the state each frame and compares rows every quarter
second; not every Insert menu row is a setting (the layout's own lines, the
Play recording page's rows).

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

Thanks. L1-L3 fixed in 08ea7100: changed also fires on the menu's open state and the renderer's status (the preview countdown); an idle open menu is not updated but the engine still reads state each frame and compares rows every quarter second; game/README.md separates setting rows from the layout's own lines and the recording rows. L4: description fixed. Merges after #2877.

Thanks. L1-L3 fixed in 08ea7100: `changed` also fires on the menu's open state and the renderer's status (the preview countdown); an idle open menu is not updated but the engine still reads state each frame and compares rows every quarter second; game/README.md separates setting rows from the layout's own lines and the recording rows. L4: description fixed. Merges after #2877.
Author
Owner

Landed directly on mod-api as af3e4d40 (one commit), after its review fixes and rebase onto 1f49aeec; closing. mod-api work now goes straight onto the branch once self-reviewed, not through PRs.

Landed directly on mod-api as af3e4d40 (one commit), after its review fixes and rebase onto 1f49aeec; closing. mod-api work now goes straight onto the branch once self-reviewed, not through PRs.
Author
Owner

Closed: landed on mod-api as af3e4d40.

Closed: landed on mod-api as af3e4d40.
HumanBean closed this pull request 2026-11-30 19:34:46 +00:00
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s

Pull request closed

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!2888
No description provided.