Repository navigation
fix(mobile): warn that removing an MCP server can delete saved values and sign-in - #49475
Conversation
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."
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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.
…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.
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.
What Changed
useMcpServerActions().removeinmobile/src/mcp-servers/use-mcp-server-actions.ts) now uses the new keymcpServers.removeMessageSavedData. It is a single literalt()call with that English as its default, and it is the same for every server. No placeholders.mobile/src/i18n/locales/en.json: addsmcpServers.removeMessageSavedData. Also removes the EnglishmcpServers.removeMessage, which no code uses any more. Target locales are not touched in this PR; their translations come through the normal localization flow.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.
Before: the same sheet with the one-line message quoted above.
Testing
verify:mobile-localizationandverify:mobile-localization-coveragepass. 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
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)