feat(site/src/pages/AgentsPage/components): show context sizes and full .mcp.json paths#26614
Merged
Merged
Conversation
…ll .mcp.json paths Adds a per-category size suffix (Context files / Skills / MCP) to the chat context popover so the context cost of each category is visible, and lists MCP config resources by their full path so multiple .mcp.json files (e.g. ~/.mcp.json and ~/project/.mcp.json) are no longer rendered as identical .mcp.json rows. Generated by Coder Agents on behalf of @kylecarbs.
mafredri
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two self-contained improvements to the chat context popover (
ContextUsageIndicator):(N.N KiB)total of the OK resources it contains, so the context cost of each category is visible at a glance..mcp.json— MCP config resources are listed by their full path instead of the bare.mcp.jsonbasename, so~/.mcp.jsonand~/project/.mcp.jsonare no longer rendered as two identical rows.Why
From an internal review of the chat context system:
.mcp.jsonfiles were indistinguishable in the UI (".mcp.json UI lacks detail").Both are frontend-only and ship independently of the deeper backend work.
How
sumResourceBytes(resources, kinds)totalssize_bytesfor OK resources of the given kinds; a smallSectionSizerenders the(N.N KiB)suffix (reusing the existingformatKiBhelper), omitted when the total is 0.FileIcon) from server resources (keyed by name, with their tools), instead of mapping both to a basename.Testing
pnpm exec biome check(format + lint) clean on the changed files.tsc -p .clean.vitest --project=storybook ContextUsageIndicator.stories.tsx— 5/5 pass, including a newMultipleMcpConfigsstory and added size assertions inClean.Scope / follow-ups (not in this PR)
Grouping MCP servers under their originating
.mcp.json, and surfacing per-server connection errors inline in the MCP section, need backend support (the agent does not currently link a server resource to its config path); tracked separately. Showing the configured (pre-symlink-resolution) path for skills/files likewise needs a backend field.Related review findings
Addresses the UI portions of two issues from the chat-context system review: "show size per category" and "
.mcp.jsonUI lacks detail". The remaining parts of the latter (server→config grouping, inline errors) are backend-blocked and intentionally deferred.This PR was created by Coder Agents on behalf of @kylecarbs.