Repository navigation
fix(tray): per-server review sheet, click-time approval decisions, review-bound approvals (#1569) - #1572
Merged
Conversation
…view-bound approvals (#1569) The macOS review sheet had the same races as the Web review screen and could not bind an approval to what the operator reviewed: - The sheet is keyed by server, so switching servers drops the previous review, selection and pending force decision. Review loads are numbered and only this server's newest response is shown. - Server and per-tool approvals capture the block list and expected hashes at the click; a review that reloads before the request runs cannot change what is sent. One approval runs at a time, the force confirmation re-sends the attempt that answered "dangerous", and the allow toggles are locked while an approval is in flight. - Approvals send expected_hashes (tool name -> the review's current_hash) on security/approve and tools/approve, unbound only when no reviewed tool has a hash. An empty review binds to the empty snapshot. A 409 "out of date" reloads the review and shows the core's message instead of the force dialog. The binding is forward-compatible: today's core reports no current_hash and ignores expected_hashes, so requests behave as before until the backend contract (#1566) lands. Closes #1569
Deploying mcpproxy-docs with
|
| Latest commit: |
e735914
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://25de2db5.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-1569-tray-review-binding.mcpproxy-docs.pages.dev |
…review) - The server approval attempt is now reserved synchronously in the click handler (send), before its Task is scheduled, so the allow toggles and approve buttons lock at the click. A selection change can no longer fall between the captured decision and the request and then be erased by its success. The blind and force confirmations go through the same path, and every exit of approve() finishes the reserved attempt. - Per-tool Approve is reserved per tool at the click (ToolApprovals) and disabled while in flight, so repeated clicks cannot send overlapping approvals for the same tool.
…der the stale notice (#1569 review) - ApprovalAttempts.isLocked covers both an in-flight attempt and an unanswered force confirmation. The approve buttons, allow toggles and the per-tool controls honour it, so a click before the alert presents can no longer consume the force candidate and leave "Force Approve" doing nothing. Cancel drops the candidate and unlocks the sheet. - Per-tool Approve/Reject is disabled while a server approval is in flight. - The "out of date" notice is set before the review reloads, so a newer attempt started while the reload is suspended is not shown as stale. - The capture-at-click test now uses the late review it builds, and comments cite the #1566 contract instead of claiming CLI/Web parity this tree does not have.
… during approval (#1569 review) - Per-tool Reject now takes the same per-tool reservation as Approve and is disabled while the sheet is locked, so Approve and Reject on one tool can no longer race each other or a server approval, and Reject is no longer live in the gap before a force confirmation presents. - "Quarantine to Review Again…" is disabled while an approval is in flight or its force confirmation is pending.
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 38119981129 --repo smart-mcp-proxy/mcpproxy-go
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 11, 2026
Dumbris
added a commit
that referenced
this pull request
Oct 12, 2026
…1566) The review payload carries a per-tool current_hash (server, tool, definition and the four safety hints; the rug-pull hash is unchanged). security/approve and tools/approve (tools and approve_all) accept expected_hashes; a mismatch returns 409 review_out_of_date and writes nothing. Server approval runs as one config commit under the approval lock (validate, baseline marker, integrity baseline and blocks, promote present pending tools, clear quarantine); tools appearing later stay pending. Coexists with Spec 116 PR2's expected_incarnation (409 server_replaced checked first). Web review screen, CLI review approve (incl. --from-review) and the macOS tray (#1572) send the binding. Live: on main a stale approve activated a definition that had turned destructive; with the fix every stale case returns 409 with 0 upstream calls. OpenCode gpt-6.1-sol VERDICT: PASS at 883b329 (round 4) and resync PASS at c0866fb. Fixes #1566
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the macOS tray half of the UX-02 review findings (#1569). The changes were written on the now-closed #1555 and are ported here onto
main, which has not touchednative/since that branch point.ReviewSheetis keyed by server, and review loads are numbered. A late response for server A can no longer fill the sheet while the operator is approving server B.ReviewTooldecodescurrent_hash.securityApproveServerandapproveSpecificToolssendexpected_hashes, the same contract as the CLI and Web on fix: serialize per-server tool-approval writes so baselines and approvals are complete (UX-02) #1555. The request is unbound only when no reviewed tool has a hash, and an empty review binds to the empty snapshot. A 409 "out of date" reloads the review and shows the core's message instead of opening the force dialog.Compatibility
The binding is inert on today's core.
mainreports nocurrent_hash, and both approve handlers ignore unknown body fields, so requests behave as before. It takes effect when the backend contract in #1566 lands.Test plan
swift test(native/macos/MCPProxy): 1746 tests, 0 failures. New coverage is inApproveServerPathTestsandReviewPresentationTests.APIClient. Security approve and tools approve both returned 409 "out of date" after a definition changed, and nothing was approved. Fresh hashes then approved.Closes #1569
🤖 Generated with Claude Code