From 7b3f3272871c424625997e71aade3cbbf9c8763e Mon Sep 17 00:00:00 2001 From: Danyang Chen Date: Mon, 30 Nov 2026 14:11:30 +0800 Subject: [PATCH] Serve /settings/model-api from the settings shell 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 --- flybot_workspace/settings_page.py | 1 + tests/test_settings_page.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flybot_workspace/settings_page.py b/flybot_workspace/settings_page.py index 3b33e1ffe..11954654b 100644 --- a/flybot_workspace/settings_page.py +++ b/flybot_workspace/settings_page.py @@ -45,6 +45,7 @@ class SettingsPage: '/settings/agent-access': ('settings', 'index.html', 'text/html; charset=utf-8'), '/settings/connectors': ('settings', 'index.html', 'text/html; charset=utf-8'), '/settings/skill-configuration': ('settings', 'index.html', 'text/html; charset=utf-8'), + '/settings/model-api': ('settings', 'index.html', 'text/html; charset=utf-8'), '/settings/custom-mcp.mjs': ('settings', 'custom-mcp.mjs', 'text/javascript; charset=utf-8'), '/settings/connected-tools.mjs': ('settings', 'connected-tools.mjs', 'text/javascript; charset=utf-8'), '/settings/app.mjs': ('settings', 'app.mjs', 'text/javascript; charset=utf-8'), diff --git a/tests/test_settings_page.py b/tests/test_settings_page.py index 7f848db8a..23eb55354 100644 --- a/tests/test_settings_page.py +++ b/tests/test_settings_page.py @@ -349,7 +349,8 @@ def test_recorded_subpages_serve_the_same_settings_shell(self): '/settings/privacy', '/settings/shortcuts', '/settings/channels', '/settings/agent-access', '/settings/connectors', - '/settings/skill-configuration'): + '/settings/skill-configuration', + '/settings/model-api'): page = self.raw.call('GET', path) self.assertEqual(page['status'], 200, path) html = page['body'].decode()