From 3349c0259597b5cce33ddf8b739e3289a235baf3 Mon Sep 17 00:00:00 2001
From: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Date: Thu, 23 Oct 2025 20:25:57 -0500
Subject: [PATCH] feat: improve auto-approve button responsiveness (#8798)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Add responsive breakpoint at 300px for compact view
- Icon correctly reflects state (X when off, ✓ when on) at all screen sizes
- Show abbreviated labels on very narrow screens (< 300px)
- Add triggerLabelOffShort translation key to all locales
Fixes issues from PR #8152:
- Icon always showing checkmark on narrow screens
- Breakpoint activating too early (was 400px)
- Incorrect Tailwind class ordering
---
webview-ui/src/components/chat/AutoApproveDropdown.tsx | 10 +++++++++-
webview-ui/src/i18n/locales/ca/chat.json | 1 +
webview-ui/src/i18n/locales/de/chat.json | 1 +
webview-ui/src/i18n/locales/en/chat.json | 1 +
webview-ui/src/i18n/locales/es/chat.json | 1 +
webview-ui/src/i18n/locales/fr/chat.json | 1 +
webview-ui/src/i18n/locales/hi/chat.json | 1 +
webview-ui/src/i18n/locales/id/chat.json | 1 +
webview-ui/src/i18n/locales/it/chat.json | 1 +
webview-ui/src/i18n/locales/ja/chat.json | 1 +
webview-ui/src/i18n/locales/ko/chat.json | 1 +
webview-ui/src/i18n/locales/nl/chat.json | 1 +
webview-ui/src/i18n/locales/pl/chat.json | 1 +
webview-ui/src/i18n/locales/pt-BR/chat.json | 1 +
webview-ui/src/i18n/locales/ru/chat.json | 1 +
webview-ui/src/i18n/locales/tr/chat.json | 1 +
webview-ui/src/i18n/locales/vi/chat.json | 1 +
webview-ui/src/i18n/locales/zh-CN/chat.json | 1 +
webview-ui/src/i18n/locales/zh-TW/chat.json | 1 +
19 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/webview-ui/src/components/chat/AutoApproveDropdown.tsx b/webview-ui/src/components/chat/AutoApproveDropdown.tsx
index 08e4a90f6b..1fbe8cc0db 100644
--- a/webview-ui/src/components/chat/AutoApproveDropdown.tsx
+++ b/webview-ui/src/components/chat/AutoApproveDropdown.tsx
@@ -173,6 +173,7 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
"inline-flex items-center gap-1.5 relative whitespace-nowrap px-1.5 py-1 text-xs",
"bg-transparent border border-[rgba(255,255,255,0.08)] rounded-md text-vscode-foreground",
"transition-all duration-150 focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder focus-visible:ring-inset",
+ "max-[300px]:shrink-0",
disabled
? "opacity-50 cursor-not-allowed"
: "opacity-90 hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)] cursor-pointer",
@@ -184,13 +185,20 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
)}
-
+
{!effectiveAutoApprovalEnabled
? t("chat:autoApprove.triggerLabelOff")
: enabledCount === totalCount
? t("chat:autoApprove.triggerLabelAll")
: t("chat:autoApprove.triggerLabel", { count: enabledCount })}
+
+ {!effectiveAutoApprovalEnabled
+ ? t("chat:autoApprove.triggerLabelOffShort")
+ : enabledCount === totalCount
+ ? t("chat:autoApprove.triggerLabelAll")
+ : enabledCount}
+