feat(webui): show pulsing running dot on busy thread-list rows
This commit is contained in:
@@ -34,12 +34,14 @@ import { cn } from "@/lib/utils";
|
||||
import type { ThreadItem } from "@/app/hooks/useThreads";
|
||||
import {
|
||||
useThreads,
|
||||
useRunningThreadIds,
|
||||
deleteThread,
|
||||
renameThread,
|
||||
pinThread,
|
||||
exportThread,
|
||||
} from "@/app/hooks/useThreads";
|
||||
import { useMemoryActivity } from "@/app/hooks/useMemoryActivity";
|
||||
import { RunningDot } from "@/app/components/RunningDot";
|
||||
import { autoApprovesTools, getThreadReviewMode } from "@/lib/reviewMode";
|
||||
import {
|
||||
Dialog,
|
||||
@@ -174,6 +176,7 @@ export function ThreadList({
|
||||
status: statusFilter === "all" ? undefined : statusFilter,
|
||||
limit: 20,
|
||||
});
|
||||
const runningIds = useRunningThreadIds();
|
||||
|
||||
// Dedupe by id, keeping the first occurrence — page 0 wins, so the freshest
|
||||
// `updated_at` survives. Without this, a thread whose `updated_at` advances
|
||||
@@ -497,6 +500,9 @@ export function ThreadList({
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)}
|
||||
{runningIds.has(thread.id) && (
|
||||
<RunningDot label={t("running")} />
|
||||
)}
|
||||
<span className="truncate">{thread.title}</span>
|
||||
</h3>
|
||||
<span className="ml-2 flex-shrink-0 text-xs tabular-nums text-muted-foreground">
|
||||
@@ -808,9 +814,7 @@ export function ThreadList({
|
||||
search.trim() &&
|
||||
filtered.length === 0 && (
|
||||
<div className="flex flex-col items-center justify-center p-8 text-center">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{t("noMatch")}
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">{t("noMatch")}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ export default {
|
||||
filterAttention: "Attention",
|
||||
filterInterrupted: "Interrupted",
|
||||
filterError: "Error",
|
||||
running: "Running",
|
||||
closeNavigation: "Close navigation",
|
||||
closeResearch: "Close research",
|
||||
loadFailed: "Failed to load research",
|
||||
|
||||
@@ -18,6 +18,7 @@ export default {
|
||||
filterAttention: "需要注意",
|
||||
filterInterrupted: "已中断",
|
||||
filterError: "错误",
|
||||
running: "正在执行",
|
||||
closeNavigation: "关闭导航",
|
||||
closeResearch: "关闭研究",
|
||||
loadFailed: "加载研究失败",
|
||||
|
||||
Reference in New Issue
Block a user