refactor(timeline): move Trace entry to header pill, simplify refresh UX

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) <noreply@anthropic.com>
This commit is contained in:
wizardchen
2026-05-27 22:52:07 +08:00
committed by lyingbug
parent 5dc0a49a9b
commit c4fba77a96
5 changed files with 111 additions and 235 deletions
+3 -1
View File
@@ -400,7 +400,9 @@ export default {
copied: 'Copied to clipboard',
close: 'Close',
live: 'LIVE',
liveTooltip: 'Parsing in progress, refreshes every 2s (next in {n}s)',
liveTooltip: 'Parsing in progress — auto-refreshes every 2s',
autoRefreshOn: 'Auto-refreshing',
autoRefreshOff: 'Auto-refresh stopped',
viewTrace: 'View trace',
justNow: 'just now',
secondsAgo: '{n}s ago',