From 22cada90820af9f9f68d280f7d05bee11de2c21f Mon Sep 17 00:00:00 2001 From: Paul Nothaft Date: Tue, 1 Sep 2026 18:54:39 +0200 Subject: [PATCH] fix(ui): drop themed text colours from the last three admin surfaces SystemHealthPage, CrmOverviewSection and HoursSection used text-theme (color: var(--color-text)) explicitly, so on a dark-toned branding theme they render near-invisible on the light admin background -- and because the class is explicit it beats the AdminLayout default that protects everything else. Converted to the neutral scale using the convention from da9ceb14. Swept the whole of each file rather than the cited lines: 3 in SystemHealthPage, 5 in CrmOverviewSection (two of them h3 elements with no colour class at all), 17 in HoursSection. All three are admin-only -- call sites verified as AdminDashboard, CustomerDetailPage, HoursLoggingPage and /admin/system-health -- so no customer-portal or public-token surface is affected, where these utilities are correct by design. Zero themed utilities remain in the three files. Refs testplan REPORT.md B14. --- .../components/admin/CrmOverviewSection.tsx | 12 +++---- .../src/components/admin/HoursSection.tsx | 36 ++++++++++--------- frontend/src/pages/admin/SystemHealthPage.tsx | 6 ++-- .../__tests__/brandingThemeTextLeak.test.ts | 19 ++++++++++ 4 files changed, 48 insertions(+), 25 deletions(-) diff --git a/frontend/src/components/admin/CrmOverviewSection.tsx b/frontend/src/components/admin/CrmOverviewSection.tsx index 34a17978..72700a2c 100644 --- a/frontend/src/components/admin/CrmOverviewSection.tsx +++ b/frontend/src/components/admin/CrmOverviewSection.tsx @@ -85,7 +85,7 @@ export const CrmOverviewSection: React.FC = () => { // backend). Keep it small so it doesn't disrupt the page. return (
-

+

{t('crmOverview.title', 'CRM overview')}

@@ -101,7 +101,7 @@ export const CrmOverviewSection: React.FC = () => { return (

-

+

{t('crmOverview.title', 'CRM overview')}

@@ -155,7 +155,7 @@ export const CrmOverviewSection: React.FC = () => { {quotesBlock && (
-

+

{t('crmOverview.quotes.title', 'Quotes')}

@@ -208,7 +208,7 @@ export const CrmOverviewSection: React.FC = () => { {invoicesBlock && (
-

+

{t('crmOverview.invoices.title', 'Invoices')}

@@ -270,9 +270,9 @@ const StatCard: React.FC = ({ icon, label, value, sub, to, onClic
{icon}
-
{label}
+
{label}
{value}
- {sub &&
{sub}
} + {sub &&
{sub}
}
diff --git a/frontend/src/components/admin/HoursSection.tsx b/frontend/src/components/admin/HoursSection.tsx index 585f3a47..7a0e6b02 100644 --- a/frontend/src/components/admin/HoursSection.tsx +++ b/frontend/src/components/admin/HoursSection.tsx @@ -248,11 +248,15 @@ export const HoursSection: React.FC = ({ return ( -

+ {/* Explicit neutral colours (not `text-theme` / `text-muted-theme`): + those resolve to the gallery branding theme's --color-text, which + is applied globally on and renders near-white inside the + light admin chrome (QA S13). */} +

{t('customers.hours.section', 'Hours')}

-

+

{isMonthly ? t('customers.hours.monthlyHint', 'Entries auto-append to the current monthly draft. Edit / delete remains possible until the scheduler arms the draft for send.') @@ -268,7 +272,7 @@ export const HoursSection: React.FC = ({ is configured anywhere along the chain. */} {!compact && (

-
) : ( -

+

{profileDefaultCurrency} {((effectiveDefaultRateMinor as number) / 100).toFixed(2)} - + {customerHourlyRateMinor != null ? t('customers.hours.rateSource.customer', 'from this customer') : t('customers.hours.rateSource.installDefault', 'install-wide default')} @@ -333,28 +337,28 @@ export const HoursSection: React.FC = ({ lives on the standalone /admin/clients/hours surface. */} {!compact && (

-

{t('customers.hours.form.title', 'Log new entry')}

+

{t('customers.hours.form.title', 'Log new entry')}

-
-
-
-
-
-