Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

feat(cyclops): filter user key namespaces (#7083)

r33drichardsee315678a18e
diff --git a/libs/fleet/e2e/user-keys.spec.ts b/libs/fleet/e2e/user-keys.spec.ts
index 779a6eacb5..7538946471 100644
--- a/libs/fleet/e2e/user-keys.spec.ts
+++ b/libs/fleet/e2e/user-keys.spec.ts
@@ -179,6 +179,18 @@ test.describe("User API keys", () => {
).toBeVisible()
})
+ test("filters namespace options by typed text", async ({ page }) => {
+ await page.goto("/user-keys")
+
+ await page
+ .getByText("All namespaces (no restriction)", { exact: true })
+ .click()
+ await page.getByPlaceholder("Filter namespaces").fill("stag")
+
+ await expect(page.getByRole("option", { name: "staging" })).toBeVisible()
+ await expect(page.getByRole("option", { name: "demo-pool" })).toHaveCount(0)
+ })
+
test("shows a retryable table error without hiding the create form", async ({ page }) => {
await page.unroute("**/api/user-keys")
await page.route("**/api/user-keys", route =>
diff --git a/libs/fleet/src/pages/UserApiKeys.tsx b/libs/fleet/src/pages/UserApiKeys.tsx
index 043aefc096..ed958939ac 100644
--- a/libs/fleet/src/pages/UserApiKeys.tsx
+++ b/libs/fleet/src/pages/UserApiKeys.tsx
@@ -194,7 +194,11 @@ export function UserApiKeys() {
}
options={nsOptions}
placeholder="All namespaces (no restriction)"
+ filteringType="auto"
+ filteringPlaceholder="Filter namespaces"
+ filteringAriaLabel="Filter namespaces"
loadingText="Loading namespaces..."
+ noMatch="No matching namespaces"
statusType={loading ? "loading" : "finished"}
empty="No namespaces found"
/>