Skip to content

feat(web): profiles, client bindings, token profile, explainer and Viewing chip (Spec 108-i) - #1444

Merged
github-actions[bot] merged 13 commits into
mainfrom
108-i-webui-profiles-clients
Oct 1, 2026
Merged

github-actions[bot] merged 13 commits into
mainfrom
108-i-webui-profiles-clients

Conversation

@Dumbris

@Dumbris Dumbris commented Sep 30, 2026

Copy link
Copy Markdown
Member

Summary

Spec 108 PR 108-i: the Web UI for profiles, client bindings, token profiles, the access explainer and the header Viewing chip. It is frontend-only (plus the e2e sweep, scripts/docs and spec docs). REST, CLI, MCP and the macOS app are unchanged here: the REST surface is 108-f (#1439), the CLI and MCP tool are 108-g and 108-h, the macOS app is 108-k.

Spec: specs/108-profiles-v3 (FR-005, FR-008a, FR-021 to FR-026, FR-040 to FR-046; tasks T090 to T103 including T042w and T098a; decisions recorded as D35 in research.md). Audit group 108-i; it removes the header "Profile:" switcher that read as agent scoping (P1) and gives the admin-key remediation a Web path (P4).

What changes for the user

Profiles page (/profiles)

  • Card grid: title and slug, max tier, tool counts by tier, unannotated hidden, who uses the profile (administrators only), calls and blocked in 24 h, and Tools, Activity, Clients and Tokens links that carry ?profile= through the link map.
  • An "All servers" card comes first and shows the anonymous status with a link to Settings.
  • "Add profile" (also + Add and the palette via ?create=1) creates a profile in one dialog: name, title, servers and a starting point (Read-only, Read + write, Everything, Custom).
  • Card actions: Edit, Assign to client, Create token with this profile, Delete.
  • A server-edition tenant sees the page read-only without used_by.

Profile editor (/profiles/:name)

  • Form with title and description counters, servers (unknown ones flagged), max tier, unannotated handling, code execution and management tools (On, Off, Inherit), "Agent may switch to", and "Assigned to".
  • Per-tool table from effective-tools: tier, the access reason in words, Allow and Deny toggles, Classify for unannotated tools, and the stale-classification marker "classification ignored — tool is now annotated".
  • Edits change a local draft with a sticky Save and Discard footer; the PUT body follows the omission semantics. A 400 marks the field, a 409 guard refusal keeps the draft and shows the two fix buttons.
  • "Try it" posts the current draft to /profiles/try. Rename and Delete list what moves first (clients with mode, tokens, switchable_to references, anonymous callers); delete requires a target unless "leave them without a profile" is chosen, which is not offered for the anonymous profile.
  • ?focus=server:tool rings the row, sets aria-current, focuses its Allow toggle and announces it; if the server is not in the profile it offers to add it.
  • A profiles.changed event never overwrites an unsaved draft; it shows "This profile changed elsewhere" with Reload.

Clients page

  • One "Profile" column is appended after Config path; Spec 109's columns are unchanged. The chip shows Work · Read-only · locked by credential (or switchable), a Locked switch, the credential badge and blocked calls. Selecting a profile sends the binding without a mode.
  • Rows with no client credential disable the chip and switch and offer "Upgrade to client credential" or "Reconnect", which opens the connect dialog on that client.
  • Warnings banner (role="status", severity in text) for every warning code, each with its action.
  • Toolbar: "Move clients…" (bulk, with the skipped list), "Upgrade admin-key clients…" (preview, guard, apply with the combined precondition token, then the "Rotate the admin API key" panel; the dialog never rotates the key) and "Add other client…" (custom client; the credential is shown once and cleared on close).
  • Expanded row: credential details, staged Rotate (supported clients preview first; custom clients show the new credential once, then a pending badge and "Finalize now"), Forget, and "Explain access…".
  • The profile and client filters of the URL contract are sent to GET /clients and GET /tokens.

Connect dialog (T042w): profile picker and Locked switch, the masked mcp_cli_•••• credential and the notice that the admin key is never written, the management-tools notice, a keyless option only while authentication is off, guard and token-name-conflict errors, and the same profile for a bulk connect.

Token dialog: Profile first, with "None — legacy scope" enabling the legacy fields; the list shows Kind, Profile, Mode and a Legacy scope badge; client-credential rows are read-only with a pointer to Clients.

Settings → Security: "Anonymous callers" profile selector with the binding-guard explanation. A guard fix button navigates here with the value preselected and never saves.

Header: the Viewing chip replaces the profile switcher. It reads and writes the URL filter contract, never calls a binding route, collapses to an icon below 1100 px, and is hidden for tenants and when there is nothing to filter by.

Deviations from the plan (recorded in research.md D35)

  • The anonymous setting saves through a new setAnonymousProfile API method (PATCH /config) instead of patchConfig, because patchConfig drops the 409 body.
  • The static "Other client?" snippet stays (existing tests pin it) and points at "Add other client…".
  • The connect dialog sends profile, mode and keyless only after a binding control was touched, so a reconnect keeps the credential's binding.
  • explain_blocked.json already has the F24 shape, so the conditional Go fixture change did not happen and this PR changes no Go file.
  • Settings.vue already highlights ?focus=<key> rows, so SettingsSection needed no focus prop.
  • Tokens under "Assigned to" link to the Tokens tab (no route re-pins a token).
  • The /tokens redirect route gets the name tokens that the link map already assumed.

Tests

New vitest specs: profiles-page, profile-policy-editor, client-binding-controls, token-dialog-profile, access-explainer, viewing-filter, contract-fixtures, connect-profile-fields, settings-anonymous-profile, api-error-body, profiles-sse-refresh. New Playwright spec e2e/web-ui-sweep/profiles-clients.spec.ts (seeded over REST by profiles-seed.ts), listed in scripts/run-web-smoke.sh; visual-a11y-sweep.spec.ts gains the Profiles, editor and Clients routes in both themes; navigation-consistency.spec.ts now expects the Profiles sidebar entry and the Profile item in the Add menu.

Existing specs updated: header-layout, top-header-tenant-gating (the profile population gate moved to the chip), auth-shell-recovery, connect-preview (credential notice replaces the API-key notice). Deleted with the component: profile-switcher and profile-switcher-hidden.

Follow-ups

The Tools and Activity entry points of the explainer and the Tools view-as and Activity attribution UI are 108-j.

…itor (Spec 108-i)

Structured REST errors (ApiError keeps code, field, used_by, bindings, fixes,
skipped; a 403 is not an auth error), the Profiles v3 methods, the profiles,
clients and clientBindings stores with the profiles.changed and
client.binding_changed invalidations, the /profiles and /profiles/:name
routes, and the Profiles page with the policy editor, per-tool table, Try it,
rename and delete dialogs.
…file, anonymous setting and the Viewing chip (Spec 108-i)

The Clients page gains the profile chip, credential badge, warnings banner,
bulk move, admin-key upgrade, custom client with a show-once credential,
staged rotate, forget and Explain access. The connect dialog gains the profile
picker, lock switch, masked client credential and the management-tools notice.
The token dialog leads with a profile. Settings gains Anonymous callers. The
header Viewing chip replaces the v2 profile switcher.
…es in the a11y and navigation sweeps (Spec 108-i)
…, current impact lists (Spec 108-i review round 1)
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

F3.2: a guard refusal of a bulk connect now renders its bindings and fix
buttons in a bulk-refusals list (there is no per-client preview panel).
F3.3: the connect dialog's GuardRefusal closes the dialog on navigate so the
Settings fix is reachable.
F4.1: the bulk-move preview counts the unscoped client list, since
bulk-assign moves every client on the from-profile instance-wide.
# Conflicts:
#	ROADMAP.md
#	specs/108-profiles-v3/research.md
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: 108-i-webui-profiles-clients

Available Artifacts

  • archive-darwin-amd64 (31 MB)
  • archive-darwin-arm64 (28 MB)
  • archive-linux-amd64 (18 MB)
  • archive-linux-arm64 (17 MB)
  • archive-windows-amd64 (31 MB)
  • archive-windows-arm64 (27 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (25 MB)
  • installer-dmg-darwin-arm64 (23 MB)
  • smart-mcp-proxymcpproxy-goHM98N3.dockerbuild (0 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 36800336394 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@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 github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved (Model B): Paperclip review verdicts = ACCEPT and qa-gate green at this head SHA. Arming auto-merge; GitHub merges when all required checks pass.

@github-actions
github-actions Bot merged commit 571027c into main Oct 1, 2026
57 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