fix(app): keep hidden chats current through brief switches

This commit is contained in:
Mohamed Boudra
2026-07-21 20:25:50 +02:00
parent c049e86fee
commit a4d11cda2b
5 changed files with 38 additions and 94 deletions
@@ -174,6 +174,10 @@ class TimelineWorld {
}
}
test("keeps hidden agents subscribed for thirty seconds", () => {
expect(VIEWED_TIMELINE_UNSUBSCRIBE_GRACE_MS).toBe(30_000);
});
test("uses a tail fetch when a live cursor is not authoritative", async () => {
const world = new TimelineWorld();
world.setLiveCursor("agent-a", 9);
@@ -42,7 +42,7 @@ export interface ViewedTimelineSync extends ViewedTimelineUiBridge {
}
const RETRY_DELAY_MS = 1_000;
export const VIEWED_TIMELINE_UNSUBSCRIBE_GRACE_MS = 5_000;
export const VIEWED_TIMELINE_UNSUBSCRIBE_GRACE_MS = 30_000;
type CatchUpStatus = "running" | "complete" | "error";