Repository navigation
ui: keep node slot warnings and the node page up when sandbox counts fail - #1383
Merged
Merged
Conversation
|
Thanks for opening this pull request! A SPACE maintainer will take a look. CONTRIBUTING.md explains how we review outside contributions. |
nikhilbirmiwal-pplx
approved these changes
Nov 3, 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.
Summary
This follows up a reviewer's notes on #1252 (node occupancy on the nodes list) and #1256 (the node page). On both pages, a failed sandbox count no longer hides information that came from a different read.
Nodes list (
ui/src/app/dashboard/nodes/page.tsx): the Sandboxes cell used to return early when a node had no sandbox count, which hid the "unhealthy slots" tag too. Slot counts come with every node read, not from the separate occupancy read. The tag now shows beside "could not count" or "not computed", with the slot counts in its tooltip. When counts are stale, the tooltip says "sandbox counts are stale" (or "the last count failed; sandbox counts are stale"), so it no longer suggests the slot sample is just as old.Node page (
ui/src/app/dashboard/nodes/[id]/page.tsx): the page used to read the node withinclude_occupancy=true. If the counting query failed, the whole page became "Could not load the node", hiding health, slots and the node actions. A transient failure on Refresh did the same, even after a successful load. Now:include_occupancy=false). Sandbox and snapshot counts come from a separate best-effortinclude_occupancy=trueread, as on the nodes list. That read has its own request generation, and an action invalidates it as it starts. A failed count shows "could not count" and leaves the rest of the page in place. If a count fails after an earlier one succeeded, the page keeps the earlier value and marks it stale;The new rules for when a failed read replaces the page and how counts are labelled live in
ui/src/lib/node-detail.ts, with tests.Validation
At this head, which sits directly on
mainafter #1252 and #1256 merged, inui/:npm ci,npm test(161 pass, includingsrc/lib/node-detail.test.mjs),npx tsc --noEmit -p .andnpm run build. The commits do not touch #1307's reconcile-trigger andread_state_errorhandling on the nodes list.Not validated: no browser or Kind run. The new nodes-list tag and the node page's warning, count labels and kept node are checked only by the unit tests above, the type check and the build.
Severity and risk
Severity: low. Both problems hide information during a partial API failure: unhealthy slots on the nodes list, and the whole node page, including its recovery actions, on the node page.
Risk: low. These are UI-only changes. The node page now makes two node reads instead of one: one on open, on Refresh and after an action, plus the count read. The counting query runs as often as before. Roll back by reverting the commits.
AI assistance: Claude Code wrote the code, the tests and this description, and ran the validation. A maintainer reviews it.