From 5868f045bc6b9cdecba435b86726d56ba7f2b233 Mon Sep 17 00:00:00 2001 From: OmO Orchestrator Date: Fri, 20 Nov 2026 19:56:26 -0500 Subject: [PATCH] refactor(admin): move AdminAggregatePanel inline styles to CSS module tokens Co-authored-by: sisyphus-dev-ai --- src/admin/AdminAggregatePanel.module.css | 22 ++++++++++++++++++++++ src/admin/AdminAggregatePanel.tsx | 15 ++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 src/admin/AdminAggregatePanel.module.css diff --git a/src/admin/AdminAggregatePanel.module.css b/src/admin/AdminAggregatePanel.module.css new file mode 100644 index 0000000..b19e772 --- /dev/null +++ b/src/admin/AdminAggregatePanel.module.css @@ -0,0 +1,22 @@ +.section { + margin-top: var(--space-6); + border-top: 1px solid var(--color-border); + padding-top: var(--space-4); +} + +.heading { + font-size: 1rem; +} + +.subheading { + font-size: 0.875rem; +} + +.description { + color: var(--color-ink-soft); + font-size: 0.8125rem; +} + +.error { + color: var(--color-negative); +} diff --git a/src/admin/AdminAggregatePanel.tsx b/src/admin/AdminAggregatePanel.tsx index 4161bd2..da1cb85 100644 --- a/src/admin/AdminAggregatePanel.tsx +++ b/src/admin/AdminAggregatePanel.tsx @@ -1,4 +1,5 @@ import { useCallback, useEffect, useState } from "react"; +import styles from "./AdminAggregatePanel.module.css"; export interface MiniappActivitySummary { id: string; @@ -55,9 +56,9 @@ export function AdminAggregatePanel({ endpoint = "/api/admin/aggregate" }: Admin }, [load]); return ( -
-

Backend relay: aggregate monitoring view

-

+

+

Backend relay: aggregate monitoring view

+

Read-only summary of whatever events have reached the backend relay (api/sync) from any device so far - never a placeholder figure. Re-fetches the relay's current state every time it loads. @@ -67,7 +68,7 @@ export function AdminAggregatePanel({ endpoint = "/api/admin/aggregate" }: Admin {error && ( -

+

Could not load aggregate: {error}

)} @@ -84,7 +85,7 @@ export function AdminAggregatePanel({ endpoint = "/api/admin/aggregate" }: Admin {summary.population === null ? "not seeded yet" : summary.population}

-

Resource levels

+

Resource levels

    {Object.entries(summary.resources).map(([resource, value]) => (
  • @@ -96,7 +97,7 @@ export function AdminAggregatePanel({ endpoint = "/api/admin/aggregate" }: Admin )}
-

Per-mini-app last activity

+

Per-mini-app last activity

    {summary.miniapps.map((m) => (
  • @@ -106,7 +107,7 @@ export function AdminAggregatePanel({ endpoint = "/api/admin/aggregate" }: Admin {summary.miniapps.length === 0 &&
  • No mini-app activity relayed yet.
  • }
-

Error-tagged events

+

Error-tagged events

    {summary.errorEvents.map((e) => (