From 07abc600219ad275f2e082a4bcd0804468171bf8 Mon Sep 17 00:00:00 2001 From: Trae User Date: Wed, 16 Sep 2026 22:20:23 +0800 Subject: [PATCH] fix(web): restore AskUserQuestion picker styling --- web/src/components/QuestionPicker.jsx | 26 +++++++++--------------- web/src/lib/questionPickerLayout.test.js | 5 +++++ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/web/src/components/QuestionPicker.jsx b/web/src/components/QuestionPicker.jsx index ae760828..22fd1e8e 100644 --- a/web/src/components/QuestionPicker.jsx +++ b/web/src/components/QuestionPicker.jsx @@ -340,15 +340,9 @@ export function QuestionPicker({ request, onResolve, originLabel = '' }) { tabIndex={-1} onKeyDown={onKeyDown} aria-label="AskUserQuestion" - className="mx-2.5 mb-2 shrink min-h-0 rounded-lg border border-border bg-surface outline-none overflow-hidden flex flex-col" - + className="mb-2 shrink min-h-0 rounded-[14px] border border-border bg-surface ace-shadow-lg outline-none overflow-hidden flex flex-col" > -
- +
{originLabel && (
@@ -357,7 +351,7 @@ export function QuestionPicker({ request, onResolve, originLabel = '' }) { )} {!collapsed && (
{question.text} @@ -409,7 +403,7 @@ export function QuestionPicker({ request, onResolve, originLabel = '' }) { {collapsed ? null : ( <> -
+
{question.options.map((opt, index) => { const selected = answer.selected?.includes(opt.value); const focused = activeOptionIndex === index; @@ -433,7 +427,7 @@ export function QuestionPicker({ request, onResolve, originLabel = '' }) { }} style={SELECTABLE_OPTION_STYLE} className={clsx( - 'group flex items-center gap-2 rounded-md px-2 py-1.5 cursor-pointer transition', + 'group flex items-center gap-3 rounded-lg px-3 py-2.5 cursor-pointer transition', selected ? 'bg-accent-bg border border-accent text-accent' : focused @@ -444,7 +438,7 @@ export function QuestionPicker({ request, onResolve, originLabel = '' }) { > - + {opt.label} {opt.recommended && ( @@ -502,7 +496,7 @@ export function QuestionPicker({ request, onResolve, originLabel = '' }) {
]*aria-hidden="true">[\s\S]*?M20 15a3/); +assert.match(picker, /min-h-11 shrink-0 px-4 py-2/); +assert.match(picker, /group flex items-center gap-3 rounded-lg px-3 py-2\.5/); assert.match(toolBlock, /const isAskUserQuestionResult = askUserQuestionResult/); assert.match(toolBlock, /translate\('用户已取消回答'\)/);