feat(webui): Server Config tab parity with macOS tray#424
Merged
Conversation
The Web UI's Configuration tab on /server-detail/:name showed only a
narrow slice of server state (Name, Protocol, URL, Command, Enabled,
Quarantined, Tool Count). The macOS tray (native/macos/MCPProxy/
ServerDetailView.swift) already shows much more — Process details, full
Docker isolation overrides, runtime status, unified Health — and pulled
the same data from the same /api/v1/servers/{id} endpoint.
The bug case that surfaced this: user inspected obsidian-pilot in the
Web UI Config tab, didn't see the Docker isolation override (image,
extra_args, vault mount), and concluded "Web UI shows only part of it"
even though the same fields were in the API response.
This commit restructures the Config tab into the same six sections the
macOS tray uses:
General — Name, Protocol, Enabled, Quarantined
Connection — URL (HTTP/SSE only)
Process — Command, Args, Working Dir (stdio only)
Environment Variables — keys with masked values
Docker Isolation — Image, Network Mode, Extra Args, Container
Overrides Working Dir, Memory/CPU Limit, Runtime —
with isolation_defaults shown as italic
placeholder when no override is set
Status — Connected, Connected At, Reconnect Count,
Tool Count, Tool List Tokens, Last Error
Health — Level, Admin State, Summary, Detail,
Suggested Action
Implementation notes:
- No new components were introduced — the Config tab uses inline
daisyUI cards + dl/dt/dd grid layout for read-only fields. The
edit affordances stay on the existing Edit page; the Config tab
is now an information dashboard, matching the macOS tray.
- Env values are masked ("••••<last2> (N chars)"). Keys are visible
so users can confirm WHICH variables are set without exposing
secrets to a casual viewer.
- Docker isolation defaults render as "default: <value>" italic
placeholders when no per-server override is set, matching the
macOS tray's behavior. Lets users see what's actually in effect.
- All fields are populated by the existing /api/v1/servers/{id}
response — no backend changes.
Type updates:
- frontend/src/types/api.ts: Server gains args, working_dir, env,
connected_at, last_reconnect_at, reconnect_count, isolation,
isolation_defaults. Adds ServerIsolationConfig + ServerIsolation
Defaults to mirror internal/contracts/types.go.
- frontend/src/types/contracts.ts: same additions to the auto-
generated mirror.
Tests: type-check + build pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying mcpproxy-docs with
|
| Latest commit: |
aa81342
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0319d146.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-webui-config-tab-parity.mcpproxy-docs.pages.dev |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 24960069712 --repo smart-mcp-proxy/mcpproxy-go
|
4 tasks
electrolobzik
added a commit
to HaloCollar/mcpproxy-go
that referenced
this pull request
May 16, 2026
Adds TestContractsInSync, which runs the generator's content function and asserts byte-equality with the committed frontend/src/types/contracts.ts. The next time a contributor hand-edits contracts.ts (or hand-edits the hardcoded TS string in main.go) without updating both sides, CI fails with a clear message pointing at the fix: Either run \`go run ./cmd/generate-types\` from the module root (if the generator is the source of truth) or update the string literals in main.go (if contracts.ts is the source of truth). The drift this test guards against is what allowed PRs smart-mcp-proxy#424 and smart-mcp-proxy#463 to silently leave the generator out of sync. Refactors main.go to factor out generateFileContent() so the test can compare without re-implementing the header concat.
Dumbris
added a commit
that referenced
this pull request
May 17, 2026
…edes #472) (#475) * fix(generate-types): re-sync hardcoded TS output with contracts.ts The TypeScript-as-Go-string literal in cmd/generate-types/main.go drifted from frontend/src/types/contracts.ts when PR #424 (Server Config tab parity) and PR #463 (per-tool enable/disable) edited contracts.ts directly without updating the generator. Running `go run ./cmd/generate-types` (invoked by Makefile's `frontend-build` target) silently reverts those fields, producing a dirty working tree on every `make build`: - Server.isolation_defaults - IsolationConfig.network_mode, IsolationConfig.extra_args - IsolationDefaults (entire interface) - Tool.disabled, Tool.approval_status The reverted contracts.ts also feeds back into Vite's bundle hashes, which is the likely reason web/frontend/dist/* also churns on rebuilds. This commit catches the generator up to the actual contracts.ts content. After this, `go run ./cmd/generate-types` is idempotent against HEAD. Verified: generator output is byte-identical to contracts.ts. * test(generate-types): catch future contracts.ts drift in CI Adds TestContractsInSync, which runs the generator's content function and asserts byte-equality with the committed frontend/src/types/contracts.ts. The next time a contributor hand-edits contracts.ts (or hand-edits the hardcoded TS string in main.go) without updating both sides, CI fails with a clear message pointing at the fix: Either run \`go run ./cmd/generate-types\` from the module root (if the generator is the source of truth) or update the string literals in main.go (if contracts.ts is the source of truth). The drift this test guards against is what allowed PRs #424 and #463 to silently leave the generator out of sync. Refactors main.go to factor out generateFileContent() so the test can compare without re-implementing the header concat. * fix(generate-types): make TestContractsInSync CRLF-safe on Windows The new TestContractsInSync did a raw byte comparison of the committed contracts.ts against generator output. On Windows CI (core.autocrlf=true) git checks out contracts.ts with CRLF endings while the generator emits LF, so the test failed on windows-amd64 even though the contract was in sync (observed on PR #472). Two-layer fix: - .gitattributes pins frontend/src/types/contracts.ts to `text eol=lf` so it is checked out identically on every platform (the real fix). - The test now normalizes CRLF->LF before comparing, keeping it green regardless of a contributor's local git config (defense in depth). Verified: test passes with both LF and CRLF checkouts of contracts.ts; `go run ./cmd/generate-types` remains idempotent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Roman Chernyak <electrolobzik@gmail.com> Co-authored-by: Claude Code <noreply@anthropic.com>
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.
Summary
Brings the Web UI's
/server-detail/:nameConfig tab to information parity with the macOS tray. Previously the Web UI showed only Name, Protocol, URL, Command, Enabled, Quarantined, Tool Count — the macOS tray (ServerDetailView.swift) already shows full Process / Docker Isolation / Status / Health detail from the same/api/v1/servers/{id}response.Why
User inspected
obsidian-pilotin the Web UI Config tab, didn't see the Docker isolation override (image, extra_args, vault mount), and reported "macOS app shows config right, but web UI shows only part of it". The data was in the API; the UI just didn't render it.Sections (mirroring
native/macos/MCPProxy/.../ServerDetailView.swift)••••<last2> (N chars))isolation_defaultsrendered as italicdefault: <value>placeholders when no override is setApproach
dl/dt/ddgrid layout. The Edit page remains the dedicated mutation surface; this tab is an information dashboard./api/v1/servers/{id}.default: ...) so the "empty = inherit" semantic is discoverable.Type updates
frontend/src/types/api.ts:Servergainsargs,working_dir,env,connected_at,last_reconnect_at,reconnect_count,isolation,isolation_defaults. NewServerIsolationConfig+ServerIsolationDefaultsmirrorinternal/contracts/types.go.frontend/src/types/contracts.ts: same additions to the auto-generated mirror.Test plan
npm run type-checkclean.npm run buildclean (ServerDetail.vue 63 KB → 63 KB, no regression).🤖 Generated with Claude Code