Don't collapse ambiguous senders to imply an indirect link betwen repeaters

This commit is contained in:
Jack Kingsman
2026-03-12 20:13:45 -07:00
parent 358589bd66
commit 1c57e35ba5
2 changed files with 74 additions and 7 deletions
@@ -710,13 +710,22 @@ function projectCanonicalPathWithAliases(
repeaterAliases: Map<string, string>
): ProjectedPacketNetworkPath {
const projected = compactPathSteps(
canonicalPath.map((nodeId) => ({
nodeId: isPacketNetworkNodeVisible(state.nodes.get(nodeId), visibility)
? (repeaterAliases.get(nodeId) ?? nodeId)
: null,
markHiddenLinkWhenOmitted: true,
hiddenLabel: null,
}))
canonicalPath.map((nodeId, index) => {
const node = state.nodes.get(nodeId);
const visible = isPacketNetworkNodeVisible(node, visibility);
return {
nodeId: visible ? (repeaterAliases.get(nodeId) ?? nodeId) : null,
// Only hidden repeater hops should imply a bridged dashed segment.
// Hidden sender/recipient endpoints should disappear with their own edge.
markHiddenLinkWhenOmitted:
!visible &&
!!node &&
node.type === 'repeater' &&
index > 0 &&
index < canonicalPath.length - 1,
hiddenLabel: null,
};
})
);
return {