Commit bacfa8e
fix(updates): always serialize is_held so client filter sees explicit false
Per Copilot review on PR #67: the dashboard's `_applyPkgViewFilter('updates')`
applies a Tabulator filter of `is_held = false`, which uses strict equality.
With `json:"is_held,omitempty"` the agent dropped the field when false, so rows
from `/api/os-updates/packages/installed` arrived with `is_held === undefined`
and got filtered out of the Updates view — making it incomplete after a full
package-list load while `Update All (N)` kept counting them.
Drop omitempty on both Package.IsHeld and InstalledPackage.IsHeld (agent + dashboard
mirror) so the boolean is always on the wire. Adds ~14 bytes/package for a typical
"All Packages" load (~10 KB on a 600-package list) — negligible vs the correctness
fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 13ec351 commit bacfa8e
2 files changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | | - | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
835 | | - | |
| 835 | + | |
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
| |||
0 commit comments