fix(timeline): track fetch attempts and surface silent polling failures
User reported: spinner spinning + "更新于 X 秒前" continuously growing without bound while parsing is in progress. The auto-poll loop IS firing every 2s, but lastFetchedAt only updated on success — so when the API returns success=false or errors, the caption silently aged while the visible state suggested live polling. - Move lastFetchedAt update into the finally block so it tracks attempts (success or failure). The caption now bounces back to "刚刚 / 1s 前 / 刚刚" every poll cycle, matching the spinner's visual cadence. - Track failedAttempts and lastFetchOk: when the last attempt failed the timestamp shows in muted italic; when 2+ consecutive attempts fail a small "⚠ 刷新失败" pill appears next to it with a tooltip explaining the situation. - New i18n keys fetchFailed / fetchFailedShort in zh-CN/en-US/ko-KR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -406,6 +406,8 @@ export default {
|
||||
liveTooltip: "解析进行中,每 2 秒自动刷新一次",
|
||||
autoRefreshOn: "自动刷新中",
|
||||
autoRefreshOff: "已停止自动刷新",
|
||||
fetchFailed: "最近 {n} 次刷新都失败了,数据可能已过期,点击刷新按钮重试",
|
||||
fetchFailedShort: "刷新失败",
|
||||
viewTrace: "查看 Trace",
|
||||
justNow: "刚刚",
|
||||
secondsAgo: "{n} 秒前",
|
||||
|
||||
Reference in New Issue
Block a user