Skip to content

feat(platform): add activate/deactivate toggle for custom agents#430

Merged
Israeltheminer merged 1 commit into
mainfrom
feat/custom-agent-active-toggle
Feb 11, 2026
Merged

feat(platform): add activate/deactivate toggle for custom agents#430
Israeltheminer merged 1 commit into
mainfrom
feat/custom-agent-active-toggle

Conversation

@Israeltheminer
Copy link
Copy Markdown
Collaborator

@Israeltheminer Israeltheminer commented Feb 11, 2026

Summary

  • Add a Switch toggle component for custom agents matching the existing automation toggle pattern
  • Display the toggle in both the custom agents list table and the general settings tab
  • Draft agents have the toggle disabled (require full publish flow); deactivation shows a confirmation dialog

Test plan

  • Verify active agents show a checked toggle in the table and settings page
  • Verify archived agents show an unchecked toggle that activates on click
  • Verify draft agents show a disabled toggle
  • Verify deactivation shows confirmation dialog before unpublishing
  • Run npm run test:ui --workspace=@tale/platform — all 235 tests pass
  • Run npm run lint --workspace=@tale/platform — 0 errors

Summary by CodeRabbit

New Features

  • Custom agents can now be toggled between active and inactive states from the agent table and detail pages
  • Deactivating an agent requires confirmation via a dialog to prevent accidental changes
  • Success and error notifications confirm the outcome of each activation or deactivation action

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

This change introduces a new CustomAgentActiveToggle component for managing the activation state of custom agents. The component includes mutation handlers for activating archived agents and deactivating active agents with confirmation dialogs. The component is integrated into the custom agents table as a new column and added to the custom agent details page under the General tab. Supporting test coverage is provided, and localized i18n strings are added for labels, dialogs, and toast notifications.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding an activate/deactivate toggle feature for custom agents, which is clearly the primary focus across all modified files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/custom-agent-active-toggle

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@services/platform/app/routes/dashboard/`$id/custom-agents/$agentId/index.tsx:
- Around line 142-150: The CustomAgentActiveToggle is being passed a possibly
undefined agent from useCustomAgentVersion(), so guard rendering by checking the
agent before rendering the toggle: only render <CustomAgentActiveToggle
agent={agent} ... /> (and the helper <p>) when agent is truthy, or alternatively
render a loading/placeholder/disabled state until agent is defined; update the
JSX around CustomAgentActiveToggle and the surrounding Stack to conditionally
render based on agent (referencing the CustomAgentActiveToggle component and the
useCustomAgentVersion hook).

Comment thread services/platform/app/routes/dashboard/$id/custom-agents/$agentId/index.tsx Outdated
Add a Switch toggle to both the custom agents list table and the
general settings tab, allowing direct activation/deactivation without
navigating through dropdown menus. Draft agents have the toggle
disabled since they require the full publish flow. Deactivation shows
a confirmation dialog consistent with existing UX patterns.
@Israeltheminer Israeltheminer force-pushed the feat/custom-agent-active-toggle branch from ebf5dd1 to 33c6b18 Compare February 11, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant