ui: right-align card buttons + add PENDING peer to dummy-run fixture#26
Merged
Merged
Conversation
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.
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.
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.
a710e41 to
4ebdec0
Compare
4 tasks
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.
- 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.
… 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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three things, one PR — bundled because the third only works if the first two are in:
Right-align action buttons in the expanded card (`justify-end` on the flex row). Both "Open in OpenWebUI" and "Metrics Dashboard" now sit flush right, matching the alignment of the labels block underneath.
Include PR fix: surface PENDING peers under their served_model_name during boot #23 (server-side fallback to `labels.served_model_name`) so PENDING peers can render a card during the boot window. Without this, a peer that hasn't yet advertised a service has `id=""`, the frontend's worker_group_id → model_id map can't resolve it, and the peer is silently dropped. Cherry-picked from `robmsmt/show-pending-peers-by-served-model-name` — same commit, same tests. Closes fix: surface PENDING peers under their served_model_name during boot #23 as superseded.
Add a real PENDING peer to the dummy-run fixture. Launched a fresh sml job, caught the dev mesh while it was still in OCF-PENDING (service: [], status: "pending", labels carry served_model_name + framework_args + expires_at), and dropped the snapshot into `dnt_table_dev_live.json`. Real shape, real hostname, real peer id — nothing synthesised.
Once merged + `make dummy-run`, the dashboard should show a model card titled `swiss-ai/Apertus-8B-Instruct-2509-rob-dev3` with a yellow "pending" pill instead of the green "ready" pill the other cards have.
Test plan
Depends on PR #25 (VITE_API_URL local fallback) to actually verify visually — without it the frontend hits prod and ignores the dummy-run backend.
🤖 Generated with Claude Code