Repository navigation
Serve /settings/model-api from the settings shell - #3467
Conversation
The settings client routes /settings/model-api to the model-api view (static/settings/app.mjs PATH_VIEWS) and tests/settings_page.test.mjs asserts that mapping, but the server allow-list in settings_page.py did not carry the path, so a hard navigation returned 404 "Not found" while the removed section /settings/message-folding is still served for back-compat. Add the route to the allow-list and extend the subpage enumeration test with it, so every routed URL keeps a served page. Related #3466
Lead review recordReviewed exact head Object graph rebuilt on my side: codeload of One reviewable slice: the server allow-list gains Deliberately untouched (checked in the diff): the QA testimony for this head (QA Engineer's own reading, not mine): single parent My own local check: the two-file slice reproduces both blobs and the tree on a clean CI (read directly from the check-runs of this head): No parity or acceptance claim. Enqueuing to the merge queue against this head. |
What
GET /settings/model-apireturned 404 "Not found" even though the settings clienttreats that URL as a real route. This adds the path to the server allow-list in
flybot_workspace/settings_page.pyand extends the subpage enumeration test with it.Three places already assumed the URL works:
flybot_workspace/static/settings/app.mjs:114—PATH_VIEWSmaps/settings/model-apito the
model-apiview.tests/settings_page.test.mjs:147— assertssettingsViewFromLocation('/settings/model-api', '#video-api') === 'model-api'.flybot_workspace/static/chat/index.html:529,551,579,609,641— five anchors link to/settings/model-api(#image-api,#video-api,#music-api,#model3d-api).The allow-list, meanwhile, carried the removed section
/settings/message-folding(back-compat, pinned by
tests/test_settings_page.py:361) but not the live one.Change
flybot_workspace/settings_page.py'/settings/model-api': ('settings', 'index.html', 'text/html; charset=utf-8')tests/test_settings_page.pytest_recorded_subpages_serve_the_same_settings_shellnow enumerates/settings/model-apitoo (+2/−1)Two files,
+3/−1. No client code, no markup, nodocs/inventory/visible-controls.jsonchange (no HTML line moves).
Verification (local readings, not CI)
python -m unittest tests.test_settings_page→ 21 tests OK (8.0s).tests.test_settings_page tests.test_visible_inventory→ 23 tests OK (9.4s).with
AssertionError: 404 != 200 : /settings/model-api; with it, the module is green.--insecure-local --open-registration,run then stopped and deleted):
GET /settings/model-api→ 200, 84,444 B,Cache-Control: no-store, body carriesid="settings-index"anddata-settings-page="model-api";GET /settings/message-foldingstill 200 with the hub(no
data-settings-page="message-folding");GET /settings/missingstill 404.git applyofslice.patch(sha256c4a09071…) on a clean0d18af72tree yields tree
38e7a812de5d44a479a75c34000949ca1deadde6, identical to the committree; blobs
11954654(settings_page.py) and23eb5535(test).Out of scope
/settings/message-foldingback-compat route and its assertion are untouched.hiddenand nothing in the repo unhides them;the live "configure model" link is built at runtime in
static/chat/app.mjs:3444with
/settings#model-api. Cleaning up the dead markup is a separate slice.and suite level only.
Related #3466