From cae5a4c70151a605c84634e240115f24fbb46d37 Mon Sep 17 00:00:00 2001 From: Lukasz Mierzwa Date: Wed, 8 Apr 2026 08:48:36 +0100 Subject: [PATCH] fix(api): fix JSON settings marshalling Fixes #6696. --- CHANGELOG.md | 4 ++ cmd/karma/views_test.go | 104 ++++++++++++++++++++++++++++++++++++++ internal/config/models.go | 20 ++++---- 3 files changed, 118 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1908550ff..179639ea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v0.129 +### Fixed + +- Settings from the config file were not being pushed to the UI - #6696. + ### Changed - Switched logging from zerolog to slog. Log output format has changed. diff --git a/cmd/karma/views_test.go b/cmd/karma/views_test.go index 45a9d2794..1ac6f1cc1 100644 --- a/cmd/karma/views_test.go +++ b/cmd/karma/views_test.go @@ -3,6 +3,7 @@ package main import ( "bytes" "context" + "encoding/base64" "encoding/json" "fmt" "html/template" @@ -3008,3 +3009,106 @@ func TestLabelSettings(t *testing.T) { }) } } + +func TestIndexUIDefaultsJSON(t *testing.T) { + // Verifies that the index handler embeds a complete, valid JSON object + // in the `) + matches := re.FindStringSubmatch(body) + if len(matches) < 2 { + t.Fatal("Could not find