Skip to content

feat(macos): add-registry affordance + provenance surfacing in tray (MCP-902)#578

Merged
Dumbris merged 2 commits into
mainfrom
macos-registry-add-902
Jun 3, 2026
Merged

feat(macos): add-registry affordance + provenance surfacing in tray (MCP-902)#578
Dumbris merged 2 commits into
mainfrom
macos-registry-add-902

Conversation

@Dumbris
Copy link
Copy Markdown
Member

@Dumbris Dumbris commented Jun 2, 2026

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.

  • New "Registries" sidebar tab — lists every configured registry (GET /api/v1/registries) with an Official · trusted / Third-party · unverified provenance badge, derived from the provenance/trusted fields (older payloads without the field default to official, matching the Web UI's isCustomRegistry). Custom registries carry an always-quarantined note.
  • "Add Registry" affordance (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 (mirrors the Web UI's localStorage gate).

APIClient gains registries() + addRegistrySource(); performRequest is refactored onto a non-validating rawRequest() so the add flow can read the stable code from 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}; errors invalid_registry_url(400)/registries_locked(403)/registry_shadows_builtin(409)/duplicate_registry(409). See docs/registries.md.

Tests (TDD, ENG-1)

MCPProxyTests/RegistryModelsTests.swift (13 tests, written failing-first) covers:

  • provenance/trust derivation (isCustom) incl. the defensive trusted == false and missing-field cases
  • GetRegistriesResponse / RegistrySummary JSON decode
  • error-code → message mapping for all four codes + fallback
  • one-time third-party ack persistence (injectable UserDefaults)

Verification

  • swift build (full app target) + swiftc deployable binary — both clean (only pre-existing warnings in unrelated files).
  • swift test --filter RegistryModelsTests13/13 pass. (The 7 SSEParserTests failures in the full suite are pre-existing on origin/main — confirmed on a clean checkout at cf856004, none of my files involved.)
  • Visual: rebuilt tray launched; the new Registries sidebar item renders correctly (icon + label, between Servers and Activity Log) and the app connects/runs.
  • Live backend contract (throwaway core built from current main): GET /api/v1/registries returns provenance/trusted for the official set; a custom add returns custom/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 by mcpproxy-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)

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 2, 2026

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

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

View logs

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

📦 Build Artifacts

Workflow Run: View Run
Branch: macos-registry-add-902

Available Artifacts

  • archive-darwin-amd64 (28 MB)
  • archive-darwin-arm64 (25 MB)
  • archive-linux-amd64 (16 MB)
  • archive-linux-arm64 (14 MB)
  • archive-windows-amd64 (28 MB)
  • archive-windows-arm64 (24 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (21 MB)
  • installer-dmg-darwin-arm64 (19 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 26905420000 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

…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.
@Dumbris Dumbris force-pushed the macos-registry-add-902 branch from 93bbcce to d3aa661 Compare June 2, 2026 19:38
@Dumbris Dumbris merged commit 06e23d4 into main Jun 3, 2026
38 checks passed
@Dumbris Dumbris deleted the macos-registry-add-902 branch June 3, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants