Skip to content

fix(settings): Remember last selected project in settings v3 rail - #129661

Merged
priscilawebdev merged 2 commits into
masterfrom
priscila/fix/settings-v3-remember-project
Nov 3, 2026
Merged

priscilawebdev merged 2 commits into
masterfrom
priscila/fix/settings-v3-remember-project

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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: SettingsPrimaryNavigationItems builds the Project link from the project slug in the URL and falls back to projects[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

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>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 3, 2026
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>
@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

DE-1799

@priscilawebdev
priscilawebdev marked this pull request as ready for review November 3, 2026 10:08
@priscilawebdev
priscilawebdev requested a review from a team as a code owner November 3, 2026 10:08
@priscilawebdev
priscilawebdev merged commit e6867ef into master Nov 3, 2026
87 checks passed
@priscilawebdev
priscilawebdev deleted the priscila/fix/settings-v3-remember-project branch November 3, 2026 10:09

This branch was successfully deployed

1 active deployment
Preview — c6c75b21 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant