Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Show Assistant live wait duration
rcourtman729878b993af
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.jsonindex 3d9eec12cd..fdb40f8f95 100644--- a/docs/release-control/v6/internal/status.json+++ b/docs/release-control/v6/internal/status.json@@ -2981,7 +2981,8 @@"--","--run","src/components/AI/Chat/__tests__/useChat.test.ts",- "src/components/AI/Chat/__tests__/MessageItem.test.tsx"+ "src/components/AI/Chat/__tests__/MessageItem.test.tsx",+ "src/components/AI/Chat/__tests__/activeTurnStatus.test.ts"]},{diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex d317104f80..619ff121a3 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -203,7 +203,10 @@ runtime cost control, and shared AI transport surfaces.`workflow_state` replaces the active status immediately instead of waitingbehind a dwell queue. Once visible assistant text, tool progress, approvals,or questions begin, stale workflow text must clear so the row does not keep- saying it is waiting on a phase that has already been superseded.+ saying it is waiting on a phase that has already been superseded. Live+ workflow and pending-tool activity must retain a per-state start timestamp+ so the drawer can show elapsed wait/run time for long provider starts and+ tool calls instead of repeating a timeless waiting label.OpenCode-parity Assistant UX work must reference OpenCode's actual sourceimplementation for message parts, tool-state mutation, progress rendering,and model/session selection before changing Pulse behavior; parity means@@ -236,7 +239,9 @@ runtime cost control, and shared AI transport surfaces.When multiple governed tools are pending, completed tools must not blank thestatus while another tool is still running, and the status heartbeat shouldfollow the latest progressed pending tool without reordering the transcript's- chronological tool rows.+ chronological tool rows. Pulse adapts this with a mutable footer status and+ inline pending rows that show the current activity plus elapsed time while+ keeping large command output collapsed.The referenced OpenCode source at commit`f750deaa3e95098fdde5fb00305b273e43c5b2cd` mutates a single tool part from`pending` input through `running` progress to completed/error indiff --git a/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx b/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsxindex 0b101d6e94..c109f243f1 100644--- a/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx+++ b/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx@@ -1,4 +1,4 @@-import { Component, Show, createSignal, createMemo, For } from 'solid-js';+import { Component, Show, createSignal, createMemo, createEffect, onCleanup, For } from 'solid-js';import CheckCircleIcon from 'lucide-solid/icons/check-circle';import ClockIcon from 'lucide-solid/icons/clock';import LoaderCircleIcon from 'lucide-solid/icons/loader-circle';@@ -144,6 +144,7 @@ export const PendingToolBlock: Component<PendingToolBlockProps> = (props) => {const toolLabel = createMemo(() => getToolLabel(props.tool.name));const inputSummary = createMemo(() => parseToolInputSummary(props.tool.input || ''));const status = createMemo(() => props.tool.status || 'pending');+ const [now, setNow] = createSignal(Date.now());const statusLabel = createMemo(() => {if (status() === 'waiting') return 'waiting';if (status() === 'running') return 'running';@@ -154,6 +155,17 @@ export const PendingToolBlock: Component<PendingToolBlockProps> = (props) => {if (status() === 'waiting') return 'h-3 w-3 shrink-0 text-amber-500 dark:text-amber-300';return 'h-3 w-3 shrink-0 animate-spin text-blue-500 dark:text-blue-400';});+ createEffect(() => {+ if (!props.tool.startedAt || status() === 'waiting') return;+ setNow(Date.now());+ const interval = window.setInterval(() => setNow(Date.now()), 1000);+ onCleanup(() => window.clearInterval(interval));+ });+ const elapsedLabel = createMemo(() => {+ if (!props.tool.startedAt || status() === 'waiting') return '';+ const elapsedSeconds = Math.max(0, Math.floor((now() - props.tool.startedAt) / 1000));+ return elapsedSeconds >= 2 ? `${elapsedSeconds}s` : '';+ });return (<div class="my-0.5 font-mono text-[11px] flex items-center gap-1.5 px-2 py-1 rounded bg-surface-alt border border-border">@@ -175,6 +187,9 @@ export const PendingToolBlock: Component<PendingToolBlockProps> = (props) => {</span></Show><span class="shrink-0 text-[10px] text-muted">{statusLabel()}</span>+ <Show when={elapsedLabel()}>+ <span class="shrink-0 text-[10px] text-muted">{elapsedLabel()}</span>+ </Show></div>);};diff --git a/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts b/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.tsindex 006d2b9358..b7c0a5cf67 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts+++ b/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts@@ -23,11 +23,12 @@ describe('getAssistantActiveTurnStatus', () => {});it('surfaces the current pending tool from active message state', () => {+ const startedAt = Date.now() - 5_000;expect(getAssistantActiveTurnStatus([assistantMessage({- pendingTools: [{ id: 'tool-1', name: 'pulse_get_nodes', input: '{}' }],+ pendingTools: [{ id: 'tool-1', name: 'pulse_get_nodes', input: '{}', startedAt }],}),],true,@@ -35,6 +36,29 @@ describe('getAssistantActiveTurnStatus', () => {).toEqual({type: 'tool',text: 'Running get nodes',+ startedAt,+ });+ });++ it('carries workflow start time so the live footer can show elapsed wait', () => {+ const startedAt = Date.now() - 8_000;+ expect(+ getAssistantActiveTurnStatus(+ [+ assistantMessage({+ workflowStatus: {+ phase: 'provider_start',+ message: 'Sent request to OpenRouter; waiting for the first token.',+ startedAt,+ },+ }),+ ],+ true,+ ),+ ).toEqual({+ type: 'thinking',+ text: 'Sent request to OpenRouter; waiting for the first token.',+ startedAt,});});diff --git a/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.ts b/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.tsindex fdbd157b46..0bb8f2ba8a 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.ts+++ b/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.ts@@ -1115,6 +1115,7 @@ describe('useChat', () => {input: '{}',rawInput: undefined,status: 'pending',+ startedAt: expect.any(Number),});dispose();});diff --git a/frontend-modern/src/components/AI/Chat/activeTurnStatus.ts b/frontend-modern/src/components/AI/Chat/activeTurnStatus.tsindex 88ba6473b9..110f366186 100644--- a/frontend-modern/src/components/AI/Chat/activeTurnStatus.ts+++ b/frontend-modern/src/components/AI/Chat/activeTurnStatus.ts@@ -6,6 +6,7 @@ export type AssistantActiveTurnStatusKind = 'thinking' | 'tool' | 'generating';export interface AssistantActiveTurnStatus {text: string;type: AssistantActiveTurnStatusKind;+ startedAt?: number;}const formatToolName = (name?: string) =>@@ -100,7 +101,7 @@ export const getAssistantActiveTurnStatus = (assistantMessage.pendingTools?.at(-1) || activePendingToolFromEvents(assistantMessage.streamEvents);const pendingToolText = formatPendingToolStatus(pendingTool);if (pendingToolText) {- return { type: 'tool', text: pendingToolText };+ return { type: 'tool', text: pendingToolText, startedAt: pendingTool?.startedAt };}const workflowStatusText = formatAssistantWorkflowStatus(assistantMessage.workflowStatus);@@ -108,6 +109,7 @@ export const getAssistantActiveTurnStatus = (return {type: assistantMessage.workflowStatus?.tool ? 'tool' : 'thinking',text: workflowStatusText,+ startedAt: assistantMessage.workflowStatus?.startedAt,};}diff --git a/frontend-modern/src/components/AI/Chat/hooks/useChat.ts b/frontend-modern/src/components/AI/Chat/hooks/useChat.tsindex 18ffd7ae2d..1e2193405f 100644--- a/frontend-modern/src/components/AI/Chat/hooks/useChat.ts+++ b/frontend-modern/src/components/AI/Chat/hooks/useChat.ts@@ -299,6 +299,7 @@ export function useChat(options: UseChatOptions = {}) {rawInput: data.raw_input || tool.rawInput,status,progress: progress || tool.progress,+ startedAt: tool.startedAt || Date.now(),});let resolvedTool: PendingTool | undefined;@@ -319,6 +320,7 @@ export function useChat(options: UseChatOptions = {}) {rawInput: data.raw_input,status,progress,+ startedAt: Date.now(),}),];@@ -691,6 +693,7 @@ export function useChat(options: UseChatOptions = {}) {input: data.input || '{}',rawInput: data.raw_input,status: 'pending',+ startedAt: Date.now(),};// Add to streamEvents in chronological positiondiff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsxindex e3059ac876..7dfd808b11 100644--- a/frontend-modern/src/components/AI/Chat/index.tsx+++ b/frontend-modern/src/components/AI/Chat/index.tsx@@ -1154,6 +1154,22 @@ export const AIChat: Component<AIChatProps> = (props) => {const currentStatus = createMemo(() =>getAssistantActiveTurnStatus(chat.messages(), chat.isLoading()),);+ const [currentStatusNow, setCurrentStatusNow] = createSignal(Date.now());+ createEffect(() => {+ const status = currentStatus();+ if (!status?.startedAt) return;+ setCurrentStatusNow(Date.now());+ const interval = window.setInterval(() => setCurrentStatusNow(Date.now()), 1000);+ onCleanup(() => window.clearInterval(interval));+ });+ const currentStatusText = createMemo(() => {+ const status = currentStatus();+ if (!status) return '';+ if (!status.startedAt) return status.text;+ const elapsedSeconds = Math.max(0, Math.floor((currentStatusNow() - status.startedAt) / 1000));+ if (elapsedSeconds < 2) return status.text;+ return `${status.text} (${elapsedSeconds}s)`;+ });createEffect(() => {input();@@ -2376,7 +2392,7 @@ export const AIChat: Component<AIChatProps> = (props) => {</div></Show>- <span class="min-w-0 truncate text-muted font-medium">{currentStatus()?.text}</span>+ <span class="min-w-0 truncate text-muted font-medium">{currentStatusText()}</span>{/* Subtle animated dots */}<div class="flex gap-0.5 ml-1">diff --git a/frontend-modern/src/components/AI/Chat/types.ts b/frontend-modern/src/components/AI/Chat/types.tsindex c81517b5c8..8ec0490778 100644--- a/frontend-modern/src/components/AI/Chat/types.ts+++ b/frontend-modern/src/components/AI/Chat/types.ts@@ -20,6 +20,7 @@ export interface PendingTool {rawInput?: string;status?: 'pending' | 'running' | 'waiting';progress?: string;+ startedAt?: number;}export interface PendingApproval {