Commit f4b8fa1
authored
ui: right-align card buttons + add PENDING peer to dummy-run fixture (#26)
* fix: surface PENDING peers under their served_model_name during boot
Before: when a launching peer is still in PENDING (no service advertised
yet), get_all_models surfaced it with id="" and worker_group_id set.
The frontend (ModelList.svelte) builds wgToModel from peers that already
carry an id, then drops any remaining id="" peer whose worker_group_id
doesn't appear in that map. During the brief PENDING window every peer
in the worker group is service-less, so wgToModel is empty for that
group and the replica is silently filtered out. By the time we COULD
render it, registrar.go flips status from PENDING to READY and advertises
the service in the same step — so PENDING is never actually visible on
the dashboard.
After: fall back to labels.served_model_name (already emitted by
model-launch's _ocf_labels on every peer) when synthesising the
no-service entry. The peer now has a real model id during boot, the
frontend's grouping succeeds, and the status pill renders "pending"
until the health check passes.
Tests updated: the multi-node-replica grouping test previously asserted
the follower kept id="". With served_model_name on every peer, both
peers in the group now resolve to the same id; we still verify the
shared worker_group_id keeps them in one replica. Added a defensive
test for the older-binary case (no served_model_name label) where the
id stays empty as before.
* ui: right-align action buttons + pending peer example fixture
Right-align the OpenWebUI + Metrics Dashboard buttons inside the
expanded model card (`justify-end` on the flex row). Matches the
in-card details which are right-aligned by design.
Add a synthetic PENDING peer to the dummy-run fixture so /make dummy-run
shows what a booting model looks like — status: "pending", service:
[], served_model_name carried in labels. Hostname + peer id are
synthetic but realistic; framework_args resembles a 70B vLLM launch.
* fixture: swap synthetic pending peer for a real one
Caught the dev mesh while a fresh sml launch (job 2297439, --dev3) was
still in OCF-PENDING — service: [], status: "pending", labels carry
served_model_name. Real shape, real hostname, real peer id; nothing
hand-rolled.
* ui: tighten extra-labels padding to fit the actual key length
The Extra labels pre-block used padEnd(18) — a fixed width copied from
the main-labels block where it makes columns line up with header /
follower entries. In the extras block there's typically just one entry
(framework_args, 14 chars), so the fixed pad inserts 4 extra spaces
between key and value with nothing to align them to. Reads like a
formatting bug.
Compute the pad from the actual keys present + 1. With framework_args
alone, that's padEnd(15) — one space between key and value. If more
labels show up later, they self-align.
* ui: rename "Open in OpenWebUI" to "Swiss AI Chat", reorder buttons
- Button text "Open in OpenWebUI" → "Swiss AI Chat". The underlying URL
still points at the OpenWebUI deployment, but users see "Swiss AI Chat"
which matches the surface-level brand they actually interact with.
- Reorder so Metrics Dashboard (secondary, emerald) sits left of Swiss
AI Chat (primary, black). Both still right-aligned as a group; the
primary action lands at the right edge where the eye finishes scanning
the card.
* ui: shorten button labels to "Chat" and "Metrics", restore Chat-first order
- "Swiss AI Chat" → "Chat" and "Metrics Dashboard" → "Metrics". The
expanded card sits below the model title that already says
"swiss-ai/..." — repeating "Swiss AI" in the button label is noise,
and "Dashboard" doesn't carry meaning past the icon.
- Restore Chat-first order so Metrics ends up at the right edge, where
it lived before the brief mid-iteration swap.
* ui: left-align action buttons (drop justify-end)
* ui: prefix topology summary with replica count when > 1
The header line said "on 4 nodes × 4x GH200" for a model with 2
replicas of 4 nodes each — undercounting the actual resources by half.
Prepend the replica multiplier so the line describes total commitment:
1 replica, 4 nodes → "4 nodes × 4x GH200"
2 replicas, 4 nodes each → "2 replicas × 4 nodes × 4x GH200"
10 replicas, 1 node each → "10 replicas × 4x GH200"
The red ×N chip next to the title still shows the replica count
on its own; the topology line now expresses it in resource terms.
* format: ruff format on test_model_service.py1 parent ac83a11 commit f4b8fa1
4 files changed
Lines changed: 117 additions & 20 deletions
File tree
- backend
- services
- tests
- fixtures
- frontend/src/components/ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
66 | 71 | | |
67 | | - | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
418 | 473 | | |
419 | 474 | | |
420 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | | - | |
118 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
126 | 152 | | |
127 | 153 | | |
128 | 154 | | |
| |||
196 | 222 | | |
197 | 223 | | |
198 | 224 | | |
199 | | - | |
200 | | - | |
201 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
202 | 229 | | |
203 | 230 | | |
204 | 231 | | |
| |||
212 | 239 | | |
213 | 240 | | |
214 | 241 | | |
215 | | - | |
216 | 242 | | |
217 | | - | |
218 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | | - | |
92 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
190 | | - | |
| 198 | + | |
191 | 199 | | |
192 | 200 | | |
193 | 201 | | |
| |||
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
203 | | - | |
| 211 | + | |
204 | 212 | | |
205 | 213 | | |
206 | 214 | | |
| |||
213 | 221 | | |
214 | 222 | | |
215 | 223 | | |
216 | | - | |
| 224 | + | |
217 | 225 | | |
218 | 226 | | |
219 | 227 | | |
| |||
272 | 280 | | |
273 | 281 | | |
274 | 282 | | |
| 283 | + | |
275 | 284 | | |
276 | | - | |
| 285 | + | |
277 | 286 | | |
278 | 287 | | |
279 | 288 | | |
| |||
0 commit comments