From 85a3ff13723feb7d6f3ce02ca31db39fcef3f7ac Mon Sep 17 00:00:00 2001 From: chengyongru <2755839590@qq.com> Date: Mon, 15 Jun 2026 20:29:18 +0800 Subject: [PATCH] fix(webui): smooth automation detail overflow --- .../src/components/settings/SettingsView.tsx | 62 +++++++++++++-- webui/src/i18n/locales/en/common.json | 6 ++ webui/src/i18n/locales/es/common.json | 6 ++ webui/src/i18n/locales/fr/common.json | 6 ++ webui/src/i18n/locales/id/common.json | 6 ++ webui/src/i18n/locales/ja/common.json | 6 ++ webui/src/i18n/locales/ko/common.json | 6 ++ webui/src/i18n/locales/vi/common.json | 6 ++ webui/src/i18n/locales/zh-CN/common.json | 6 ++ webui/src/i18n/locales/zh-TW/common.json | 6 ++ webui/src/tests/app-layout.test.tsx | 77 +++++++++++++++++++ 11 files changed, 188 insertions(+), 5 deletions(-) diff --git a/webui/src/components/settings/SettingsView.tsx b/webui/src/components/settings/SettingsView.tsx index 2e44d4df..e5726167 100644 --- a/webui/src/components/settings/SettingsView.tsx +++ b/webui/src/components/settings/SettingsView.tsx @@ -3710,6 +3710,14 @@ function AutomationDetailPanel({ const updated = job.updated_at_ms ? fmtDateTime(job.updated_at_ms, locale) : null; const message = job.payload.message || tx("settings.automations.systemTask", "System-managed automation"); const schedule = formatAutomationSchedule(job, locale, tx); + const [messageExpanded, setMessageExpanded] = useState(false); + const [historyExpanded, setHistoryExpanded] = useState(false); + const messageNeedsExpansion = automationMessageNeedsExpansion(message); + + useEffect(() => { + setMessageExpanded(false); + setHistoryExpanded(false); + }, [job.id]); return (
@@ -3745,9 +3753,25 @@ function AutomationDetailPanel({
{tx("settings.automations.fields.message", "Message")}
-
+
{message}
+ {messageNeedsExpansion ? ( + + ) : null}
@@ -3800,7 +3824,13 @@ function AutomationDetailPanel({
) : null} - +