[enhancement] feat(#606): support auth mode + bearer token when adding HTTP MCP servers (#607)

* feat(#606): support auth mode + bearer token when adding HTTP MCP servers

- Extend AddMcpServerRequest with auth (none|header|oauth) and bearerToken
- Add auth mode FilterChip selector in HTTP add-server dialog
- Conditionally show masked bearer token field when auth == header
- Wire new fields through McpServersViewModel request builder

Backend contract: exactly one of url/command required; bearer_token
requires auth == "header"; args/env only for stdio. SnakeCase naming
strategy auto-serializes bearerToken -> bearer_token.

Fixes #606

* fix(#606): address agy review — remember PasswordVisualTransformation + FlowRow for auth chips

- Wrap PasswordVisualTransformation in remember {} to avoid per-recomposition allocation
- Use FlowRow for the 3 auth-mode FilterChips so they wrap on narrow screens instead of overflowing
This commit is contained in:
M57 authored and GitHub committed 2026-07-16 13:58:20 +03:00
1 parent 45490c82c2
commit 228431d57a
4 files changed
+73

No files matched your search

+5
View File
@@ -727,6 +727,11 @@
<string name="mcp_servers_catalog_installing">Installing…</string>
<string name="mcp_servers_catalog_source">source: %1$s</string>
<string name="mcp_servers_catalog_required_env">Required env vars</string>
<string name="mcp_servers_auth_mode">Authentication</string>
<string name="mcp_servers_auth_none">None</string>
<string name="mcp_servers_auth_header">Header</string>
<string name="mcp_servers_auth_oauth">OAuth</string>
<string name="mcp_servers_field_bearer_token">Bearer token</string>
<!-- Gateway Screen -->
<string name="gateway_status_running">GATEWAY RUNNING</string>