feat(api,ui): add showcase workspace delete endpoint and panel action (#404)#405
Conversation
There was a problem hiding this comment.
Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds workspace lifecycle deletion to the Showcase Workspace feature:
DELETE /demo/workspaces/{workspace_id}(204 / RFC 7807 404) plus a confirmed Delete action on the/showcaseSaved-workspaces panel. Deletion removes ONLY theshowcase_workspacemetadata row — the run's created objects (model runs, scenario plans, aliases, jobs, agent sessions, artifacts) are soft references and stay untouched. Docs swept (RUNBOOKS / DOMAIN_MODEL / API_CONTRACTS) to reflect the implemented workspace model with the remaining gaps marked explicitly out of scope.Type of Change
feat— new featurefix— bug fixfeat!/fix!— breaking change (orBREAKING CHANGE:in the body)refactor— code restructure, no behavior changedocs— documentation onlytest— test-only changechore/ci— tooling, CI, or repo hygiene (no version bump)Checklist
Code Quality
uv run ruff check . --fix && uv run ruff format .uv run mypy app/ && uv run pyright app/Anywithout justification)Testing
uv run pytest -v) — 1977 unit + 16 demo integration; frontend 356 vitest, 61 filesapp/*/tests/Database
uv run alembic upgrade headon fresh DB)Documentation
Security
Testing Instructions
Key integration proof:
test_delete_workspace_integration_keeps_created_objectscreates a REAL agent session, soft-references it (plus a dangling run id) from a workspace, deletes the workspace, and asserts the session still exists.Related Issues
Fixes #404. Relates to #389 (showcase-workspace umbrella), #390 (no-FK soft-reference design), #393 (E4 restore/replay).