fix(workspaces): drop unusable serverside redirect after scheduling deletion - #941
Merged
realcodesiman merged 1 commit intoAug 11, 2026
Merged
Conversation
…eletion The schedule-deletion action redirected server-side to the same settings page the client already reloads via onSuccess, so the redirect never had a chance to run before the client's window.location.reload() took over. Remove the dead redirect and keep the client-side reload as the single source of truth for the post-action refresh. Update the action's test to match: it now resolves normally instead of throwing NEXT_REDIRECT, so drop the next/navigation mock and redirect assertion.
realcodesiman
deleted the
fix/workspace-deletion-drop-serverside-redirect
branch
August 11, 2026 14:53
viethung0o0
pushed a commit
that referenced
this pull request
Sep 7, 2026
…eletion (#941) The schedule-deletion action redirected server-side to the same settings page the client already reloads via onSuccess, so the redirect never had a chance to run before the client's window.location.reload() took over. Remove the dead redirect and keep the client-side reload as the single source of truth for the post-action refresh. Update the action's test to match: it now resolves normally instead of throwing NEXT_REDIRECT, so drop the next/navigation mock and redirect assertion.
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.
Summary
redirect()inscheduleWorkspaceDeletionAction— it targeted the same settings page the client already reloads viaonSuccess, so it was dead code (the client'swindow.location.reload()takes over before the redirect could matter).window.location.reload()inworkspace-deletion-card.tsxas the single source of truth for refreshing the page after scheduling deletion.NEXT_REDIRECT).Changes
apps/builder/src/features/workspaces/actions/schedule-workspace-deletion-action.tsapps/builder/__tests__/schedule-workspace-deletion-action.test.tsTest plan
pnpm vitest run __tests__/schedule-workspace-deletion-action.test.tspassespnpm --filter builder check-typespnpm lint(touched files clean; pre-existing unrelated lint findings elsewhere untouched)