App 2052/optionally sync mcp config with secrets#1001
Conversation
…add tests - useSaveFieldsAsSecrets: wrap returned fn in useCallback for stable identity, pass field.label as secret description, truncate key lists >3 in toasts, update JSDoc to document upsert behaviour - SaveAsSecretToggle: replace hidden input with sr-only for AT accessibility, move data-testid to label, add aria-hidden to decorative track, replace div with button for keyboard-reachable info trigger with aria-label - InstallServerModal: add stateRef to avoid stale closure in onSuccess callback, add comment explaining why argFields have no secret toggle - translation.json: plural-safe English wording for MCP$SECRETS_SAVED - tests: add use-save-fields-as-secrets.test.ts (9 tests), add save-as-secret-toggle.test.tsx (9 tests), extend install-server-modal with save-as-secret describe block (8 tests); 35/35 pass Co-authored-by: openhands <openhands@all-hands.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Mock-LLM Docker E2E Test Results12/12 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
✅ Mock-LLM Docker E2E Test Results12/12 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
📸 Snapshot Test ReportWarning Snapshot comparison step crashed (timeout, OOM, or runner error) — diff results below may be incomplete or absent. ❌ 1 snapshot differ from the main branch baseline. Add the
✅ Unchanged snapshots (72)
Generated by the Snapshot Tests workflow. This comment was created by an AI agent (OpenHands) on behalf of the repo maintainers. |
|
"Save As A Secret" Toggle render conditions: a field renders the toggle if and only if it was an envField at init time. WILL render: WILL NOT render: |



Why
MCP server config and the Secrets store are entirely separate. When a user
installs an MCP server that requires credentials (API keys, tokens, etc.),
those values are written only into
mcp_configand are therefore invisibleto the Automation Server when running automations. Users had to re-enter the
same credentials manually in Settings → Secrets, with no indication that this
step was necessary.
Summary
envFieldin the MCPinstall modal. Password-type fields are pre-checked; non-password fields
default to off. On successful install, checked fields are fire-and-forget
upserted to the Secrets store so the Automation Server can access them
immediately.
Issue Number
https://linear.app/all-hands-ai/issue/APP-2052/mcp-server-configuration-form-should-allow-setting-secrets-needed-by
#926
How to Test
npm install && npm run dev(e.g. Slack, Tavily).
envFieldshows an "Also save as secret" toggle.Password-type fields should be pre-checked; plain-text fields should be
unchecked.
checked fields appear with the field label as their description.
with a checked toggle, and confirm the modal still closes and a toast
error appears — no modal-level error is shown.
Video/Screenshots
https://github.com/user-attachments/assets/116ec279-fc28-484a-8165-d3e5c6fc4a80

Type
Notes
onClose(), so a Secrets API failure never blocks the MCP install flow.SecretsService.createSecretis an upsert internally; re-installing aserver overwrites the existing secret for that key name rather than
creating a duplicate.
envFields(environment variables / credentials).argFieldsare CLI positional arguments and are not candidates for secretstorage.
🐳 Docker images for this PR
• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas
ghcr.io/openhands/agent-canvasghcr.io/openhands/agent-server:1.24.0-pythonopenhands-automation==1.0.0a5aadce623c2b6e78c924ba33c44d75bcfb89b2a40Pull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-aadce62Run
All tags pushed for this build
About Multi-Architecture Support
sha-aadce62) is a multi-arch manifest supporting both amd64 and arm64sha-aadce62-amd64) are also available if needed