From 6809fa13afec0d27c7e597137bdf655e9e717e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 16 Apr 2026 23:12:57 -0400 Subject: [PATCH] polish: reformat AutomationActivityLog JSX; InlineNotice alert role for actionable warns (P1-20, P3-63) --- .../components/automation/AutomationPanel.tsx | 37 ++++++++++++++++--- src/renderer/components/ui/feedback.tsx | 3 +- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/automation/AutomationPanel.tsx b/src/renderer/components/automation/AutomationPanel.tsx index c91a7a70..b13e331d 100644 --- a/src/renderer/components/automation/AutomationPanel.tsx +++ b/src/renderer/components/automation/AutomationPanel.tsx @@ -12,12 +12,39 @@ import { WorkflowCard } from "./WorkflowList" import { WorkflowFormModal } from "./WorkflowEditor" function AutomationActivityLog({ entries }: { entries: AutomationLogEntry[] }) { - if (entries.length === 0) return
No activity yet
+ if (entries.length === 0) { + return
No activity yet
+ } return ( -
{entries.map((entry, idx) => { - const ti = triggerConfig[entry.trigger as AutomationTrigger]; const ai = actionConfig[entry.action as AutomationAction]; const TIcon = ti?.icon ?? Lightning - return
{entry.ruleName}
{ti?.label ?? entry.trigger}{ai?.label ?? entry.action}
{timeAgo(entry.executedAt)}
- })}
+
+ {entries.map((entry, idx) => { + const ti = triggerConfig[entry.trigger as AutomationTrigger] + const ai = actionConfig[entry.action as AutomationAction] + const TIcon = ti?.icon ?? Lightning + return ( + + +
+
+ {entry.ruleName} +
+
+ {ti?.label ?? entry.trigger} + + {ai?.label ?? entry.action} +
+
+ {timeAgo(entry.executedAt)} +
+ ) + })} +
) } diff --git a/src/renderer/components/ui/feedback.tsx b/src/renderer/components/ui/feedback.tsx index 4ef0c8f6..113042b8 100644 --- a/src/renderer/components/ui/feedback.tsx +++ b/src/renderer/components/ui/feedback.tsx @@ -61,8 +61,9 @@ export function InlineNotice({ : tone === "warn" ? "border-warning bg-warning-muted text-warning" : "border-destructive bg-destructive-muted text-destructive"; + const role = tone === "danger" || (tone === "warn" && action) ? "alert" : "status"; return ( -
+
{action ? (
{message}