Repository navigation
feat(admin): tidy the Hosts table and show per-host detail in a panel - #1995
Open
Devin-Holland wants to merge 3 commits into
Open
Devin-Holland wants to merge 3 commits into
Devin-Holland wants to merge 3 commits into
Conversation
The Organizations column lists only the organizations a host is dedicated to (or "Shared"); the organizations with instances on a host, with their counts, move to a details panel that opens from the row. Locations show the location code and provider, cells get spacing, CPU reads as the share of cores busy in the last heartbeat sample, and the -1 central-manager stores for an unreported value shows as unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on close The panel holds the clicked host, refreshed from the list when present, so a refetch or filter change that drops it neither closes nor later reopens it. Closing returns focus to the row's host name. A missing or -1 capacity shows as unknown for memory and disk as it does for CPU, and the table keeps the provider when a host has no location code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Closing now only clears an open flag; the clicked host stays selected, so the panel no longer empties during its exit animation, and focus return reads it directly instead of a separate ref. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dawsontoth
approved these changes
Oct 22, 2026
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.
Follow-up to #1975 from feedback on stage.
⊙ Problem
The Admin → Hosts columns ran together: Studio's table cells have no padding. "1" instances and "0.1 / 4" CPU read as "10.1 / 4". A shared host's Organizations cell listed every organization with an instance on it. The location repeated a full place name. CPU showed a decimal nobody could interpret.
🤔 Should the per-instance organizations leave the table entirely?
No, they move to the panel. Staff still need "who runs on this shared host", just not in a column that grows with every tenant.
💡 Solution
us-east1-b · gcp.🤔 Why a percentage for CPU?
usedCPUCoresis not an allocation. Each heartbeat, the host manager samples CPU for 100 ms and reports busy cores, so "0.1 of 4" meant 0.1 cores busy at that instant. A percentage says that without implying fractional reservations.⚖️ Alternatives
🔧 Changes
src/features/admin/hosts/index.tsx: the table changes, the details panel, and the CPU and usage formatting. Central-manager stores-1when a host leaves a usage value out; that now shows as unknown instead of "-1". The panel holds the clicked host, so a refetch that drops it neither closes nor later reopens it, and keeps its content while it slides closed.✅ Verification
pnpm test5947 passing on this head. Page tests and formatter tests cover:-1and zero-capacity formatting.Reverting any of these fails a test.
Rendered the real page against stub data shaped like stage's four hosts (desktop dark, and mobile): columns separate, the panel lists the per-instance organizations with counts.
Related PRs: #1975 overlaps (this follows it up; it is merged)
Complexity: low
🤖 Generated by Claude Code (Claude Opus 5.5); posted via @Devin-Holland.
Review-Coverage: authored=claude; ran=codex,gemini; adjudicated=domain; blocked=cursor-composer(auth); declined=cursor-grok,cursor-kimi,cursor-muse,muse; rounds=1; full=1 @ 23cddf6
Review-Attention: read ~6m (decisions: whole-row-click-opens-modal, org-column-dedicated-only, location-code-over-name, cpu-as-sampled-percentage, do-less-alternative; raised: degraded review) @ 23cddf6