Poll dashboard duplicate cleanup between status updates

Run duplicate dashboard cleanup on a short interval so stale external Status messages are removed between normal status updates.
This commit is contained in:
Eyejoker
2026-05-04 00:02:27 +09:00
committed by GitHub
parent 2be267c51e
commit bc78d43967
2 changed files with 19 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import type { UsageRow } from './dashboard-usage-rows.js';
import {
buildWebUsageRowsForSnapshot,
formatStatusHeader,
getDashboardDuplicateCleanupIntervalMs,
renderUsageTable,
shouldPurgeDashboardChannelOnStart,
summarizeWatcherTasks,
@@ -82,6 +83,13 @@ describe('shouldPurgeDashboardChannelOnStart', () => {
});
});
describe('getDashboardDuplicateCleanupIntervalMs', () => {
it('polls duplicate cleanup faster than the status update interval', () => {
expect(getDashboardDuplicateCleanupIntervalMs(10_000)).toBe(2_000);
expect(getDashboardDuplicateCleanupIntervalMs(1_000)).toBe(1_000);
});
});
describe('renderUsageTable', () => {
const claudeRow: UsageRow = {
name: 'Claude pro',