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 42e67809bb9fc71046be4f6ccc4ffa1f8825b450 Author: Wu Sheng <[email protected]> AuthorDate: Sun May 31 09:00:00 2026 +0800 fix(layer): re-seed selection on same-layer deep-link params Completes the same-layer rehydrate fix: the LayerShell watch now fires on query changes, but resetForLayer early-returned when ownerKey === layerKey, so a same-mounted-layer deep link still no-opped. Re-seed when the query carries ?service/?instance/?endpoint even on the same layer; keep the sticky pick only for paramless scope/tab navigation. --- apps/ui/src/state/layerSelection.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/ui/src/state/layerSelection.ts b/apps/ui/src/state/layerSelection.ts index 6d5d02c..0422cbf 100644 --- a/apps/ui/src/state/layerSelection.ts +++ b/apps/ui/src/state/layerSelection.ts @@ -64,7 +64,13 @@ export const useLayerSelectionStore = defineStore('layer-selection', () => { * a no-op — the operator's pick survives. */ function resetForLayer(layerKey: string, query: Record<string, unknown>): void { - if (ownerKey.value === layerKey) return; + const hasSeed = + query.service != null || query.instance != null || query.endpoint != null; + // Same layer + NO deep-link params → keep the sticky pick (scope/tab + // nav within the layer). Same layer WITH params (a deep link into the + // layer the operator is already on) DOES re-seed, otherwise the new + // ?service/?instance/?endpoint would be silently ignored. + if (ownerKey.value === layerKey && !hasSeed) return; ownerKey.value = layerKey; service.value = pickQueryString(query.service); instance.value = pickQueryString(query.instance);
