From ac7285789d9f57f456329c25f301e7443d9dde6b Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 30 Jul 2026 23:30:43 +0800 Subject: [PATCH] fix(dashboard): include private locations in monitor sidebar regions (#2508) Fixes issue where sidebar Regions section only showed cloud regions, appearing empty for private-only monitors. Changes: Combined monitor.regions with monitor.privateLocations mapped to string IDs, matching the pattern used in the overview page. The sidebar now shows all regions (cloud + private) with the same display logic (show count if more than 6, otherwise show comma-separated list). --- .../src/app/(dashboard)/monitors/[id]/sidebar.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/dashboard/src/app/(dashboard)/monitors/[id]/sidebar.tsx b/apps/dashboard/src/app/(dashboard)/monitors/[id]/sidebar.tsx index e054ab3e..98c4e4df 100644 --- a/apps/dashboard/src/app/(dashboard)/monitors/[id]/sidebar.tsx +++ b/apps/dashboard/src/app/(dashboard)/monitors/[id]/sidebar.tsx @@ -70,10 +70,17 @@ export function Sidebar() { }, { label: "Regions", - value: - monitor.regions.length > 6 - ? `${monitor.regions.length} regions` - : monitor.regions.join(", "), + value: (() => { + const allRegions = [ + ...monitor.regions, + ...(monitor.privateLocations?.map((location) => + location.id.toString(), + ) ?? []), + ]; + return allRegions.length > 6 + ? `${allRegions.length} regions` + : allRegions.join(", "); + })(), }, { label: "Tags", -- 2.51.2