chore(web): narrow SCOPE_ORDER to 3 layers, drop builtin UI affordances #941

Closed
opened 2026-05-08 08:57:02 +00:00 by claude-desktop · 0 comments
Collaborator

As a dashboard user, I want the agent-config scope ladder UI to stop showing a "Builtin" tier that the runtime no longer supports, so that the form options match what the API will accept.

After tracker #934's migration lands, every PUT that mentions scope='builtin' returns a CHECK violation. Leaving the UI option in place creates phantom controls. The narrowing also simplifies anchored-scope.ts and the MCP-tab read-only branch.

Acceptance criteria

SCOPE_ORDER

  • apps/web/src/features/agent-config/scope-ladder.tsx: drop "builtin" from the SCOPE_ORDER array and from SCOPE_LABEL. Resulting order: ["global", "agent_type", "instance"].
  • Update consumers that pattern-match on "builtin" (a case "builtin": branch in mcp-tab.tsx, the <option value="builtin"> element, the read-only-when-builtin guard).

anchored-scope.ts

  • Drop builtin from the resolution ladders documented in apps/web/src/features/agent-config/anchored-scope.ts:43-45 and from the implementation. Updated ladders:
    • instance → agent_type (matching type) → global
    • agent_type → global
    • global (no further fallback)

Service-config UX

  • apps/web/src/routes/$locale/settings.service.tsx: replace "Reset all to builtin" with "Reset to factory defaults". Wire the buttons to the new POST /api/service-config/reset-defaults endpoint.
  • Update the toast strings (Fields reset to builtinReset to factory defaults, etc.).
  • Drop the scopes={["builtin", "global"]} array argument and the readOnly={new Set(["builtin"])} props.

Tests

  • Updated component tests for mcp-tab and settings.service (no "builtin" option rendered, factory-reset button calls the new endpoint).
  • just qa green.

Out of scope

  • API endpoint creation — separate POST /service-config/reset-defaults story.
  • Backend filter cleanup — separate chore.

References

  • Meta tracker: #934
  • Files: apps/web/src/features/agent-config/scope-ladder.tsx, apps/web/src/features/agent-config/anchored-scope.ts, apps/web/src/features/agent-config/mcp-tab.tsx, apps/web/src/routes/$locale/settings.service.tsx, apps/web/src/routes/$locale/agents.$type.{index,$instance}.tsx
As a dashboard user, I want the agent-config scope ladder UI to stop showing a "Builtin" tier that the runtime no longer supports, so that the form options match what the API will accept. After tracker #934's migration lands, every PUT that mentions `scope='builtin'` returns a CHECK violation. Leaving the UI option in place creates phantom controls. The narrowing also simplifies `anchored-scope.ts` and the MCP-tab read-only branch. ## Acceptance criteria ### `SCOPE_ORDER` - [ ] `apps/web/src/features/agent-config/scope-ladder.tsx`: drop `"builtin"` from the `SCOPE_ORDER` array and from `SCOPE_LABEL`. Resulting order: `["global", "agent_type", "instance"]`. - [ ] Update consumers that pattern-match on `"builtin"` (a `case "builtin":` branch in `mcp-tab.tsx`, the `<option value="builtin">` element, the read-only-when-builtin guard). ### `anchored-scope.ts` - [ ] Drop builtin from the resolution ladders documented in `apps/web/src/features/agent-config/anchored-scope.ts:43-45` and from the implementation. Updated ladders: - `instance → agent_type (matching type) → global` - `agent_type → global` - `global` (no further fallback) ### Service-config UX - [ ] `apps/web/src/routes/$locale/settings.service.tsx`: replace "Reset all to builtin" with "Reset to factory defaults". Wire the buttons to the new `POST /api/service-config/reset-defaults` endpoint. - [ ] Update the toast strings (`Fields reset to builtin` → `Reset to factory defaults`, etc.). - [ ] Drop the `scopes={["builtin", "global"]}` array argument and the `readOnly={new Set(["builtin"])}` props. ### Tests - [ ] Updated component tests for `mcp-tab` and `settings.service` (no `"builtin"` option rendered, factory-reset button calls the new endpoint). - [ ] `just qa` green. ## Out of scope - API endpoint creation — separate `POST /service-config/reset-defaults` story. - Backend filter cleanup — separate chore. ## References - Meta tracker: #934 - Files: `apps/web/src/features/agent-config/scope-ladder.tsx`, `apps/web/src/features/agent-config/anchored-scope.ts`, `apps/web/src/features/agent-config/mcp-tab.tsx`, `apps/web/src/routes/$locale/settings.service.tsx`, `apps/web/src/routes/$locale/agents.$type.{index,$instance}.tsx`
dev closed this issue 2026-05-08 09:27:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#941
No description provided.