TypeScript
fix(web): hovering a thread automation shows its full title and schedule (#18144)
Tristan Manchester48745ffba50d
diff --git a/apps/web/src/components/chat/ThreadAutomationsPanel.tsx b/apps/web/src/components/chat/ThreadAutomationsPanel.tsxindex 94f6ff5b663..28fb297b352 100644--- a/apps/web/src/components/chat/ThreadAutomationsPanel.tsx+++ b/apps/web/src/components/chat/ThreadAutomationsPanel.tsx@@ -37,6 +37,24 @@ const STATUS_DOT_CLASS: Record<ScheduledTask["lastRunStatus"], string> = {failed: "bg-destructive",};+function taskScheduleLine(task: ScheduledTask) {+ return (+ <>+ {scheduleLabel(task.schedule)}+ {task.enabled && task.nextRunAt !== null ? (+ <>+ {" · next "}+ <ScheduledRelativeLabel value={task.nextRunAt} />+ </>+ ) : task.enabled ? (+ ""+ ) : (+ " · paused"+ )}+ </>+ );+}+export function ThreadAutomationsPanel(props: {readonly environmentId: EnvironmentId;readonly threadId: ThreadId;@@ -162,24 +180,18 @@ export function ThreadAutomationsPanel(props: {aria-hidden/></span>- <div className="min-w-0 flex-1">- <span className="block truncate text-sm font-medium text-foreground/80">- {task.title}- </span>- <p className="truncate text-2xs text-muted-foreground">- {scheduleLabel(task.schedule)}- {task.enabled && task.nextRunAt !== null ? (- <>- {" · next "}- <ScheduledRelativeLabel value={task.nextRunAt} />- </>- ) : task.enabled ? (- ""- ) : (- " · paused"- )}- </p>- </div>+ <Tooltip>+ <TooltipTrigger render={<div className="min-w-0 flex-1" />}>+ <span className="block truncate text-sm font-medium text-foreground/80">+ {task.title}+ </span>+ <p className="truncate text-2xs text-muted-foreground">{taskScheduleLine(task)}</p>+ </TooltipTrigger>+ <TooltipPopup side="left">+ <p className="font-medium">{task.title}</p>+ <p className="text-muted-foreground">{taskScheduleLine(task)}</p>+ </TooltipPopup>+ </Tooltip><Tooltip><TooltipTriggerrender={