Repository navigation
fix(ui): sort MCP tools by name and lead the template page back to the chat - #3644
Draft
cjlg-soloio wants to merge 2 commits into
Draft
cjlg-soloio wants to merge 2 commits into
cjlg-soloio wants to merge 2 commits into
Conversation
…e chat - The tools an MCP server reports are listed alphabetically (numeric-aware) on the MCP servers page and the app detail page, instead of in discovery order. - The chat context panel's Template link reads as a link: it underlines on hover or focus and has a tooltip saying it opens the AgentTemplate. - Opened from that link, the AgentTemplate page's back button says "Back to conversation" and returns to the same chat. A direct visit still says "Back to templates". The origin travels in router state through a small `useBackLink` hook, which only follows in-app paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
cjlg-soloio
commented
Nov 11, 2026
cjlg-soloio
left a comment
Contributor
Author
There was a problem hiding this comment.
This automated review is a first pass. A manual review will follow once the blockers are addressed.
Two issues block merge. The template page tells people it leads back to a conversation when they came from the agent's own page. And switching tabs on the template page loses the way back.
⚠️ What I checked
- MCP tool sort: numeric-aware
localeCompare, applied insideToolServerTools, so the MCP servers page and the app detail page both get it ✅ backLink.ts: accepts only state whosefromstarts with/and not//, with a non-empty label, and falls back otherwise ✅- Wrapping a react-router
Linkin an antdTooltip: RR7'sLinkforwards its ref and the hover/focus handlers, and no wrapper element is added ✅ - Back-link label for every place the context panel renders: the chat and the agent page (
AgentPage.tsx:611) - Router state surviving in-page navigation on the template page: tabs, delete
- Keyboard access to the new tooltip
- Forbidden terms in the diff, title and body ✅
🤖 written by Claude
…y origin - The context panel's link labels the way back "Back to agent" when no conversation is open, and its tooltip also opens on keyboard focus. - Switching tabs on the AgentTemplate page carries the router state, so the back button keeps pointing at where the reader came from. Returning replaces the history entry. - Tools whose names differ only in case get a fixed order. - An e2e test covers chat → template → tab switch → back to the same chat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
Contributor
Author
|
Before (
verify-3644.mp4Screenshots🤖 written by Claude |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.










🤖 written by Claude (start)
Changelog
/kind fix
Changes
Sorts each MCP server's tools by name, styles the chat panel's Template link with a hover state and tooltip, and gives the AgentTemplate page a "Back to conversation" button when opened from that link, via a small
useBackLinkhook inui/src/router/backLink.tsthat reads router state and only follows in-app paths.Testing
ui/, runKAGENT_UI_ENABLE_MOCK=true yarn dev, open/mcpand expandkagent-tool-server: tools readk8s_describe_resource,k8s_get_events,k8s_get_pods, and stay in that order when you searchk8s_get.🤖 written by Claude (end)
🤖 Generated with Claude Code