diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index aebd863..e3dbec8 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1487,6 +1487,15 @@ if (!source) return '' return t('capture.source.' + source) } + function inboxMetaText(item) { + const parts = [] + if (item.captureKind) parts.push(captureKindLabel(item.captureKind)) + if (item.captureSource) parts.push(captureSourceLabel(item.captureSource)) + if (item.captureContextLabel) parts.push(`${t('inbox.capturedIn')}: ${item.captureContextLabel}`) + if (item.suggestedTargetLabel) parts.push(`${t('inbox.suggestedTarget')}: ${item.suggestedTargetLabel}`) + parts.push(formatDate(item.capturedAt || item.createdAt)) + return parts.filter(Boolean).join(' · ') + } function addInboxCapture(item) { if (!item || !item.id) return inboxNodes = [item, ...inboxNodes.filter(existing => existing.id !== item.id)] @@ -2345,12 +2354,7 @@
openInboxArtifact(item)} on:keydown={(e) => e.key === 'Enter' && openInboxArtifact(item)}>
{item.title} - - {#if item.captureKind}{captureKindLabel(item.captureKind)} · {/if} - {#if item.captureSource}{captureSourceLabel(item.captureSource)} · {/if} - {#if item.captureContextLabel}{t('inbox.capturedIn')}: {item.captureContextLabel} · {/if} - {formatDate(item.capturedAt || item.createdAt)} - + {inboxMetaText(item)}
@@ -2577,11 +2581,7 @@
openInboxArtifact(item)} on:keydown={(e) => e.key === 'Enter' && openInboxArtifact(item)}>
{item.title} - - {#if item.captureKind}{captureKindLabel(item.captureKind)} · {/if} - {#if item.captureSource}{captureSourceLabel(item.captureSource)} · {/if} - {formatDate(item.createdAt)} - + {inboxMetaText(item)}
{#if item.suggestedTargetNodeId} diff --git a/frontend/src/lib/i18n/locales/en.js b/frontend/src/lib/i18n/locales/en.js index 609b1c1..c973086 100644 --- a/frontend/src/lib/i18n/locales/en.js +++ b/frontend/src/lib/i18n/locales/en.js @@ -34,6 +34,7 @@ export default { 'inbox.keepHere': 'Keep here', 'inbox.localEmpty': 'No unprocessed materials for this case', 'inbox.capturedIn': 'Captured in', + 'inbox.suggestedTarget': 'Target', 'inbox.assignTitle': 'Assign material', 'inbox.assignTarget': 'Case', 'inbox.assignSearchPlaceholder': 'Find case', diff --git a/frontend/src/lib/i18n/locales/ru.js b/frontend/src/lib/i18n/locales/ru.js index c53247c..bee5cdd 100644 --- a/frontend/src/lib/i18n/locales/ru.js +++ b/frontend/src/lib/i18n/locales/ru.js @@ -35,6 +35,7 @@ export default { 'inbox.keepHere': 'Оставить здесь', 'inbox.localEmpty': 'Для этого дела неразобранных материалов нет', 'inbox.capturedIn': 'Захвачено в', + 'inbox.suggestedTarget': 'Цель', 'inbox.assignTitle': 'Разложить материал', 'inbox.assignTarget': 'Дело', 'inbox.assignSearchPlaceholder': 'Найти дело', diff --git a/scripts/check-gui-render.mjs b/scripts/check-gui-render.mjs index 3fd78ca..ac99862 100755 --- a/scripts/check-gui-render.mjs +++ b/scripts/check-gui-render.mjs @@ -263,6 +263,15 @@ async function runReadyScenario(cdp, url) { await clickText(cdp, '.tab', 'Активность') await assertText(cdp, 'Smoke activity', 'activity: per-node activity visible') + await emitDroppedFiles(cdp, ['/tmp/project-context-file.txt']) + await clickText(cdp, '.nav-item', 'Неразобранное') + await assertText(cdp, 'project-context-file.txt', 'inbox: node-context capture visible globally') + await assertText(cdp, 'Захвачено в: Smoke Project', 'inbox: global list shows capture context') + await assertText(cdp, 'Цель: Smoke Project', 'inbox: global list shows suggested target') + await clickInboxItemButton(cdp, 'project-context-file.txt', 'Удалить') + await clickText(cdp, '.overlay .btn', 'Удалить') + await assertEval(cdp, `!document.querySelector('.inbox-screen')?.innerText.includes('project-context-file.txt')`, 'inbox: node-context capture can be deleted') + await clickText(cdp, '.nav-item', 'Сегодня') await assertText(cdp, 'Сегодня', 'today: system view opens') await assertText(cdp, 'Smoke Project', 'today: dashboard data visible')