fix(site): stop workspace deletes playing hide-and-seek#23641
Open
fix(site): stop workspace deletes playing hide-and-seek#23641
Conversation
johnstcn
commented
Mar 25, 2026
Member
Author
johnstcn
left a comment
There was a problem hiding this comment.
read through - whole cause of this was apparently me not knowing how to make react-query properly invalidate
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes stale workspace list UI after deleting a workspace via the row kebab-menu by triggering the same “action succeeded → refresh list” path used by other workspace actions, and adds a Storybook interaction test to cover the immediate “Deleting” state.
Changes:
- Passes
onActionSuccessfrom the workspaces table row intoWorkspaceMoreActions. - Invokes
onActionSuccessafter a successful delete mutation insideWorkspaceMoreActions. - Adds a new
WorkspacesPageStorybook story that exercises delete → immediate “Deleting” state.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| site/src/pages/WorkspacesPage/WorkspacesTable.tsx | Wires onActionSuccess into the kebab-menu actions component so list invalidation can occur after delete. |
| site/src/pages/WorkspacesPage/WorkspacesPage.stories.tsx | Adds Storybook play test to validate the UI transitions to “Deleting” immediately after delete. |
| site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx | Calls the page-provided success callback after delete so the workspaces list query is invalidated/refetched. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
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.
Deletingstate.