Repository navigation
ui: show an organization's sandboxes and API keys on its page - #1262
Merged
Merged
Conversation
|
Thanks for opening this pull request! A SPACE maintainer will take a look. CONTRIBUTING.md explains how we review outside contributions. |
ac-pplx
force-pushed
the
ac/admin-ui-org-detail
branch
from
October 31, 2026 18:37
9dbeb0a to
3361268
Compare
This was referenced Oct 31, 2026
ac-pplx
force-pushed
the
ac/admin-ui-org-detail
branch
2 times, most recently
from
November 1, 2026 03:38
4cb46d9 to
a507627
Compare
ac-pplx
marked this pull request as ready for review
November 1, 2026 05:47
zibi-pplx
previously approved these changes
Nov 1, 2026
zibi-pplx
dismissed
their stale review
November 1, 2026 22:30
Withdrawing this approval for now. Any feedback above still stands.
ac-pplx
force-pushed
the
ac/admin-ui-org-detail
branch
from
November 2, 2026 04:44
168088f to
94933f1
Compare
Looking up an organization during a support case needs its users, sandboxes and keys together; the organization page showed only users (with per-user sandbox counts), branding and BYOK, so the rest meant switching pages and re-selecting the organization. The page now lists the organization's sandboxes (linking to each, and to the sandbox list filtered to the organization) and its API keys, and user names link to their pages. Turning BYOK on or off, which changes how every new sandbox in the organization is created, now asks for confirmation and says what changes.
The org page's BYOK confirmation and card text said that enabling BYOK puts new sandboxes on encrypted volumes. A new sandbox is encrypted only when the org flag and the cluster's SPACE_BYOK_VOLUME_ENCRYPTION setting are both on, and only then does it skip warm pools; the flag is also shared with credential encryption. Both texts now say so, and that existing sandboxes keep the encryption they were created with.
- The org page's Sandboxes card, its title and the users table's counts took every row of the org-scoped admin list, which can also carry rowless node-reported rows (warm-pool slots, observed-local sandboxes) that belong to no org. Only the org's sandbox rows count now, and a full 5000-row answer reads "5000+". - The BYOK texts now hold on every path that reads the flag: with it on, create admission never claims a warm-pool slot and a fork of an unencrypted sandbox is refused, whatever the cluster's SPACE_BYOK_VOLUME_ENCRYPTION setting; with it off, a fork of an encrypted sandbox is refused. - The Sandboxes and API keys cards show loading while they load, and their own error with Retry, and "Not loaded" instead of an empty list, when they fail. - "Manage API keys" opens the API Keys page on this organization; the page takes the organization from `?org=`.
…PI's rows - The BYOK enable confirmation, the card text and the code comments said new sandboxes are encrypted only where the cluster enables BYOK volume encryption. That is false for forks: a fork keeps its source's encryption, so forks of the organization's encrypted sandboxes stay encrypted whatever that setting, and forks of its unencrypted sandboxes are refused (fork_operation_executor.rs). The texts say so. - The sandbox list counts as capped when the API returned its limit of rows, not when the organization's own rows reach it: the rowless node-reported rows it leaves out count against the limit too. When capped, the users' sandbox counts read as lower bounds (≥n) and the note says they cover only the listed sandboxes. - After a failed load the card titles and the users total read "not loaded" instead of "…" forever, and each load resets the capped flag.
The previous change counted every row of the org-scoped answer against the 5000-row limit. The admin list's limit applies only to database rows, all of which belong to the org, and it appends node-reported rows (rowless warm-pool slots, observed-local sandboxes) beyond the limit. So an org with 4,900 sandboxes and 150 node-reported rows read as capped. The list is capped again only when the org's own rows reach the limit.
ac-pplx
force-pushed
the
ac/admin-ui-org-detail
branch
from
November 2, 2026 19:32
94933f1 to
6dccec9
Compare
johnlouie-pplx
approved these changes
Nov 3, 2026
johnlouie-pplx
left a comment
Contributor
There was a problem hiding this comment.
Approving.
6dccec9 is the same patch as 168088f, rebased. On main the org-scoped admin sandbox list no longer appends node-reported rows (include_observed_only is false when org_id is set), so the page's own-rows filter and the API's 5000-row cap now count the same rows. "Open in Sandboxes" filters by org now that #1248 is in. The key cards still show only ApiKeyMetadata, with no secret or hash. npm test (151 pass), tsc and next build pass on 6dccec9. I didn't run it in a browser.
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
An organization's page now shows the organization's sandboxes and API keys.
Looking up an organization during a support case needs its users, sandboxes and keys together. The page showed only users (with per-user sandbox counts), branding and BYOK, so the rest meant switching pages and re-selecting the organization.
Changes:
?org=, which that page now reads).SPACE_BYOK_VOLUME_ENCRYPTIONsetting are both on; with the flag on, whatever that setting, create admission never claims a warm-pool slot for the organization (both incrates/libs/api/src/controllers/sandbox/queries.rs); a fork keeps its source's encryption, so with the flag on a fork of an encrypted sandbox stays encrypted whatever that setting and a fork of an unencrypted sandbox is refused, and with it off a fork of an encrypted sandbox is refused (crates/libs/api/src/fork_operation_executor.rs); the flag is shared with credential encryption (credential-manager readsorganizations.byok_enabled); and existing sandboxes keep the encryption they were created with.Quota usage is not shown. Per-organization sandbox limits are environment configuration (
SPACE_NATIVE_ORG_SANDBOX_LIMIT*), and no API returns them.Stack
Stacked on #1253 (user page), which is stacked on #1247. Merge those first. This branch is restacked on #1253's third review follow-up. Merge #1248 before it as well: the "Open in Sandboxes" link filters the sandbox list with
?org=, which #1248 adds, and #1248 stops the organization-scoped sandbox list, which this page reads, from including rowless warm-pool slots.Validation
npm ci,npm test(60 pass) andnpm run buildinui/.space-uiimage):byok_enabledunchanged in the API.main.Visual confirmation
The BYOK confirmation:
Severity and risk
Severity: medium.
Risk: low. The page makes one more read per load (the organization's keys). Roll back by reverting the commit.
AI assistance: Claude Code wrote the code and this description, and ran the validation; a maintainer reviews it.