From 01d00c2a3696f694a61b27be39ef8c83327f6fbd Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 27 May 2026 17:00:43 +0800 Subject: [PATCH] refactor(frontend): rebuild timeline UI with side drawer + attempt tabs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous Langfuse-style waterfall had concrete UX problems visible in the field: the status text column wrapped Chinese characters across two lines, the root span name truncated mid-identifier, the inline detail expansion shifted sibling rows out of order, and the attempt selector was a plain HTML dropdown replaced by a horizontal pill tab strip with a per-attempt status glyph (✓ / ✗ / ●). attemptStatuses Map populates lazily — one /spans?attempt=n fetch per missing tab on mount — so multi-attempt history doesn't block the initial render. Drawer body shows the rich span data the backend just started emitting: timing (started / finished / duration), an error block when failed/cancelled, and Input / Output / Metadata as a 2-column humanized key/value table. Numbers use toLocaleString, booleans render as ✓/✗, arrays/objects collapse to a summary with a per-key "Show JSON" toggle. Existing copySpan retains the raw JSON export path. Root span name is now localized via knowledgeStages.root ("Knowledge processing" / "知识处理") instead of leaking the raw identifier "knowledge_processing" — which previously truncated as "knowledge_process…". i18n: added knowledgeStages.total and knowledgeStages.detail.{started, finished, duration, input, output, metadata, error, showJson, hideJson} to en-US, zh-CN, ko-KR, ru-RU. Compact mode (used by the card hover popover) is untouched. --- .../knowledge-processing-timeline.vue | 963 ++++++++++++------ frontend/src/i18n/locales/en-US.ts | 12 + frontend/src/i18n/locales/ko-KR.ts | 12 + frontend/src/i18n/locales/ru-RU.ts | 12 + frontend/src/i18n/locales/zh-CN.ts | 12 + 5 files changed, 719 insertions(+), 292 deletions(-) diff --git a/frontend/src/components/knowledge-processing-timeline.vue b/frontend/src/components/knowledge-processing-timeline.vue index d3d169c0..9e665192 100644 --- a/frontend/src/components/knowledge-processing-timeline.vue +++ b/frontend/src/components/knowledge-processing-timeline.vue @@ -1,5 +1,5 @@