Skip to content

refactor(config): rename Teams→ServerEdition (internal/teams→serveredition, teams→server_edition key + alias) (MCP-1086)#603

Merged
Dumbris merged 4 commits into
mainfrom
rename/teams-to-serveredition
Jun 12, 2026
Merged

refactor(config): rename Teams→ServerEdition (internal/teams→serveredition, teams→server_edition key + alias) (MCP-1086)#603
Dumbris merged 4 commits into
mainfrom
rename/teams-to-serveredition

Conversation

@Dumbris

@Dumbris Dumbris commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Renames the server-edition surface for clarity (MCP-1086). Blocked-by #588/MCP-1035 — now merged, so this lands the rename on top.

  • Config type: TeamsConfigServerEditionConfig, TeamsOAuthConfigServerEditionOAuthConfig, DefaultTeamsConfigDefaultServerEditionConfig; Config.TeamsConfig.ServerEdition.
  • Config key: json/mapstructure tag teamsserver_edition, with back-compat: an existing config that still uses teams is normalized onto ServerEdition on load (new key wins). Implemented in loadConfigFile mirroring the feat(registry): simplify trust/quarantine + add edit endpoint (MCP-1072) #594 provenance normalize-on-read. Compiles in both editions (ServerEditionConfig is a struct{} stub in personal builds).
  • Package move: internal/teams/internal/serveredition/ (41 files + broker/ from feat(config): per-upstream auth_broker block + teams credential keys (spec 074, MCP-1035) #588), package teamsserveredition; all imports/selectors updated.
  • Exported symbols: TeamsAuthMiddlewareServerEditionAuthMiddleware, TeamsStatusInfoServerEditionStatusInfo, TeamsInfoServerEditionInfo, wireTeamsOAuthwireServerEditionOAuth.
  • CLI: mcpproxy status -o json server-edition block key teamsserver_edition (aligns output with the rename).

Unchanged per scope: personal/server edition strings, the server build tag, and the edition_teams.go build-tag filename.

Tests

  • New file-load back-compat tests (server-tagged): new server_edition key, legacy teams key, both-keys-new-wins.
  • go build ./cmd/mcpproxy (personal) ✅ and go build -tags server ./cmd/mcpproxy
  • go test -tags server ./internal/serveredition/... -race ✅ (all packages)
  • Full runtime suite (approval-hash canary) ✅
  • go vet ./... and go vet -tags server ./...
  • ./scripts/run-linter.sh → 0 issues ✅

Docs

  • CLAUDE.md path + config-key references updated, kept under the 40k char gate (39,969/40,000; tightened a few descriptions to offset growth).
  • Active feature docs + specs config-key/code-path references updated.
  • Preserved intact: spec directory slugs (029-mcpproxy-teams, 024-teams-multiuser-oauth), historical spec narrative prose, and the archived docs/plans/2026-03-08-repo-restructure-design.md (it records the original -tags teams design).

swagger

teams config is swaggerignore — no REST surface change (verified: no teams/ServerEdition refs in oas/swagger.yaml).

Unblocks the frontend rename task (B).

Related MCP-1086

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: c0a758e
Status: ✅  Deploy successful!
Preview URL: https://5f9184e0.mcpproxy-docs.pages.dev
Branch Preview URL: https://rename-teams-to-servereditio.mcpproxy-docs.pages.dev

View logs

@codecov-commenter

codecov-commenter commented Jun 4, 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 35.71429% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/config/loader.go 16.66% 4 Missing and 1 partial ⚠️
cmd/mcpproxy/status_cmd.go 20.00% 3 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

📦 Build Artifacts

Workflow Run: View Run
Branch: rename/teams-to-serveredition

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 27397915729 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

Dumbris added a commit that referenced this pull request Jun 9, 2026
Codex review follow-up for PR #603 / MCP-1086:
- generate-release-notes.sh: server-edition code path internal/teams/ → internal/serveredition/
- specs/029-mcpproxy-teams/tasks.md: build-tag docs //go:build teams / -tags teams → server, matching the accepted scope (build tag remains "server", current code uses //go:build server). Package paths were already renamed by PR #603; only the build-tag references were stale.

Edition-name/wording strings left untouched (owned by MCP-1087).

Related #603
Dumbris added a commit that referenced this pull request Jun 10, 2026
…nd related docs

All //go:build teams, -tags teams, internal/teams/ references updated to
//go:build server, -tags server, internal/serveredition/ to match the
actual build tags used throughout the codebase.

Related #603
@Dumbris

Dumbris commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Code Review — request_changes (automated, MCP-1859)

The backend rename from teamsserver_edition is complete and correct (config alias, struct renames, package move to internal/serveredition/). One gap remains:

frontend/src/views/Settings.vue still uses the old key prefix

Lines 202–215 and 258:

const teamsFields: SettingField[] = [
  { key: 'teams.enabled', ... },
  { key: 'teams.oauth.provider', ... },
  { key: 'teams.max_user_servers', ... },
]
const hasTeams = computed(() => state.working && state.working.teams != null)
// ...
base.push({ id: 'teams', label: 'Teams', icon: '👥' })

The backend config JSON now uses the server_edition key (with a legacy read-alias for teams). The Settings UI reads/writes values by key name — writes will use the old key, creating a round-trip mismatch once the alias is eventually removed.

Required fix: rename all teams.* field keys and the state.working.teams reference to server_edition.* / state.working.server_edition in Settings.vue. Also update the tab label ('Teams''Server Edition') and section-id for consistency.

Everything else (backend, tests, docs, Dockerfile, release workflow) looks good. Approve once the frontend is aligned.

Dumbris added 3 commits June 12, 2026 07:19
…ition; teams→server_edition key (alias)

Renames the server-edition surface for clarity and to disambiguate from any
"teams" collaboration concept (MCP-1086).

Go:
- config.TeamsConfig→ServerEditionConfig, TeamsOAuthConfig→ServerEditionOAuthConfig,
  DefaultTeamsConfig→DefaultServerEditionConfig; Config.Teams→Config.ServerEdition.
- Config key/tag teams→server_edition. Legacy "teams" key still loads onto
  ServerEdition via normalize-on-load in loadConfigFile (new key wins). Compiles
  in both editions (ServerEditionConfig is a struct{} stub in personal builds).
- Move internal/teams/→internal/serveredition/ (package teams→serveredition,
  incl. broker/ from #588); update all imports and selectors.
- Rename exported symbols: TeamsAuthMiddleware→ServerEditionAuthMiddleware,
  TeamsStatusInfo→ServerEditionStatusInfo, TeamsInfo→ServerEditionInfo,
  wireTeamsOAuth→wireServerEditionOAuth.
- `mcpproxy status -o json` server-edition block key teams→server_edition (aligns
  output with the rename).

Edition strings ("personal"/"server"), the `server` build tag, and the
edition_teams.go build-tag filename are unchanged per scope.

Tests:
- New file-load back-compat tests: new server_edition key, legacy teams key,
  and both-keys-new-wins (server-tagged).

Docs:
- CLAUDE.md path/config-key references (kept under the 40k char gate); active
  feature docs; specs config-key + code-path references. Spec directory slugs
  (029-mcpproxy-teams, 024-teams-multiuser-oauth) and historical narrative are
  preserved intact.

swagger: teams config is swaggerignore — no REST surface change (verified).

Related MCP-1086
Codex review follow-up for PR #603 / MCP-1086:
- generate-release-notes.sh: server-edition code path internal/teams/ → internal/serveredition/
- specs/029-mcpproxy-teams/tasks.md: build-tag docs //go:build teams / -tags teams → server, matching the accepted scope (build tag remains "server", current code uses //go:build server). Package paths were already renamed by PR #603; only the build-tag references were stale.

Edition-name/wording strings left untouched (owned by MCP-1087).

Related #603
…nd related docs

All //go:build teams, -tags teams, internal/teams/ references updated to
//go:build server, -tags server, internal/serveredition/ to match the
actual build tags used throughout the codebase.

Related #603
@Dumbris Dumbris force-pushed the rename/teams-to-serveredition branch from d7c5557 to e06cd9e Compare June 12, 2026 04:25
…n key (MCP-1086)

Address CodexReviewer REQUEST_CHANGES on PR #603. The backend renamed the
canonical config key teams -> server_edition; the settings UI was still bound
to the legacy teams object, so after the rename the Server Edition tab would
disappear and edits would reintroduce the legacy key.

- Settings.vue: gate the Server Edition tab on server_edition (fallback to the
  legacy teams key), and alias a legacy teams-keyed config onto server_edition
  at load so old configs still hydrate the form.
- settings/fields.ts: write/read the canonical server_edition.* dot-paths; the
  shared SettingsSection read (getPath) and PATCH partial (buildPartial) follow
  the field keys, so both now target server_edition.
- idp-token-storage.md + idp_subject_token.go: rename operator-facing refs to
  server_edition, noting teams is still accepted as a back-compat alias.

Verified: vitest (server-edition wording spec), frontend build (vue-tsc),
go build -tags server ./cmd/mcpproxy, go build ./cmd/mcpproxy.

Related #603
@Dumbris Dumbris merged commit 4ab7c88 into main Jun 12, 2026
40 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