From 55a4e7ce28c24d37991505cec2655cb54914fbee Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 15 Jun 2026 02:05:23 +0200 Subject: [PATCH] Enhance metadata display and refine item readiness status in LibraryManager --- src/LibraryManager.jsx | 7 ++++++- src/styles.css | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/LibraryManager.jsx b/src/LibraryManager.jsx index 3abe083..73ab7e5 100644 --- a/src/LibraryManager.jsx +++ b/src/LibraryManager.jsx @@ -13,13 +13,18 @@ function itemSyncMeta(item) { const progress = Math.max(0, Math.min(100, Number(sync.progress) || 0)) const detail = String(sync.detail || '').trim() const enrichEnabled = !!item?.enrich_enabled + const metadataReady = ['ready', 'fallback'].includes(item?.metadata?.status) if (status === 'ready') { return { status, progress: 100, label: 'Available', - detail: detail || (enrichEnabled ? 'Ready with standard metadata and deep enrichment.' : 'Ready with standard metadata.') + detail: detail || ( + metadataReady + ? (enrichEnabled ? 'Ready with standard metadata and deep enrichment.' : 'Ready with standard metadata.') + : 'Ready for chat. Automatic metadata has not been generated yet.' + ) } } if (status === 'failed') { diff --git a/src/styles.css b/src/styles.css index c2dcc18..0922d2c 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1874,6 +1874,51 @@ input:checked + .slider:before { background: color-mix(in srgb, var(--accent) 12%, transparent); } +.library-item-metadata { + margin-top: 10px; + padding-top: 10px; + border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent); +} + +.library-item-metadata p { + display: -webkit-box; + margin: 0; + overflow: hidden; + color: color-mix(in srgb, var(--text) 88%, var(--muted)); + font-size: 13px; + line-height: 1.45; + -webkit-box-orient: vertical; + -webkit-line-clamp: 4; +} + +.library-metadata-chips, +.library-metadata-entities { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-top: 9px; +} + +.library-metadata-chips span { + padding: 3px 7px; + border-radius: 999px; + background: color-mix(in srgb, var(--accent) 12%, transparent); + color: var(--text); + font-size: 11px; +} + +.library-metadata-entities span { + color: var(--muted); + font-size: 11px; +} + +.library-metadata-warning { + margin-top: 8px; + color: #d6a75f; + font-size: 11px; + line-height: 1.4; +} + .library-file-path, .muted-copy { color: var(--muted);