Skip to content

fix(mobile): warn that removing an MCP server can delete saved values and sign-in - #49475

Merged
AmethystLiang merged 6 commits into
mainfrom
AmethystLiang/disclose-mobile-mcp-data
Nov 26, 2026
Merged

AmethystLiang merged 6 commits into
mainfrom
AmethystLiang/disclose-mobile-mcp-data

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Before you remove an MCP server on the phone, Orca asks you to confirm. That message used to say "You can add it again any time", which is not always true: removing a server can delete the headers, environment variables or sign-in saved for it, and sessions using it can lose access. The confirmation now says so, in one warning that holds for every server.

Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2

What Changed

  • Before: "New sessions won’t have it. You can add it again any time."
  • After: "Sessions using it may lose access now. This can delete any saved headers, environment variables or sign-in for it. If so, you may need to re-enter them or sign in again to get that access back."
  • The mobile Remove confirm (useMcpServerActions().remove in mobile/src/mcp-servers/use-mcp-server-actions.ts) now uses the new key mcpServers.removeMessageSavedData. It is a single literal t() call with that English as its default, and it is the same for every server. No placeholders.
  • mobile/src/i18n/locales/en.json: adds mcpServers.removeMessageSavedData. Also removes the English mcpServers.removeMessage, which no code uses any more. Target locales are not touched in this PR; their translations come through the normal localization flow.
  • The title ("Remove {{name}}?") and the Remove button are unchanged. Nothing changes in what removal does on the host.

Why

The old line promised an easy undo that removal does not always allow. Saved values can be deleted, and getting access back can mean re-entering them or signing in again. The phone can't reliably tell ahead of time what a given removal will delete. For example, a credential may be shared with another entry, or the host may not be able to read it. So this uses one hedged warning ("may", "can", "if so") that is honest in every case, instead of per-server messages that could over- or under-claim.

Checked against how comparable products handle this.

Linked Issue

None (maintainer change).

Visual Proof

Seeded component fixtures only: the real confirm content in the bottom-drawer sheet styles, with strings from the real hook for a made-up server ("example-api"). Dark and light, at 320, 375 and 390 pt widths. No product screenshots and no real data.

remove-confirm-single.png

Before: the same sheet with the one-line message quoted above.

Testing

  • verify:mobile-localization and verify:mobile-localization-coverage pass. The desktop localization verifiers also pass.

  • Changed-file checks and lint pass locally.

  • Seeded fixture renders, as above, checked at the narrowest width (5 lines at 320 pt, 4 at 375/390 pt).

  • No automated test is added. This is a copy-only change, and a hook test would only check the translation key and callback wiring, which the test anti-patterns guide rules out. The renders are the evidence for the copy.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Performance

None, because this only changes one string in the mobile English catalog and its call-site default, and removes one unused English entry. No new code path runs. Nothing runs more often, and there are no new reads, writes, subprocesses, assets or loading changes. The boot-bundle entry list (en-runtime-required.json) is unchanged, so startup is unaffected. Extraction and localization CI see the same call-site count and are otherwise unaffected.

Risk

Level: Low

Copy-only change on one mobile confirm. Riskiest part: target locales do not have the new key yet, so they show the English text until translations land, which is the existing fallback for new keys. Back out with a plain revert.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

The phone's Remove confirm said "You can add it again any time" for every
server, while the host deletes its saved headers or environment variables
and its Orca sign-in for good, and the relay stops sessions already using a
server with saved headers or a sign-in. The confirm now names what goes,
chosen from the server's sign-in state and its saved names; until those
are read it says any saved values are deleted.

Tests hold the host to those words: removing keeps values another server
still names, and a running session's relay calls stop at once.
A sign-in never sits beside saved header values (the host refuses both an
edit and a hand-edited row that try), a credential this host can't open
reads as nothing saved, and removing one of two hand-edited rows sharing a
credential ends nothing for the other.
What removing a server deletes depends on host state the phone can't see
for sure: a credential another entry still names survives, one this host
can't open reads as nothing saved, and a details read can be pending or
stale. One conditional warning never claims more or less than can happen,
so the per-state lines, their keys and the details plumbing go.
The Remove confirm now uses mcpServers.removeMessageSavedData, so the
English mcpServers.removeMessage has no caller left; delete it from
en.json only. Drop the host-list removal tests: they do not pin any
claim the hedged warning makes.
Say what to do only if something was actually deleted: "If so, you may
need to re-enter them or sign in again to get that access back."
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The MCP server removal confirmation now warns that active sessions may lose access and that saved headers, environment variables, or sign-in may need to be restored. A test checks that cancellation sends no RPC request and confirmation sends one removal request with the server ID.

Merge Risk: Minimal · up to d03b3

The mobile MCP server removal dialog now warns that removal can delete saved headers, environment variables, or sign-in. This is a low-risk text and test change and is ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the MCP server removal warning now covers deleted saved values and sign-in. It is specific and matches the changeset, which replaces the removal confirmation message i…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers most of the template. It has a clear ELI5, a before/after What Changed section, a Why section that explains the choice of one hedged warning, a Visual Proof with fixture renders…
Full details: Title check

Explanation

The title names the main change: the MCP server removal warning now covers deleted saved values and sign-in. It is specific and matches the changeset, which replaces the removal confirmation message in en.json and use-mcp-server-actions.ts. The title uses a fix(mobile) prefix, which is conventional. It is 81 characters, within a typical limit.

Full details: Description check

Explanation

The description covers most of the template. It has a clear ELI5, a before/after What Changed section, a Why section that explains the choice of one hedged warning, a Visual Proof with fixture renders, a Testing section, a Performance line, and a Risk section with level and revert plan. The Linked Issue section says 'None (maintainer change)', which the template allows for maintainers. The AI Disclosure section is empty, but the template marks it as optional for internal contributors. The Testing checklist is inconsistent: the manual-testing box is unchecked, yet the author marks automated tests as added/updated and says no automated test was added. The PR objectives also say the author did not complete manual testing. The description says a test file covers the new key, but the description itself says no automated test was added. These contradictions should be fixed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5f89b821-6681-4262-8be6-247a6c102421
Commits

Reviewing files that changed from the base of the PR and between 27300a1 and d03b38e.

Files selected for processing: 3

  • mobile/src/i18n/locales/en.json
  • mobile/src/mcp-servers/use-mcp-server-actions.test.ts
  • mobile/src/mcp-servers/use-mcp-server-actions.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

It only wires the hook's callbacks to a fake RPC client and checks a
translation key; it does not exercise what removal deletes. The seeded
fixture renders remain the evidence for the copy.
@AmethystLiang
AmethystLiang merged commit 38e9196 into main Nov 26, 2026
29 checks passed
@AmethystLiang
AmethystLiang deleted the AmethystLiang/disclose-mobile-mcp-data branch November 26, 2026 23:34
AmoabaKelvin added a commit that referenced this pull request Nov 27, 2026
…schema (#50170)

* fix(i18n): drop the stale Traditional Chinese MCP remove message on the phone

#49475 replaced mobile mcpServers.removeMessage; #50002 then translated the old key, failing mobile locale validation on main.

* fix(connectors): build the wake reply place schema lazily

#49406 added an eager schema to connector-params.ts while #50160 set its ratchet baseline, failing ratchets on main.
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.

1 participant