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
Clarify Pulse Assistant drawer copy
rcourtman38770f30c270
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex 4cdb19c854..3dfcd481de 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -284,7 +284,9 @@ helpers used across chat, settings, and usage surfaces.`frontend-modern/src/utils/aiSessionDiffPresentation.ts`, and`frontend-modern/src/utils/aiExplorePresentation.ts` are the canonical ownersfor provider naming, provider health labels, control-level semantics,-chat/session empty states, session-diff badges, and explore-status labels.+chat drawer title/subtitle, discovery hint framing, chat/session empty states,+assistant message and question-card labels, session-diff badges, and explore-+status labels.Settings and chat surfaces must consume those helpers instead of keeping localAI wording or model/provider inference branches.diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex aed1e7ddb9..108f90a53d 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -246,7 +246,7 @@ regression protection.the same compact summary payload instead of reintroducing route-local`all-resources` fetches, summary recomputation, or page-level layout churnthat displaces the protected overview widgets.-32. Keep infrastructure summary consumers on the compact dashboard overview rather than reopening the all-resources hook. `frontend-modern/src/hooks/useDashboardTrends.ts`, `frontend-modern/src/components/Infrastructure/useInfrastructureSummaryState.ts`, and adjacent dashboard summary consumers may derive chart identity and storage presence from the overview payload they were already given, but they must not call `useResources()` or mount a second unfiltered unified-resource fetch path inside the dashboard hot path. That rule also applies to globally mounted helpers such as `frontend-modern/src/components/AI/Chat/index.tsx`: closed assistant surfaces must read the live websocket snapshot or existing unified-resource cache rather than forcing the dashboard to pay for `all-resources` just because the shell component is mounted.+32. Keep infrastructure summary consumers on the compact dashboard overview rather than reopening the all-resources hook. `frontend-modern/src/hooks/useDashboardTrends.ts`, `frontend-modern/src/components/Infrastructure/useInfrastructureSummaryState.ts`, and adjacent dashboard summary consumers may derive chart identity and storage presence from the overview payload they were already given, but they must not call `useResources()` or mount a second unfiltered unified-resource fetch path inside the dashboard hot path. That rule also applies to globally mounted helpers such as `frontend-modern/src/components/AI/Chat/index.tsx`: closed assistant surfaces must read the live websocket snapshot or existing unified-resource cache rather than forcing the dashboard to pay for `all-resources` just because the shell component is mounted. When that assistant shell changes presentation, `frontend-modern/src/utils/aiChatPresentation.ts` must remain the canonical owner for drawer labels and empty-state copy so hot-path consumers do not grow one-off inline strings or extra state branches alongside the mounted shell.33. Keep hidden workload-route selector shells off the hot path. When theworkloads route keeps `frontend-modern/src/components/shared/InfrastructureSelector.tsx`mounted only for layout parity, `frontend-modern/src/components/shared/useInfrastructureSelectorState.ts`diff --git a/frontend-modern/src/components/AI/Chat/ChatMessages.tsx b/frontend-modern/src/components/AI/Chat/ChatMessages.tsxindex 14daf1df0a..11121c139b 100644--- a/frontend-modern/src/components/AI/Chat/ChatMessages.tsx+++ b/frontend-modern/src/components/AI/Chat/ChatMessages.tsx@@ -2,6 +2,7 @@ import { Component, Show, For, createEffect, createMemo } from 'solid-js';import { MessageItem } from './MessageItem';import type { ChatSession } from '@/api/aiChat';import type { ChatMessage, PendingApproval, PendingQuestion } from './types';+import { AI_CHAT_SUGGESTIONS_LABEL } from '@/utils/aiChatPresentation';interface ChatMessagesProps {messages: ChatMessage[];@@ -102,7 +103,7 @@ export const ChatMessages: Component<ChatMessagesProps> = (props) => {<Show when={props.emptyState!.suggestions && props.emptyState!.suggestions!.length > 0}><div class="space-y-2"><div class="text-xs font-medium text-muted text-left uppercase tracking-wider pl-1">- Or try asking+ {AI_CHAT_SUGGESTIONS_LABEL}</div><For each={props.emptyState!.suggestions}>{(suggestion) => (diff --git a/frontend-modern/src/components/AI/Chat/MessageItem.tsx b/frontend-modern/src/components/AI/Chat/MessageItem.tsxindex 117c37bfb7..f2bd0af7e0 100644--- a/frontend-modern/src/components/AI/Chat/MessageItem.tsx+++ b/frontend-modern/src/components/AI/Chat/MessageItem.tsx@@ -6,6 +6,10 @@ import { ToolExecutionBlock } from './ToolExecutionBlock';import { ApprovalCard } from './ApprovalCard';import { QuestionCard } from './QuestionCard';import type { ChatMessage, PendingApproval, PendingQuestion, StreamDisplayEvent } from './types';+import {+ AI_CHAT_ASSISTANT_MESSAGE_LABEL,+ AI_CHAT_CONTEXT_USED_LABEL,+} from '@/utils/aiChatPresentation';import { formatIdentifierLabel } from '@/utils/textPresentation';interface MessageItemProps {@@ -139,7 +143,9 @@ export const MessageItem: Component<MessageItemProps> = (props) => {</svg></div><div class="flex items-baseline gap-2">- <span class="text-xs font-semibold text-base-content">Assistant</span>+ <span class="text-xs font-semibold text-base-content">+ {AI_CHAT_ASSISTANT_MESSAGE_LABEL}+ </span><Show when={props.message.model && !props.message.isStreaming}><span class="text-[10px] text-muted font-mono">{props.message.model}</span></Show>@@ -230,7 +236,7 @@ export const MessageItem: Component<MessageItemProps> = (props) => {<Show when={!props.message.isStreaming && contextTools().length > 0}><div class="mt-4 pt-3 border-t border-border-subtle flex flex-wrap gap-2"><span class="text-[10px] uppercase font-semibold text-muted tracking-wider">- Context used+ {AI_CHAT_CONTEXT_USED_LABEL}</span><div class="flex flex-wrap gap-1.5">{contextTools().map((name) => (diff --git a/frontend-modern/src/components/AI/Chat/QuestionCard.tsx b/frontend-modern/src/components/AI/Chat/QuestionCard.tsxindex e8c14bb12b..e37cae7440 100644--- a/frontend-modern/src/components/AI/Chat/QuestionCard.tsx+++ b/frontend-modern/src/components/AI/Chat/QuestionCard.tsx@@ -1,5 +1,9 @@import { Component, Show, For, createSignal } from 'solid-js';import type { PendingQuestion } from './types';+import {+ AI_CHAT_QUESTION_CARD_PLACEHOLDER,+ AI_CHAT_QUESTION_CARD_TITLE,+} from '@/utils/aiChatPresentation';interface QuestionCardProps {question: PendingQuestion;@@ -49,7 +53,7 @@ export const QuestionCard: Component<QuestionCardProps> = (props) => {/></svg></div>- <span class="font-semibold">Question from Pulse Assistant</span>+ <span class="font-semibold">{AI_CHAT_QUESTION_CARD_TITLE}</span></div>{/* Questions */}@@ -68,7 +72,7 @@ export const QuestionCard: Component<QuestionCardProps> = (props) => {value={answers()[q.id] || ''}onInput={(e) => handleInputChange(q.id, e.currentTarget.value)}class="w-full px-3 py-2 text-sm border border-blue-200 dark:border-blue-700 rounded-md bg-surface text-base-content focus:outline-none focus:ring-2 focus:ring-blue-500"- placeholder="Type your answer..."+ placeholder={AI_CHAT_QUESTION_CARD_PLACEHOLDER}disabled={props.question.isAnswering}/></Show>diff --git a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsxindex c2f9512934..b5bc724e09 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx@@ -12,6 +12,7 @@ const {mockAiChatStore,mockByType,mockResources,+ mockWebSocketState,} = vi.hoisted(() => {const mockChat = {messages: vi.fn((): ChatMessage[] => []),@@ -83,6 +84,9 @@ const {const mockByType = vi.fn((_type: string): Array<{ name: string }> => []);const mockResources = vi.fn((): Array<{ id: string; type: string }> => []);+ const mockWebSocketState = {+ resources: [] as Array<{ id: string; type: string }> | undefined,+ };return {mockChat,@@ -92,6 +96,7 @@ const {mockAiChatStore,mockByType,mockResources,+ mockWebSocketState,};});@@ -167,6 +172,12 @@ vi.mock('@/stores/aiChat', () => ({ aiChatStore: mockAiChatStore }));vi.mock('@/utils/logger', () => ({logger: { info: vi.fn(), warn: vi.fn(), error: vi.fn(), debug: vi.fn() },}));+vi.mock('@/hooks/useUnifiedResources', () => ({+ getCachedUnifiedResources: mockResources,+}));+vi.mock('@/stores/websocket-global', () => ({+ getGlobalWebSocketStore: () => ({ state: mockWebSocketState }),+}));vi.mock('@/hooks/useResources', () => ({useResources: () => ({ byType: mockByType, resources: mockResources }),}));@@ -205,6 +216,7 @@ beforeEach(() => {mockChat.sendMessage.mockResolvedValue(true);mockByType.mockReturnValue([]);mockResources.mockReturnValue([]);+ mockWebSocketState.resources = [];mockAIAPI.getModels.mockResolvedValue({ models: [] });mockAIAPI.getSettings.mockResolvedValue({model: 'gpt-4',@@ -230,7 +242,9 @@ describe('AIChat', () => {it('renders the header with title when open', () => {renderChat();expect(screen.getByText('Pulse Assistant')).toBeInTheDocument();- expect(screen.getByText('Infrastructure intelligence')).toBeInTheDocument();+ expect(+ screen.getByText('Observed context, provider-backed reasoning, and governed actions.'),+ ).toBeInTheDocument();});it('renders the input textarea', () => {@@ -418,13 +432,13 @@ describe('AIChat', () => {it('opens session picker on click', () => {renderChat();fireEvent.click(screen.getByTitle('Chat sessions'));- expect(screen.getByText('New conversation')).toBeInTheDocument();+ expect(screen.getByText('New session')).toBeInTheDocument();});- it('shows "No previous conversations" when empty', () => {+ it('shows "No previous assistant sessions" when empty', () => {renderChat();fireEvent.click(screen.getByTitle('Chat sessions'));- expect(screen.getByText('No previous conversations')).toBeInTheDocument();+ expect(screen.getByText('No previous assistant sessions')).toBeInTheDocument();});it('lists sessions in the dropdown', async () => {@@ -916,8 +930,13 @@ describe('AIChat', () => {});renderChat();await waitFor(() => {- expect(screen.getByText('Discovery is off.')).toBeInTheDocument();+ expect(screen.getByText('Workload Discovery is off.')).toBeInTheDocument();});+ expect(+ screen.getByText(+ /Enable it in Settings so Pulse Assistant can reference real services, versions, and commands instead of generic guidance\./,+ ),+ ).toBeInTheDocument();});it('does not show discovery hint when discovery is enabled', async () => {@@ -925,7 +944,7 @@ describe('AIChat', () => {await waitFor(() => {expect(mockAIAPI.getSettings).toHaveBeenCalled();});- expect(screen.queryByText('Discovery is off.')).not.toBeInTheDocument();+ expect(screen.queryByText('Workload Discovery is off.')).not.toBeInTheDocument();});});diff --git a/frontend-modern/src/components/AI/Chat/__tests__/ChatMessages.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/ChatMessages.test.tsxindex abddcf7deb..d38d636784 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/ChatMessages.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/ChatMessages.test.tsx@@ -69,11 +69,11 @@ describe('ChatMessages', () => {<ChatMessagesmessages={[]}{...makeHandlers()}- emptyState={{ title: 'Welcome to Pulse AI' }}+ emptyState={{ title: 'Ask about your infrastructure' }}/>));- expect(screen.getByText('Welcome to Pulse AI')).toBeInTheDocument();+ expect(screen.getByText('Ask about your infrastructure')).toBeInTheDocument();});it('shows subtitle when provided in emptyState', () => {@@ -165,10 +165,10 @@ describe('ChatMessages', () => {/>));- expect(screen.queryByText('Or try asking')).not.toBeInTheDocument();+ expect(screen.queryByText('Try asking')).not.toBeInTheDocument();});- it('renders "Or try asking" label when suggestions exist', () => {+ it('renders "Try asking" label when suggestions exist', () => {render(() => (<ChatMessagesmessages={[]}@@ -180,7 +180,7 @@ describe('ChatMessages', () => {/>));- expect(screen.getByText('Or try asking')).toBeInTheDocument();+ expect(screen.getByText('Try asking')).toBeInTheDocument();});it('does not show empty state when there are messages', () => {@@ -188,18 +188,18 @@ describe('ChatMessages', () => {<ChatMessagesmessages={[makeMessage()]}{...makeHandlers()}- emptyState={{ title: 'Welcome to Pulse AI' }}+ emptyState={{ title: 'Ask about your infrastructure' }}/>));- expect(screen.queryByText('Welcome to Pulse AI')).not.toBeInTheDocument();+ expect(screen.queryByText('Ask about your infrastructure')).not.toBeInTheDocument();});it('does not show empty state when emptyState prop is not provided', () => {render(() => <ChatMessages messages={[]} {...makeHandlers()} />);expect(screen.queryByText('Welcome')).not.toBeInTheDocument();- expect(screen.queryByText('Or try asking')).not.toBeInTheDocument();+ expect(screen.queryByText('Try asking')).not.toBeInTheDocument();});it('each suggestion button is individually clickable', () => {diff --git a/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsxindex fca42e11b5..579322bbb6 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsx@@ -116,7 +116,7 @@ describe('MessageItem', () => {/>));- expect(screen.queryByText('Assistant')).not.toBeInTheDocument();+ expect(screen.queryByText('Pulse Assistant')).not.toBeInTheDocument();});it('renders user content directly (not via markdown)', () => {@@ -139,7 +139,7 @@ describe('MessageItem', () => {<MessageItem message={makeMessage({ role: 'assistant' })} {...makeHandlers()} />));- expect(screen.getByText('Assistant')).toBeInTheDocument();+ expect(screen.getByText('Pulse Assistant')).toBeInTheDocument();});it('does not use right-alignment for assistant messages', () => {@@ -212,7 +212,7 @@ describe('MessageItem', () => {));// No model text should appear anywhere in the assistant header area- const assistantLabel = screen.getByText('Assistant');+ const assistantLabel = screen.getByText('Pulse Assistant');const parent = assistantLabel.parentElement;expect(parent?.querySelector('.font-mono')).not.toBeInTheDocument();});diff --git a/frontend-modern/src/components/AI/Chat/__tests__/QuestionCard.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/QuestionCard.test.tsxindex 662ce99807..d34d7b5b22 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/QuestionCard.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/QuestionCard.test.tsx@@ -23,12 +23,12 @@ function makePendingQuestion(overrides?: Partial<PendingQuestion>): PendingQuest}describe('QuestionCard', () => {- it('renders the header "Question from Pulse Assistant"', () => {+ it('renders the header "Pulse Assistant needs your input"', () => {render(() => (<QuestionCard question={makePendingQuestion()} onAnswer={vi.fn()} onSkip={vi.fn()} />));- expect(screen.getByText('Question from Pulse Assistant')).toBeInTheDocument();+ expect(screen.getByText('Pulse Assistant needs your input')).toBeInTheDocument();});it('renders the question text', () => {diff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsxindex b9c2d9d464..c7ff514735 100644--- a/frontend-modern/src/components/AI/Chat/index.tsx+++ b/frontend-modern/src/components/AI/Chat/index.tsx@@ -23,7 +23,21 @@ import {syncAIRuntimeSettings,} from '@/stores/aiRuntimeState';import { logger } from '@/utils/logger';-import { AI_CHAT_SESSION_EMPTY_STATE } from '@/utils/aiChatPresentation';+import {+ AI_CHAT_COLLAPSE_TITLE,+ AI_CHAT_DISCOVERY_HINT_BODY,+ AI_CHAT_DISCOVERY_HINT_TITLE,+ AI_CHAT_DRAWER_SUBTITLE,+ AI_CHAT_DRAWER_TITLE,+ AI_CHAT_EMPTY_STATE_SUBTITLE,+ AI_CHAT_EMPTY_STATE_TITLE,+ AI_CHAT_INPUT_PLACEHOLDER,+ AI_CHAT_NEW_SESSION_BUTTON_TITLE,+ AI_CHAT_NEW_SESSION_MENU_LABEL,+ AI_CHAT_NEW_SESSION_SHORT_LABEL,+ AI_CHAT_SESSION_EMPTY_STATE,+ getAIChatEmptyStateSuggestions,+} from '@/utils/aiChatPresentation';import {getAIChatControlLevelPresentation,normalizeAIControlLevel,@@ -813,7 +827,7 @@ export const AIChat: Component<AIChatProps> = (props) => {<buttononClick={props.onClose}class="hidden sm:flex absolute left-0 top-1/2 -translate-x-full -translate-y-1/2 items-center justify-center w-8 py-3 rounded-l-xl bg-surface text-blue-600 dark:text-blue-400 shadow-sm border border-r-0 border-border hover:bg-surface-hover transition-colors z-50 cursor-pointer"- title="Collapse Pulse Assistant"+ title={AI_CHAT_COLLAPSE_TITLE}><svgclass="h-5 w-5 flex-shrink-0"@@ -848,8 +862,8 @@ export const AIChat: Component<AIChatProps> = (props) => {</svg></div><div>- <h2 class="text-sm font-semibold text-base-content">Pulse Assistant</h2>- <p class="text-[11px] text-muted">Infrastructure intelligence</p>+ <h2 class="text-sm font-semibold text-base-content">{AI_CHAT_DRAWER_TITLE}</h2>+ <p class="text-[11px] text-muted">{AI_CHAT_DRAWER_SUBTITLE}</p></div></div>@@ -858,7 +872,7 @@ export const AIChat: Component<AIChatProps> = (props) => {<buttononClick={handleNewConversation}class="flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] text-muted hover:text-base-content rounded-md border border-border hover:border-border bg-surface transition-colors"- title="New chat"+ title={AI_CHAT_NEW_SESSION_BUTTON_TITLE}><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path@@ -868,7 +882,7 @@ export const AIChat: Component<AIChatProps> = (props) => {d="M12 4v16m8-8H4"/></svg>- <span class="font-medium">New</span>+ <span class="font-medium">{AI_CHAT_NEW_SESSION_SHORT_LABEL}</span></button>{/* Model selector */}@@ -996,7 +1010,7 @@ export const AIChat: Component<AIChatProps> = (props) => {d="M12 4v16m8-8H4"/></svg>- <span class="font-medium">New conversation</span>+ <span class="font-medium">{AI_CHAT_NEW_SESSION_MENU_LABEL}</span></button><div class="max-h-64 overflow-y-auto">@@ -1119,8 +1133,8 @@ export const AIChat: Component<AIChatProps> = (props) => {/></svg><span>- <span class="font-medium">Discovery is off.</span> Enable it in Settings for more- accurate answers about your infrastructure.+ <span class="font-medium">{AI_CHAT_DISCOVERY_HINT_TITLE}</span>{' '}+ {AI_CHAT_DISCOVERY_HINT_BODY}</span></div><button@@ -1152,18 +1166,9 @@ export const AIChat: Component<AIChatProps> = (props) => {.slice(0, 3)}onLoadSession={handleLoadSession}emptyState={{- title: 'Pulse Assistant ready',- suggestions: isCluster()- ? [- 'Analyze overall cluster health',- 'Check node load balancing',- 'Find and fix failed services',- ]- : [- 'Analyze system health',- 'Check storage usage',- 'Scan for security vulnerabilities',- ],+ title: AI_CHAT_EMPTY_STATE_TITLE,+ subtitle: AI_CHAT_EMPTY_STATE_SUBTITLE,+ suggestions: getAIChatEmptyStateSuggestions(isCluster()),onSuggestionClick: (s) => setInput(s),}}/>@@ -1265,7 +1270,7 @@ export const AIChat: Component<AIChatProps> = (props) => {value={input()}onInput={handleInputChange}onKeyDown={handleKeyDown}- placeholder="Ask about your infrastructure..."+ placeholder={AI_CHAT_INPUT_PLACEHOLDER}rows={2}class="w-full px-4 py-3 text-sm rounded-md border border-border bg-surface text-base-content placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none"/>diff --git a/frontend-modern/src/components/AI/Chat/types.ts b/frontend-modern/src/components/AI/Chat/types.tsindex 508c6b7ece..5a3d057298 100644--- a/frontend-modern/src/components/AI/Chat/types.ts+++ b/frontend-modern/src/components/AI/Chat/types.ts@@ -24,7 +24,7 @@ export interface PendingApproval {approvalId?: string; // ID of the approval record for API calls}-// Question from Pulse AI+// Question from Pulse Assistantexport interface QuestionOption {label: string;value: string;diff --git a/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.ts b/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.tsindex af41bea0e8..2f68b238de 100644--- a/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.ts@@ -1085,7 +1085,13 @@ describe('monitored-system model guardrails', () => {expect(aiChatSource).not.toContain("mention.type === 'agent'");expect(aiChatSource).toContain('@/utils/aiControlLevelPresentation');expect(aiChatSource).toContain('AI_CHAT_SESSION_EMPTY_STATE');- expect(aiChatSource).not.toContain('No previous conversations');+ expect(aiChatSource).toContain('AI_CHAT_DRAWER_SUBTITLE');+ expect(aiChatSource).toContain('AI_CHAT_DISCOVERY_HINT_TITLE');+ expect(aiChatSource).toContain('getAIChatEmptyStateSuggestions');+ expect(aiChatSource).not.toContain('No previous assistant sessions');+ expect(aiChatSource).not.toContain('Infrastructure intelligence');+ expect(aiChatSource).not.toContain('Pulse Assistant ready');+ expect(aiChatSource).not.toContain('Discovery is off.');expect(aiChatSource).toContain('getAIChatControlLevelPresentation');expect(aiChatSource).toContain('normalizeAIControlLevel');expect(aiChatSource).not.toContain('const normalizeControlLevel =');@@ -1099,6 +1105,10 @@ describe('monitored-system model guardrails', () => {'const mentionsForAPI = mentions.length > 0 ? mentions : undefined;',);expect(aiChatPresentationSource).toContain('export const AI_CHAT_SESSION_EMPTY_STATE');+ expect(aiChatPresentationSource).toContain('export const AI_CHAT_DRAWER_SUBTITLE');+ expect(aiChatPresentationSource).toContain('export const AI_CHAT_DISCOVERY_HINT_TITLE');+ expect(aiChatPresentationSource).toContain('export const AI_CHAT_QUESTION_CARD_TITLE');+ expect(aiChatPresentationSource).toContain('export function getAIChatEmptyStateSuggestions');expect(mentionAutocompleteSource).toContain("| 'agent'");expect(mentionAutocompleteSource).toContain('getSimpleStatusIndicator');expect(mentionAutocompleteSource).toContain('<StatusDot');diff --git a/frontend-modern/src/utils/__tests__/aiChatPresentation.test.ts b/frontend-modern/src/utils/__tests__/aiChatPresentation.test.tsindex 15834ae56e..1c71d05c0b 100644--- a/frontend-modern/src/utils/__tests__/aiChatPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/aiChatPresentation.test.ts@@ -1,12 +1,56 @@import { describe, expect, it } from 'vitest';import {+ AI_CHAT_ASSISTANT_MESSAGE_LABEL,+ AI_CHAT_CONTEXT_USED_LABEL,+ AI_CHAT_DISCOVERY_HINT_BODY,+ AI_CHAT_DISCOVERY_HINT_TITLE,+ AI_CHAT_DRAWER_SUBTITLE,+ AI_CHAT_DRAWER_TITLE,+ AI_CHAT_EMPTY_STATE_SUBTITLE,+ AI_CHAT_EMPTY_STATE_TITLE,AI_CHAT_MODEL_SELECTOR_EMPTY_STATE,+ AI_CHAT_NEW_SESSION_MENU_LABEL,+ AI_CHAT_NEW_SESSION_SHORT_LABEL,+ AI_CHAT_QUESTION_CARD_TITLE,AI_CHAT_SESSION_EMPTY_STATE,+ AI_CHAT_SUGGESTIONS_LABEL,+ getAIChatEmptyStateSuggestions,} from '@/utils/aiChatPresentation';describe('aiChatPresentation', () => {- it('exports canonical AI chat empty-state copy', () => {- expect(AI_CHAT_SESSION_EMPTY_STATE).toBe('No previous conversations');+ it('exports canonical assistant drawer presentation copy', () => {+ expect(AI_CHAT_DRAWER_TITLE).toBe('Pulse Assistant');+ expect(AI_CHAT_DRAWER_SUBTITLE).toBe(+ 'Observed context, provider-backed reasoning, and governed actions.',+ );+ expect(AI_CHAT_DISCOVERY_HINT_TITLE).toBe('Workload Discovery is off.');+ expect(AI_CHAT_DISCOVERY_HINT_BODY).toBe(+ 'Enable it in Settings so Pulse Assistant can reference real services, versions, and commands instead of generic guidance.',+ );+ expect(AI_CHAT_EMPTY_STATE_TITLE).toBe('Ask about your infrastructure');+ expect(AI_CHAT_EMPTY_STATE_SUBTITLE).toBe(+ 'Pulse Assistant uses observed infrastructure context and your configured provider to inspect state, explain findings, and suggest safe next steps.',+ );+ expect(AI_CHAT_NEW_SESSION_SHORT_LABEL).toBe('New');+ expect(AI_CHAT_NEW_SESSION_MENU_LABEL).toBe('New session');+ expect(AI_CHAT_SESSION_EMPTY_STATE).toBe('No previous assistant sessions');expect(AI_CHAT_MODEL_SELECTOR_EMPTY_STATE).toBe('No matching models.');+ expect(AI_CHAT_SUGGESTIONS_LABEL).toBe('Try asking');+ expect(AI_CHAT_QUESTION_CARD_TITLE).toBe('Pulse Assistant needs your input');+ expect(AI_CHAT_ASSISTANT_MESSAGE_LABEL).toBe('Pulse Assistant');+ expect(AI_CHAT_CONTEXT_USED_LABEL).toBe('Context used');+ });++ it('builds canonical empty-state suggestions for cluster and single-system chat', () => {+ expect(getAIChatEmptyStateSuggestions(true)).toEqual([+ 'Summarize cluster health',+ 'Find failed services',+ 'Check node load and pressure',+ ]);+ expect(getAIChatEmptyStateSuggestions(false)).toEqual([+ 'Summarize system health',+ 'Check storage pressure',+ 'Explain recent Patrol findings',+ ]);});});diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 42f646bb70..bb9f08e913 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -4591,6 +4591,10 @@ describe('frontend resource type boundaries', () => {expect(modelSelectorSource).not.toContain('No matching models.');expect(aiChatPresentationSource).toContain('export const AI_CHAT_MODEL_SELECTOR_EMPTY_STATE');expect(aiChatPresentationSource).toContain('export const AI_CHAT_SESSION_EMPTY_STATE');+ expect(aiChatPresentationSource).toContain('export const AI_CHAT_DRAWER_TITLE');+ expect(aiChatPresentationSource).toContain('export const AI_CHAT_DISCOVERY_HINT_TITLE');+ expect(aiChatPresentationSource).toContain('export const AI_CHAT_QUESTION_CARD_TITLE');+ expect(aiChatPresentationSource).toContain('export function getAIChatEmptyStateSuggestions');expect(remediationStatusSource).toContain('getRemediationPresentation');expect(remediationStatusSource).not.toContain("'bg-green-50 dark:bg-green-900 border border-green-200 dark:border-green-800'",diff --git a/frontend-modern/src/utils/aiChatPresentation.ts b/frontend-modern/src/utils/aiChatPresentation.tsindex 4c50112f1b..abd31502a6 100644--- a/frontend-modern/src/utils/aiChatPresentation.ts+++ b/frontend-modern/src/utils/aiChatPresentation.ts@@ -1,2 +1,39 @@-export const AI_CHAT_SESSION_EMPTY_STATE = 'No previous conversations';+export const AI_CHAT_DRAWER_TITLE = 'Pulse Assistant';+export const AI_CHAT_DRAWER_SUBTITLE =+ 'Observed context, provider-backed reasoning, and governed actions.';+export const AI_CHAT_COLLAPSE_TITLE = 'Collapse Pulse Assistant';+export const AI_CHAT_NEW_SESSION_SHORT_LABEL = 'New';+export const AI_CHAT_NEW_SESSION_BUTTON_TITLE = 'New assistant session';+export const AI_CHAT_NEW_SESSION_MENU_LABEL = 'New session';+export const AI_CHAT_SESSION_EMPTY_STATE = 'No previous assistant sessions';export const AI_CHAT_MODEL_SELECTOR_EMPTY_STATE = 'No matching models.';+export const AI_CHAT_DISCOVERY_HINT_TITLE = 'Workload Discovery is off.';+export const AI_CHAT_DISCOVERY_HINT_BODY =+ 'Enable it in Settings so Pulse Assistant can reference real services, versions, and commands instead of generic guidance.';+export const AI_CHAT_EMPTY_STATE_TITLE = 'Ask about your infrastructure';+export const AI_CHAT_EMPTY_STATE_SUBTITLE =+ 'Pulse Assistant uses observed infrastructure context and your configured provider to inspect state, explain findings, and suggest safe next steps.';+export const AI_CHAT_INPUT_PLACEHOLDER = 'Ask about your infrastructure...';+export const AI_CHAT_SUGGESTIONS_LABEL = 'Try asking';+export const AI_CHAT_QUESTION_CARD_TITLE = 'Pulse Assistant needs your input';+export const AI_CHAT_QUESTION_CARD_PLACEHOLDER = 'Type your answer...';+export const AI_CHAT_ASSISTANT_MESSAGE_LABEL = 'Pulse Assistant';+export const AI_CHAT_CONTEXT_USED_LABEL = 'Context used';++const AI_CHAT_CLUSTER_EMPTY_STATE_SUGGESTIONS = [+ 'Summarize cluster health',+ 'Find failed services',+ 'Check node load and pressure',+];++const AI_CHAT_SINGLE_SYSTEM_EMPTY_STATE_SUGGESTIONS = [+ 'Summarize system health',+ 'Check storage pressure',+ 'Explain recent Patrol findings',+];++export function getAIChatEmptyStateSuggestions(isCluster: boolean) {+ return isCluster+ ? AI_CHAT_CLUSTER_EMPTY_STATE_SUGGESTIONS+ : AI_CHAT_SINGLE_SYSTEM_EMPTY_STATE_SUGGESTIONS;+}