Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

When deleting a workspace, the redirect logic was using a stale closure value of selectedWorkspace. If the user navigated to another workspace while the delete was in progress, they'd still get redirected to the project page because the callback captured the old selection.

Fix: Use functional update form of setSelectedWorkspace to check the current selection at the time the delete completes, not the value captured when the callback was created.

Generated with mux

When deleting a workspace, the redirect logic was using a stale closure
value of selectedWorkspace. If the user navigated to another workspace
while the delete was in progress, they'd still get redirected to the
project page because the callback captured the old selection.

Fix: Use functional update form of setSelectedWorkspace to check the
*current* selection at the time the delete completes, not the value
captured when the callback was created.

_Generated with mux_
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ammario ammario merged commit 98c2743 into main Dec 9, 2025
19 checks passed
@ammario ammario deleted the fix-workspace-deletion-redirect branch December 9, 2025 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants