Skip to content

feat: color badges for subagent types with .claude/agents/ config support#50

Merged
matt1398 merged 1 commit intomatt1398:mainfrom
cesarafonseca:feat/subagent-type-color-badges
Feb 21, 2026
Merged

feat: color badges for subagent types with .claude/agents/ config support#50
matt1398 merged 1 commit intomatt1398:mainfrom
cesarafonseca:feat/subagent-type-color-badges

Conversation

@cesarafonseca
Copy link
Contributor

@cesarafonseca cesarafonseca commented Feb 21, 2026

Summary

  • Subagent badges now display distinct colors instead of generic gray, making different agent types visually distinguishable at a glance
  • Colors are resolved from the project's .claude/agents/*.md frontmatter (color field), matching the user's configured color for each agent
  • When no agent config exists, colors are generated deterministically via a string hash — any custom agent type gets a consistent color automatically
  • New AgentConfigReader service reads and parses agent definitions from .claude/agents/ via IPC. Results are cached per projectRoot, so session refreshes (file watcher turns) don't re-read from disk
  • Team member colors (Orchestrate Teams) are unaffected — team branch always takes priority

Future extensibility

The AgentConfigReader already parses the full frontmatter of agent files. Today it exposes name and color, but it can be extended to surface other supported frontmatter fields like description, model, tools — enabling richer agent tooltips, model badges, or tool inventory views.

Screenshots

CLI claude-devtools
CLI claude-devtools

Testing

  • npm run typecheck passes
  • npm run lint passes
  • npm test passes

@cesarafonseca cesarafonseca marked this pull request as draft February 21, 2026 16:20
@cesarafonseca cesarafonseca force-pushed the feat/subagent-type-color-badges branch from 1ea45bf to 7c263c9 Compare February 21, 2026 16:37
@cesarafonseca cesarafonseca changed the title feat: deterministic color badges for subagent types feat: color badges for subagent types with .claude/agents/ config support Feb 21, 2026
@cesarafonseca cesarafonseca force-pushed the feat/subagent-type-color-badges branch from 7c263c9 to 2dc1c43 Compare February 21, 2026 16:45
@cesarafonseca cesarafonseca marked this pull request as ready for review February 21, 2026 16:46
@cesarafonseca cesarafonseca force-pushed the feat/subagent-type-color-badges branch 2 times, most recently from 5d6bae8 to f150447 Compare February 21, 2026 16:52
…port

Subagent badges now show distinct colors instead of generic gray.
Colors are resolved from the project's .claude/agents/*.md frontmatter
(color field), with deterministic hash-based fallback for unconfigured types.

New AgentConfigReader service reads agent definitions via IPC, cached
per project root to avoid redundant disk reads on session refreshes.

Team member colors remain unaffected (team branch has priority).
@cesarafonseca cesarafonseca force-pushed the feat/subagent-type-color-badges branch from f150447 to f05bf9f Compare February 21, 2026 16:53
@matt1398 matt1398 merged commit 39d88e2 into matt1398:main Feb 21, 2026
3 checks passed
proxikal added a commit to proxikal/claude-devtools that referenced this pull request Feb 21, 2026
Two performance regressions introduced in recent PRs:

1. readAgentConfigs blocked transcript rendering (PR matt1398#50)
   The agent config IPC call was awaited on the critical path of
   fetchSessionDetail, preventing any transcript data from rendering
   until the filesystem read completed. On macOS this was especially
   noticeable due to security checks on first directory access.
   Fixed by making the call fire-and-forget: the transcript renders
   immediately and subagent color badges update asynchronously.
   Also set the project cache key optimistically before the async call
   to prevent duplicate in-flight requests on rapid navigation.

2. SessionSearcher stat()-called every session file on each search (PR matt1398#53)
   LocalFileSystemProvider.readdir() did not populate the optional
   mtimeMs field on FsDirent entries. The new SearchTextCache-based
   SessionSearcher fell back to an individual fsProvider.stat() call
   per session file when mtimeMs was missing, adding N extra filesystem
   round-trips on every search in local mode.
   Fixed by statting all entries concurrently inside readdir(), so
   mtimeMs is always populated and the stat fallback is never triggered.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants