From 77dafab7dbb3933239eb45cdfc06b33eabe65a56 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 9 Mar 2026 21:54:28 +0000 Subject: [PATCH] Fix Teesside node scope and add flasher nav --- backend/src/db/index.ts | 16 +++++++++++++++- frontend/src/pages/shared/SiteLayout.tsx | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/backend/src/db/index.ts b/backend/src/db/index.ts index e4ad2f9..f247037 100644 --- a/backend/src/db/index.ts +++ b/backend/src/db/index.ts @@ -77,7 +77,21 @@ function buildNodeScopeClause( const conditions: string[] = []; if (placeholders.networkParam) { - conditions.push(`${prefix}network = ${placeholders.networkParam}`); + conditions.push( + `( + ${prefix}network = ${placeholders.networkParam} + OR ( + ${placeholders.networkParam} = 'teesside' + AND EXISTS ( + SELECT 1 + FROM packets p_scope + WHERE LOWER(p_scope.src_node_id) = LOWER(${prefix}node_id) + AND p_scope.network = 'teesside' + AND split_part(p_scope.topic, '/', 1) <> 'meshcore-test' + ) + ) + )`, + ); } else { conditions.push(`${prefix}network IS DISTINCT FROM 'test'`); } diff --git a/frontend/src/pages/shared/SiteLayout.tsx b/frontend/src/pages/shared/SiteLayout.tsx index 899366c..541acfd 100644 --- a/frontend/src/pages/shared/SiteLayout.tsx +++ b/frontend/src/pages/shared/SiteLayout.tsx @@ -139,6 +139,7 @@ export const SiteLayout: React.FC = ({ ))} {showLiveMap && Live Map} + Flasher handleNavClick('/login')}