Skip to content

feat(attention): Spec 108 warnings as attention kinds, profile scope on Servers and row links (Spec 109-l) - #1457

Merged
github-actions[bot] merged 12 commits into
mainfrom
109-l-profiles-integration
Oct 2, 2026
Merged

github-actions[bot] merged 12 commits into
mainfrom
109-l-profiles-integration

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 1, 2026

Copy link
Copy Markdown
Member

Summary

Spec 109-l (specs/109-ux-navigation-consistency, Phase 14, T151 to T159) integrates Spec 108 into the needs-attention list and renders the three link-map rows that 109-k registered but never showed. It also fixes two items of #1437.

Spec 108 warnings now appear as needs-attention items, ranked 4 to 9 so they sit above every server item. They come from the same function that fills the Clients page banner, so the two cannot disagree, and they never read a client config file.

Closes #1437 (items 2, 3 and 4 landed with 108-j in #1448; this PR owns items 1 and 5).

User-visible changes

Core, REST, SSE

  • Six new attention kinds with exact wire names equal to the Spec 108 warning codes: anonymous_denied_by_binding_guard (4), client_holds_admin_key (5), client_token_name_conflict (6), profile_missing (7), client_rotation_pending (8), client_credential_expiring (9). The binding guard is a single item with the new subject type setting; every other item is one per client. Each carries a fix verb equal to the Spec 108 warning action and a target the Web UI already serves.
  • Scoped callers (agent tokens, non-admin server-edition sessions) are now filtered by an allow-list on REST and SSE: only server items they can enumerate. The new kinds are administrator-only and an unknown future subject type fails closed.
  • The attention subscriber also recomputes on client.binding_changed, profiles.changed, config.reloaded and config.saved, re-reads the client warnings every 30 seconds (rotations, forgets and token creation emit no event), and wakes when an active credential enters its 14-day window. since for the expiring kind is the start of that window.
  • client_holds_admin_key appears once a client's credential state has been observed (an on-demand read persists it). There is deliberately no background config read, which would trigger the macOS privacy prompt. Recorded in FR-093.
  • Follow-ups from Spec 108-e scope attribution review (#1436) #1437 item 1: GET /servers?profile=<viewed> from a caller pinned to a narrower profile now counts only tools both profiles admit and drops servers outside the caller's own pin, so it agrees with GET /tools. Administrator output is unchanged.
  • Follow-ups from Spec 108-e scope attribution review (#1436) #1437 item 5: a revoked token's name stays reserved because activity history references it. POST /tokens (and mcpproxy token create) now say so: A revoked token named "x" still holds this name for activity history; choose another name.
  • OpenAPI regenerated (subject type enum and the attention scoping description).

Web UI

  • Servers page: a Profile select and a removable chip, backed by GET /servers?profile=. The list is page-local, so the shared servers store (sidebar, header, Dashboard) is untouched. It shows the spinner instead of the unfiltered list while /status features are pending, "Profile not found" with Clear on a 404, a disabled chip for -, and "No servers in this profile" with Clear.
  • Clients expanded row: Activity, Sessions, Tools it sees, Usage, each carrying client=<id>.
  • Tokens tab: Activity and Usage links on agent token rows (client credentials are filtered as clients, from the Clients page).
  • All of these stay hidden until features.scope_filters lists the parameter, and the URL keeps the parameter untouched meanwhile. useScopeQuery.ts, navModel.ts and SidebarNav.vue are not touched.
  • Generated contracts.ts gains the six kinds and the setting subject.

macOS

  • Home attention rows and the tray "Needs Attention" rows for the new items are actionable: a pure AttentionWarningAction mapper feeds 108-k's warning dispatcher, so each opens Settings (scrolled to require_mcp_auth), the Clients page, the upgrade sheet, the connect sheet or the Agent Tokens tab filtered by the token. The tray never mutates config or a credential.
  • ScopeFilterTests additions for the un-hide, the URL round trip and the profile links.

CLI

  • No format change. mcpproxy attention, status and doctor render the new items generically; a golden pins the table with a setting subject and an admin-key client.

Audit findings

No audit finding carries a dedicated id for this PR. It implements FR-093, FR-002 (kinds), FR-007 (scoped filtering), FR-082 (the deep links 109-k registered) and parity row 30 of Spec 109.

Spec documents

specs/109 tasks (T151 to T156 plus T152a, T154a, T157, T158, T159; 185 tasks), spec FR-002, FR-007, FR-082, FR-093, contracts/rest-api.md#attention (the kind table), data-model section 4, quickstart recipe 109-l, research D33 (P1 to P15). Spec 108 FR-043 and the Tokens contract gain the revoked-name sentence. docs/features/needs-attention.md lists the new kinds and docs/development/web-ui-verification.md the new sweep spec. ROADMAP regenerated.

Tests added

  • Go: internal/runtime attention_108_kinds_test.go (table, ordering, truncation, no secrets, name equality with the Spec 108 codes), attention_108_source_test.go (the set equals ClientsService.Warnings, zero config reads, no clients service), attention_108_subscriber_test.go (events, periodic tick, expiry threshold, firstSeen), attention_108_contract_test.go (exact TypeScript lines), attention_108_bench_test.go (cost at the 100-token deployment cap, about 1 ms); internal/httpapi attention_108_scope_test.go (REST and SSE allow-list), servers_profile_caller_pin_test.go (both list branches), tokens_revoked_name_test.go; cmd/mcpproxy attention_108_cmd_test.go with a golden.
  • Frontend: profiles-unhide.spec.ts (features x /profiles route table), servers-profile-scope.spec.ts, attention-108-targets.spec.ts (each target resolves in the real router).
  • Playwright: e2e/web-ui-sweep/profiles-unhide.spec.ts (sidebar and Add menu, Viewing chip, Clients and Token links, Servers scope, an expiring credential becoming the first attention item within seconds, 1440/900/390 layout, keyboard order). The 108-i sweep step that clicked a link named "Tools" now clicks the renamed "Tools it sees" link by its test id.
  • Swift: Attention108KindsTests, three ScopeFilterTests cases.

Deviations from the plan, recorded

  • The plan's helper path helpers/profile-seed.ts is e2e/web-ui-sweep/profiles-seed.ts on main.
  • AttentionClientWarning also carries BindingNames (display names for the guard detail) next to BindingCount, and Since.
  • The plan's 500-token cost case cannot exist: the store caps tokens at 100, so the cost test runs at the cap.
  • AttentionList.vue gets no aria-describedby: item ids can contain spaces (custom client ids), which are invalid id references; the summary sits directly above the fix button.
  • Token-row links render only when the Activity and Usage routes are registered, so routers without them (the 108-i unit specs) keep passing unmodified.

Follow-ups

  • Agent-token expiry as an attention kind (not a Spec 108 warning).
  • Background admin-key detection without config reads.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1dc4cf2
Status: ✅  Deploy successful!
Preview URL: https://49507766.mcpproxy-docs.pages.dev
Branch Preview URL: https://109-l-profiles-integration.mcpproxy-docs.pages.dev

View logs

F1.1: the attention subscriber starts before the management service is
wired, so a quiet instance never recomputed and never armed the 30s
client-warning refresh or the expiry wake-up. loop() now arms an initial
recompute timer. Test-first: TestAttention108QuietBootSurfacesWarningWithoutAnyEvent.
Also stops the final timer values on exit (the deferred stop captured nil).

F4.1: Clients view now remembers a clientDetail route (pendingExpandID) and
expands the row once load()/adopt() delivers it, so the profile picker is
visible for profile_missing items routed from Home or the tray. The view
state has no unit seam; covered by existing swift suite and review.
@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

❌ Patch coverage is 95.74468% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/runtime/attention_108.go 96.71% 4 Missing and 1 partial ⚠️
internal/httpapi/view_as.go 86.95% 2 Missing and 1 partial ⚠️
internal/httpapi/clients.go 66.66% 1 Missing and 1 partial ⚠️
internal/runtime/clients_service.go 86.66% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: 109-l-profiles-integration

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 (26 MB)
  • installer-dmg-darwin-arm64 (24 MB)
  • smart-mcp-proxymcpproxy-go6QSF9U.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 36958466079 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@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 1a5044f into main Oct 2, 2026
59 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.

Follow-ups from Spec 108-e scope attribution review (#1436)

2 participants