Skip to content

gut(ui): strip residual 'default' agent badge from agents list (#2529 F3) #2550

@alexey-pelykh

Description

@alexey-pelykh

Context

Found during #2529 UI remnants audit (F3). The agentBadgeText function at ui/src/ui/views/agents-utils.ts:104-106 still returns a "default" pill badge when agentId === defaultId, rendering via <span class="agent-pill">default</span> at views/agents.ts:133, 260.

This contradicts #2286's explicit intent:

"Remove isDefault field from AgentSummary, AgentHealthSummary, and all UI types — agents now display in agents.list order with no special "default" marker"
"Strip (default) / [default] badges from all display output: health, agents list, TUI, channels add, Web UI agent panels and nodes"

#2286 stripped the (default) / [default] bracketed forms but left the bare-text pill form in place.

Scope

File Lines Action
ui/src/ui/views/agents-utils.ts 104-106 Delete agentBadgeText function
ui/src/ui/views/agents-utils.ts 147, 242 Remove defaultId param where only used by agentBadgeText
ui/src/ui/views/agents.ts 26 Remove agentBadgeText import
ui/src/ui/views/agents.ts 120, 133, 152, 160, 202, 221, 245, 260, 292 Remove badge computation + .agent-pill rendering for default marker. Preserve .agent-pill.warn (used for "missing" status at agents-panels-status-files.ts:447) — only the default-variant usage is dead.

Caveat

Backend defaultId field is LIVE — emitted by src/commands/status.agent-local.ts:21, 87, used for agent pre-selection (app-settings.ts:220, app-render.ts:117,155,569, app-chat.ts:221,232). This issue removes only the visual pill, not the underlying defaultId data flow.

Acceptance Criteria

  • agentBadgeText and call-sites removed
  • Agent pre-selection via defaultId still works (verify via browser smoke test)
  • .agent-pill base + .agent-pill.warn rules preserved (still used for "missing" indicator)
  • pnpm check passes
  • pnpm test:ui:smoke passes

Size estimate

~15 LOC removed across agents-utils.ts + agents.ts.

Related

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions