Skip to content

feat(site/src): render Agent Plugin context - #30577

Closed
jscottmiller wants to merge 2 commits into
scott/agent-plugins/7-agent-wiringfrom
scott/agent-plugins/8-agents-ui
Closed

jscottmiller wants to merge 2 commits into
scott/agent-plugins/7-agent-wiringfrom
scott/agent-plugins/8-agents-ui

Conversation

@jscottmiller

@jscottmiller jscottmiller commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Linear: CODAGT-1101

tl;dr: The Agents UI shows Agent Plugin skills, MCP servers and plugins with their plugin attribution.

Note

Updated for main's context popover redesign (#31845, #31927). The screenshots below predate it. The plugin behavior is unchanged, but it now sits on main's design: issues appear in each section's issue list instead of a single Issues list, plugin MCP servers sit under a plugin: <name> chip rather than having an inline label, plugin manifest issues appear in the Plugins section, and the usage tone follows main's compaction-based threshold. (Coder Agents generated on behalf of @f0ssel.)

Plugin skills appear under "Workspace skills" in the composer, because they arrive in the chat's pinned context with the other workspace skills. Their trigger is always /plugin/<plugin>/<name>, as workspace triggers are always qualified, so the alias keeps resolving if a same-named skill appears later. Picking one inserts a skill chip with that label, which sends skill_plugin_name (#29323) and keeps the plugin name through drafts, copy and paste, edits, the transcript, and queued messages.

The context indicator now displays warnings. A resource that loaded but carries a warning (an OK row with a non-empty error) is listed under Issues as warning and marks the indicator, where main listed only resources that failed to load. Some of these warnings are the only report that a plugin server or skill was skipped. Plugins themselves get their own list, and plugin skills and MCP servers are grouped under their plugin.

This is the frontend half of #29323, which keeps the API types and a plugin manifest label for the new resource kind.

Main (no plugins):
main-no-plugins

This PR (no plugins; note that the warning is now displayed, causing the width to expand to the panel width cap):
branch-no-plugins

This PR (plugins; the word "broken" comes from the name of the plugin directory containing the broken plugin and is not a part of the UI copy):
branch-with-plugins

PR map

scott/agent-plugins/7-agent-wiring..b29b709049

Category Files + -
prod (frontend) 12 432 200
test (frontend) 9 700 8
Total 21 1132 208
  1. ContextUsageIndicator.tsx (+288/-151): buildContextPanelModel groups files and skills by directory or plugin, lists OK plugins, names issue rows as the lists do, and reports whether any issue or failure exists. getIndicatorState marks the indicator for any resource issue, warnings included.
  2. ChatMessageInput/SkillInvocationNode.tsx (+41/-10): the chip node carries the plugin name through clone, JSON, duplicate checks, insertion, and serializeMessageDraft.
  3. ChatMessageInput/ChatMessageInput.tsx (+37/-10): the composer splits pinned skills into workspace and plugin lists, shows plugin triggers in the workspace group, and passes the plugin name to chip insertion, paste availability, and the sent parts.
  4. utils/skillAliases.ts (+26/-10): getSkillAlias builds /plugin/<plugin>/<name>, and resolveSkillTriggers always qualifies plugin triggers.
  5. ChatPageContent.tsx (+12/-9): workspaceSkillsFromChat dedupes skills by plugin and skill name, and carries pluginName.
  6. ChatMessageInput/skillClipboard.ts, SkillChip.tsx, QueuedMessagesList.tsx, UserMessageContent.tsx, chatInputContent.ts, chatMessageEdits.ts, SkillsTriggerMenu.tsx (+28/-10): copy and paste, chip labels, the request, and the optimistic edit carry the plugin name.

This PR was generated by Coder Agents on behalf of @jscottmiller.

@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 77e1f5e to 8299110 Compare October 9, 2026 22:27
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 8299110 to 0c8d9cf Compare October 12, 2026 18:15
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 0c8d9cf to 02463fa Compare October 12, 2026 19:42
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 02463fa to 7dd94c3 Compare October 12, 2026 21:13
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 7dd94c3 to fae952c Compare October 12, 2026 21:17
@jscottmiller
jscottmiller added this pull request to stack #29327 October 12, 2026 21:55
@jscottmiller

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-10-13 23:08 UTC by @jscottmiller

Review history
  • R1 (2026-10-12): 10 reviewers, 11 Nit, 1 P2, 3 P3, 5 P4, COMMENT. Review
  • R2 (2026-10-13): 10 reviewers, 14 Nit, 1 P2, 4 P3, 9 P4, REQUEST_CHANGES. Review

deep-review v0.13.0 | Round 2 | f42d030..babb07c

Last posted: Round 2, 28 findings (1 P2, 4 P3, 9 P4, 14 Nit), REQUEST_CHANGES. Review

Finding inventory

Finding inventory: PR #30577

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P4 Author fixed (babb07c) ContextUsageIndicator.tsx:255 plugins list lacks the empty-name filter the doc comment promises R1 Netero Yes
CRF-2 P4 Author fixed (babb07c) ContextUsageIndicator.tsx:147 Deleted comment explaining why lists are grouped by directory R1 Netero Yes
CRF-3 Note Note (body) ContextUsageIndicator.test.tsx:257 RTL component test follows FE1 but conflicts with root AGENTS.md wording R1 Netero No
CRF-4 P3 Author fixed (babb07c) ContextUsageIndicator.tsx:224 issueDisplayName takes the basename of MCP server sources, so Issues names a different server than the MCP list R1 Razor P3, Mafuuu P3, Bisky P3, Nami P4 Yes
CRF-5 P3 Author fixed (babb07c) ContextUsageIndicator.tsx:445 OK-row warnings do not mark the indicator, but some report plugin resources that did not load; comment premise is false R1 Pariston P3, Razor P4, Leorio P4 Yes
CRF-6 P2 Open (re-raised R2: component wiring of warnings into getIndicatorState untested) ContextUsageIndicator.test.tsx:258 Indicator tests assert only aria-label; reverting the glyph and tone change passes all tests R1 Bisky Yes
CRF-7 P3 Author fixed (babb07c) ChatMessageInput.tsx:738 No composer test covers plugin triggers or personal/plugin name collision qualification R1 Bisky P3, Mafuuu P4 Yes
CRF-8 P4 Author fixed (babb07c) ContextUsageIndicator.test.tsx:150 nameless test row duplicates the broken row's case R1 Bisky Yes
CRF-9 Note Note (body) ContextUsageIndicator.stories.tsx:216 New plugin stories have hover-only or no play functions R1 Bisky No
CRF-10 Nit Author fixed (babb07c) ChatMessageInput.tsx:683 Precedence comments say "personal or workspace skill"; plugin skills now a distinct source R1 Mafuuu Yes
CRF-11 P4 Author fixed (babb07c) ContextUsageIndicator.tsx:79 Comment says MCP servers are keyed by name; name is now a non-unique display name R1 Gon Yes
CRF-12 Nit Author fixed (babb07c) ContextUsageIndicator.tsx:54 ContextGroupLabel comment restates getPathDirname behavior R1 Gon Yes
CRF-13 Nit Author fixed (babb07c) ContextUsageIndicator.tsx:88 ContextIssueItem comment ends with a purpose clause the field conveys R1 Gon Yes
CRF-14 Nit Author fixed (babb07c) ContextUsageIndicator.tsx:100 ContextGroup comment restates the type and duplicates groupByLabel's ordering note R1 Gon Yes
CRF-15 Nit Author fixed (babb07c) ContextUsageIndicator.tsx:232 buildContextPanelModel comment ends with a derivable explanation R1 Gon Yes
CRF-16 Nit Author fixed (babb07c) SkillsTriggerMenu.tsx:63 createPinnedSkillMenuItem doc says "agent pushed" instead of "pinned" and narrates the body R1 Gon, Leorio Yes
CRF-17 Nit Author fixed (babb07c) ChatPageContent.tsx:99 Identity sentence duplicates SkillMetadata.pluginName comment and the code R1 Gon Yes
CRF-18 Nit Author fixed (babb07c) ContextUsageIndicator.stories.tsx:124 PluginResources story comment copies rules the unit tests assert R1 Gon Yes
CRF-19 Nit Author fixed (babb07c) ContextUsageIndicator.tsx:211 resourceLabel/directoryLabel return group keys, not display strings R1 Gon P4 Yes
CRF-20 P4 Author fixed (babb07c) ContextUsageIndicator.tsx:505 Group key formula built separately in groupByLabel and two render sites R1 Gon Yes
CRF-21 Nit Author fixed (babb07c) SkillsTriggerMenu.stories.tsx:103 Placeholder plugin// uses for the plugin R1 Gon Yes
CRF-22 Nit Author fixed (babb07c) ContextUsageIndicator.tsx:238 const ok holds an array R1 Gon Yes
CRF-23 P4 Author fixed (babb07c, description rewritten) PR description Description and commit body repeat the per-file summary and omit the reasons for three choices R1 Leorio No
CRF-24 Note Note (body) SkillsTriggerMenu.tsx:66 Plugin skills render under "Workspace skills"; empty state omits plugins; "workspace" has two meanings R1 Pariston, Leorio, Gon No
CRF-25 OOS Out of scope (body) .github/workflows/flake-go.yaml Flake Check failure is a Go job; this PR changes no Go files R1 Netero No
CRF-26 OOS Out of scope (body) coderd/x/skills/skills.go:73 Skill alias format re-derived in frontend instead of returned by the API R1 Pariston No
CRF-27 OOS Out of scope (body) agent/agentcontext/resolve.go:434 Agent packs cosmetic notices and dropped-resource messages into one error string R1 Razor No
CRF-28 OOS Author fixed in this PR (babb07c); Law R2: move to its own PR site/src/modules/roles/RoleSelector.tsx:58 Object.groupBy used without polyfill below browserslist targets R1 Ging-TS No
CRF-29 Nit Open ContextUsageIndicator.test.tsx:373 Test named "marks the indicator" asserts only the accessible name R2 Netero Yes
CRF-30 P4 Open ContextUsageIndicator.test.tsx:161 CRF-8 fix tests a non-OK plugin row with plugin_name, which the API contract says never arrives R2 Mafuuu Yes
CRF-31 P3 Open ContextUsageIndicator.test.tsx:41 No test covers groupByLabel merging non-adjacent items with the same label R2 Bisky Yes
CRF-32 P4 Dropped by orchestrator (FE1 forbids play-function assertions; Pixel screenshots the menu state) ChatMessageInput.stories.tsx:229 CollidingPluginSkillQualifiesPersonalTrigger story asserts nothing R2 Bisky No
CRF-33 P4 Open ContextUsageIndicator.test.tsx:328 Usage-tone test skips the 85 and 95 thresholds, so an off-by-one passes R2 Bisky Yes
CRF-34 P4 Open SkillsTriggerMenu.tsx:197 Composer row shows the plugin name in the trigger and again in the plugin label R2 Nami Yes
CRF-35 P4 Open SkillsTriggerMenu.tsx:197 SkillMenuItem type does not tie pluginName to source "plugin"; render guard checks an impossible state R2 Razor Yes
CRF-36 Nit Open ContextUsageIndicator.tsx:83 MCP config full-path clause still duplicated with line 296 R2 Gon Yes
CRF-37 Nit Open ContextUsageIndicator.tsx:205 Usage thresholds 95 and 85 are bare literals in the new exported getIndicatorState R2 Gon P4 Yes
CRF-38 P4 Process observation (body) PR description PR map range is not this PR's diff; file list omits submitChatTurn.ts R2 Leorio No
CRF-39 OOS Out of scope (body) site/tsconfig.json:8 lib esnext type-checks APIs below browserslist targets; no lint catches them R2 Law, Ging-TS No

Law analysis

R2: effective +1016 -189, head babb07c. Verdict: Split. Enforcement: Mandatory. Move the site/src/modules/roles/RoleSelector.tsx Object.groupBy fix to its own fix(site/src/modules/roles) PR against main; keep the Agent Plugin indicator and composer changes here. Law ran in R2 because effective additions first exceeded 1000 and no prior Law analysis existed.

Contested and acknowledged

Round log

Round 1

Full panel (round 1). Netero first pass: 2 P4, 1 Note, no P0, panel proceeded. Law not run (effective additions 799). Panel: ging-ts, ging-react, nami, melody (specialists: .ts/.tsx, frontend, wire-format triggers and MCP source format); pariston, mafuuu (core); bisky (tests changed); gon, leorio (once-per-PR floor); razor (wildcard). Size 10 exceeds the focused target of 8 because of the Bisky requirement and the Gon/Leorio floor. Ging-React, Ging-TS, Melody: no in-scope findings. Gon comment-wording P2s downgraded to Nit (reviewer-prompt defines comment wording as Nit); CUI:79 stale comment P2 to P4 (no code relies on the false invariant today). Result: 1 P2, 3 P3, 6 P4, 11 Nit, 3 Note, 4 OOS. Reviewed against 22cc66d..fae952c.

