backup tile: unknown size shows a dash, not 0 B (R-517 follow-up, measured on 9201)
gates / gates (push) Successful in 14s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-09-15 10:53:20 +02:00
parent 843b319f35
commit d3eacbb7cc
4 changed files with 37 additions and 1 deletions
@@ -114,6 +114,10 @@ type guestBackupView struct {
CanTrigger bool // a backup trigger (quiesce loop) is wired
// SizeUnknown (R-517): the shown success was read back from storage after an agent restart, so
// its size is not known. The tile prints „–", never „0 B" (measured live on 9201, 2026-09-15).
SizeUnknown bool
// Tiers (R-517, agent >= v0.131.0) is the per-tier truth. Empty on an older agent — the tile then
// renders the single latest record as before.
Tiers []guestTierView
@@ -182,6 +186,7 @@ func buildTierViews(v *guestBackupView, tiers []agentapi.TierBackupState, cadenc
if tv.HasSuccess && (t.Primary || !v.HasBackup) && (t.Primary || tv.SuccessAt.After(newestOK)) {
v.HasBackup, v.Success = true, true
v.StartedAt, v.SizeBytes, v.Target = tv.SuccessAt, tv.SizeBytes, tv.Label
v.SizeUnknown = !tv.SizeKnown
newestOK = tv.SuccessAt
}
v.Tiers = append(v.Tiers, tv)