Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ function CloudStatusIcon({
const link = meta && threadUrl ? threadUrl : undefined;
const ariaLabel = link ? `Open ${sourceLabel} thread` : undefined;

if (taskRunStatus === "queued" || taskRunStatus === "in_progress") {
if (taskRunStatus === "queued") {
return (
<Tooltip
content={
link ? `Open ${sourceLabel} thread` : `${sourceLabel} (running)`
link ? `Open ${sourceLabel} thread` : `${sourceLabel} (queued)`
}
side="right"
>
Expand All @@ -120,6 +120,22 @@ function CloudStatusIcon({
</Tooltip>
);
}
if (taskRunStatus === "in_progress") {
return (
<Tooltip
content={
link ? `Open ${sourceLabel} thread` : `${sourceLabel} (running)`
}
side="right"
>
{renderIconSpan({
icon: <Icon size={size} weight="fill" color="var(--accent-11)" />,
link,
ariaLabel,
})}
</Tooltip>
);
}
if (taskRunStatus === "completed") {
return (
<Tooltip
Expand Down Expand Up @@ -288,16 +304,6 @@ export function TaskIcon({
if (isGenerating) {
return <DotsCircleSpinner size={size} className="text-accent-11" />;
}
if (isCloudTask) {
return (
<CloudStatusIcon
taskRunStatus={taskRunStatus}
originProduct={originProduct}
threadUrl={slackThreadUrl}
size={size}
/>
);
}
if (isSuspended) {
return (
<Tooltip content="Suspended" side="right">
Expand All @@ -320,6 +326,16 @@ export function TaskIcon({
if (isPinned) {
return <PushPin size={size} color="var(--accent-11)" />;
}
if (isCloudTask) {
return (
<CloudStatusIcon
taskRunStatus={taskRunStatus}
originProduct={originProduct}
threadUrl={slackThreadUrl}
size={size}
/>
);
}
if (originProductMeta) {
const { Icon, label } = originProductMeta;
const link = slackThreadUrl;
Expand Down
Loading