diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md index bf2e74812..5a4408b2a 100644 --- a/docs/release-control/v6/internal/subsystems/ai-runtime.md +++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md @@ -141,6 +141,9 @@ Structured mention resolution also uses the shared AI tools discovery canonicalization helpers now, so chat prefetch and discovery responses agree on resource-type and target-ID formatting instead of maintaining chat-local copies. +The chat mention picker now also carries the canonical preferred resource +label as `label` through the structured mention payload, so mention search, +selection, and submission do not depend on a raw `displayName` field fork. The same governed-context rule also applies to the main unified AI resource overview: infrastructure, workload, alert-label, and top-consumer summaries must not leak raw resource names, cluster labels, IP addresses, or unresolved diff --git a/frontend-modern/src/components/AI/Chat/MentionAutocomplete.tsx b/frontend-modern/src/components/AI/Chat/MentionAutocomplete.tsx index e20a75f72..c764dc3f4 100644 --- a/frontend-modern/src/components/AI/Chat/MentionAutocomplete.tsx +++ b/frontend-modern/src/components/AI/Chat/MentionAutocomplete.tsx @@ -4,7 +4,7 @@ import { getSimpleStatusIndicator } from '@/utils/status'; export interface MentionResource { id: string; - displayName: string; + label: string; type: 'vm' | 'system-container' | 'app-container' | 'agent'; status?: string; node?: string; @@ -28,7 +28,7 @@ export function MentionAutocomplete(props: MentionAutocompleteProps) { if (!q) return props.resources.slice(0, 10); // Show first 10 if no query return props.resources - .filter((r) => r.displayName.toLowerCase().includes(q)) + .filter((r) => r.label.toLowerCase().includes(q)) .slice(0, 10); // Limit to 10 results }; @@ -155,7 +155,7 @@ export function MentionAutocomplete(props: MentionAutocompleteProps) { {getTypeIcon(resource.type)}
- {resource.displayName} + {resource.label} ({ MentionAutocomplete: (props: { visible: boolean; query: string; - resources: Array<{ id: string; displayName: string }>; - onSelect: (resource: { id: string; displayName: string }) => void; + resources: Array<{ id: string; label: string }>; + onSelect: (resource: { id: string; label: string }) => void; }) => (
resource.displayName).join('|')} + data-resource-labels={props.resources.map((resource) => resource.label).join('|')} >