docs(menu): the Insert menu's settings page describes the contract that exists #2888
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2888
Loading…
Reference in a new issue
No description provided.
Delete branch "cleanup/area10-stale-docs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
docs/dev/reference/settings-declarations.mdstill described the renderer declaring the Insert menu's rows: ninerenderer_setting_*members,MkwVkSettingDecl,gpu/vk/menu_model.h,menu_text.hand "step f", all gone since APIversion 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_effectsandoutput_preview;longshot/settings-hostandlongshot/mods-host; a declaration's fields asservice_decl_jsongives 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.mdandgame/mods/hdr/README.md(game_rows.cpp), and C++ comments ingpu/vk/vk_menu.cpp,vk_menu_i18n.cppand twogpu/vk/menu/*.cppheaders (gameplay,sprint) (and a comment intests/test_menu_i18n.py) that namedgame_rows.cpp,mod_ui_menu.cpporrenderer_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.pyand pre-commit on the changed files pass. Every statement waschecked against
mod-api(and by a cold review).Review fixes (
08ea7100): what fireschanged, 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'scontrol::tests::the_socket_is_made_private_and_a_client_handed_over, control.rs:428), fails the same way on mod-api @12f42db5; the final head08ea7100only 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 andAGENTS.md's menu rule are left to #2877. Merges after #2877, which deletescontroller_speaker.cppanddetail.cpp(left alone here).Checklist
Ready for review
mod-api; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (tests/test_lifter.py: build-core's socket hand-over test, failing on mod-api @12f42db5too.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened. (Only comments changed;tests/test_menu_i18n.py's comment updated.)Assisted-by:/Co-Authored-By:trailers.🤖 Generated with Claude Code
https://claude.ai/code/session_016o1k1SQVyAWsujjFVd8Wuc
@review
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.
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.
docs/dev/reference/settings-declarations.md:40:changedalso 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 forchanged.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.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.@fixcan 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:
fa72fa338cagainst12f42db5c1: 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:
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.
@ -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) orL1 (should fix):
changedalso 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
changedso 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 ownlines (`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 thegeneration changes, and its rows and the status with `useHost`: an open menu where nothing changes costs nothing aL2 (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/menuholdssettings.host,settings_host_stepreads 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.
@ -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 drawsfrom `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 drawsL3 (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.
Thanks. L1-L3 fixed in
08ea7100:changedalso 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.Landed directly on mod-api as
af3e4d40(one commit), after its review fixes and rebase onto1f49aeec; closing. mod-api work now goes straight onto the branch once self-reviewed, not through PRs.Closed: landed on mod-api as
af3e4d40.Pull request closed