Fix PSS side nav highlight issue#16462
Merged
momesgin merged 3 commits intorancher:masterfrom Jan 30, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines routing and component wiring for project-scoped secrets so that the “Project Secrets” item in the Explorer sidebar stays open and highlighted when creating, viewing, or editing project-scoped secrets.
Changes:
- Updated routing for project-scoped secrets to use the generic
c-cluster-product-resource-namespace-idroute withresource: VIRTUAL_TYPES.PROJECT_SECRETS, so navigation remains consistent and the sidebar highlight persists. - Added a
ProjectSecretProxyedit component and associated unit tests to bridge theprojectsecretvirtual type to the standard Secret editor while maintaining the correct route context. - Adjusted Explorer product configuration and the Project Secrets list view so that list/create flows use the project-secrets virtual type and the menu item remains active on sub-routes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
shell/models/secret.js |
Adjusts detailLocation for project-scoped secrets to use the generic c-cluster-product-resource-namespace-id route with resource: VIRTUAL_TYPES.PROJECT_SECRETS, aligning navigation with the Explorer sidebar highlighting expectations. |
shell/list/projectsecret.vue |
Updates createLocation() so Project Secret creation uses the projectsecret virtual type route (with appropriate query scope) while still favoriting the Project Secrets list in the masthead. |
shell/edit/projectsecret.vue |
Introduces ProjectSecretProxy, a thin wrapper that forwards all attrs to the standard Secret editor, allowing the router to resolve an edit component for projectsecret without changing list behavior. |
shell/edit/__tests__/projectsecret.test.ts |
Adds unit tests validating that ProjectSecretProxy renders the Secret component and correctly forwards attributes and listeners, guarding against regressions in the proxy behavior. |
shell/config/product/explorer.js |
Configures VIRTUAL_TYPES.PROJECT_SECRETS to use the Secret schema (resource: SECRET) and removes exact: true from the Project Secrets virtual nav item so that the sidebar item stays active across create/edit/detail routes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
richard-cox
approved these changes
Jan 30, 2026
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
Fixes #14780
Occurred changes and/or fixed issues
ProjectSecretProxycomponent (shell/edit/projectsecret.vue) to handle Create/Edit views for theprojectsecretresource by wrapping the standard Secret edit component. This ensures the correct component is loaded while preserving the route context required for sidebar highlighting.Technical notes summary
createLocationinshell/list/projectsecret.vueto targetVIRTUAL_TYPES.PROJECT_SECRETS.exact: truefrom the Project Secrets menu definition inshell/config/product/explorer.jsto allow the menu item to remain active for sub-routes (create/edit).shell/edit/projectsecret.vuewhich wraps@shell/edit/secret/index.vue. This component is required because the resource loader searches for an editor based on the route's resource name (projectsecret).detailLocationinshell/models/secret.jsto use the correct generic routec-cluster-product-resource-namespace-id. This fixes the sidebar losing state after going to edit config or detail page of a PSS.Areas or cases that should be tested
projectsecretresource and the "Project Secrets" sidebar item remains highlighted.Areas which could experience regressions
Screenshot/Video
psshl.mov
Checklist
Admin,Standard UserandUser Base