Skip to content

bug(tray): macOS review sheet keeps state across servers, captures approval late, and sends no expected_hashes #1569

Closed

Description

@Dumbris

Problem

The macOS tray review UI (native/macos/MCPProxy/MCPProxy/Views/ReviewQueueView.swift) has the same class of problems as the Web review screen, plus it cannot bind approvals to the reviewed definitions:

  • ReviewSheet (:13) keeps SwiftUI identity when .showReview selects another server, so its review, selections and pending force decision survive A -> B; .task { await load() } (:242) is not keyed by server and load() (:282) has no server/order guard, so a late A response can populate the sheet while approval targets B. Matching tool definitions on A and B make a hash check useless: the guard needs server identity.
  • approve(force:) (:292) and per-tool approve read the decision inside the spawned Task, so a review refresh landing between the click and the Task approves the new definitions/selection instead of what was clicked.
  • Force confirmation is not tied to the request that failed: clicking selective approve then Approve All overwrites the pending decision, so the force retry repeats the wrong one.
  • Tray approvals send no expected_hashes (the field does not exist on main yet; see the backend contract issue). Evidence in the closed UX-02 branch notes that a session task "Send expected_hashes from macOS tray approvals" was filed; no GitHub issue or PR for it exists (searched expected_hashes), so this issue tracks it.

Suggested direction

Key the sheet by server id (.id(server)) and reset state on change; add a load generation; capture the full decision (block list + hashes) synchronously in the button action; bind force confirmation to the attempt; after the backend contract lands, send expected_hashes from APIClient.

Where Sol found it

ux02-r4-B.txt #1-#2, ux02-r5-chunk3.txt #1.

Related: #1566


Found by OpenCode Sol 6.1 cross-model review of the (now split) oversized PRs #1553 (UX-01) and #1555 (UX-02); verified still present on origin/main (704795c) by reading the cited sites. Pre-existing, deliberately out of scope of the minimal core PRs. Review transcripts: docs/qa/0.70.0-ux-2026-10-10/remediation/reviews/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/traykind/bugpriority/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions