From 1e0ee2042701c616de45b2bb0712055a2f5eb05a Mon Sep 17 00:00:00 2001 From: Daniel Bohlin Date: Sun, 10 May 2026 16:18:16 +0200 Subject: [PATCH 1/2] fix(blazor): use Radzen theme tokens for cache content panel The JSON `
` in CacheContent.razor was hardcoded to
background:#f5f5f5, which renders white-on-white in dark Radzen
themes. Switched to var(--rz-base) for the panel background and
var(--rz-text-color) for the text so the panel adapts to the
active theme. Reported by Quilt4Net.Server.

Bundled NuGet bumps (per the session-start NuGet check):
- Tharga.Blazor 2.1.4 -> 2.1.5 (same project being modified).
- Tharga.MongoDB 2.10.9 -> 2.10.10 (clears NU1902/NU1903 transitive
  vulnerability advisories from SharpCompress 0.30.1 and Snappier
  1.0.0; warning count back from 21 to 1).

Build clean (1 pre-existing CS0162); 453 tests pass.
---
 Tharga.Cache.Blazor/CacheContent.razor        |  2 +-
 .../Tharga.Cache.Blazor.csproj                |  2 +-
 .../Tharga.Cache.MongoDB.csproj               |  2 +-
 plan/feature.md                               | 21 +++++++++++++++++++
 plan/plan.md                                  | 10 +++++++++
 5 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 plan/feature.md
 create mode 100644 plan/plan.md

diff --git a/Tharga.Cache.Blazor/CacheContent.razor b/Tharga.Cache.Blazor/CacheContent.razor
index cbf3047..b18c6e5 100644
--- a/Tharga.Cache.Blazor/CacheContent.razor
+++ b/Tharga.Cache.Blazor/CacheContent.razor
@@ -16,7 +16,7 @@
     }
     else
     {
-        
@_json
+
@_json
} diff --git a/Tharga.Cache.Blazor/Tharga.Cache.Blazor.csproj b/Tharga.Cache.Blazor/Tharga.Cache.Blazor.csproj index 66602f6..67ec546 100644 --- a/Tharga.Cache.Blazor/Tharga.Cache.Blazor.csproj +++ b/Tharga.Cache.Blazor/Tharga.Cache.Blazor.csproj @@ -27,7 +27,7 @@ - + diff --git a/Tharga.Cache.MongoDB/Tharga.Cache.MongoDB.csproj b/Tharga.Cache.MongoDB/Tharga.Cache.MongoDB.csproj index 68cddeb..c8e5250 100644 --- a/Tharga.Cache.MongoDB/Tharga.Cache.MongoDB.csproj +++ b/Tharga.Cache.MongoDB/Tharga.Cache.MongoDB.csproj @@ -39,7 +39,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/plan/feature.md b/plan/feature.md new file mode 100644 index 0000000..3340c30 --- /dev/null +++ b/plan/feature.md @@ -0,0 +1,21 @@ +# Feature: cache-content-darkmode + +## Goal +Fix the cache content JSON panel so it stays readable in dark Radzen themes. Today the `
` block in `CacheContent.razor` uses a hardcoded `background:#f5f5f5`, which combined with the theme's white default text colour renders white-on-white in dark mode.
+
+## Originating request
+`Tharga.Cache — Blazor / Dark-mode unreadable: hardcoded light background on cache content 
 block` from Quilt4Net.Server, priority Low.