Round 2

Churn guard PROCEED: 20 of 20 open findings addressed in squashed commit babb07c (cited e3a1026 not in repo). Law ran (first time effective additions exceeded 1000, no prior analysis): Split, Mandatory (RoleSelector.tsx to its own PR). Law gate says skip panel, but deep-review post rejected a no-panel round after a prior panel round, so a full panel ran. Round type: restructure (new exports getIndicatorState and createSkillMenuItems, files added to the diff, title scope changed). Panel: ging-ts, ging-react, nami, melody, pariston, mafuuu, bisky, gon, leorio (restructure floor), razor (wildcard, random draw). Size 10 above focused target 8 because of Bisky and the Gon/Leorio floor. Netero verified CRF-1, CRF-2. CRF-6 re-raised: orchestrator reproduced that hasResourceIssues: hasResourceFailures, at ContextUsageIndicator.tsx:488 passes all 13 tests; kept at P2 (Netero rated residual P4; the mutation CRF-6 named still survives; higher wins). CRF-8 fix followed the R1 suggestion, which proposed an input the API never sends (CRF-30). Pariston claimed every OK-row warning reports a dropped resource; disproved by manifest warnings at agent/agentcontext/plugin.go:264-280 ("unknown field ignored"). No finding: the author picked the mark-on-any-issue option offered in R1, and the comment says "some warnings". CRF-32 drop: keep-argument is that no test checks the text inserted when the plugin item is selected; dropped because the requested fix puts assertions in a play function, which FE1 forbids, and createSkillMenuItems unit tests cover the trigger text. CRF-37 Gon P4 to Nit (magic-number convention; literals moved from base getIndicatorToneClassName). Result: CRF-6 P2 re-raised; new 1 P3, 4 P4, 3 Nit, 1 process observation, 1 OOS, 1 dropped. Reviewed against f42d030..babb07c.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR adds Agent Plugin attribution to the composer skills menu and the context indicator. Findings: 1 P2, 3 P3, 6 P4, 11 Nit.

The PR description and commit body repeat the per-file summary already in the PR map, and do not explain three choices: why warnings on OK rows leave the indicator unmarked, why plugin skills stay under the "Workspace skills" heading, and why plugin triggers are always qualified even when the bare name is unique.

Out of scope (needs a ticket or explicit acceptance by a human):

  • .github/workflows/flake-go.yaml: the failing Flake Check runs Go tests and this PR changes no Go files, so the failure comes from the stacked base branch and was not diagnosed here.
  • coderd/x/skills/skills.go:73: the skill alias format is defined in Go and rebuilt in three frontend places, so a backend format change desynchronizes composer triggers from read_skill lookup with no error.
  • agent/agentcontext/resolve.go:434: the agent joins cosmetic manifest notices and "resource skipped / not started" messages into one error string on OK rows, so no client can mark only the warnings that mean a resource did not load.
  • site/src/modules/roles/RoleSelector.tsx:58: Object.groupBy is used without a polyfill while browserslist targets Chrome 111 and Safari 16.4, where it throws TypeError.

