Skip to content

feat(api,ui): add showcase workspace delete endpoint and panel action (#404)#405

Merged
w7-mgfcode merged 1 commit into
devfrom
feat/demo-workspace-delete
Jun 12, 2026
Merged

feat(api,ui): add showcase workspace delete endpoint and panel action (#404)#405
w7-mgfcode merged 1 commit into
devfrom
feat/demo-workspace-delete

Conversation

@w7-mgfcode

Copy link
Copy Markdown
Owner

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 /showcase Saved-workspaces panel. Deletion removes ONLY the showcase_workspace metadata 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 feature
  • fix — bug fix
  • feat! / fix! — breaking change (or BREAKING CHANGE: in the body)
  • refactor — code restructure, no behavior change
  • docs — documentation only
  • test — test-only change
  • chore / ci — tooling, CI, or repo hygiene (no version bump)

Checklist

Code Quality

  • My code follows the project's coding standards (see CLAUDE.md)
  • I have run uv run ruff check . --fix && uv run ruff format .
  • I have run uv run mypy app/ && uv run pyright app/
  • All type annotations are complete (no Any without justification)

Testing

  • I have added tests that prove my fix/feature works
  • All existing tests pass (uv run pytest -v) — 1977 unit + 16 demo integration; frontend 356 vitest, 61 files
  • New tests follow existing patterns in app/*/tests/

Database

  • No database changes required
  • Migration added and tested (uv run alembic upgrade head on fresh DB)
  • Migration is backward compatible

Documentation

  • No documentation changes needed
  • I have updated relevant documentation
  • Docstrings follow Google style

Security

  • No hardcoded secrets, credentials, or API keys
  • Input validation is in place for user-provided data
  • No SQL injection vulnerabilities (using SQLAlchemy ORM)

Testing Instructions

# Backend
uv run pytest app/features/demo -v -m "not integration"
docker compose up -d && uv run pytest app/features/demo -v -m integration

# Frontend
cd frontend && pnpm lint && pnpm test --run src/components/demo/WorkspacePanel.test.tsx src/hooks/use-workspaces.test.ts

# Manual: run a showcase with "Save as workspace" ticked, then Delete the row
# from the Saved-workspaces panel — confirm the dialog copy, the list refresh,
# and that /explorer/runs etc. still show the run the workspace referenced.

Key integration proof: test_delete_workspace_integration_keeps_created_objects creates 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).

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac152ac7-84d2-4af1-84b1-c576f4c54648

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/demo-workspace-delete

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@w7-mgfcode w7-mgfcode merged commit bdf85f6 into dev Jun 12, 2026
8 checks passed
@w7-mgfcode w7-mgfcode deleted the feat/demo-workspace-delete branch June 12, 2026 19:17
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.

1 participant