From 45b61f812de45882dcfcb7966d79155f44c4936e Mon Sep 17 00:00:00 2001 From: Kirill Ilin Date: Mon, 2 Mar 2026 23:13:48 +0500 Subject: [PATCH] fix(dashboard): restore stock-instance sidebars for namespace-level pages PR #2106 removed stock-instance-* sidebar resources to fix broken URLs on the main page before namespace selection. However, these sidebars are required for rendering namespace-level pages (api-table, api-form, etc.) such as the Backup Plans page. Without stock-instance-api-table, the frontend cannot find the sidebar for namespace-scoped api-table pages and renders an empty page instead. The original bug (broken URLs with empty namespace placeholder) is already fixed by CUSTOMIZATION_SIDEBAR_FALLBACK_ID="" in web.yaml, so re-adding stock-instance-* sidebars does not reintroduce it. Co-Authored-By: Claude Signed-off-by: Kirill Ilin --- internal/controller/dashboard/manager.go | 4 ++++ internal/controller/dashboard/sidebar.go | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/internal/controller/dashboard/manager.go b/internal/controller/dashboard/manager.go index 339c9b9e..42c641ad 100644 --- a/internal/controller/dashboard/manager.go +++ b/internal/controller/dashboard/manager.go @@ -307,6 +307,10 @@ func (m *Manager) buildExpectedResourceSet(crds []cozyv1alpha1.ApplicationDefini "stock-project-builtin-table", "stock-project-crd-form", "stock-project-crd-table", + "stock-instance-api-form", + "stock-instance-api-table", + "stock-instance-builtin-form", + "stock-instance-builtin-table", } for _, sidebarID := range stockSidebars { expected["Sidebar"][sidebarID] = true diff --git a/internal/controller/dashboard/sidebar.go b/internal/controller/dashboard/sidebar.go index 0ea41f0d..1f1c1670 100644 --- a/internal/controller/dashboard/sidebar.go +++ b/internal/controller/dashboard/sidebar.go @@ -243,6 +243,11 @@ func (m *Manager) ensureSidebar(ctx context.Context, crd *cozyv1alpha1.Applicati "stock-project-builtin-table", "stock-project-crd-form", "stock-project-crd-table", + // stock-instance sidebars (namespace-level pages after namespace is selected) + "stock-instance-api-form", + "stock-instance-api-table", + "stock-instance-builtin-form", + "stock-instance-builtin-table", } // Add details sidebars for all CRDs with dashboard config