Skip to content

fix(site): stop workspace deletes playing hide-and-seek#23641

Open
johnstcn wants to merge 6 commits intomainfrom
fix/workspaces-delete-ghosting-list
Open

fix(site): stop workspace deletes playing hide-and-seek#23641
johnstcn wants to merge 6 commits intomainfrom
fix/workspaces-delete-ghosting-list

Conversation

@johnstcn
Copy link
Member

@johnstcn johnstcn commented Mar 25, 2026

  • Fix workspaces list invalidation after kebab-menu delete and add Storybook coverage for the immediate Deleting state.

🤖 This PR was made by Coder Agents and read by me.

@johnstcn johnstcn self-assigned this Mar 25, 2026
Copy link
Member Author

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read through - whole cause of this was apparently me not knowing how to make react-query properly invalidate

@johnstcn johnstcn changed the title [DNM] fix(site/src): workspace deletes stop playing hide-and-seek fix(site/src): workspace deletes stop playing hide-and-seek Mar 25, 2026
@johnstcn johnstcn marked this pull request as ready for review March 25, 2026 23:01
Copilot AI review requested due to automatic review settings March 25, 2026 23:01
@johnstcn johnstcn changed the title fix(site/src): workspace deletes stop playing hide-and-seek fix(site): stop workspace deletes playing hide-and-seek Mar 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 onActionSuccess from the workspaces table row into WorkspaceMoreActions.
  • Invokes onActionSuccess after a successful delete mutation inside WorkspaceMoreActions.
  • Adds a new WorkspacesPage Storybook 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.

@johnstcn johnstcn marked this pull request as draft March 26, 2026 00:08
@johnstcn johnstcn marked this pull request as ready for review March 26, 2026 09:03
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