Skip to content

enhance: how to connect ai client updates#7000

Merged
ivyjeong13 merged 8 commits into
obot-platform:mainfrom
ivyjeong13:enhance/how-to-connect-commands-magic-link-ux-update
Jun 23, 2026
Merged

enhance: how to connect ai client updates#7000
ivyjeong13 merged 8 commits into
obot-platform:mainfrom
ivyjeong13:enhance/how-to-connect-commands-magic-link-ux-update

Conversation

@ivyjeong13

Copy link
Copy Markdown
Collaborator

Addresses #6852

Copilot AI review requested due to automatic review settings June 19, 2026 15:05

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.

⚠️ Not ready to approve

There are confirmed issues that can break quick-install deep links and corrupt persisted AI-client preferences (empty/invalid localStorage values).

Pull request overview

This PR enhances the MCP “Connect” experience in the SvelteKit UI by adding client-specific connection helpers (magic links + CLI commands) and introducing a per-device “preferred AI clients” setting that controls which helpers are shown.

Changes:

  • Add a “Set Preferred Client(s)” dialog on the MCP Servers page and persist the selection in userDeviceSettings.
  • Update the connect modal to show “Quick Install” (Cursor/VS Code deep links) and “Install via CLI” (Claude/Codex commands) based on preferences.
  • Extend shared UI primitives/utilities (CopyField slots + UTF-8 Base64 encoding) to support the new connect UX.
File summaries
File Description
ui/user/src/routes/mcp-servers/+page.svelte Adds a dialog to select and save preferred AI clients.
ui/user/src/lib/stores/userDeviceSettings.svelte.ts Persists AI client preferences to localStorage and initializes from it.
ui/user/src/lib/format.ts Adds UTF-8 → Base64 helper used for magic-link config encoding.
ui/user/src/lib/constants.ts Introduces AiClient enum and common client metadata/constants.
ui/user/src/lib/components/mcp/HowToConnect.svelte Renders magic links + CLI commands (plus doc links) for connecting to MCP servers.
ui/user/src/lib/components/mcp/ConnectToServer.svelte Passes connection URL + display name into HowToConnect and switches URL display to CopyField.
ui/user/src/lib/components/CopyField.svelte Adds snippet support for custom “preContent” and light styling customization hooks.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 5

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte Outdated
Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte Outdated
Comment thread ui/user/src/lib/stores/userDeviceSettings.svelte.ts
Comment thread ui/user/src/lib/stores/userDeviceSettings.svelte.ts Outdated
Comment thread ui/user/src/lib/constants.ts Outdated
@entelligence-ai-pr-reviews

entelligence-ai-pr-reviews Bot commented Jun 19, 2026

Copy link
Copy Markdown

EntelligenceAI PR Summary

Introduces dynamic AI client integration into the MCP connection flow, including magic link and CLI command installation support, AI client preference persistence, and supporting infrastructure refactors.

  • HowToConnect.svelte: Transformed into a dynamic guide with 'Quick Install' and 'Install via CLI' sections, filtered by user device preferences
  • mcp.ts: Added getAiClientCommand and getAiClientMagicLink with private helpers for Cursor and VSCode deep-link/CLI generation
  • services/user/constants.ts: Relocated and expanded AI client constants with AiClient enum and capability-grouping arrays (MAGIC_LINK_SUPPORTED_AI_CLIENTS, COMMAND_SUPPORTED_AI_CLIENTS)
  • userDeviceSettings.svelte.ts: Added AI client preference read/write via localStorage using validated AiClient enum values
  • format.ts: Added UTF-8-safe encodeUtf8ToBase64 utility using manual bitwise Base64 encoding
  • CopyField.svelte: Added preContent snippet, classes CSS override prop, and public clear() method
  • ConnectToServer.svelte: Migrated from CopyButton to CopyField and updated close/cleanup handlers
  • mcp-servers/+page.svelte: Added preferred AI client selection dialog with per-client toggles and persistence
  • constants.ts: Removed COMMON_AI_CLIENTS (relocated to services/user/constants.ts)

Confidence Score: 3/5 - Review Recommended

Likely safe but review recommended — the PR successfully introduces dynamic AI client integration with magic link and CLI command support, and the new code appears structurally sound. However, a pre-existing unresolved concern about getAiClientMagicLink in mcp.ts remains open: the second parameter is named id but is semantically used as a display name passed to generateCursorMagicLink / generateVsCodeMagicLink as name=, creating a misleading API contract that could cause incorrect behavior at call sites. This naming/semantic mismatch is not purely cosmetic — it risks callers passing the wrong value if the parameter name is taken at face value.

