From 78017eee2aead95f260db15bdd49372dacb210b1 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Sat, 29 Aug 2026 19:24:07 -0400 Subject: [PATCH] Put the dual-bay sibling in the triage band, and fix the gage counterpart TWO STRIPS OF CHROME SAYING THE SAME KIND OF THING The machine page opened with a banner - "Dual-bay machine - sibling bay: 2022" - directly above a hero whose band said "Controlled by". Both answer "what am I looking at", and splitting them across a banner and a band cost a strip of vertical space to say so. The sibling is now a chip in the band beside the controlling PC. The band takes an `extraitems` prop rather than learning what dualpath is: the pairing is resolved by the machines plugin, not from the relationships endpoint, so core cannot derive it, and a dualpath-shaped prop on a core component would be the machines plugin leaking upward. A page passes [{label, links:[{text, to}]}] and the band renders it with its own markup, which also keeps the chips visually identical to the ones it derives itself. The label stays "Dual-bay sibling" rather than "Dualpath". The banner spelled the meaning out because a dualpath pair is ONE physical machine in two bays; a chip reading "Dualpath" would have dropped that. THE GAGE PAGE FILTERED FOR A COUNTERPART THAT CANNOT EXIST MeasuringToolDetail was wired counterparttype="machine" labelled "Used on". Wrong on both counts. The import synthesizes one measuring-tool asset per metrology PC and a 'controls' edge PC -> tool (stage_metrology), so a gage's counterpart is a COMPUTER, exactly as on the machine page. Filtering for a machine peer meant the band rendered nothing on every gage that has a PC. It looked merely empty rather than wrong because this dev database holds one measuring tool with no relationships at all, so there was nothing to be missing. A hand-held gage genuinely has no such edge and correctly shows nothing; a metrology station now shows the PC that drives it. The relationships card stays. It is the only surface with Add Relationship and the per-row delete, and it lists types the band filters out - the band is triage, the card is management. It does now repeat what the band shows, which is worth revisiting separately. Verified on screen. Frontend 280 passed. --- frontend/src/components/AssetTriageBand.vue | 25 +++++++++- .../machines/frontend/views/MachineDetail.vue | 47 +++++++++---------- .../frontend/views/MeasuringToolDetail.vue | 17 +++++-- 3 files changed, 57 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/AssetTriageBand.vue b/frontend/src/components/AssetTriageBand.vue index 15556f89..62a0d5e3 100644 --- a/frontend/src/components/AssetTriageBand.vue +++ b/frontend/src/components/AssetTriageBand.vue @@ -19,6 +19,20 @@ +
+ {{ item.label }} + + {{ link.text }} + +
+
Remote access @@ -86,7 +100,15 @@ const props = defineProps({ // printer through usesprinter and defaultprinter. Hardcoding 'controls' // left the band blank on the printer page, which is the one page where the // link is not obvious from the asset itself. - relationshiptypes: { type: Array, default: () => ['controls'] } + relationshiptypes: { type: Array, default: () => ['controls'] }, + // Triage facts a page knows but core cannot derive from a relationship + // edge. The machine page's dual-bay sibling is the case this exists for: + // it is resolved by the machines plugin, not from the relationships + // endpoint, and it used to sit in its own banner above the hero - two + // strips of chrome saying two halves of the same "what am I looking at". + // Shape: [{ label, links: [{ text, to }] }]. A link with no `to` renders + // as plain text rather than a dead chip. + extraitems: { type: Array, default: () => [] } }) const machines = ref([]) @@ -102,6 +124,7 @@ const hasAnything = computed(() => Boolean(slots.actions) || Boolean(props.liveness) || machines.value.length > 0 || + props.extraitems.length > 0 || (props.accessmethods && props.accessmethods.length > 0) || Boolean(props.locationname) ) diff --git a/plugins/machines/frontend/views/MachineDetail.vue b/plugins/machines/frontend/views/MachineDetail.vue index f9d49c88..b7e0867d 100644 --- a/plugins/machines/frontend/views/MachineDetail.vue +++ b/plugins/machines/frontend/views/MachineDetail.vue @@ -20,16 +20,6 @@
Loading...