feat(mira/feed): WikiStatusBadge 加 🚫 放棄 狀態 + ↻ 重試
對應 wiki_giveup_scanner workflow (mira repo) 標 wiki-give-up tag 的 raw:
顯示 🚫 放棄 ↻ 按鈕,hover 解釋。點擊清 tag + 強制重 trigger。
leo 2026-05-17 反饋 C 落地:watcher 一直 fail 的 raw 不會無限重試了,
6h+ scanner 標給棄、UI 顯示給棄、用戶可手動修。
This commit is contained in:
@@ -2082,9 +2082,13 @@ function WikiStatusBadge({
|
||||
if (!mainBlock) return null;
|
||||
|
||||
let processed = false;
|
||||
let givenUp = false;
|
||||
try {
|
||||
const tags = JSON.parse(mainBlock.tags_json || '[]') as string[];
|
||||
processed = Array.isArray(tags) && tags.includes('wiki-processed');
|
||||
if (Array.isArray(tags)) {
|
||||
processed = tags.includes('wiki-processed');
|
||||
givenUp = tags.includes('wiki-give-up');
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
@@ -2136,6 +2140,23 @@ function WikiStatusBadge({
|
||||
);
|
||||
}
|
||||
|
||||
// wiki_giveup_scanner 標的:已試多輪 cron 仍失敗,停止重試
|
||||
if (givenUp) {
|
||||
return (
|
||||
<button
|
||||
onClick={handleRetry}
|
||||
disabled={retrying || !!recentlyRetried}
|
||||
title="跑了 6h+ 仍沒 wiki,已給棄停止 watcher 重試。點擊強制重試一次(也許 wiki_synthesis 已修復)"
|
||||
style={{
|
||||
background: 'transparent', border: '1px solid #944', color: '#a55',
|
||||
fontSize: '0.85em', padding: '0 6px', borderRadius: 4, cursor: 'pointer',
|
||||
}}
|
||||
>
|
||||
{recentlyRetried ? '⏳ 已重試' : (retrying ? '…' : '🚫 放棄 ↻')}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
if (recentlyRetried) {
|
||||
return <span style={{ color: '#888', fontSize: '0.85em' }}>⏳ 重試中</span>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user