fix(agents): keep disabled custom agents visible in settings#3319
Merged
piorpua merged 3 commits intoJun 14, 2026
Merged
Conversation
Disabling a custom agent removed it from the entire UI, including the settings list that hosts the re-enable toggle, leaving no way to turn it back on from the GUI. The settings management surface now reads a dedicated management view of /api/agents (include_disabled=true) via a separate SWR key, so a disabled custom agent stays listed (greyed, with a working re-enable toggle). Pickers keep using the shared detected key and the default filtered view, so disabled agents stay hidden there. Toggling an agent revalidates both keys, so re-enabling in settings makes it reappear in the pickers. Requires the matching AionCore change that adds the include_disabled query parameter to GET /api/agents.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Adds a focused render test for LocalAgents proving it consumes the include_disabled management view (useManagedAgents) and derives the detected/custom sections, covering the previously untested component body.
This was referenced Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Keep user-disabled custom agents visible (greyed, with a working re-enable toggle) in
Settings → Agents → Local Agents, instead of having them vanish from the whole UI.
Fixes #3318
Why
Toggling a custom agent off removed it from the entire UI, including the settings list that
hosts the re-enable toggle — so there was no way to turn it back on from the GUI. The
settings screen shared the same
/api/agentsdata path as the pickers, so when the backenddropped the disabled row it disappeared everywhere.
How
The fix keeps pickers untouched and gives the settings surface its own data path:
ipcBridge.ts: new siblinggetManagedAgentsbridge hitting/api/agents?include_disabled=true.getAvailableAgents(the picker path) is unchanged.agentTypes.ts: newMANAGED_AGENTS_SWR_KEY+fetchManagedAgents, kept separate fromthe shared
DETECTED_AGENTS_SWR_KEYso disabled agents never leak into the pickers.useAgents.ts: newuseManagedAgents()hook. Itsrevalidaterefreshes both themanagement key and the shared detected key, so toggling an agent on/off in settings is
immediately reflected in every picker.
LocalAgents.tsx: switched fromuseAgents()touseManagedAgents()so disabled customagents stay listed. The existing toggle/create/delete handlers already call this hook's
revalidate, so both caches stay in sync.AgentCard.tsx: a disabled custom card now greys its identity block (subtle opacity) inaddition to the already-disabled Start Chat button.
No new user-facing strings (the greyed state + disabled button communicate the state), so no
i18n changes.
Tests
bunx vitest run— added:useManagedAgents: subscribes to the management key, andrevalidate/refreshCustomAgentsrefresh both SWR keys (this is what makes a re-enabled agentreappear in pickers).
fetchManagedAgents: hits theinclude_disabledbridge (never the picker-safe one) anddegrades to
[]on failure / non-array.Local checks
bun run format— cleanbun run lint— 0 errors (pre-existing warnings only)bunx tsc --noEmit— cleannode scripts/check-i18n.js— passedbunx vitest run— 1150 passed, 3 skippedCoupling
This is the renderer half of a cross-repo fix. The backend half adds the
include_disabledquery parameter to
GET /api/agentsand lives in iOfficeAI/AionCore#467. Both PRs arecoupled — this change only works against an AionUi build whose bundled
aioncorebinaryincludes that backend change, so the AionCore half must be bundled for the fix to function
in a release.