From c9e13d65831efc4ce19045658d632877d47bfb74 Mon Sep 17 00:00:00 2001 From: viettranx Date: Thu, 16 Apr 2026 15:27:19 +0700 Subject: [PATCH] feat(ui): compact hook overview metadata into inline single-card layout --- .../hooks/components/hook-overview-tab.tsx | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/ui/web/src/pages/hooks/components/hook-overview-tab.tsx b/ui/web/src/pages/hooks/components/hook-overview-tab.tsx index ccf76b24..5e183cbd 100644 --- a/ui/web/src/pages/hooks/components/hook-overview-tab.tsx +++ b/ui/web/src/pages/hooks/components/hook-overview-tab.tsx @@ -27,10 +27,10 @@ const EVENT_COLORS: Record = { function MetaItem({ label, children }: { label: string; children: React.ReactNode }) { return ( -
-

{label}

-
{children}
-
+ + {label} + {children} + ); } @@ -40,9 +40,9 @@ export function HookOverviewTab({ hook }: HookOverviewTabProps) { const scriptSource = hook.handler_type === "script" ? ((cfg?.source as string) ?? "") : ""; return ( -
- {/* Header card — primary identity + status */} -
+
+ {/* Header card — identity + status + metadata (compact) */} +
{hook.matcher && ( -
+

{t("table.matcher")}

{hook.matcher}
)} {hook.if_expr && ( -
+

{t("form.ifExpr")}

{hook.if_expr}
)} -
- {/* Metadata grid */} -
-
+ {/* Inline metadata */} +
{hook.timeout_ms}ms + | - {hook.on_timeout} + {hook.on_timeout} + | {hook.priority} + | - {hook.source} + {hook.source} - - v{hook.version} + | + + {hook.version} + | {new Date(hook.created_at).toLocaleString()} + | {new Date(hook.updated_at).toLocaleString()}