fix(node-sync): keep shared client traffic row when email still lives on other inbounds

client_traffics is the per-email accumulator shared across every inbound
and node the client is attached to. setRemoteTrafficLocked deleted it
unguarded in two sweeps — when a node inbound vanished from the snapshot
(node reinstall, tag change, another master's reconcile on a shared
node) and when an email left one inbound's stats — even though the
email was still attached elsewhere. The next sync then re-seeded the
row with that node's counter alone, so the panel showed the last
changed panel's number instead of the summed total.

Guard both sweeps with emailUsedByOtherInbounds, matching what the
manual-edit path (updateClientTraffics) already does. Truly removed
clients are still cleaned up by the zero-attachment sweep.
This commit is contained in:
MHSanaei
2026-06-11 14:28:09 +02:00
parent dc52e725b6
commit 8258a26fbf
3 changed files with 108 additions and 8 deletions
@@ -68,7 +68,7 @@ export default function ClientTrafficCell({
showInfo={false}
strokeColor={display.strokeColor}
status={display.status}
size={compact ? 'small' : 'default'}
size={compact ? 'small' : 'medium'}
/>
<span className="client-traffic-cell-limit">
{display.isUnlimited ? (