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
Keep Assistant queue state out of active status text
rcourtmanb1cab5eeb8aa
diff --git a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsxindex 9a22a45535..32c0680a5b 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx@@ -5679,16 +5679,20 @@ describe('AIChat', () => {]);const status = screen.getByLabelText('Assistant active turn status');- await waitFor(() =>- expect(status).toHaveTextContent('Preparing Pulse context. · 1 follow-up queued'),+ await waitFor(() => expect(status).toHaveTextContent('Preparing Pulse context.'));+ expect(status).not.toHaveTextContent('follow-up queued');+ expect(screen.getByLabelText('Queued follow-up messages')).toHaveTextContent(+ '1 follow-up queued',);expect(status).not.toHaveTextContent('OpenRouter is starting the response.');await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);- expect(status).toHaveTextContent('Reading current Pulse inventory. · 1 follow-up queued');+ expect(status).toHaveTextContent('Reading current Pulse inventory.');+ expect(status).not.toHaveTextContent('follow-up queued');await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);- expect(status).toHaveTextContent('OpenRouter is starting the response. · 1 follow-up queued');+ expect(status).toHaveTextContent('OpenRouter is starting the response.');+ expect(status).not.toHaveTextContent('follow-up queued');expect(status).not.toHaveTextContent('Preparing Pulse context.');expect(status).not.toHaveTextContent('Reading current Pulse inventory.');});@@ -5842,7 +5846,10 @@ describe('AIChat', () => {expect(activityDock).toContainElement(screen.getByLabelText('Assistant active turn status'));expect(screen.getByLabelText('Assistant active turn status')).toHaveTextContent(- 'Generating response · 1 follow-up queued',+ 'Generating response',+ );+ expect(screen.getByLabelText('Assistant active turn status')).not.toHaveTextContent(+ 'follow-up queued',);expect(activityDock).toContainElement(screen.getByLabelText('Queued follow-up messages'));expect(screen.getByText('1 follow-up queued')).toBeInTheDocument();diff --git a/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts b/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.tsindex 56e648bc4a..570c004428 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts+++ b/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts@@ -61,7 +61,8 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'thinking',- text: 'Sending prompt · 1 follow-up queued',+ text: 'Sending prompt',+ queuedFollowUpCount: 1,startedAt: 1_000,});});@@ -82,7 +83,8 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'thinking',- text: 'OpenRouter is starting the response. · 2 follow-ups queued',+ text: 'OpenRouter is starting the response.',+ queuedFollowUpCount: 2,startedAt: 1_000,});});@@ -1016,7 +1018,8 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'generating',- text: 'Generating response · 2 follow-ups queued',+ text: 'Generating response',+ queuedFollowUpCount: 2,});});diff --git a/frontend-modern/src/components/AI/Chat/activeTurnStatus.ts b/frontend-modern/src/components/AI/Chat/activeTurnStatus.tsindex f375220f2e..3fa224d779 100644--- a/frontend-modern/src/components/AI/Chat/activeTurnStatus.ts+++ b/frontend-modern/src/components/AI/Chat/activeTurnStatus.ts@@ -15,6 +15,7 @@ export interface AssistantActiveTurnStatus {text: string;type: AssistantActiveTurnStatusKind;startedAt?: number;+ queuedFollowUpCount?: number;}interface AssistantActiveTurnStatusCandidate extends AssistantActiveTurnStatus {@@ -581,21 +582,15 @@ export const getAssistantQueuedFollowUpCount = (messages: ChatMessage[]): number0,);-export const getAssistantQueuedFollowUpStatusSuffix = (messages: ChatMessage[]): string => {- const count = getAssistantQueuedFollowUpCount(messages);- if (count <= 0) return '';- return ` · ${count} ${count === 1 ? 'follow-up' : 'follow-ups'} queued`;-};-export const withAssistantQueuedFollowUpStatus = (status: AssistantActiveTurnStatus,messages: ChatMessage[],): AssistantActiveTurnStatus => {- const suffix = getAssistantQueuedFollowUpStatusSuffix(messages);- if (!suffix) return status;+ const count = getAssistantQueuedFollowUpCount(messages);+ if (count <= 0) return status;return {...status,- text: `${status.text}${suffix}`,+ queuedFollowUpCount: count,};};diff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsxindex bc296d5883..47317ed807 100644--- a/frontend-modern/src/components/AI/Chat/index.tsx+++ b/frontend-modern/src/components/AI/Chat/index.tsx@@ -2437,6 +2437,9 @@ export const AIChat: Component<AIChatProps> = (props) => {currentStatusNow(),);});+ const activityDockQueuedFollowUpCount = createMemo(() =>+ Math.max(currentStatus()?.queuedFollowUpCount || 0, chat.queuedFollowUpCount()),+ );createEffect(() => {const status = currentStatus();if (!status?.startedAt) return;@@ -4491,7 +4494,7 @@ export const AIChat: Component<AIChatProps> = (props) => {when={currentStatus() ||autonomousWarningVisible() ||- chat.queuedFollowUpCount() > 0+ activityDockQueuedFollowUpCount() > 0}><div@@ -4593,7 +4596,7 @@ export const AIChat: Component<AIChatProps> = (props) => {</button></div></Show>- <Show when={chat.queuedFollowUpCount() > 0}>+ <Show when={activityDockQueuedFollowUpCount() > 0}><divclass={`px-2.5 py-1.5 ${currentStatus() || autonomousWarningVisible()@@ -4606,7 +4609,11 @@ export const AIChat: Component<AIChatProps> = (props) => {<div class="flex min-h-7 items-center gap-2"><ClockIcon class="h-3.5 w-3.5 shrink-0" aria-hidden="true" /><span class="min-w-0 flex-1 truncate text-xs font-medium">- {pluralizeCount(chat.queuedFollowUpCount(), 'follow-up', 'follow-ups')}{' '}+ {pluralizeCount(+ activityDockQueuedFollowUpCount(),+ 'follow-up',+ 'follow-ups',+ )}{' '}{chat.queuedFollowUpsPaused() ? 'paused' : 'queued'}</span><button