Skip to content

ui: keep node slot warnings and the node page up when sandbox counts fail - #1383

Merged
ac-pplx merged 2 commits into
mainfrom
ac/admin-ui-node-followups
Nov 3, 2026
Merged

ac-pplx merged 2 commits into
mainfrom
ac/admin-ui-node-followups

Conversation

@ac-pplx

@ac-pplx ac-pplx commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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 with include_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:

  • the node read is metadata-only (include_occupancy=false). Sandbox and snapshot counts come from a separate best-effort include_occupancy=true read, 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;
  • a failed node read replaces the page only until the node first loads. After that, a failed Refresh or post-action read keeps the last loaded node. A warning names the error and when the node was loaded, and offers Retry;
  • a 403 or 404 still replaces the page;
  • opening a different node clears the previous node's state.

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 main after #1252 and #1256 merged, in ui/: npm ci, npm test (161 pass, including src/lib/node-detail.test.mjs), npx tsc --noEmit -p . and npm run build. The commits do not touch #1307's reconcile-trigger and read_state_error handling 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.

@github-actions github-actions Bot added the triage:pending Waiting for a maintainer to triage label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! A SPACE maintainer will take a look.

CONTRIBUTING.md explains how we review outside contributions.

@ac-pplx
ac-pplx added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit a6ecd88 Nov 3, 2026
25 checks passed
@ac-pplx
ac-pplx deleted the ac/admin-ui-node-followups branch November 3, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:pending Waiting for a maintainer to triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants