fix: handle invalid origin when navigating between pages#1856
Merged
gustavobtflores merged 1 commit intokernelci:mainfrom Apr 16, 2026
Merged
Conversation
071ebe4 to
dd53ad7
Compare
alanpeixinho
approved these changes
Apr 15, 2026
MarceloRobert
approved these changes
Apr 16, 2026
Collaborator
MarceloRobert
left a comment
There was a problem hiding this comment.
I see that the treeListing still makes a request with the invalid origin, so I think the best thing would be for the listings (tree and hardware) to check if the origin is valid before making the requests. But either way, a request to an invalid origin will be really fast, and this change ultimately fixes the problem so I'll approve and leave this as a technical debt
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.
Description
Fixes the origin selector appearing blank and causing empty backend responses when navigating between Hardware and Tree pages. The issue occurred because the
originsearch parameter is global, but Hardware pages usetest_originswhile Tree pages usecheckout_origins. When a selected origin from one page type didn't exist in the other, the selector showed nothing and the backend returned no data.Changes
pageOriginsinto a separateuseMemoto compute page-specific originsselectItemsto use the pre-computedpageOriginsuseEffectto check if the current origin is invalid for the page and auto-correct toDEFAULT_ORIGINHow to test
test_originsbut not incheckout_originsCloses #1841