Remove the unreachable non-embedded mode of AgentSettingsScreen
Author: simonrosenbergCreated Sep 28, 2026Updated Sep 28, 2026
Labelsenhancement
Problem
AgentSettingsScreen (src/routes/agent-settings.tsx) still has a non-embedded mode that nothing can reach.
Since #1571 (54d718a, 2026-07-08), the /settings/agent route renders only <Navigate to="/settings/agents" replace />. The only component that renders AgentSettingsScreen is the Agent Profile editor (agent-profiles-local-view.tsx), and it always passes embedded. Every !embedded branch has therefore been unreachable for about three months, while it is still maintained and tested.
What is dead
In src/routes/agent-settings.tsx:
- Save path.
handleSave(about 140 lines) and theuseSaveSettingsmutation that writes globalagent_settings, plus the page's own Save button (agent-save-button). - Tool switches. The "Enable sub-agents" and "Enable LLM switching" toggles, with their state, dirty tracking and label lookups. #17516 already removes them from the profile editor, so the only place they still render is this dead mode.
- Page header. The non-embedded title and description block.
- The
embeddedprop itself. Everyembedded &&guard is always true in practice, including the fallback that seeds the form from live global settings when no profile is passed.
In __tests__/routes/agent-settings.test.tsx, 26 tests render the non-embedded screen, and 18 of them click agent-save-button.
Proposal
- Make
AgentSettingsScreenthe profile-editor form only. Drop theembeddedprop, the global save path, the header and the tool switches. - Keep the
/settings/agentredirect for old links. - Don't just delete the tests. Some non-embedded tests are the only coverage for behaviour the profile editor also relies on, such as how the ACP command, model and credentials are saved. Rewrite those against the embedded editor, and drop only the ones that cover the global-settings save.
Notes
- This is a follow-up to #17516 and edits the same file, so it should land after it or be stacked on it.
- No user-visible change: the code removed here cannot be rendered today.
Source: OpenHands/OpenHands