From e6c49ef4ed25b1e0dd9806a1c75a29eb47d8bf61 Mon Sep 17 00:00:00 2001 From: armada-lookout Date: Tue, 21 Jul 2026 15:12:50 +0000 Subject: [PATCH] Simplify MCP tools permission prompt copy 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 --- .../components/workflow/ApprovalDialog.tsx | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/ui/src/components/workflow/ApprovalDialog.tsx b/src/ui/src/components/workflow/ApprovalDialog.tsx index fcf0b8f1..810c5e47 100644 --- a/src/ui/src/components/workflow/ApprovalDialog.tsx +++ b/src/ui/src/components/workflow/ApprovalDialog.tsx @@ -42,8 +42,9 @@ function getServiceIcon(serverName: string | null): ReactElement { /** * Plain-language explanations of why specific tools are needed, so non-technical - * users can make an informed choice (issue #783 AC2). Returns null for tools - * without a bespoke explanation, in which case the generic description is used. + * users can make an informed choice (issue #783 AC2, shortened further per #968). + * Returns null for tools without a bespoke explanation, in which case the generic + * description is used. * * Keyed on the raw, unformatted tool id (the segment after any server prefix) via * the shared {@link splitToolName} so it survives both MCP separators ("__" and "."). @@ -51,7 +52,7 @@ function getServiceIcon(serverName: string | null): ReactElement { function getToolPurpose(rawToolName: string): string | null { switch (splitToolName(rawToolName).tool) { case "capture_video_frame": - return "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."; + return "YakShaver wants to grab a frame from your recording, so it can see what you're pointing at."; default: return null; } @@ -154,20 +155,20 @@ export function ApprovalDialog({ request, onSubmit, error: pError }: ApprovalDia const isOpen = true; const readableToolInfo = toolName ? parseToolName(toolName) : null; - const toolLabel = readableToolInfo?.tool ?? "an action"; const dialogTitle = readableToolInfo ? `Can YakShaver use "${readableToolInfo.tool}"?` : "Can YakShaver perform this action?"; // Some tools have a clear, user-facing purpose that non-technical users benefit - // from understanding (issue #783 AC2). Keyed on the raw, unformatted tool id so it - // survives both MCP separators ("__" and ".") and any display-label changes. + // from understanding (issue #783 AC2, shortened further per #968). Keyed on the raw, + // unformatted tool id so it survives both MCP separators ("__" and ".") and any + // display-label changes. const toolPurpose = toolName ? getToolPurpose(toolName) : null; const dialogDescription = toolPurpose ?? (readableToolInfo?.server - ? `To keep working on your task, YakShaver needs to use the "${readableToolInfo.tool}" tool (from ${readableToolInfo.server}). It only runs when you say it's OK.` - : `To keep working on your task, YakShaver needs to perform an action. It only runs when you say it's OK.`); + ? `YakShaver needs to use "${readableToolInfo.tool}" (from ${readableToolInfo.server}) to keep going.` + : `YakShaver needs to perform an action to keep going.`); return ( @@ -184,17 +185,15 @@ export function ApprovalDialog({ request, onSubmit, error: pError }: ApprovalDia {!showCorrectionForm && ( )}