fix: default to 'average' variation when navigating to package managers#75
Merged
darcyclarke merged 1 commit intomainfrom Mar 14, 2026
Merged
fix: default to 'average' variation when navigating to package managers#75darcyclarke merged 1 commit intomainfrom
darcyclarke merged 1 commit intomainfrom
Conversation
When clicking away from the package managers view and then clicking back, the route index redirect was going to 'clean' instead of 'average'. This was inconsistent with the initial load behavior which uses sortVariations() to determine the first variation (which is 'average'). Changed the package-managers index route from Navigate to='clean' to Navigate to='average' to match the intended default behavior.
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.
Problem
When navigating away from the package managers view (e.g., to task runners or registries) and then clicking back, the page defaults to the "clean" variation instead of "average".
This is inconsistent with the initial page load, which uses
sortVariations()to pick the first variation — which is "average".Root Cause
In
routes.tsx, the package-managers index route was hardcoded to redirect toclean:Meanwhile, the
App.tsxuseEffect that handles the initial/→/package-managers/{variation}redirect correctly usessortVariations(), which puts "average" first.When the user navigates away and clicks back, the NavLink goes to
/package-managers(no variation), hitting the index route redirect — which was going tocleaninstead ofaverage.Fix
Changed the package-managers index route default from
cleantoaverageto match the intended behavior.Changes
app/src/routes.tsx: ChangedNavigate to="clean"→Navigate to="average"