Commit 3aeeb99
authored
🤖 fix: align sidebar parent/sub-agent connectors (#3129)
## Summary
Derive the left-sidebar sub-agent connector from shared sidebar geometry
so the default parent→child rail lands on both status indicators instead
of relying on disconnected offsets.
## Background
The connector between a parent agent row and its sub-agent rows had
drifted out of alignment because the rail and elbow geometry were
encoded with hardcoded offsets that were no longer tied to the actual
leading status-slot centers. That made the connector fragile whenever
surrounding row layout changed.
## Implementation
- added `sidebarItemLayout.ts` to centralize sidebar padding and
leading-slot geometry
- updated `AgentListItem` to compute the parent rail and child endpoint
from that shared layout instead of ad hoc offsets
- updated `SubAgentListItem` to draw the elbow from explicit
x-coordinates, which makes the default connector alignment correct by
construction
- reused the shared padding helper in `TaskGroupListItem` so grouped
rows stay on the same indentation grid
- added focused helper/component/integration tests for the connector
geometry
## Validation
- `make static-check`
- `bun test src/browser/components/sidebarItemLayout.test.ts
src/browser/components/AgentListItem/SubAgentListItem.test.tsx
src/browser/components/AgentListItem/AgentListItem.test.tsx`
- visually verified Storybook stories for `App Sidebar Three Active
Sub-Agents` and `BestOfSubagents`
## Risks
Low-to-medium risk in left-sidebar row layout and grouped sub-agent
rendering. The main mitigation is that the connector now derives from
shared layout primitives, and the new tests cover both the geometry
helpers and rendered connector positions.
---
_Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` •
Cost: `$6.76`_
<!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=6.76 -->1 parent f1e7c9f commit 3aeeb99
7 files changed
Lines changed: 254 additions & 65 deletions
File tree
- src/browser/components
- AgentListItem
- ProjectSidebar
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
245 | | - | |
| 247 | + | |
246 | 248 | | |
| 249 | + | |
| 250 | + | |
247 | 251 | | |
248 | 252 | | |
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
252 | 280 | | |
253 | 281 | | |
254 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
89 | | - | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| |||
125 | 133 | | |
126 | 134 | | |
127 | 135 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
147 | 140 | | |
148 | 141 | | |
149 | 142 | | |
| |||
193 | 186 | | |
194 | 187 | | |
195 | 188 | | |
196 | | - | |
| 189 | + | |
197 | 190 | | |
198 | 191 | | |
199 | 192 | | |
| |||
238 | 231 | | |
239 | 232 | | |
240 | 233 | | |
| 234 | + | |
241 | 235 | | |
242 | 236 | | |
243 | 237 | | |
| |||
254 | 248 | | |
255 | 249 | | |
256 | 250 | | |
257 | | - | |
| 251 | + | |
258 | 252 | | |
259 | 253 | | |
260 | 254 | | |
| |||
297 | 291 | | |
298 | 292 | | |
299 | 293 | | |
300 | | - | |
| 294 | + | |
301 | 295 | | |
302 | 296 | | |
303 | 297 | | |
| |||
658 | 652 | | |
659 | 653 | | |
660 | 654 | | |
661 | | - | |
| 655 | + | |
662 | 656 | | |
663 | 657 | | |
664 | 658 | | |
| |||
786 | 780 | | |
787 | 781 | | |
788 | 782 | | |
789 | | - | |
| 783 | + | |
790 | 784 | | |
791 | 785 | | |
792 | 786 | | |
| |||
1117 | 1111 | | |
1118 | 1112 | | |
1119 | 1113 | | |
1120 | | - | |
1121 | | - | |
1122 | 1114 | | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1127 | 1118 | | |
1128 | | - | |
| 1119 | + | |
1129 | 1120 | | |
1130 | 1121 | | |
1131 | 1122 | | |
| |||
1136 | 1127 | | |
1137 | 1128 | | |
1138 | 1129 | | |
1139 | | - | |
| 1130 | + | |
| 1131 | + | |
1140 | 1132 | | |
1141 | 1133 | | |
1142 | 1134 | | |
| |||
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
0 commit comments