From 9264749b3e7680fcc361aee05b0ef306df31fe5c Mon Sep 17 00:00:00 2001 From: akhuoa Date: Tue, 6 Jan 2026 13:09:11 +1300 Subject: [PATCH 1/5] Query forward and backward connections on path click --- src/components/SplitFlow.vue | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/components/SplitFlow.vue b/src/components/SplitFlow.vue index 8733c775..34f3f6c2 100644 --- a/src/components/SplitFlow.vue +++ b/src/components/SplitFlow.vue @@ -73,6 +73,9 @@ import SplitDialog from "./SplitDialog.vue"; // import contextCards from './context-cards' import { SideBar } from "@abi-software/map-side-bar"; import "@abi-software/map-side-bar/dist/style.css"; +import { + queryForwardBackwardConnections +} from '@abi-software/map-utilities'; import { capitalise, getNewMapEntry, @@ -85,6 +88,7 @@ import { useEntriesStore } from '../stores/entries'; import { useMainStore } from '../stores/index' import { useSettingsStore } from '../stores/settings'; import { useSplitFlowStore } from '../stores/splitFlow'; +import { useConnectivitiesStore } from '../stores/connectivities'; import { ElContainer as Container, ElHeader as Header, @@ -454,7 +458,7 @@ export default { }); } }, - openConnectivityInfo: function (payload) { + openConnectivityInfo: async function (payload) { // expand connectivity card and show connectivity info // if expanded exist, payload should be an array of one element // skip payload not match the expanded in multiple views @@ -483,6 +487,31 @@ export default { } else { // click on the flatmap paths/features directly // or onDisplaySearch is performed + const connectivityEntries = this.connectivityEntry.map(entry => entry.id); + const flatmapAPI = this.settingsStore.flatmapAPI; + const knowledgeSource = this.connectivityEntry[0].mapuuid || ''; + + if (connectivityEntries.length && knowledgeSource) { + const connections = await queryForwardBackwardConnections(flatmapAPI, knowledgeSource, connectivityEntries); + const availableConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys; + const mappedConnections = connections.map((connId) => { + const matched = availableConnectivities.find((ac) => ac.id === connId); + if (matched) { + return { + ...matched, + featureId: [matched.id], + title: matched.label, + id: matched.id, + label: matched.label, + 'nerve-label': matched['nerve-label'], + ready: true, + }; + } + return false; + }); + this.connectivityEntry.push(...mappedConnections); + } + this.connectivityKnowledge = this.connectivityEntry; if (this.connectivityKnowledge.every(ck => ck.ready)) { this.connectivityHighlight = this.connectivityKnowledge.map(ck => ck.id); @@ -981,7 +1010,7 @@ export default { }); }, computed: { - ...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore), + ...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore, useConnectivitiesStore), envVars: function () { return { API_LOCATION: this.settingsStore.sparcApi, From 5727ac972886a39f0c56ce108b683197d4f9a007 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Tue, 6 Jan 2026 13:36:07 +1300 Subject: [PATCH 2/5] Update neuron connection mode label --- src/components/DialogToolbarContent.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/DialogToolbarContent.vue b/src/components/DialogToolbarContent.vue index 27074a67..6d386815 100644 --- a/src/components/DialogToolbarContent.vue +++ b/src/components/DialogToolbarContent.vue @@ -119,8 +119,7 @@ Neuron populations terminating at a location. - Neuron populations associated with a location (or) - Neuron populations that share at least one edge with another neuron population. + Neuron populations associated with a location. From 96a6a70b8c3e63568a988e1e9d84191a699a6473 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Thu, 15 Jan 2026 10:23:46 +1300 Subject: [PATCH 3/5] Fix connectivity details not showing for forward/backward connections --- src/components/SplitFlow.vue | 39 +++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/components/SplitFlow.vue b/src/components/SplitFlow.vue index 34f3f6c2..3f452566 100644 --- a/src/components/SplitFlow.vue +++ b/src/components/SplitFlow.vue @@ -490,33 +490,36 @@ export default { const connectivityEntries = this.connectivityEntry.map(entry => entry.id); const flatmapAPI = this.settingsStore.flatmapAPI; const knowledgeSource = this.connectivityEntry[0].mapuuid || ''; + let mappedConnections = []; + let forwardBackwardConnections = []; + // fetch forward/backward connections if (connectivityEntries.length && knowledgeSource) { - const connections = await queryForwardBackwardConnections(flatmapAPI, knowledgeSource, connectivityEntries); + forwardBackwardConnections = await queryForwardBackwardConnections(flatmapAPI, knowledgeSource, connectivityEntries); + const allConnections = [ + ...connectivityEntries, + ...forwardBackwardConnections, + ]; const availableConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys; - const mappedConnections = connections.map((connId) => { - const matched = availableConnectivities.find((ac) => ac.id === connId); - if (matched) { - return { - ...matched, - featureId: [matched.id], - title: matched.label, - id: matched.id, - label: matched.label, - 'nerve-label': matched['nerve-label'], - ready: true, - }; - } - return false; + mappedConnections = allConnections.map((connId) => { + return availableConnectivities.find((ac) => ac.id === connId); }); - this.connectivityEntry.push(...mappedConnections); } - this.connectivityKnowledge = this.connectivityEntry; - if (this.connectivityKnowledge.every(ck => ck.ready)) { + // if there are forward/backward connections, use them for connectivityKnowledge + if (forwardBackwardConnections.length) { + this.connectivityEntry = []; + this.connectivityKnowledge = mappedConnections; this.connectivityHighlight = this.connectivityKnowledge.map(ck => ck.id); this.connectivityProcessed = true; + } else { + this.connectivityKnowledge = this.connectivityEntry; + if (this.connectivityKnowledge.every(ck => ck.ready)) { + this.connectivityHighlight = this.connectivityKnowledge.map(ck => ck.id); + this.connectivityProcessed = true; + } } + if (this.$refs.sideBar) { this.$refs.sideBar.tabClicked({ id: 2, type: 'connectivityExplorer' }); this.$refs.sideBar.setDrawerOpen(true); From 1217322466520035e6f75d722674ce8d7a9813e1 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Thu, 15 Jan 2026 10:37:15 +1300 Subject: [PATCH 4/5] Fetch forward and backward connections only for neuron connection mode --- src/components/SplitFlow.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/SplitFlow.vue b/src/components/SplitFlow.vue index 3f452566..d1492bd9 100644 --- a/src/components/SplitFlow.vue +++ b/src/components/SplitFlow.vue @@ -489,12 +489,13 @@ export default { // or onDisplaySearch is performed const connectivityEntries = this.connectivityEntry.map(entry => entry.id); const flatmapAPI = this.settingsStore.flatmapAPI; + const { viewingMode } = this.settingsStore.globalSettings; const knowledgeSource = this.connectivityEntry[0].mapuuid || ''; let mappedConnections = []; let forwardBackwardConnections = []; - // fetch forward/backward connections - if (connectivityEntries.length && knowledgeSource) { + // fetch forward/backward connections on Neuron Connection mode + if (viewingMode === 'Neuron Connection' && connectivityEntries.length && knowledgeSource) { forwardBackwardConnections = await queryForwardBackwardConnections(flatmapAPI, knowledgeSource, connectivityEntries); const allConnections = [ ...connectivityEntries, From f39b92c03e294e6d7220286cea19272ed02f905d Mon Sep 17 00:00:00 2001 From: akhuoa Date: Thu, 15 Jan 2026 10:57:14 +1300 Subject: [PATCH 5/5] Remove duplicated items from connectivity click --- src/components/SplitFlow.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/SplitFlow.vue b/src/components/SplitFlow.vue index d1492bd9..492333f3 100644 --- a/src/components/SplitFlow.vue +++ b/src/components/SplitFlow.vue @@ -467,7 +467,10 @@ export default { this.connectivityExplorerClicked.pop(); return; } - this.connectivityEntry = payload.map(entry => { + + // Remove duplicate items from payload + const uniquePayload = [...new Map(payload.map((entry) => [entry.featureId[0], entry])).values()]; + this.connectivityEntry = uniquePayload.map((entry) => { let result = { ...entry, label: entry.title, @@ -479,6 +482,7 @@ export default { } return result; }); + if (this.connectivityExplorerClicked.length) { // only remove clicked if not placeholder entry if (this.connectivityEntry.every(entry => entry.ready)) {