Key Findings:

  • In mcp.ts, getAiClientMagicLink's second parameter is named id but is passed downstream as a display name= argument; if any call site passes a machine ID instead of a human-readable label (or vice versa), the generated deep-links will be silently incorrect without any runtime error.
  • The PR's core features — HowToConnect.svelte transformation, getAiClientCommand, and getAiClientMagicLink — appear well-scoped and the quick install / CLI install flow is a meaningful UX improvement.
  • AI client preference persistence adds user-facing state that should be validated against expected enum values to prevent stale or invalid preferences from causing silent failures in the filtering logic.
Files requiring special attention
  • ui/user/src/lib/services/user/mcp.ts
  • ui/user/src/lib/components/HowToConnect.svelte

Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte Outdated
Comment thread ui/user/src/lib/stores/userDeviceSettings.svelte.ts
Comment thread ui/user/src/routes/mcp-servers/+page.svelte Outdated
Comment thread ui/user/src/lib/components/mcp/ConnectToServer.svelte
Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte Outdated
Copilot AI review requested due to automatic review settings June 19, 2026 19:05

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 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte Outdated
Comment thread ui/user/src/lib/stores/userDeviceSettings.svelte.ts Outdated
Comment thread ui/user/src/lib/services/user/mcp.ts Outdated
Comment thread ui/user/src/lib/components/mcp/ConnectToServer.svelte
Copilot AI review requested due to automatic review settings June 19, 2026 20:00

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 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte
Comment thread ui/user/src/lib/components/mcp/ConnectToServer.svelte Outdated
Comment thread ui/user/src/lib/stores/userDeviceSettings.svelte.ts
Comment thread ui/user/src/lib/stores/userDeviceSettings.svelte.ts Outdated
Comment thread ui/user/src/lib/services/user/mcp.ts
Copilot AI review requested due to automatic review settings June 19, 2026 21:24

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 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte
Comment thread ui/user/src/lib/components/mcp/HowToConnect.svelte
Comment thread ui/user/src/lib/stores/userDeviceSettings.svelte.ts Outdated
Comment thread ui/user/src/lib/services/user/mcp.ts
Comment thread ui/user/src/lib/components/mcp/ConnectToServer.svelte
@ivyjeong13 ivyjeong13 force-pushed the enhance/how-to-connect-commands-magic-link-ux-update branch from e1c7b67 to baa2832 Compare June 22, 2026 19:51
@ivyjeong13 ivyjeong13 merged commit 846a3cd into obot-platform:main Jun 23, 2026
4 checks passed
hbanerjee74 added a commit to accelerate-data/obot that referenced this pull request Jun 25, 2026
* chore: fetch full git history in image build workflow (obot-platform#6988)

* chore(deps): bump webpack-dev-server (obot-platform#6989)

Bumps the npm_and_yarn group with 1 update in the /docs directory: [webpack-dev-server](https://github.com/webpack/webpack-dev-server).


Updates `webpack-dev-server` from 5.2.4 to 5.2.5
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/main/CHANGELOG.md)
- [Commits](webpack/webpack-dev-server@v5.2.4...v5.2.5)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-version: 5.2.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* enhance: allow OAuth clients that don't supply resource to connect (obot-platform#6983)

In order to know which MCP server the MCP client is trying to connect
to, they should send a resource parameter with the authorize request.
Not all clients do this. This change introduces a way to alter the
metadata endpoints so that we can still determine which MCP server the
client is connecting to when they don't send a resource parameter.

Signed-off-by: Donnie Adams <donnie@obot.ai>

* chore: registry API: use only the short description (obot-platform#6990)

Signed-off-by: Grant Linville <grant@obot.ai>

* chore: drop python and pip from image builds (obot-platform#6996)

* enhance: add a new authentication complete screen (obot-platform#6991)

This screen finishes the MCP OAuth flow so that we can control what the
user sees when the OAuth process completes. This fixes issues when we
redirect back to apps on a user's computer.

This change also removes the old login complete screen in favor of a
consistent experience. That is, if a user uses `obot login`, then they
will see this new "authentication complete" screen with the "you can now
close this window" text.

Signed-off-by: Donnie Adams <donnie@obot.ai>

* chore: clean up image builds (obot-platform#6992)

Clean up the Docker image build by removing legacy dependencies and
consolidating the duplicated OSS/Enterprise build pipeline into a single job.

- Drop the `build-pgvector` stage and the pgvector extension install
- Remove unused runtime packages: `git`, `npm`,
  `nodejs`, `sqlite`, `sqlite-dev`, `libreoffice`, `perl-utils`
- Stop copying the Node build of the UI (`ui/user/build-node`)
- Reorganize docker instructions for clarity
- The `obot-enterprise` image is now identical to the OSS `obot` image, so
  its separate `enterprise-build`/`enterprise-image-scan` jobs are removed
- The single `build` job now also publishes/signs the `-enterprise` tag for
  backwards compatibility, and tags it `latest` on releases
- Rename `oss-build` → `build` and `oss-image-scan` → `image-scan`

Addresses obot-platform#6997

Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>

* feat: add support for CIMD (obot-platform#6964)

This change adds support for Client ID Metadata Documents for Obot when
it is functioning as an OAuth Authorization Server. That is, instead of
clients dynamically registering, clients can use CIMD to request auth
tokens on a user's behalf.

Additionally, if an authorization server for an MCP server supports
CIMD, then Obot will use it to get access tokens.

This change also adds an exception for this because claude-code doesn't
advertise itself as a native application_type, but should be treated as
one.

Signed-off-by: Donnie Adams <donnie@obot.ai>

* feat: admin ability to add app notification banner (obot-platform#6999)

* feat: admin ability to add app notification banner

* Update pkg/api/handlers/appnotifications.go

Co-authored-by: Donnie Adams <donald.g.adams@me.com>

* Update pkg/api/handlers/appnotifications.go

Co-authored-by: Donnie Adams <donald.g.adams@me.com>

* fix: hydration warning fix for InfoTooltip

* adjust logic in page.ts

* address peer review: rename singleton app-notification & remove metadata property

* rename appnotifications -> appnotification & nits

* go generate lint

* fix: on cancel, reset to what's in appnotificationstore, fallback to data.appNotification

* address a few more app notification singular noun verbiage

* fix: add check valid date for dismissedAt

---------

Co-authored-by: Donnie Adams <donald.g.adams@me.com>

* chore: dependabot, dompurify, & lucide-svelte deprecation (obot-platform#7003)

* fix: only check for a valid license once per day (obot-platform#7011)

Previously, we would check for a valid license on startup and every hour
after that. This change checks on startup and once per day.

Additionally, an API endpoint is added to allow users to manually check
their license once every 5 minutes.

Signed-off-by: Donnie Adams <donnie@obot.ai>

* fix: sort devices initally by scannedAt descending (obot-platform#7008)

* fix: sort devices initally by scannedAt descending

* derived for getTableUrlParamsFilters

* fix: save sidebar scroll state on navigation for sidebar in Layout (obot-platform#7013)

* enhance: how to connect ai client updates (obot-platform#7000)

* enhance: how to connect ai client updates

* copilot review comments

* fix: length check & command update

* fix: review comments

* fix: id instead of name for command

* fix: create name for command

* add support for no preference

* address copilot review

* chore: migrate mcp audit logs to support local agent audit logs (obot-platform#6928)

Signed-off-by: Grant Linville <grant@obot.ai>

* Revert "chore: migrate mcp audit logs to support local agent audit logs (obot-platform#6928)" (obot-platform#7030)

This reverts commit 0f41a83.

* feat: add ability to configure MCP server on first connect (obot-platform#7007)

Before this change, when a user connected to an MCP server for the first
time through an MCP client without first configuring it in the Obot UI,
the connection would fail if the server had required configuration.

After this change, the user will be able to provide the required
configuration during the connection. In fact, connecting to an MCP server
in the UI will just show the URL and the user will have to configure it on
first connection.

Signed-off-by: Donnie Adams <donnie@obot.ai>
Co-authored-by: Ivy <ivy.jeong@gmail.com>

* enhance: make redirect countdown dynamic (obot-platform#7036)

This change will make the "redirect in 3 seconds" text count down until
the redirect actually happens.

Signed-off-by: Donnie Adams <donnie@obot.ai>

* enhance: more logging around successful license validation (obot-platform#7037)

Signed-off-by: Donnie Adams <donnie@obot.ai>

* docs: fix private IP MCP env var (obot-platform#7035)

* chore: bump images for nanobot stdio fix (obot-platform#7027)

Signed-off-by: Donnie Adams <donnie@obot.ai>

* fix: show partial pat in edit of mcp catalog source url (obot-platform#7019)

* fix: show partial pat on edit of mcp catalog source URL

* changes

* update UI to show when PAT needs updating after preexisting sourceURL change

lint

* fix: for len <= 4 of pat, just return the mask

* check for explicit clear token action made by user

* use input readonly instead of p

* chore: remove redunant check (obot-platform#7040)

The ValidationCodeNoMachine error is also a ErrLicenseNotActivated
error, so we don't need redundant checks.

Signed-off-by: Donnie Adams <donnie@obot.ai>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Donnie Adams <donnie@obot.ai>
Signed-off-by: Grant Linville <grant@obot.ai>
Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>
Co-authored-by: Nick Hale <4175918+njhale@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Donnie Adams <donnie@obot.ai>
Co-authored-by: Grant Linville <grant@obot.ai>
Co-authored-by: Ivy <ivy@acorn.io>
Co-authored-by: Donnie Adams <donald.g.adams@me.com>
Co-authored-by: Ivy <ivy.jeong@gmail.com>
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