From 11702fa5e0b66926436f42c7736faea281ed31e1 Mon Sep 17 00:00:00 2001 From: duckietm Date: Tue, 26 May 2026 12:51:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=99=20Small=20updates=20for=20the=20HK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/configuration/ui-config.example | 1 + .../views/audit/HousekeepingAuditTab.tsx | 10 +--- .../dashboard/HousekeepingDashboardTab.tsx | 16 +---- .../views/economy/HousekeepingEconomyTab.tsx | 25 ++------ .../views/rooms/HousekeepingRoomsTab.tsx | 22 ++----- .../views/users/HousekeepingUsersTab.tsx | 60 +++---------------- src/components/toolbar/ToolbarView.tsx | 12 +++- src/css/icons/icons.css | 7 +++ 8 files changed, 37 insertions(+), 116 deletions(-) diff --git a/public/configuration/ui-config.example b/public/configuration/ui-config.example index 5503c2c..d531398 100644 --- a/public/configuration/ui-config.example +++ b/public/configuration/ui-config.example @@ -25,6 +25,7 @@ "wired.action.mute.user.max.length": 100, "game.center.enabled": false, "guides.enabled": true, + "housekeeping.enabled": true, "toolbar.hide.quests": true, "catalog.style.new": true, "show.google.ads": false, diff --git a/src/components/housekeeping/views/audit/HousekeepingAuditTab.tsx b/src/components/housekeeping/views/audit/HousekeepingAuditTab.tsx index 6141da7..714b151 100644 --- a/src/components/housekeeping/views/audit/HousekeepingAuditTab.tsx +++ b/src/components/housekeeping/views/audit/HousekeepingAuditTab.tsx @@ -33,15 +33,8 @@ const passesFilter = (entry: IHousekeepingActionLogEntry, target: TargetFilter, export const HousekeepingAuditTab: FC = () => { const { actionLog, refreshAuditLog, metricsByAction, resetActionMetrics } = useHousekeepingStore(); - // Gated behind a UI-config flag (off by default) so non-debug - // operators don't see internal latency stats. The flag is read - // once at mount — flipping the config requires a reload, same - // as every other UI-config gate. const telemetryEnabled = useMemo(() => GetConfigurationValue('housekeeping.telemetry.enabled', false) === true, []); const [ isTelemetryExpanded, setIsTelemetryExpanded ] = useState(false); - // Filter state is persisted per user so an HK who's iterating on - // "show me failures only, filtered to 'spam'" doesn't reset every - // time they switch tabs or close the panel. const [ targetFilter, setTargetFilter ] = useLocalStorage('nitro.housekeeping.audit.target_filter', 'all'); const [ successFilter, setSuccessFilter ] = useLocalStorage('nitro.housekeeping.audit.success_filter', 'all'); const [ query, setQuery ] = useLocalStorage('nitro.housekeeping.audit.query', ''); @@ -73,7 +66,6 @@ export const HousekeepingAuditTab: FC = () => return (
- { /* Header w/ counts + refresh */ }

@@ -87,7 +79,7 @@ export const HousekeepingAuditTab: FC = () =>

diff --git a/src/components/housekeeping/views/dashboard/HousekeepingDashboardTab.tsx b/src/components/housekeeping/views/dashboard/HousekeepingDashboardTab.tsx index 4cb1b8c..6c93af4 100644 --- a/src/components/housekeeping/views/dashboard/HousekeepingDashboardTab.tsx +++ b/src/components/housekeeping/views/dashboard/HousekeepingDashboardTab.tsx @@ -70,26 +70,17 @@ export const HousekeepingDashboardTab: FC = () => const [ now, setNow ] = useState(() => Date.now()); const [ refreshedAt, setRefreshedAt ] = useState(null); - // Tag every successful dashboard payload with a local timestamp. - // Triggered when the `dashboard` reference flips post-refresh. useEffect(() => { if(dashboard) setRefreshedAt(Date.now()); }, [ dashboard ]); - // Wall-clock tick — drives the "live X seconds ago" copy + the - // stale-banner trigger. Cheap (1 setState/s) and only runs while - // the tab is mounted. useEffect(() => { const id = setInterval(() => setNow(Date.now()), 1_000); return () => clearInterval(id); }, []); - // Auto-refresh: polls getDashboard every AUTO_REFRESH_MS while the - // tab is mounted. The HK panel's parent already kicks off an - // initial refresh on open, so this only handles the steady-state - // re-fetch; closing the tab unmounts the effect and stops the loop. const refreshRef = useRef(refreshDashboard); refreshRef.current = refreshDashboard; @@ -161,7 +152,6 @@ export const HousekeepingDashboardTab: FC = () => return (
- { /* Header row: title + live status badge + refresh */ }

@@ -176,7 +166,7 @@ export const HousekeepingDashboardTab: FC = () =>

@@ -196,7 +186,6 @@ export const HousekeepingDashboardTab: FC = () => { dashboard && <> - { /* Hero card: BIG online count + pulsing dot + peak today */ }
@@ -252,7 +241,6 @@ export const HousekeepingDashboardTab: FC = () =>
- { /* Quick hotel-alert inline */ }