fix(FN-3797): restore org chart connector endpoints for wide subtrees

- Compute first/last child subtree leaf counts in AgentsView and expose them as CSS variables on org-chart child groups
- Update org chart connector offset math to anchor horizontal bars to first/last child subtree centers instead of fixed node half-widths
- Keep defaults tokenized for single-child cases and preserve vertical-layout connector behavior
- Extend dashboard CSS and component tests to assert the new connector offset variables and connector rule coverage

Fusion-Task-Id: FN-3797
This commit is contained in:
Fusion
2026-05-08 21:31:20 -07:00
committed by gsxdsm
parent 111ad7afce
commit 12ddca0dfe
5 changed files with 50 additions and 3 deletions

View File

@@ -853,6 +853,8 @@
--org-chart-connector-gap: var(--space-sm);
--org-chart-children-offset: calc(var(--space-lg) + var(--space-sm));
--org-chart-root-gap: var(--space-xl);
--org-chart-first-child-leaves: 1;
--org-chart-last-child-leaves: 1;
display: flex;
align-items: flex-start;
justify-content: flex-start;
@@ -968,6 +970,20 @@
}
.org-chart-children {
--org-chart-first-child-leaves-number: var(--org-chart-first-child-leaves, 1);
--org-chart-last-child-leaves-number: var(--org-chart-last-child-leaves, 1);
--org-chart-first-child-center-offset: calc(
(
var(--org-chart-first-child-leaves-number) * var(--org-chart-node-width) +
(var(--org-chart-first-child-leaves-number) - 1) * var(--org-chart-sibling-gap)
) / 2
);
--org-chart-last-child-center-offset: calc(
(
var(--org-chart-last-child-leaves-number) * var(--org-chart-node-width) +
(var(--org-chart-last-child-leaves-number) - 1) * var(--org-chart-sibling-gap)
) / 2
);
position: relative;
display: flex;
align-items: flex-start;
@@ -982,8 +998,8 @@
content: "";
position: absolute;
top: 0;
left: calc(var(--org-chart-node-width) / 2);
right: calc(var(--org-chart-node-width) / 2);
left: var(--org-chart-first-child-center-offset);
right: var(--org-chart-last-child-center-offset);
height: 1px;
background: var(--border);
}