implement UI namespace filtering#1923
Open
maazghani wants to merge 8 commits into
Open
Conversation
Signed-off-by: Maaz Ghani <maazghani@gmail.com>
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds namespace-aware behavior to the Agents UI by introducing query-param-driven namespace filtering, improving how “all namespaces” is represented in the selector, and adjusting agent list fetching/refreshing flows.
Changes:
- Add namespace filtering on
/agentsvia?namespace=plus namespace-aware empty state and create link. - Enhance
NamespaceComboboxto optionally include an “All namespaces” entry and disable auto-default selection when desired. - Add/adjust tests for namespace behavior and normalize
getAgentsto treat missingdataas an empty list.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/lib/tests/agentsActions.test.ts | Adds coverage for getAgents normalization when data is missing. |
| ui/src/lib/tests/CreateAgentPage.namespace.test.tsx | Verifies create page initializes namespace from ?namespace=. |
| ui/src/lib/tests/AgentsProvider.namespace.test.tsx | Verifies AgentsProvider no longer fetches all agents on mount. |
| ui/src/lib/tests/AgentList.namespace.test.tsx | Tests namespace filtering, URL updates, and scoped empty-state create link. |
| ui/src/components/NamespaceCombobox.tsx | Adds “All namespaces” option, optional default auto-select, and ARIA label support. |
| ui/src/components/DeleteAgentButton.tsx | Replaces provider refresh with an onDeleted callback for post-delete refresh. |
| ui/src/components/AgentsProvider.tsx | Stops initial agent list fetching and removes post-create/update refresh behavior. |
| ui/src/components/AgentListView.tsx | Threads onAgentsChanged down to rows to refresh after deletes. |
| ui/src/components/AgentList.tsx | Implements namespace query parsing, filtered fetching, and namespace selector/UX. |
| ui/src/components/AgentGrid.tsx | Threads onAgentsChanged through to cards for refresh after deletes. |
| ui/src/components/AgentCard.tsx | Calls onAgentsChanged after delete via DeleteButton. |
| ui/src/app/agents/new/page.tsx | Initializes create namespace from query and returns to namespace-scoped list after create. |
| ui/src/app/actions/agents.ts | Normalizes getAgents to sort an empty array when data isn’t an array. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Maaz Ghani <maazghani@gmail.com>
Signed-off-by: Maaz Ghani <maazghani@gmail.com>
peterj
previously approved these changes
May 26, 2026
Signed-off-by: Maaz Ghani <maazghani@gmail.com>
Contributor
Author
|
PR comments addressed, @peterj ready to review/merge. |
Contributor
Author
|
Looks like chainguard has recovered |
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
part 2 of addressing #1812
This connects the agents list UI to the namespace filtering support added in the previous API/client PR.
/agentsstays the all-namespaces view./agents?namespace=<namespace>now fetches and renders agents scoped to that namespace. The namespace picker drives both the URL and the agents request, so there is no “trust me, the request was scoped” UI state.The scoped empty state also carries the namespace into
New Agent, but only as the starting value. The create form still lets the user change the namespace before saving.Notes
AgentListowns list fetching now because the selected namespace comes from the route.AgentsProviderstill handles shared create/edit dependencies without fetching every agent on mount.Delete refresh gets passed down from the current list view so deletes refresh the same scoped query.
Tests
Added coverage for:
/agentsfetching all agents/agents?namespace=kagentfetching scoped agentsNew Agent?namespace=...getAgents()normalizing a missing data field to[]