feat(connections): open a remote MCP server the way a Composio provider opens (#821) - #829
1 finding
The PR extends the connection detail panel from Composio-only to a discriminated union that also handles remote MCP servers, with three new pure functions (mcpProviderSlug, mcpStanding, probedOn) and a new McpBody component. The unit tests for the pure functions are thorough — they cover every branch of mcpStanding (disabled, auth states, never-probed vs unknown, singular/plural tool counts, needs_config vs error) and probedOn (valid, undefined, zero, NaN). The render suite covers the panel's headline claims (system badge, credential state, usage key collision, unavailable usage, connection date, disconnect scope, manifest vs runtime, member vs admin, reachability). One new behavioral path is uncovered: McpBody renders health.message when a probe returned a non-ok status with a message, and no test verifies that message reaches the DOM. Code retrieval was unavailable (model: openrouter embeddings returned 404 Not Found: {"error":{"message":"No allowed providers are available for the selected model. Providers serving openai/text-embedding-3-small: openai, azure, but your account's allowed-providers setting permits only: deepinfra, streamlake, digitalocean. To change your allowed providers, visit: https://openrouter.ai/settings/privacy.","code":404,"metadata":{"available_providers":["openai","azure"],"requested_pro), so this review saw the diff alone.
| Finding | Where | |
|---|---|---|
| Cover the MCP probe-message branch in the render suite | frontend/src/views/connections/ProviderDetail.tsx:435 |
 Cover the MCP probe-message branch in the render suite
frontend/src/views/connections/ProviderDetail.tsx:435
[RULE] Add focused tests with every behavior change.
The new McpBody component renders the probe's error message when a probe ran but did not succeed, but no test exercises this path. The render suite covers the probe line (reachable, not-probed, needs_config, error) via mcpStanding, and the unit tests check mcpStanding's probe string, but no test passes a health with status !== "ok" and a non-empty message and asserts that health.message appears in the rendered panel. If this branch were removed or its condition changed, nothing in the suite would fail.