feat(macos): add-registry affordance + provenance surfacing in tray (MCP-902)#578
Merged
Conversation
Deploying mcpproxy-docs with
|
| Latest commit: |
cd158b9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9b5a78e9.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://macos-registry-add-902.mcpproxy-docs.pages.dev |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 26905420000 --repo smart-mcp-proxy/mcpproxy-go
|
…MCP-902) Mirror the MCP-867 Web UI registry surface in the macOS tray (native/macos/): - New "Registries" sidebar tab listing every configured registry with an Official · trusted / Third-party · unverified provenance badge derived from the provenance/trusted fields (older payloads without the field default to official). Custom registries carry an always-quarantined note. - "Add Registry" sheet: https URL + optional name, protocol fixed to modelcontextprotocol/registry; POSTs /api/v1/registries via the new APIClient.addRegistrySource(), mapping the stable error codes (invalid_registry_url / registries_locked / registry_shadows_builtin / duplicate_registry) to actionable messages. - One-time third-party warning gating the first custom add; the acknowledgement is persisted in UserDefaults. APIClient gains registries() + addRegistrySource(); performRequest is refactored onto a non-validating rawRequest() so the add flow can read the error code from the body. Tests: RegistryModelsTests covers provenance/trust derivation, list/summary decode, error-code to message mapping, and ack persistence. Docs updated in docs/registries.md.
93bbcce to
d3aa661
Compare
# Conflicts: # docs/registries.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Mirrors the MCP-867 Web UI registry surface (PR #575) in the macOS tray (
native/macos/). The tray previously had no registry surface at all.GET /api/v1/registries) with an Official · trusted / Third-party · unverified provenance badge, derived from theprovenance/trustedfields (older payloads without the field default to official, matching the Web UI'sisCustomRegistry). Custom registries carry an always-quarantined note.modelcontextprotocol/registry; POSTs/api/v1/registriesvia the newAPIClient.addRegistrySource(), mapping the stable error codes (invalid_registry_url/registries_locked/registry_shadows_builtin/duplicate_registry) to actionable messages.UserDefaults(mirrors the Web UI's localStorage gate).APIClientgainsregistries()+addRegistrySource();performRequestis refactored onto a non-validatingrawRequest()so the add flow can read the stablecodefrom the error body (the existing throwing path is preserved for all other callers).Contract
POST /api/v1/registries {url, protocol?, id?, name?}→RegistrySummary{provenance, trusted}; errorsinvalid_registry_url(400)/registries_locked(403)/registry_shadows_builtin(409)/duplicate_registry(409). Seedocs/registries.md.Tests (TDD, ENG-1)
MCPProxyTests/RegistryModelsTests.swift(13 tests, written failing-first) covers:isCustom) incl. the defensivetrusted == falseand missing-field casesGetRegistriesResponse/RegistrySummaryJSON decodeUserDefaults)Verification
swift build(full app target) +swiftcdeployable binary — both clean (only pre-existing warnings in unrelated files).swift test --filter RegistryModelsTests→ 13/13 pass. (The 7SSEParserTestsfailures in the full suite are pre-existing onorigin/main— confirmed on a clean checkout atcf856004, none of my files involved.)main):GET /api/v1/registriesreturnsprovenance/trustedfor the official set; a custom add returnscustom/unverified+trusted=false; and the duplicate / invalid-url / shadow-builtin error codes match exactly what the Swift client decodes and maps. (In-window sidebar selection can't be driven bymcpproxy-ui-test, so the view's data path was verified at the API layer per the documented practice.)Docs updated in
docs/registries.md(ENG-9). No QA artifacts committed.Related MCP-902 · mirrors MCP-867 (#575)