Repository navigation
ui: open sandboxes from any identifier an operator has - #1242
Merged
Merged
Conversation
The admin sandbox routes take only the `sbx_<uuid>` form, but the console
links to sandboxes with bare UUIDs in two places: the node sandboxes
drawer (from GET /nodes/{id}/sandboxes) and Credential Rules (from the
admin list, whose rows carry bare UUIDs). Both links opened "Sandbox not
found" with a 400 from the API. Operators also hold the pod name
(space-sbx-<hex>-g<N>) from kubectl and node logs, and `sandbox:<uuid>`
tags from logs, none of which the detail URL accepted.
parseSandboxRef resolves the public ID, a bare or undashed UUID, a
`sandbox:` tag and the sandbox pod name to one canonical form. The detail
page loads any of them and replaces the URL with the `sbx_` ID; the node
drawer and Credential Rules link with the canonical ID, and Credential
Rules search matches a full identifier in any of those forms.
|
Thanks for opening this pull request! A SPACE maintainer will take a look. CONTRIBUTING.md explains how we review outside contributions. |
This was referenced Oct 31, 2026
A non-canonical sandbox link (bare UUID, pod name) now moves to the sbx_ URL at the top of the detail page's effect, before any request, instead of after the first load. Each such link loads the sandbox once, and a slow load can no longer send the operator back to the sandbox after they have left the page. URL identifiers are decoded with a helper that keeps malformed percent-encoding as typed. The publicSandboxIdFromAny test is named for what it checks, and a new test covers its fallback for identifiers it cannot parse.
ac-pplx
marked this pull request as ready for review
October 31, 2026 18:43
zibi-pplx
previously approved these changes
Nov 1, 2026
zibi-pplx
dismissed
their stale review
November 1, 2026 22:29
Withdrawing this approval for now. Any feedback above still stands.
johnlouie-pplx
approved these changes
Nov 2, 2026
johnlouie-pplx
left a comment
Contributor
There was a problem hiding this comment.
Approving at f18c09f. I rechecked the identifier parser against the server's pod naming, the redirect-before-load path, and the admin authorization checks. I found no blocker. All 69 UI tests pass at this head; the combined stack also builds at #1248. The list-search gap is covered by #1244. I haven't reproduced the author's browser tests.
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
The console now opens a sandbox from any identifier an operator is likely to hold. Before this change, two of its own links were broken.
The admin sandbox routes accept only
sbx_<uuid>, but the console linked to sandboxes with bare UUIDs in two places:GET /admin/api/v1/nodes/{id}/sandboxesrows;idis a bare UUID there).Both links opened "Sandbox not found" after a
400 sandbox id must be an sbx_ prefixed UUID. Operators also copy the sandbox pod name (space-sbx-<32 hex>-g<N>) from kubectl and node logs, andsandbox:<uuid>tags from logs; the detail URL accepted neither.parseSandboxRef(ui/src/lib/sandbox-id.ts) resolves each of these to one canonical form:sbx_<uuid>in any case;sandbox:<uuid>;It rejects names, short labels and partial IDs, so it never guesses. Changes:
/dashboard/sandboxes/<any of those>replaces the URL with thesbx_ID before anything loads. The sandbox is then read once, and a slow load cannot send the operator back to the sandbox after they have left the page. Identifiers from the URL are decoded with a helper that keeps malformed percent-encoding as typed.sbx_ID.The admin API itself still requires
sbx_on sandbox routes, and its debug route requires a bare UUID. Making the API accept every form is a separate backend change and is not part of this PR.Validation
npm ci,npm test(69 pass, including the newsrc/lib/sandbox-id.test.mjscases for each accepted and rejected form, the fallback for identifiers that do not parse, and malformed percent-encoding) andnpm run buildinui/.main(production build) and on this branch (the Kindspace-uiimage):main.Visual confirmation
Following a sandbox link from the node drawer. Before, it lands on "Sandbox not found"; after, it opens the sandbox:
Videos: before, after.
Final screens:
Opening
/dashboard/sandboxes/space-sbx-<hex>-g1(a pod name) after this change. It lands on the sandbox, and the URL becomes itssbx_ID:Severity and risk
Severity: medium. Two navigation paths in the operator console were broken outright, and identifier lookup is the first step of most support cases.
Risk: low.
sbx_ID.parseSandboxRefrejects now fails in the browser with the same not-found page, instead of reaching the API.AI assistance: Claude Code wrote the code, the tests and this description, and ran the validation; a maintainer reviews it.