Skip to content

Commit 6b6b35b

Browse files
committed
refactor: rebuild fanout mobile view on shared scene, drop bespoke SVG and cost captions
1 parent 6c80589 commit 6b6b35b

2 files changed

Lines changed: 189 additions & 221 deletions

File tree

website/src/components/VisualElements/SubAgentFanoutDiagram.module.css

Lines changed: 66 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,6 @@
88
font-feature-settings: var(--font-mono-features);
99
}
1010

11-
.scheduleKey,
12-
.costSummary {
13-
display: flex;
14-
flex-wrap: wrap;
15-
gap: var(--space-1) var(--space-2);
16-
margin: 0;
17-
color: var(--text-muted);
18-
font-family: var(--font-mono-spec);
19-
font-size: var(--text-xs);
20-
font-weight: 600;
21-
line-height: var(--lh-sm);
22-
}
23-
24-
.scheduleKey strong {
25-
color: var(--text-body);
26-
letter-spacing: 0.08em;
27-
}
28-
29-
.costSummary {
30-
display: block;
31-
}
32-
3311
.panels,
3412
.panel {
3513
min-width: 0;
@@ -79,12 +57,10 @@
7957

8058
.dispatchPath {
8159
stroke: var(--visual-indigo);
82-
opacity: 0.85;
8360
}
8461

8562
.returnPath {
8663
stroke: var(--visual-violet);
87-
opacity: 0.85;
8864
}
8965

9066
/* Paths meet the root-facing side of each robot. Separate elbow columns keep
@@ -273,82 +249,97 @@
273249
}
274250
}
275251

252+
.screenReaderSummary {
253+
position: absolute;
254+
width: 1px;
255+
height: 1px;
256+
overflow: hidden;
257+
clip: rect(0 0 0 0);
258+
white-space: nowrap;
259+
}
260+
261+
/* The mobile form folds desktop's outer rails into one delegate rail. The
262+
root window remains the only framed timeline and every path returns to it. */
276263
.mobileDiagram {
277-
width: 100%;
278-
height: auto;
279-
max-width: 340px;
280-
margin-inline: auto;
264+
font-feature-settings: var(--font-mono-features);
281265
}
282266

283-
.mobileRoot rect,
284-
.mobileAgent rect {
285-
stroke-width: var(--diagram-stroke, 2px);
286-
vector-effect: non-scaling-stroke;
267+
.mobileStackClip {
268+
position: relative;
269+
display: block;
270+
height: 560px;
271+
min-width: 0;
287272
}
288273

289-
.mobileRoot rect {
290-
fill: var(--surface-raised);
291-
stroke: var(--border-emphasis);
274+
.mobileRootStack {
275+
position: absolute;
276+
inset: 0 30% 0 0;
277+
min-width: 0;
292278
}
293279

294-
.mobileRoot text,
295-
.mobileAgent text,
296-
.mobileStage {
297-
font-feature-settings: var(--font-mono-features);
280+
.mobileDelegateRail,
281+
.mobileFlowLayer {
282+
position: absolute;
283+
inset: 0;
298284
}
299285

300-
.mobileRoot text,
301-
.mobileAgent > text:first-of-type {
302-
fill: var(--text-body);
303-
font-family: var(--font-mono-keyword);
304-
font-size: 10px;
305-
font-weight: 600;
286+
.mobileDelegateRail {
287+
pointer-events: none;
306288
}
307289

308-
.mobileRoot text:last-of-type,
309-
.mobileStage {
310-
fill: var(--text-muted);
311-
font-family: var(--font-mono-spec);
312-
font-size: 8px;
313-
font-weight: 600;
314-
letter-spacing: 0.04em;
290+
.mobileFlowLayer {
291+
z-index: 0;
292+
overflow: visible;
315293
}
316294

317-
.mobileContract {
318-
fill: var(--text-muted);
319-
font-family: var(--font-mono-spec);
320-
font-size: 7px;
295+
.mobileRailLabel,
296+
.mobileParallelLabel {
297+
position: absolute;
298+
z-index: 2;
299+
color: var(--text-muted);
300+
font-family: var(--font-mono-keyword);
301+
font-size: 11px;
321302
font-weight: 600;
322303
letter-spacing: 0.04em;
304+
line-height: var(--lh-sm);
323305
}
324306

325-
.mobileAgent rect {
326-
fill: var(--visual-bg-cyan);
327-
stroke: var(--visual-cyan);
328-
}
329-
330-
.mobileTask {
331-
fill: var(--text-body);
332-
font-family: var(--font-mono-ai);
333-
font-size: 10px;
334-
font-weight: 500;
307+
.mobileRailLabel {
308+
top: 0;
309+
left: 72%;
335310
}
336311

337-
.mobileStage {
338-
font-size: 9px;
312+
.mobileParallelLabel {
313+
left: 72%;
314+
width: 26%;
315+
text-align: center;
316+
white-space: nowrap;
339317
}
340318

341-
.screenReaderSummary {
319+
.mobileWorker {
342320
position: absolute;
343-
width: 1px;
344-
height: 1px;
345-
overflow: hidden;
346-
clip: rect(0 0 0 0);
321+
z-index: 1;
322+
display: flex;
323+
flex-direction: column-reverse;
324+
align-items: center;
325+
justify-content: center;
326+
gap: 2px;
327+
width: 24%;
328+
color: var(--text-body);
329+
font-family: var(--font-mono-ai);
330+
font-size: 11px;
331+
font-weight: 500;
332+
line-height: var(--lh-sm);
347333
white-space: nowrap;
334+
transform: translate(-50%, -50%);
335+
}
336+
337+
.mobileWorker svg {
338+
flex: 0 0 32px;
339+
width: 32px;
340+
height: 32px;
348341
}
349342

350-
/* The compact composition preserves every root-to-agent request and return
351-
when the desktop rails no longer have room for legible labels. */
352343
@media (prefers-reduced-motion: reduce) {
353344
.container * {
354345
transition: none !important;

0 commit comments

Comments
 (0)