Notes:

  • ContextUsageIndicator.test.tsx:257: the RTL component tests follow FRONTEND_PATTERNS.md FE1, which conflicts with the root AGENTS.md rule against RTL component tests; only a docs change resolves the conflict.
  • ContextUsageIndicator.stories.tsx:216: the PluginResources play function only hovers and WithPluginSkill has no play function, so the new plugin labels are checked only by visual snapshots.
  • SkillsTriggerMenu.tsx:66: plugin skills render under the "Workspace skills" menu heading while SkillSource now uses "workspace" to mean non-plugin, and the empty-state text ("No personal or workspace skills found.") does not mention plugins.

site/src/pages/AgentsPage/components/ChatMessageInput/ChatMessageInput.tsx:683

Nit [CRF-10] The comments here and at submitChatTurn.ts:122 say a "personal or workspace skill" takes precedence over a built-in command, but this PR makes plugin a separate skill source that also takes precedence. (Mafuuu)

Write "personal, workspace, or plugin skill".

🤖

🤖 This review was automatically generated with Coder Agents.

@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from fae952c to e3a1026 Compare October 12, 2026 22:38
@linear-code

linear-code Bot commented Oct 12, 2026

Copy link
Copy Markdown

CODAGT-1101

@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch 2 times, most recently from 4aa2f0e to acf1ad6 Compare October 12, 2026 23:25
@jscottmiller jscottmiller changed the title feat(site/src/pages/AgentsPage/components): render Agent Plugin context feat(site/src): render Agent Plugin context Oct 12, 2026
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from acf1ad6 to 25ce093 Compare October 13, 2026 17:37
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 25ce093 to 9fe9746 Compare October 13, 2026 19:10
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 9fe9746 to babb07c Compare October 13, 2026 19:56
@jscottmiller

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 0c397e8 to 5ab2a39 Compare October 21, 2026 18:26
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 5ab2a39 to 8e88ee8 Compare October 21, 2026 19:07
The composer's skills menu lists plugin skills under "Workspace skills",
since they arrive in the same pinned context as other workspace skills.
Like workspace triggers, plugin triggers are always qualified: a qualified
alias resolves even if another skill with the same name appears later.

Picking a plugin skill inserts a skill chip labeled
/plugin/<plugin>/<name>. The chip carries the plugin name, sends it as
skill_plugin_name, and keeps it through drafts, copy and paste, edits, the
transcript and the queue.

The context indicator groups plugin skills under their plugin, lists
OK plugins, and names issue rows as the lists do. Any issue marks the
indicator, including a warning on an OK row, because some of those
warnings are the only report that a plugin server or skill was skipped.
@jscottmiller
jscottmiller force-pushed the scott/agent-plugins/8-agents-ui branch from 8e88ee8 to b29b709 Compare October 22, 2026 16:54
@f0ssel
f0ssel removed this pull request from stack #29327 November 13, 2026 18:05
@f0ssel
f0ssel added this pull request to stack #32193 November 13, 2026 19:04
…gents-ui

Main redesigned the Agents context popover (accordion tree, ACP section,
per-section issues) and renamed ChatPageContent.test.ts to .tsx. The
merge keeps main's design and re-applies this branch's plugin behavior on
it: plugin skills group under their plugin, a Plugins section lists OK
plugins and their issues, plugin MCP servers show under a plugin chip,
issue rows use plugin-qualified names, and OK rows with warnings mark
the indicator. The usage tone follows main's compaction threshold, and
the per-section byte totals main removed are dropped. Typed plugin skill
aliases keep their plugin name when converted to chips.
@f0ssel

f0ssel commented Nov 16, 2026

Copy link
Copy Markdown
Member

Closing in favor of the split stack #32264 → #32275, which carries this PR's changes in smaller PRs (rebased on current main, with the doc-check fixes). The scott/agent-plugins/* branch is left in place.

This branch had an error being deployed

1 failed deployment
docs-preview — 02138ed5 Deployed Nov 16, 2026 by f0ssel via cleanup #119
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.

3 participants