Skip to content

Commit 20dc73e

Browse files
committed
fix: lifecycle history details formatting and action label i18n
- formatDetails: handle expire_working, archive, merge, compress details - Hide agent_id-only details (show dash instead of raw JSON) - Action summary stats use translated labels instead of raw action names
1 parent f521a00 commit 20dc73e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/dashboard/src/pages/LifecycleMonitor.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,13 @@ export default function LifecycleMonitor() {
184184
return parts.join(' · ');
185185
}
186186
if (d.score) return `分数 ${Number(d.score).toFixed(2)}`;
187+
if (d.decay_score) return `衰减 ${Number(d.decay_score).toFixed(2)}`;
188+
if (d.distance) return `距离 ${Number(d.distance).toFixed(3)}`;
189+
if (d.compressed_count) return `压缩 ${d.compressed_count} 条 → ${d.groups} 组`;
187190
if (d.reason) return d.reason;
191+
// Hide agent_id-only details
192+
const keys = Object.keys(d).filter(k => k !== 'agent_id');
193+
if (keys.length === 0) return '\u2014';
188194
return raw.length > 60 ? raw.slice(0, 60) + '…' : raw;
189195
} catch { return raw.length > 60 ? raw.slice(0, 60) + '…' : raw; }
190196
};
@@ -390,7 +396,7 @@ export default function LifecycleMonitor() {
390396
<div style={{ display: 'flex', gap: 16, flexWrap: 'wrap' }}>
391397
{Object.entries(actionCounts).map(([action, count]) => (
392398
<div key={action} className="stat-card" style={{ padding: 12, minWidth: 100 }}>
393-
<div className="label">{action}</div>
399+
<div className="label">{actionLabel(action)}</div>
394400
<div className="value" style={{ fontSize: 20 }}>{count}</div>
395401
</div>
396402
))}

0 commit comments

Comments
 (0)