Skip to content

refactor(platform): simplify agent selector#534

Merged
larryro merged 1 commit into
mainfrom
simplify-agent-selector
Feb 23, 2026
Merged

refactor(platform): simplify agent selector#534
larryro merged 1 commit into
mainfrom
simplify-agent-selector

Conversation

@larryro
Copy link
Copy Markdown
Collaborator

@larryro larryro commented Feb 23, 2026

Summary

  • Merge system and custom agents into a single alphabetically sorted list with the default chat agent pinned first
  • Remove separate "Built-in agents" / "Custom agents" UI sections and divider
  • Drop unused isSystemDefault and systemAgentSlug properties from agent option and selected agent interfaces

Test plan

  • Open the agent selector popover and verify all agents appear in a single alphabetical list
  • Verify the default chat agent ("Assistant") is always listed first
  • Search for agents and confirm filtering works correctly
  • Select different agents and verify selection state persists

🤖 Generated with Claude Code

Summary by CodeRabbit

  • UI Improvements
    • Simplified the agent selection interface by consolidating built-in and custom agents into a single, unified list
    • Agents are now organized alphabetically with the default chat agent prominently displayed first
    • Removed visual dividers and section headers that previously separated agent categories, streamlining the overall experience

… grouping

Merge system and custom agents into a single alphabetically sorted list
with the default chat agent pinned first, removing unnecessary UI sections
and unused properties from the agent option and selected agent interfaces.
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Feb 23, 2026

Greptile Summary

This PR simplifies the agent selector UI by merging system and custom agents into a single alphabetically sorted list.

Key Changes:

  • Removed the system/custom agent grouping and divider UI
  • Simplified sorting: default chat agent is pinned first, then all other agents are sorted alphabetically
  • Cleaned up unused properties (isSystemDefault, systemAgentSlug) from AgentOption and SelectedAgent interfaces
  • Removed the SYSTEM_SLUG_ORDER constant that previously maintained stable ordering for system agents
  • Deleted unused translation keys for section headers

Code Quality:

  • The refactor reduces complexity and improves maintainability
  • The database schema still contains isSystemDefault and systemAgentSlug fields (used at line 51 in agent-selector.tsx), so the code correctly accesses these from the database query
  • Selection logic properly handles both the default chat agent and custom agents

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The refactor is well-executed with clean code changes. The implementation correctly maintains references to database fields while removing unused interface properties. No breaking changes or logical issues detected.
  • No files require special attention

Important Files Changed

Filename Overview
services/platform/app/features/chat/components/agent-selector.tsx Simplified agent selector by merging system and custom agents into a single alphabetically sorted list with default chat agent pinned first. Removed complex sorting logic and UI dividers.
services/platform/app/features/chat/context/chat-layout-context.tsx Removed unused isSystemDefault property from SelectedAgent interface, simplifying the interface to only essential fields.
services/platform/messages/en.json Removed unused translation keys builtinSection and customSection that were previously used for agent grouping UI.

Last reviewed commit: 666fd41

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

This PR simplifies the agent selection UI by consolidating separate system and custom agent lists into a single combined list. The changes remove the isSystemDefault and systemAgentSlug fields from the AgentOption interface, eliminate section headers and dividers that visually separated agent types, and update sorting to prioritize the default chat agent followed by alphabetical order. The SelectedAgent interface is also simplified by removing the isSystemDefault property. Translation keys for section headers (builtinSection and customSection) are removed from the localization file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor(platform): simplify agent selector' accurately and directly summarizes the main change—consolidating agent options into a single simplified list and removing UI separations.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch simplify-agent-selector

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

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