Improve UI views for assets/components/failures and timeline details

This commit is contained in:
2026-02-15 23:26:12 +03:00
parent 929bf9c524
commit f9ff0e10ff
14 changed files with 1221 additions and 87 deletions

View File

@@ -0,0 +1,19 @@
package api
import "testing"
func TestDecodeJSONBytesIgnoresUnknownFields(t *testing.T) {
payload := []byte(`{"known":"value","status_at_collection":"ok"}`)
var req struct {
Known string `json:"known"`
}
if err := decodeJSONBytes(payload, &req); err != nil {
t.Fatalf("decode payload: %v", err)
}
if req.Known != "value" {
t.Fatalf("expected known field to be decoded, got %q", req.Known)
}
}