Clean duplicate dashboard status messages

Clean duplicate Status dashboard messages by marker, preserve the tracked message, and avoid full-channel purge on startup.
This commit is contained in:
Eyejoker
2026-05-03 23:56:07 +09:00
committed by GitHub
parent a4b7aef3bd
commit 2be267c51e
8 changed files with 367 additions and 23 deletions

View File

@@ -63,22 +63,16 @@ describe('formatStatusHeader', () => {
});
describe('shouldPurgeDashboardChannelOnStart', () => {
it('keeps the existing status message when a stored message id exists', () => {
it('purges on startup when explicitly requested, even with a stored message id', () => {
expect(
shouldPurgeDashboardChannelOnStart({
purgeOnStart: true,
storedMessageId: 'status-message-1',
}),
).toBe(false);
).toBe(true);
});
it('purges only when explicitly requested and no stored message id exists', () => {
expect(
shouldPurgeDashboardChannelOnStart({
purgeOnStart: true,
storedMessageId: null,
}),
).toBe(true);
it('does not purge when startup purge is disabled', () => {
expect(
shouldPurgeDashboardChannelOnStart({
purgeOnStart: false,