From 5cd4407e57ad6c6388528569af65675482925d62 Mon Sep 17 00:00:00 2001 From: KaifAhmad1 Date: Thu, 6 Aug 2026 13:03:56 +0530 Subject: [PATCH] fix(explorer): review follow-ups for #830 render-loop fix - Wire the Explorer frontend's node --test suites (test:graph-store, test:graph-workspace, and the new test:plugin-registry regression test) into CI. Previously only `npm run build` ran, so none of the frontend tests -- including this fix's own regression coverage -- executed anywhere except a contributor's local machine. - Broaden the diagnostics dedup's structureLayer comparison to also cover disabledReason/curveCount/bridgeCurveCount/backboneCurveCount, not just cacheKey/lastDrawAt/enabled, so a disabledReason-only transition doesn't leave the dev diagnostics panel stale. --- .github/workflows/ci.yml | 13 ++++++++++--- .../workspaces/GraphWorkspace/GraphWorkspace.tsx | 6 +++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18a246fb..6122e91b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,18 @@ jobs: node-version: '20' cache: 'npm' cache-dependency-path: explorer/package-lock.json - - name: Build Explorer frontend + - name: Install Explorer frontend dependencies + working-directory: explorer + run: npm ci + - name: Test Explorer frontend working-directory: explorer run: | - npm ci - npm run build + npm run test:graph-store + npm run test:graph-workspace + npm run test:plugin-registry + - name: Build Explorer frontend + working-directory: explorer + run: npm run build - run: pip install build - run: python -m build - name: Verify Explorer frontend is packaged diff --git a/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx b/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx index 4aa36e7a..df2cd6ec 100644 --- a/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx +++ b/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx @@ -2323,7 +2323,11 @@ export function GraphWorkspace({ externalFocusNodeId, externalFocusToken }: Grap const structureLayerChanged = prev.structureLayer?.cacheKey !== diagnostics.structureLayer?.cacheKey || prev.structureLayer?.lastDrawAt !== diagnostics.structureLayer?.lastDrawAt || - prev.structureLayer?.enabled !== diagnostics.structureLayer?.enabled; + prev.structureLayer?.enabled !== diagnostics.structureLayer?.enabled || + prev.structureLayer?.disabledReason !== diagnostics.structureLayer?.disabledReason || + prev.structureLayer?.curveCount !== diagnostics.structureLayer?.curveCount || + prev.structureLayer?.bridgeCurveCount !== diagnostics.structureLayer?.bridgeCurveCount || + prev.structureLayer?.backboneCurveCount !== diagnostics.structureLayer?.backboneCurveCount; // distanceVisual is compared by reference: GraphCanvas passes the same // object when distances haven't changed.