Skip to content

feat(profile): surface the XTM One MCP server in the user profile (#6570)#6571

Merged
SamuelHassine merged 2 commits into
mainfrom
feat/xtm-one-mcp-profile-card
Jul 6, 2026
Merged

feat(profile): surface the XTM One MCP server in the user profile (#6570)#6571
SamuelHassine merged 2 commits into
mainfrom
feat/xtm-one-mcp-profile-card

Conversation

@SamuelHassine

@SamuelHassine SamuelHassine commented Jul 5, 2026

Copy link
Copy Markdown
Member

Proposed changes

  • Add a new "XTM One MCP server" card to the user profile page (XtmOneMcpAccess.tsx), rendered after the "API access" card in profile/Index.jsx.
  • The card is shown only when the platform is connected to XTM One - same gate as the top-bar CTEM Command Center button (platform_xtm_one_configured + platform_xtm_one_url from useAuth() settings), including the http(s) scheme guard before any URL reaches an anchor href.
  • Card content: capability explanation, the MCP endpoint URL ({platform_xtm_one_url}/mcp/openaev) with a copy-to-clipboard button (shared copyToClipboard util), 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.
  • i18n: 6 new keys added to all 9 locales (en/fr/de/es/it/ja/ko/ru/zh), placed via yarn sort-translation.

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the change (yarn check-ts, yarn lint, yarn i18n-checker all pass)
  • I added/updated the relevant documentation (the card links to the existing XTM One MCP docs surface)

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

  • 141e100: toHttpUrl extracted to the shared url-helper.ts and reused by both XtmOneMcpAccess and CtemCommandCenterButton ; proper diacritics restored in the FR/ES/DE strings (plus the unflagged IT e -grave); new XtmOneMcpAccess.test.tsx (7 cases: visibility gate, javascript: URL rejection, endpoint derivation with trailing-slash normalization, safe target/rel).

Copilot AI review requested due to automatic review settings July 5, 2026 23:41
@SamuelHassine SamuelHassine added the filigran team Item from the Filigran team. label Jul 5, 2026

Copilot AI 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.

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 XtmOneMcpAccess profile card gated by platform_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.

Comment thread openaev-front/src/admin/components/profile/XtmOneMcpAccess.tsx Outdated
Comment thread openaev-front/src/admin/components/profile/XtmOneMcpAccess.tsx
Comment thread openaev-front/src/utils/lang/fr.json Outdated
Comment thread openaev-front/src/utils/lang/es.json Outdated
Comment thread openaev-front/src/utils/lang/de.json Outdated
Comment thread openaev-front/src/utils/lang/fr.json Outdated
Comment thread openaev-front/src/utils/lang/fr.json Outdated
Comment thread openaev-front/src/utils/lang/de.json Outdated
Comment thread openaev-front/src/utils/lang/es.json Outdated
Comment thread openaev-front/src/utils/lang/fr.json Outdated
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.62%. Comparing base (6ad7691) to head (141e100).

Files with missing lines Patch % Lines
...t/src/admin/components/profile/XtmOneMcpAccess.tsx 90.00% 1 Missing ⚠️
openaev-front/src/utils/url-helper.ts 85.71% 1 Missing ⚠️

❌ 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     
Flag Coverage Δ
backend 66.93% <ø> (-0.04%) ⬇️
e2e 18.36% <0.00%> (ø)
frontend 2.94% <88.23%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…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
@SamuelHassine

Copy link
Copy Markdown
Member Author

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).

Copilot AI 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.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.

@SamuelHassine SamuelHassine merged commit c837567 into main Jul 6, 2026
38 checks passed
@SamuelHassine SamuelHassine deleted the feat/xtm-one-mcp-profile-card branch July 6, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface the XTM One MCP server in the user profile

2 participants