Skip to content

Commit 9debfc2

Browse files
committed
fix(ui): reload open session drawer when a session gains compaction checkpoints
1 parent 5644a65 commit 9debfc2

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

ui/src/pages/sessions/sessions-page.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,15 @@ class SessionsPage extends LitElement {
638638
const row = this.result?.sessions.find((session) => session.key === sessionKey);
639639
const hasCheckpoints =
640640
(row?.compactionCheckpointCount ?? 0) > 0 || Boolean(row?.latestCompactionCheckpoint);
641-
if (!hasCheckpoints || this.checkpointItemsByKey[sessionKey]) {
641+
if (!hasCheckpoints) {
642+
// Seed an empty cache entry so reconcileCheckpointCache sees this key
643+
// and reloads the open drawer if the session compacts on a refresh.
644+
if (!this.checkpointItemsByKey[sessionKey]) {
645+
this.checkpointItemsByKey = { ...this.checkpointItemsByKey, [sessionKey]: [] };
646+
}
647+
return;
648+
}
649+
if (this.checkpointItemsByKey[sessionKey]) {
642650
return;
643651
}
644652
await this.loadCheckpoint(sessionKey);

0 commit comments

Comments
 (0)