feat(profile): surface the XTM One MCP server in the user profile (#6570)#6571
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “XTM One MCP server” card to the user profile so users can discover and copy the MCP endpoint when the platform is connected to XTM One, mirroring the existing top-bar XTM One integration gating.
Changes:
- Added
XtmOneMcpAccessprofile card gated byplatform_xtm_one_configured+ an http(s)-only URL guard, with copy-to-clipboard for the MCP endpoint and an external link to manage settings in XTM One. - Rendered the new card after the existing “API access” card on the profile page.
- Added i18n keys for the new UI across all locales.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| openaev-front/src/admin/components/profile/XtmOneMcpAccess.tsx | New profile card surfacing the MCP endpoint + copy button + external “Manage in XTM One” link with http(s) URL guarding. |
| openaev-front/src/admin/components/profile/Index.jsx | Renders the new MCP card on the profile page. |
| openaev-front/src/utils/lang/en.json | Adds English i18n keys for the new card. |
| openaev-front/src/utils/lang/fr.json | Adds French i18n keys for the new card. |
| openaev-front/src/utils/lang/de.json | Adds German i18n keys for the new card. |
| openaev-front/src/utils/lang/es.json | Adds Spanish i18n keys for the new card. |
| openaev-front/src/utils/lang/it.json | Adds Italian i18n keys for the new card. |
| openaev-front/src/utils/lang/ja.json | Adds Japanese i18n keys for the new card. |
| openaev-front/src/utils/lang/ko.json | Adds Korean i18n keys for the new card. |
| openaev-front/src/utils/lang/ru.json | Adds Russian i18n keys for the new card. |
| openaev-front/src/utils/lang/zh.json | Adds Chinese i18n keys for the new card. |
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (2.94%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6571 +/- ##
============================================
- Coverage 44.63% 44.62% -0.01%
+ Complexity 7619 7615 -4
============================================
Files 2320 2321 +1
Lines 64597 64607 +10
Branches 8573 8574 +1
============================================
- Hits 28832 28831 -1
- Misses 33934 33942 +8
- Partials 1831 1834 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…itics, card tests (#6570) - extract the http(s)-only URL guard into url-helper.ts and use it in both XtmOneMcpAccess and CtemCommandCenterButton - restore proper diacritics in the new FR/ES/DE strings and the missing e-grave in IT - add XtmOneMcpAccess.test.tsx covering the visibility gate, javascript: URL rejection, endpoint derivation with trailing-slash normalization, and the safe target/rel of the manage link
|
Review pass complete in 141e100: all 11 Copilot comments addressed (shared toHttpUrl helper, FR/ES/DE diacritics plus an unflagged IT fix, and a 7-case test suite for the new card - which also addresses the codecov patch-coverage signal). All threads resolved, CI fully green, branch mergeable. Remaining before merge: one approving review from a maintainer (author cannot self-approve). |
Proposed changes
XtmOneMcpAccess.tsx), rendered after the "API access" card inprofile/Index.jsx.platform_xtm_one_configured+platform_xtm_one_urlfromuseAuth()settings), including the http(s) scheme guard before any URL reaches an anchor href.{platform_xtm_one_url}/mcp/openaev) with a copy-to-clipboard button (sharedcopyToClipboardutil), an authentication note (personal XTM One API key as bearer token), and a "Manage in XTM One" button opening the user's XTM One profile (endpoint, connection status, ready-to-copy client configuration) in a new tab with noopener/noreferrer.yarn sort-translation.Related issues
Checklist
yarn check-ts,yarn lint,yarn i18n-checkerall pass)Further comments
Frontend-only change. The MCP server itself lives in XTM One (
POST /mcp/openaev); this card makes it discoverable from the OpenAEV profile, mirroring the top-bar XTM One dashboard link.Review pass
toHttpUrlextracted to the sharedurl-helper.tsand reused by bothXtmOneMcpAccessandCtemCommandCenterButton; proper diacritics restored in the FR/ES/DE strings (plus the unflagged ITe-grave); newXtmOneMcpAccess.test.tsx(7 cases: visibility gate,javascript:URL rejection, endpoint derivation with trailing-slash normalization, safe target/rel).