Repository navigation
fix(settings): Remember last selected project in settings v3 rail - #129661
Merged
Merged
Conversation
The Project link in the settings v3 rail fell back to the first project whenever the user was outside project settings, so switching to org settings and back dropped the selected project. Remember the last project per organization and fall back to the first project only when the remembered one is no longer available. Co-Authored-By: Priscila Andre de Oliveira <29228205+priscilawebdev@users.noreply.github.com>
Page filters persist project IDs, so a renamed project is still found. Do the same for the settings rail's remembered project. Co-Authored-By: Priscila Andre de Oliveira <29228205+priscilawebdev@users.noreply.github.com>
priscilawebdev
approved these changes
Nov 3, 2026
This branch was successfully deployed
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.
With
settings-v3, picking a project in project settings, going to org settings, and then clicking Project in the settings rail sent you to the org's first project, not the one you'd picked.The cause:
SettingsPrimaryNavigationItemsbuilds the Project link from the project slug in the URL and falls back toprojects[0]. Once you're on an org settings page, the URL has no project slug, so the selection is lost.The fix remembers the last project you visited in settings, one entry per organization in local storage, and the Project link uses it when the URL has no project. This follows the page-filter pattern: the URL wins, then the stored value, then a default. The project is stored by ID, like page filters do, so a project renamed elsewhere is still found. If the stored project no longer exists or you lost access to it, the link falls back to the first project, same as before.
Tests cover the switch project → Org → Project flow (it fails without this fix), resolving a renamed project by ID, and falling back when the stored project is gone.
via @priscilawebdev.
--
View Session [Sentry]
closes DE-1799