From c4fba77a96a91ca5bd086fb6798b95e2118ec957 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 27 May 2026 22:52:07 +0800 Subject: [PATCH] refactor(timeline): move Trace entry to header pill, simplify refresh UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Trace trigger was a giant card-style row with a green left strip sitting above 文件名/摘要 — visually competed with document content and felt out of place vs. the rest of the app's quiet density. Trace entry: - Replaces the big card with a compact rounded pill in the drawer header, next to the file-type t-tag. - Reads as a quiet secondary action — status dot + label + duration + chevron — at the same visual weight as the file-type tag. - Status dot still pulses while parsing is in progress so the LIVE signal survives the size cut. - Hidden mount preserved so the pill's status/duration stays live even before the user opens the secondary drawer. Refresh UX: - "更新于 X 秒前" caption now always visible (was hidden once polling stopped). After parsing completes it tells the user how stale the data is when they reopen the drawer hours later — the original reason it was hidden ("ticks up forever") is exactly the staleness signal one needs. - LIVE badge tooltip simplified from "解析中,每 2 秒自动刷新({n}s 后)" (cryptic countdown) to "解析进行中 — 每 2 秒自动刷新". - Manual refresh icon now slow-spins in brand color while auto-poll is active — users can tell at a glance "auto-refresh is on" without needing the LIVE badge to interpret. Manual click still triggers the fast spin. - Drops the unused nextRefreshIn computed. i18n: liveTooltip rewritten in zh-CN/en-US/ko-KR; new keys autoRefreshOn / autoRefreshOff for the button title states. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/components/doc-content.vue | 301 +++++------------- .../knowledge-processing-timeline.vue | 33 +- frontend/src/i18n/locales/en-US.ts | 4 +- frontend/src/i18n/locales/ko-KR.ts | 4 +- frontend/src/i18n/locales/zh-CN.ts | 4 +- 5 files changed, 111 insertions(+), 235 deletions(-) diff --git a/frontend/src/components/doc-content.vue b/frontend/src/components/doc-content.vue index 9870b309..51c8dfbf 100644 --- a/frontend/src/components/doc-content.vue +++ b/frontend/src/components/doc-content.vue @@ -814,51 +814,40 @@ const handleDetailsScroll = () => { {{ getTypeLabel() }} + + - - - - +