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-label">{{ t('knowledgeStages.head.attempt') }}</span>
<span class="kp-stat-val kp-mono">#{{ data.current_attempt }}</span> <span class="kp-stat-val kp-mono">#{{ data.current_attempt }}</span>
</div> </div>
<!-- "Updated X ago" — always visible. While polling it <!-- "Updated X ago" — only meaningful while we're actively
stays small (1-2s); after parsing finishes it shows polling. Terminal traces (completed/failed/cancelled)
staleness when a user reopens the drawer hours later are final data; showing the staleness counter would
("更新于 3 小时前") so they know to hit refresh. When just tick up forever and imply freshness concerns
consecutive fetches are failing we surface that — where none exist. While polling, also surface fetch
otherwise the caption would silently age while the failures so the user knows when the loop is running
spinner kept spinning. --> but not landing data. -->
<div v-if="lastFetchedAt" class="kp-stat kp-stat-end"> <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-label">{{ t('knowledgeStages.head.updated') }}</span>
<span <span
class="kp-stat-val" class="kp-stat-val"