fix(timeline): hide "更新于" once trace is terminal

User report: opening an already-completed doc still shows "更新于 X 秒前"
ticking up forever, which is misleading — the data IS final, no
freshness concern exists. Re-gate the caption on isLive (was always
on) so it only appears while pending/processing. Failures pill is
still gated on the same isLive condition, which is the only state
where polling-failure feedback is meaningful.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
wizardchen
2026-05-27 23:05:29 +08:00
committed by lyingbug
parent 9333869439
commit babf9139ec
@@ -968,14 +968,14 @@ const stageBreakdown = computed<StageRowSummary[]>(() => {
<span class="kp-stat-label">{{ t('knowledgeStages.head.attempt') }}</span>
<span class="kp-stat-val kp-mono">#{{ data.current_attempt }}</span>
</div>
<!-- "Updated X ago" — always visible. While polling it
stays small (1-2s); after parsing finishes it shows
staleness when a user reopens the drawer hours later
("更新于 3 小时前") so they know to hit refresh. When
consecutive fetches are failing we surface that —
otherwise the caption would silently age while the
spinner kept spinning. -->
<div v-if="lastFetchedAt" class="kp-stat kp-stat-end">
<!-- "Updated X ago" — only meaningful while we're actively
polling. Terminal traces (completed/failed/cancelled)
are final data; showing the staleness counter would
just tick up forever and imply freshness concerns
where none exist. While polling, also surface fetch
failures so the user knows when the loop is running
but not landing data. -->
<div v-if="lastFetchedAt && isLive" class="kp-stat kp-stat-end">
<span class="kp-stat-label">{{ t('knowledgeStages.head.updated') }}</span>
<span
class="kp-stat-val"