Skip to content

XS⚠️ ◾ Simplify MCP tools permission prompt copy#995

Open
tomek-i wants to merge 1 commit into
mainfrom
968-simplify-mcp-permission-prompt-copy
Open

XS⚠️ ◾ Simplify MCP tools permission prompt copy#995
tomek-i wants to merge 1 commit into
mainfrom
968-simplify-mcp-permission-prompt-copy

Conversation

@tomek-i

@tomek-i tomek-i commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

The MCP tools permission dialog (ApprovalDialog.tsx) explained itself with a two-clause description plus a full sentence for each of the three response options, making it slower to scan than it needs to be. This trims the copy to short, plain language that states what YakShaver wants, why, and what happens if you don't allow it — matching the terser tone already used by the sibling screen-recording permission dialog.

Closes #968

What changed

File Change
src/ui/src/components/workflow/ApprovalDialog.tsx Shortened the dialog description, the bespoke capture_video_frame purpose copy, and the three option bullets (Allow / Allow Always / Review-Correct); removed the now-unused toolLabel variable that only existed to repeat the tool name in each bullet.

Before / after

Description (generic tool with a server):

  • Before: To keep working on your task, YakShaver needs to use the "X" tool (from Y). It only runs when you say it's OK.
  • After: YakShaver needs to use "X" (from Y) to keep going.

capture_video_frame purpose:

  • Before: YakShaver wants to capture a still frame from your screen recording so it can see what you're pointing at and keep working on your task accurately. It only runs when you say it's OK.
  • After: YakShaver wants to grab a frame from your recording, so it can see what you're pointing at.

Option bullets:

  • Before: Allow — let YakShaver use "X" this one time. / Allow Always — let YakShaver use "X" now and skip this prompt next time. / Review / Correct… — don't run "X" as-is. You can leave a note telling YakShaver what to change and try again, or stop the step entirely.
  • After: Allow — use it this once. / Allow Always — use it now and don't ask again. / Review / Correct… — don't run it yet. Tell YakShaver what to change, or stop this step.

The tool name still appears once, prominently, in the dialog title (Can YakShaver use "X"?), so repeating it in every bullet was redundant rather than clarifying.

Decisions

  • Decision: Keep the three existing actions (Allow / Allow Always / Review-Correct) rather than restructuring the interaction model.
    • Why: The issue asks for simpler wording, not a different set of choices; the three actions are functionally necessary (one-time allow, whitelist, and a correction/deny path).
    • Alternatives considered: Collapsing "Review / Correct…" and "Don't Allow" into a single explicit "Deny" bullet — kept as-is since the existing flow (open a correction form with both "Don't Allow" and "Send correction") is unchanged and out of scope for a copy-only issue.
  • Decision: Drop the recurring "It only runs when you say it's OK" reassurance from the description.
    • Why: It's redundant — the entire dialog's existence already communicates that nothing runs without a decision. Removing it shortens the description without losing information (AC1/AC3 — the per-option bullets already state what each button does).

Acceptance criteria

  • Criterion 1 (shorter, easier to understand) — description and bullets condensed to short clauses/phrases instead of full sentences.
  • Criterion 2 (explains why permission is needed) — description keeps a plain "why" (e.g. "to keep going", "so it can see what you're pointing at").
  • Criterion 3 (impact of denying is clear) — the "Review / Correct…" bullet explicitly states the tool won't run yet and the step can be stopped.
  • Criterion 4 (consistent tone of voice) — matches the short, plain style already used by MacScreenRecordingPermissionDialog ("YakShaver needs permission to record your screen.").

Testing

  • Unit tests added/updated — none needed; no test file exists for ApprovalDialog.tsx (pure copy change, no logic/behavior change) and no existing test asserts the old copy strings.
  • Integration tests added/updated — n/a
  • Manual testing performed — read through the rendered JSX structure and Tailwind classes; the dialog container is max-w-lg, and the new copy is shorter than before, so there's no truncation/layout risk.
  • Build passes
  • Tests pass
  • Lint / format clean

Ran the full validation suite in the worktree:

  • npm run build — clean (tsc, no errors).
  • npm rebuild better-sqlite3 --build-from-source && npx vitest run --reporter=verbose --exclude 'src/ui/**' — 68 test files / 696 tests passed.
  • npm --prefix src/ui install && npm --prefix src/ui test — 35 test files / 261 tests passed.
  • npm run lint — clean (one pre-existing, unrelated info-level suggestion in Cloud360LiveView.tsx, not touched by this change).

Screenshots

No screenshot captured (headless worktree without a display); the diff is copy-only within the existing dialog layout — see the before/after text above.

Follow-up items

  • No dedicated test coverage exists for ApprovalDialog.tsx's copy/behavior; adding a lightweight render test (e.g. asserting the title/description render for a couple of tool-name shapes) would guard future copy regressions but is out of scope for this copy-only PR.

🤖 Generated with Claude Code

The dialog explaining each MCP tool request was verbose: a two-clause
description plus a full-sentence explanation of each of the three
buttons. Trim it to short, scannable copy that states what YakShaver
wants and why, and makes clear what happens if you don't allow it,
matching the terser tone used elsewhere (e.g. the screen recording
permission dialog).

Relates to #968
Copilot AI review requested due to automatic review settings July 21, 2026 15:13
@tomek-i tomek-i added the armada Eligible for the ARMADA fleet to pick up label Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Metrics

Thanks for keeping your pull request small.
⚠️ Consider adding additional tests.

Lines
Product Code 13
Test Code -
Subtotal 13
Ignored Code -
Total 13

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@github-actions github-actions Bot changed the title Simplify MCP tools permission prompt copy XS⚠️ ◾ Simplify MCP tools permission prompt copy Jul 21, 2026
@tomek-i

tomek-i commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Skipped the automatic walkthrough recording (config: logbook: "all") for this PR.

Reason: this change is a plain-text copy edit inside ApprovalDialog.tsx — no new workflow, route, or interaction. The dialog itself only appears in response to a live backend tool_approval IPC event (there's no URL/route that surfaces it directly), and the repo's saved staging recipe (.armada/logbook/staging.json) only reaches / with no scripted trigger for that event. Toolchain preflight was otherwise fine (ffmpeg ready, Playwright capture ready, TTS degraded to captions — an expired/invalid ELEVENLABS_API_KEY), so the gap is staging reachability, not tooling.

Wiring up a scripted trigger for a tool-approval prompt (e.g. a debug IPC hook) would be a reasonable follow-up if walkthroughs of permission-dialog copy become valuable, but doing so here would mean modifying the app just to make it recordable, which is out of scope for a copy-only PR. Before/after copy is documented in the PR description instead.

Copilot AI 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.

Pull request overview

This PR simplifies the user-facing copy in the MCP tools permission dialog to make it shorter and more scannable, aligning with the tone used by similar permission prompts.

Changes:

  • Shortened the generic dialog description and the bespoke capture_video_frame purpose text.
  • Condensed the three option bullets (Allow / Allow Always / Review-Correct).
  • Removed the redundant toolLabel variable used only for repeating the tool name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 185 to 197
{!showCorrectionForm && (
<ul className="space-y-1.5 text-sm text-white/70">
<li>
<span className="font-medium text-white/90">Allow</span> &mdash; let YakShaver use{" "}
{`"${toolLabel}"`} this one time.
<span className="font-medium text-white/90">Allow</span> &mdash; use it this once.
</li>
<li>
<span className="font-medium text-white/90">Allow Always</span> &mdash; let YakShaver
use {`"${toolLabel}"`} now and skip this prompt next time.
<span className="font-medium text-white/90">Allow Always</span> &mdash; use it now and
don't ask again.
</li>
<li>
<span className="font-medium text-white/90">Review / Correct&hellip;</span> &mdash;
don't run {`"${toolLabel}"`} as-is. You can leave a note telling YakShaver what to
change and try again, or stop the step entirely.
don't run it yet. Tell YakShaver what to change, or stop this step.
</li>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Pre-release build is available for this PR:
https://github.com/SSWConsulting/SSW.YakShaver.Desktop/releases/tag/0.6.0-beta.995.1784646818

@tomek-i tomek-i added the armada:reviewing Claimed by crows-nest; review->merge pipeline running label Jul 22, 2026
@tomek-i

tomek-i commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

🔭 crows-nest: ready-PR pipeline started — review → address → re-validate → gated merge.

@tomek-i

tomek-i commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

🔍 muster review — PR #995

Lenses: code-review ✅ · codex-rescue ⚠️ unavailable (agent type codex:codex-rescue not present in this environment)
Review status: ⚠️ degraded (single-lens) — a missing second lens is not treated as a green light

Findings

None. The code-review lens found the diff clean: copy-only change, the unused toolLabel variable and all three of its usages were removed atomically, no dangling references, JSX text apostrophes need no escaping, and no other files needed changes.

Summary: blocking: 0 · major: 0 · minor: 0 · nit: 0


🔭 crows-nest: merge-gate decision = blocked — reason: review degraded (a lens failed) — a missing review is not a green light. This is an environment limitation (the codex-rescue second-opinion lens isn't installed here), not a finding against the code itself — CI is green and the PR is mergeable. A human reviewer's sign-off (or a second automated pass once codex-rescue is available) can clear this.

@tomek-i tomek-i added armada:blocked ARMADA could not finish; needs a human and removed armada:reviewing Claimed by crows-nest; review->merge pipeline running labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

armada:blocked ARMADA could not finish; needs a human armada Eligible for the ARMADA fleet to pick up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ MCP tools permission prompt - Simplify wording to be less verbose and easier to understand

2 participants