feat(desktop): add teardown script support for workspace deletion
Merged
SA
1y ago+138+138+012345678901234567890123456789-14-14-01234567890123456789
Summary
- Adds teardown script support that runs when workspaces are deleted
- Teardown scripts are configured in
.superset/setup.jsonunder theteardownkey - Creates
superset-teardown.shwhich deletes the associated Neon branch - Shows a toast warning if teardown fails (deletion still proceeds)
Changes
- Add
teardownfield toSetupConfigtype - Create
teardown.tsutility to run teardown scripts synchronously (60s timeout) - Modify
deletemutation to run teardown before worktree removal - Add toast notification for teardown failures in
DeleteWorkspaceDialog
Test plan
- Create a workspace (should create Neon branch)
- Delete the workspace (should delete Neon branch)
- Verify Neon branch is removed from Neon dashboard
- Test with teardown script failing (should show warning toast but still delete workspace)
Notes
Users need to update their local .superset/setup.json to include:
{
"commands": ["./superset-setup.sh"],
"teardown": ["./superset-teardown.sh"]
}
🤖 Generated with Claude Code
Summary by CodeRabbit
- New Features
- Workspaces now execute custom teardown commands when deleted for automatic resource cleanup
- Teardown error warnings are displayed to users if cleanup fails during workspace deletion
✏️ Tip: You can customize this high-level summary in your review settings.