fix(notifications): stop embedding Local in janitor alerts (#1631)

Fleet-aggregated reclaim alerts showed Node Local in the body while the
badge already named the remote. Use a node-neutral message so identity
comes from the hub badge; leave stored rows unchanged.
This commit is contained in:
Anso
2026-07-14 18:28:01 -04:00
committed by GitHub
parent c170c3f30c
commit 678c198faa
3 changed files with 9 additions and 7 deletions
+3 -4
View File
@@ -439,15 +439,14 @@ export class MonitorService {
const MIN_RECLAIMABLE_GB = 0.1;
if (reclaimGb >= janitorLimitGb && reclaimGb >= MIN_RECLAIMABLE_GB) {
const registry = NodeRegistry.getInstance();
const localNode = registry.getNode(registry.getDefaultNodeId());
const nodeLabel = localNode?.name ?? 'this node';
// Node-neutral body: the hub bell badge attributes remotes.
// Embedding the local seed name ("Local") made fleet alerts look wrong.
await this.dispatchWithCooldown(
HOST_ALERT_KEYS.janitor,
JANITOR_COOLDOWN_MS,
'info',
'system',
`Node "${nodeLabel}" has accumulated ${reclaimGb.toFixed(1)} GB of unused Docker data. Open Resources to reclaim space, or set up a Prune Node Resources schedule.`,
`This node has accumulated ${reclaimGb.toFixed(1)} GB of unused Docker data. Open Resources to reclaim space, or set up a Prune Node Resources schedule.`,
);
}
} finally {