-
Notifications
You must be signed in to change notification settings - Fork 55
Update site selection behavior after site deletion #2459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update site selection behavior after site deletion #2459
Conversation
- Update site selection logic to preserve the currently selected site if it still exists after deletion. - Add tests to verify that the first remaining site is selected when the currently selected site is deleted, and that selection remains unchanged when a different site is deleted.
📊 Performance Test ResultsComparing 17075a3 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
ivan-ottinger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Works well and the change looks good. Thank you for adding the test as well.
CleanShot.2026-01-22.at.15.38.30.mp4
epeicher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @gcsecsey! I have tested it, and it works as advertised. I can see that the second site remains selected using this branch while it selects the first site in trunk. LGTM! ![]()
| Trunk | This branch |
|---|---|
![]() |
![]() |
…ves-to-the-first-site
|
It seems it still changes the tab to Overview for the selected site. |
Good catch, I added a follow-up for this in #2468 |


Related issues
Proposed Changes
onDeleteSiteto check if the currently selected site still exists after deletionTesting Instructions
npm startPre-merge Checklist