implement filtering AgentList by namespace#1813
Open
maazghani wants to merge 6 commits intokagent-dev:mainfrom
Open
implement filtering AgentList by namespace#1813maazghani wants to merge 6 commits intokagent-dev:mainfrom
maazghani wants to merge 6 commits intokagent-dev:mainfrom
Conversation
Agent-Logs-Url: https://github.com/maazghani/kagent/sessions/c373920c-0f64-4998-afa2-0a928633e43e Co-authored-by: maazghani <5009288+maazghani@users.noreply.github.com>
Agent-Logs-Url: https://github.com/maazghani/kagent/sessions/c373920c-0f64-4998-afa2-0a928633e43e Co-authored-by: maazghani <5009288+maazghani@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Maaz Ghani <maazghani@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Maaz Ghani <maazghani@gmail.com>
Agent-Logs-Url: https://github.com/maazghani/kagent/sessions/cb9140cb-1ccd-44b2-93a5-cfcbcc5ba043 Co-authored-by: maazghani <5009288+maazghani@users.noreply.github.com>
Agent-Logs-Url: https://github.com/maazghani/kagent/sessions/c5137321-6f88-4e20-b1ce-b8e5138c15a9 Co-authored-by: maazghani <5009288+maazghani@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds namespace-aware filtering to the Agents page UI by deriving the active namespace from the namespace query parameter and applying the filter consistently across both grid and list views, including a namespace-specific empty state.
Changes:
- Add a namespace selector to the Agents page header, driven by the
namespaceURL query param (with an “All namespaces” option). - Filter the rendered agents list prior to passing data into
AgentGrid/AgentListView, keeping both views consistent. - Add Jest component tests covering URL-driven filtering, default-namespace normalization, and the filtered empty state.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ui/src/components/AgentList.tsx | Adds namespace query-param state, namespace dropdown options derived from loaded agents, filtered rendering, and a namespace-specific empty state. |
| ui/src/components/tests/AgentList.test.tsx | Adds component tests for namespace filtering behavior and filtered empty state. |
| ui/jest.setup.ts | Updates next/navigation mocks to reusable jest fns so tests can override return values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
@copilot thoughts on solutions for if the cluster has a large number of namespaces? |
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.
addresses #1812
The agents page showed a single unscoped list across namespaces, which made the view noisy in multi-tenant clusters and harder to navigate. This change adds namespace-aware filtering to the existing agents page without changing the underlying data flow.
Namespace-scoped list state
namespacequery param so the view persists across refresh/navigation.Consistent filtering across views
AgentGridandAgentListViewstay in sync.Filtered empty state
Coverage