+
+## Scope
+- `Tharga.Cache.Blazor/CacheContent.razor`, line 19 — replace the hardcoded `background:#f5f5f5` with a Radzen theme variable, and explicitly set the text colour for safety.
+
+## Acceptance criteria
+- The JSON panel is readable in both light and dark Radzen themes (verified visually in `Tharga.Cache.BlazorServer`).
+- Existing behaviour preserved — same border radius, padding, max-height, overflow.
+- Build is clean and all tests still pass.
+
+## Done condition
+User confirms the JSON panel renders correctly under at least one dark theme.
+
+## Originating branch
+master
diff --git a/plan/plan.md b/plan/plan.md
new file mode 100644
index 0000000..0dfd4c5
--- /dev/null
+++ b/plan/plan.md
@@ -0,0 +1,10 @@
+# Plan: cache-content-darkmode
+
+## Steps
+- [x] 1. Update `CacheContent.razor` — replaced `background:#f5f5f5` with `var(--rz-base)`, added `color: var(--rz-text-color)`.
+- [x] 2. Bundle dependency bumps (NuGet update reminder during feature start):
+      - Tharga.Blazor 2.1.4 → 2.1.5 in `Tharga.Cache.Blazor.csproj`.
+      - Tharga.MongoDB 2.10.9 → 2.10.10 in `Tharga.Cache.MongoDB.csproj` (clears NU1902/NU1903 advisories from transitive SharpCompress/Snappier).
+- [x] 3. Build clean (1 pre-existing CS0162 warning), 453 tests pass.
+- [ ] 4. Commit.
+- [ ] 5. (After user verifies dark mode in browser) close feature, push, create PR.

From a0b16a30fcb288d9eb1b83626aa0a9e5eaf79914 Mon Sep 17 00:00:00 2001
From: Daniel Bohlin 
Date: Sun, 10 May 2026 16:23:33 +0200
Subject: [PATCH 2/2] feat: cache-content-darkmode complete

---
 plan/feature.md | 21 ---------------------
 plan/plan.md    | 10 ----------
 2 files changed, 31 deletions(-)
 delete mode 100644 plan/feature.md
 delete mode 100644 plan/plan.md

diff --git a/plan/feature.md b/plan/feature.md
deleted file mode 100644
index 3340c30..0000000
--- a/plan/feature.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Feature: cache-content-darkmode
-
-## Goal
-Fix the cache content JSON panel so it stays readable in dark Radzen themes. Today the `
` block in `CacheContent.razor` uses a hardcoded `background:#f5f5f5`, which combined with the theme's white default text colour renders white-on-white in dark mode.
-
-## Originating request
-`Tharga.Cache — Blazor / Dark-mode unreadable: hardcoded light background on cache content 
 block` from Quilt4Net.Server, priority Low.
-
-## Scope
-- `Tharga.Cache.Blazor/CacheContent.razor`, line 19 — replace the hardcoded `background:#f5f5f5` with a Radzen theme variable, and explicitly set the text colour for safety.
-
-## Acceptance criteria
-- The JSON panel is readable in both light and dark Radzen themes (verified visually in `Tharga.Cache.BlazorServer`).
-- Existing behaviour preserved — same border radius, padding, max-height, overflow.
-- Build is clean and all tests still pass.
-
-## Done condition
-User confirms the JSON panel renders correctly under at least one dark theme.
-
-## Originating branch
-master
diff --git a/plan/plan.md b/plan/plan.md
deleted file mode 100644
index 0dfd4c5..0000000
--- a/plan/plan.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Plan: cache-content-darkmode
-
-## Steps
-- [x] 1. Update `CacheContent.razor` — replaced `background:#f5f5f5` with `var(--rz-base)`, added `color: var(--rz-text-color)`.
-- [x] 2. Bundle dependency bumps (NuGet update reminder during feature start):
-      - Tharga.Blazor 2.1.4 → 2.1.5 in `Tharga.Cache.Blazor.csproj`.
-      - Tharga.MongoDB 2.10.9 → 2.10.10 in `Tharga.Cache.MongoDB.csproj` (clears NU1902/NU1903 advisories from transitive SharpCompress/Snappier).
-- [x] 3. Build clean (1 pre-existing CS0162 warning), 453 tests pass.
-- [ ] 4. Commit.
-- [ ] 5. (After user verifies dark mode in browser) close feature, push, create PR.