Skip to content

fix(connect): name the checked config paths on "No config found" rows - #949

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/connect-form-show-checked-paths
Aug 3, 2026
Merged

fix(connect): name the checked config paths on "No config found" rows#949
github-actions[bot] merged 2 commits into
mainfrom
fix/connect-form-show-checked-paths

Conversation

@Dumbris

@Dumbris Dumbris commented Aug 3, 2026

Copy link
Copy Markdown
Member

Problem

On a laptop running stable mcpproxy (≤ v0.52.1), the Connect Client form showed "No config found" for OpenCode even though ~/.config/opencode/opencode.jsonc exists. Two separate issues:

  1. The .jsonc support (connect opencode fails: OpenCode bootstraps opencode.jsonc, mcpproxy only recognizes opencode.json #922, fixed by fix(connect): recognize OpenCode's opencode.jsonc global config #923) has only shipped in v0.53.0-rc.* prereleases — stable builds only check opencode.json. Upgrading resolves the detection itself.
  2. The form never says which paths it checked, so a mismatch like this is undiagnosable from the UI. That is what this PR fixes.

Changes

  • Core: ClientStatus gains an additive checked_paths field — every config location the existence check consults, highest precedence first. For OpenCode that is both opencode.jsonc and opencode.json; for other clients the single config_path. Populated on both the stat-only aggregate (GET /api/v1/connect) and the per-client detail. Static path list, no extra stats/reads — the content-read-free contract (Spec 075) is untouched.
  • macOS form: supported, unconnected rows without a config now render a Looked for opencode.jsonc or opencode.json in ~/.config/opencode note (home-abbreviated). A denied-access remediation or an explicit core note still outranks it. Against a core older than the app, it falls back to naming config_path.
  • Web UI: already shows config_path per row; only the hand-written ClientStatus type gained the new optional field.

Tests

  • Go: checked_paths_test.go — aggregate + detail carry the candidates, .jsonc first; single-file clients report exactly one path. go test -race ./internal/connect/..., strict golangci-lint v2, and ./scripts/test-api-e2e.sh all pass.
  • Swift: fixture-driven model tests for the looked-for note (multi-candidate collapse, single-path fallback, no note when config present, core note precedence). Full swift test suite passes.

A user whose ~/.config/opencode/opencode.jsonc exists saw only "No config
found" in the Connect Client form and could not tell which file mcpproxy
had looked for (their core predated the #923 jsonc fix). Make the verdict
explicit instead of a mystery:

- ClientStatus gains additive checked_paths: every config location the
  existence check consults, highest precedence first (both opencode.jsonc
  and opencode.json for OpenCode; the single config_path elsewhere).
- The macOS form renders it as a "Looked for ... in ..." note on
  supported, unconnected rows without a config, home-abbreviated. An
  explicit core note or denied-remediation still outranks it, and a core
  older than the app falls back to naming config_path.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f1f2dc3
Status: ✅  Deploy successful!
Preview URL: https://1e9dd49a.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-connect-form-show-checke.mcpproxy-docs.pages.dev

View logs

@codecov-commenter

codecov-commenter commented Aug 3, 2026

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/connect/clients.go 72.72% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

…e, note channel

Adversarial review (panel + opencode cross-model) found four genuine
defects:

- opencodeConfigCandidates joined an empty homeDir into CWD-relative
  paths. Every production Service is built without a homeDir (NewService),
  so the #923 jsonc preference — and the new checked_paths — silently
  degraded to stats against the working directory. Empty now resolves via
  os.UserHomeDir, like ConfigPath.
- A permission-blocked aggregate row (access_state=denied, no remediation)
  fell through to the looked-for note, claiming files were checked when
  the stat was forbidden. The gate now allows only absent/unknown/nil.
- The looked-for hint rendered in the orange warning channel on every
  not-installed row; it is informational and now renders secondary
  (ClientRow.noteIsWarning), and the row accessibility label includes the
  note so VoiceOver announces it.
- The home-abbreviation branch had zero coverage (fixtures used /Users/x);
  new tests exercise real-home tilde abbreviation and the denied gate.
@Dumbris

Dumbris commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Cross-model + adversarial review round 1 (codex quota-blocked; used opencode/gpt-5.6-sol + refute-verify panel) surfaced four genuine defects, fixed in f1f2dc3:

  • Production bug, pre-existing since fix(connect): recognize OpenCode's opencode.jsonc global config #923: every production connect.Service is constructed without a homeDir (NewService), and opencodeConfigCandidates("") joined CWD-relative paths — so the .jsonc preference never actually fired in production builds (it only worked in tests, which use NewServiceWithHome). Empty home now resolves via os.UserHomeDir, fixing the jsonc preference, the disconnect/undo alternate-candidate scans, and the new checked_paths alike.
  • A permission-blocked aggregate row (access_state=denied, which the stat-only list reports without remediation) fell through to the looked-for note, claiming files were checked when the stat was forbidden. The gate now only fires for absent/unknown.
  • The looked-for hint rendered in the orange warning channel on every not-installed row and was invisible to VoiceOver; it now renders secondary and is included in the row accessibility label.
  • The tilde-abbreviation branch had zero test coverage (fixtures used /Users/x); real-home tests added.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/connect-form-show-checked-paths

Available Artifacts

  • archive-darwin-amd64 (28 MB)
  • archive-darwin-arm64 (26 MB)
  • archive-linux-amd64 (17 MB)
  • archive-linux-arm64 (15 MB)
  • archive-windows-amd64 (28 MB)
  • archive-windows-arm64 (25 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (22 MB)
  • installer-dmg-darwin-arm64 (20 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 30796094892 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved (Model B): adversarial panel + opencode cross-model review clean at this head SHA; qa-gate green; CI fully green. Arming auto-merge.

@github-actions
github-actions Bot merged commit d0e7025 into main Aug 3, 2026
38 checks passed
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