This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch fix/3d-fps-and-layer-rehydrate
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git

commit 025738a8971fa338222fff0c6b3d587f0c8aea69
Author: Wu Sheng <[email protected]>
AuthorDate: Sun May 31 09:06:21 2026 +0800

    fix(layer): complete the endpoint/config dashboard gating
    
    Three follow-ons to the prior layer-URL fixes, all in LayerDashboardsView:
    - effectiveEndpoint now also accepts a pin confirmed by the targeted name
      lookup, so a valid endpoint outside the top-N actually drives the fetch
      instead of leaving the dashboard gated forever.
    - configReady requires resolved widgets (not just config != null), so an
      empty resolved config no longer fires metrics that the BFF fills with
      default widgets — metrics run only for resolved widgets.
    - the page-init orchestrator now receives 
effectiveInstance/effectiveEndpoint
      (validated), not the raw selected refs, so its event sequence matches when
      metrics are actually allowed to run.
---
 .../render/layer-dashboard/LayerDashboardsView.vue    | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/apps/ui/src/render/layer-dashboard/LayerDashboardsView.vue 
b/apps/ui/src/render/layer-dashboard/LayerDashboardsView.vue
index 7ef58ea..49a57fc 100644
--- a/apps/ui/src/render/layer-dashboard/LayerDashboardsView.vue
+++ b/apps/ui/src/render/layer-dashboard/LayerDashboardsView.vue
@@ -347,12 +347,19 @@ const effectiveInstance = computed<string | null>(() => {
 const effectiveEndpoint = computed<string | null>(() => {
   const v = selectedEndpoint.value;
   if (!v) return null;
-  return endpointList.value.some((e) => e.name === v) ? v : null;
+  // Valid if in the default top-N OR confirmed by the targeted name lookup
+  // (a deep-linked endpoint outside the recent list) — otherwise the
+  // dashboard would stay gated forever for a perfectly valid pin.
+  if (endpointList.value.some((e) => e.name === v)) return v;
+  if (pinnedEndpointMatches.value.some((e) => e.name === v)) return v;
+  return null;
 });
 const widgetsForQuery = computed(() => config.value?.widgets ?? []);
-// Hold the metrics fetch until the dashboard config bundle has resolved,
-// so the widget list fires once (resolved) rather than empty-then-refetch.
-const configReady = computed(() => config.value !== null);
+// Hold the metrics fetch until the config bundle has resolved WITH widgets.
+// A resolved-but-empty config means "no dashboard for this layer/scope",
+// so we don't fire (which would otherwise make the BFF substitute its own
+// default widget set); metrics run only for resolved widgets.
+const configReady = computed(() => widgetsForQuery.value.length > 0);
 const { data, isFetching, error } = useLayerDashboard(
   layerKey,
   serviceName,
@@ -376,9 +383,9 @@ useLayerPageOrchestrator({
   serviceList: landingRows,
   effectiveService: serviceName,
   instanceList,
-  effectiveInstance: selectedInstance,
+  effectiveInstance,
   endpointList,
-  effectiveEndpoint: selectedEndpoint,
+  effectiveEndpoint,
   dashboard: data,
 });
 

Reply via email to