Repository navigation
fix: resolve undefined cluster context in navigation - #639
Merged
undera merged 2 commits intoJan 5, 2026
Merged
Conversation
undera
requested changes
Jan 5, 2026
undera
left a comment
Collaborator
There was a problem hiding this comment.
Please add encodeURIComponent() for context in URL, to avoid breaking on weird context names
Collaborator
|
Also mind the static failure (prettier) |
Contributor
Author
|
I've updated Repository.tsx to wrap the context variable in encodeURIComponent() to ensure safe URL navigation with various cluster names. I also resolved the formatting issues locally using Prettier. All checks are now passing and the PR is ready for your review |
Collaborator
|
Very nice! Thank you! |
Contributor
Author
|
No problem at all, the pleasure is mine! I’m happy I could help improve the project. If any other issues come up or if there’s anything else that needs a fix, please feel free to reach out—I’d be glad to help again |
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.
Changes Proposed
Description
This PR addresses the issue where navigating to the "Installed" tab after adding a new repository resulted in a broken URL path: /#/undefined/installed/.
The Problem: The application was failing to persist or retrieve the active cluster context during the redirect from the repository addition view back to the main dashboard. This caused the frontend to default the cluster segment of the route to undefined.
The Fix: I modified the navigation component to ensure the cluster variable is correctly sourced from the global state or the current context before constructing the redirect URL.
Added a fallback mechanism so that if a specific cluster is not found in the immediate route params, it defaults to the currently active cluster rather than becoming undefined.
Check List
Important Note
"I manually verified the logic in the source code. I attempted to run a local build via Docker to record a video, but encountered environment-specific errors on my local Windows machine. I am relying on the CI/CD pipeline here to verify the build integrity."