From 8666e0271c2c9aaadd1f9119b55ee7347a8cad50 Mon Sep 17 00:00:00 2001 From: Cam Proudlock Date: Sat, 29 Aug 2026 19:09:06 -0400 Subject: [PATCH] Reciprocal controls links, dead chip links, and a resumable legacy import The machine page now shows the PC that controls it. The endpoint was correct all along and returned both directions; AssetTriageBand discarded every peer whose type was not 'machine' and was mounted only on the PC page. The counterpart type, label and relationship types are now props. Fixed while adopting it more widely: every band chip linked to /assets/, and there is no such route. The resolver that AssetRelationships.vue kept privately is now frontend/src/utils/assetRoute.js, used by both - and its type lookup is case-insensitive, because seed data capitalises the type names while this site's database does not. The legacy import is now safe to resume. The 409-resolve asked for per_page=10000 against a server that clamps to 100, so it silently searched the first 100 rows and dropped links past that on every re-run. The crosswalk is now bound to the database it describes, so one carried across a rebuild is refused rather than attaching rows to the wrong assets. Source database names are resolved from the environment, so the loader can be aimed without editing it. Full suite 2178 passed, frontend 280 passed. --- .../src/components/AssetRelationships.vue | 24 +-- frontend/src/components/AssetTriageBand.vue | 51 ++++-- frontend/src/utils/assetRoute.js | 43 +++++ frontend/src/utils/assetRoute.spec.js | 54 ++++++ .../machines/frontend/views/MachineDetail.vue | 12 ++ .../frontend/views/MeasuringToolDetail.vue | 10 ++ .../frontend/views/NetworkDeviceDetail.vue | 9 + .../printers/frontend/views/PrinterDetail.vue | 11 ++ scripts/site_imports/wjf/PILOT-DEPLOY.md | 43 ++++- scripts/site_imports/wjf/README.md | 34 +++- scripts/site_imports/wjf/harness.py | 137 +++++++++++++-- scripts/site_imports/wjf/run.py | 138 +++++++++++++-- .../test_relationship_directional.py | 47 +++++ tests/test_site_import_loader.py | 164 ++++++++++++++++++ 14 files changed, 701 insertions(+), 76 deletions(-) create mode 100644 frontend/src/utils/assetRoute.js create mode 100644 frontend/src/utils/assetRoute.spec.js create mode 100644 tests/test_site_import_loader.py diff --git a/frontend/src/components/AssetRelationships.vue b/frontend/src/components/AssetRelationships.vue index 5aaf4afc..0b1d11b1 100644 --- a/frontend/src/components/AssetRelationships.vue +++ b/frontend/src/components/AssetRelationships.vue @@ -186,6 +186,7 @@