Phase 4 + M5: Low-priority fixes and frontend component integration

M5: TagBadge integrated into ContactDetail (replaces plain Badge)
M5: EntityHistoryPanel integrated into ContactDetail (timeline section)

L1: Replace document.write() with Blob URL in print.ts (XSS-safe)
L2: AI UI Control feedback storage capped at 100 entries (FIFO eviction)
L3: Backup & Restore documentation added to DEPLOY.md

Verified: Backend import OK, TypeScript 0 errors
This commit is contained in:
Agent Zero
2026-07-26 21:29:37 +02:00
parent 825d638130
commit b6e3afd28b
5 changed files with 95 additions and 15 deletions
@@ -15,6 +15,8 @@ import { useAIUIControlStore } from '@/store/aiUIControlStore';
import { PluginPage } from '@/components/plugins/PluginLoader';
import { useAuthStore } from '@/store/authStore';
import { CustomFieldRenderer } from '@/components/contacts/CustomFieldRenderer';
import { TagBadge } from '@/components/tags/TagBadge';
import { EntityHistoryPanel } from '@/components/common/EntityHistoryPanel';
import { useCustomFields } from '@/api/customFields';
import {
type UnifiedContact,
@@ -427,7 +429,9 @@ export function ContactDetail({ contact, loading, onEdit, onDeleted }: ContactDe
<dd>
{tags.length > 0 ? (
<div className="flex flex-wrap gap-1 mt-1">
{tags.map((tag) => <Badge key={tag} variant="secondary">{tag}</Badge>)}
{tags.map((tag) => (
<TagBadge key={tag} tag={{ name: tag, color: 'blue' }} size="sm" />
))}
</div>
) : (
<span className="text-sm text-secondary-400"></span>
@@ -453,6 +457,13 @@ export function ContactDetail({ contact, loading, onEdit, onDeleted }: ContactDe
<HistoryViewer entityType="contact" entityId={contact.id} />
</Section>
)}
{/* Entity History Timeline */}
{contact.id && (
<Section title={t('history.timeline', 'Aktivitäts-Timeline')}>
<EntityHistoryPanel entityType="contact" entityId={contact.id} />
</Section>
)}
</div>
) : (
<div className="p-4">