Skip to content

feat(webui): Block / Block All in Tool Quarantine view (#632 FE lane) - #654

Merged
Dumbris merged 2 commits into
mainfrom
mcp-2199-fe-block-button
Jun 14, 2026
Merged

Dumbris merged 2 commits into
mainfrom
mcp-2199-fe-block-button

Conversation

@Dumbris

@Dumbris Dumbris commented Jun 14, 2026

Copy link
Copy Markdown
Member

Frontend: Block button in Tool Quarantine view

Frontend lane of #632 (parent MCP-2196). Adds a reversible reject
affordance next to Approve in the Server Detail tool-quarantine panel.

What changed

  • api.blockTools(serverName, tools?) — mirrors approveTools against
    POST /api/v1/servers/{id}/tools/block, sending {tools:[...]} for an
    explicit set or {block_all:true} otherwise. Contract response: { blocked: int }.
  • ServerDetail.vue — a per-tool Block button next to each Approve,
    and a Block All next to Approve All on the quarantine banner
    (data-test attrs added). Handlers blockTool/blockAllTools reuse
    approvalLoading, refresh approvals + server state, and toast on success.
    Blocking is reversible, so no destructive-confirm modal.
  • Docs — docs/features/tool-quarantine.md Web UI section documents Block / Block All.

Tests / verification

  • Unit (frontend/tests/unit/): quarantine-block-api.spec.ts locks the api
    URL/body contract; quarantine-block-view.spec.ts mounts the real
    ServerDetail and asserts the buttons render + call blockTools with the
    right args. Full FE suite: 167 passed; vue-tsc clean; make build green.
  • Playwright sweep (specs/mcp-2199-block-button/verification/, 3/3) built
    to the backend contract with page.route mocks — see report.html.

⚠️ Depends on the backend lane

The POST .../tools/block endpoint is not merged yet (separate backend
lane of #632). This PR builds to the agreed contract with mocks; the Playwright
sweep will be re-run unmocked after the backend lands + a rebase onto
origin/main
before this is merge-ready. Do not merge ahead of the backend.

Related #632

Adds a reversible reject affordance next to Approve in the Server Detail
tool-quarantine panel: a per-tool Block button and a Block All button on
the banner. Blocking removes a pending/changed tool from quarantine and
disables it in the tools list; it is reversible via the existing tools
toggle, so no destructive-confirm modal.

- api.blockTools(serverName, tools?) mirrors approveTools against
  POST /api/v1/servers/{id}/tools/block ({tools:[...]} or {block_all:true}).
- ServerDetail.vue: Block/Block All buttons with data-test attrs +
  blockTool/blockAllTools handlers reusing approvalLoading + success toast.
- Unit tests: api contract (URL/body) + component button render & handler args.
- Docs: tool-quarantine.md Web UI section documents Block/Block All.
- Verification: Playwright sweep (3/3) built to the backend contract with
  page.route mocks; to be re-run unmocked after the backend lane lands.

Related #632
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0181d11
Status: ✅  Deploy successful!
Preview URL: https://b10ea321.mcpproxy-docs.pages.dev
Branch Preview URL: https://mcp-2199-fe-block-button.mcpproxy-docs.pages.dev

View logs

@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 commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: mcp-2199-fe-block-button

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

Note: Artifacts expire in 14 days.

@Dumbris

Dumbris commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

QA Gate — PASS ✅ (head 2abbcd3de9e0bde9eeb9ce12a353a5576a3ad533)

Posted qa-gate = success for this head SHA (SHA-pinned; a new commit invalidates it).

Frontend surface:

  • vitest run → 167/167 passed (22 files), exit 0
  • vue-tsc --noEmit → 0 errors, exit 0

Regression adequacy (QA-5): ADEQUATE. quarantine-block-view.spec.ts asserts Block/Block-All buttons render (data-test selectors) and call api.blockTools with the right args; quarantine-block-api.spec.ts pins the POST /tools/block contract ({tools:[...]} vs {block_all:true}, slash-name %2F encoding). Engineer also committed Playwright verification artifacts under specs/mcp-2199-block-button/verification/.

Note: the FE blockTools call targets the /tools/block endpoint added in #653 — merge/land #653 first (or together) so the button has a live backend.

Tested in an isolated worktree at the PR head. QA tracked by MCP-2213, whose Paperclip checkout is orphaned (dead run) — verdict recorded here out-of-band.

CodexReviewer found that ServerDetail.vue's block handlers refreshed
tool approvals + server summaries but not serverTools, leaving the
Available Tools row/toggle stale until a manual reload. Add loadTools()
to both blockTool and blockAllTools success paths so a blocked tool
shows disabled immediately, mirroring the approve / enable-disable path.

Extend quarantine-block-view.spec.ts with two tests asserting
getServerTools is re-fetched after Block and Block All.

Related #654

@mcpproxy-gatekeeper mcpproxy-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved via Claude Code review (Codex quota exhausted). Reviewed diff + ran tests; verdict ACCEPT. See review notes.

@Dumbris
Dumbris merged commit f4916d0 into main Jun 14, 2026
46 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