Skip to content

Task 4401- Report OSM cleanup failure on workspace delete - #151

Merged
shweta2101 merged 1 commit into
developfrom
feature-task-4401-workspace-deletion
Oct 14, 2026
Merged

shweta2101 merged 1 commit into
developfrom
feature-task-4401-workspace-deletion

Conversation

@shweta2101

@shweta2101 shweta2101 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

DevBoard Task

https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/4401/

Changes implemented

  • Workspace deletion now handles OSM cleanup independently.
  • If workspace deletion succeeds but OSM cleanup fails, the user is redirected to the dashboard and shown an informational toast.
  • Workspace API deletion failures still show the existing error behavior.

Testing impact

  • Successful workspace + OSM deletion.
  • Successful workspace deletion with failed OSM cleanup.
  • Failed primary workspace deletion.
  • Dashboard redirection and persistence of the informational toast.

Screenshot
Screenshot 2026-10-14 at 11 12 06 AM 1

Summary

  • WorkspacesClient.deleteWorkspace now deletes the workspace and requests OSM cleanup in parallel. It throws if workspace deletion fails and reports whether OSM cleanup succeeded.
  • When OSM cleanup fails after workspace deletion succeeds, the delete panel shows an informational toast and redirects to /dashboard.
  • Added unit and end-to-end tests for OSM cleanup failure and primary workspace deletion failure.

Make workspace deletion resilient to OSM cleanup failures: introduce DeleteWorkspaceResult and change WorkspacesClient.deleteWorkspace to use Promise.allSettled so the API record deletion and the OSM cleanup are attempted in parallel. The method now throws if the primary workspace delete fails and returns { osmRequestSucceeded: boolean } to indicate whether the OSM request succeeded. Update the Delete settings panel to show an informational toast when the workspace is deleted but OSM cleanup failed. Add unit tests for the new delete behavior and an e2e test that asserts the info toast is shown when OSM cleanup returns an error.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c6f0d9ff-b80f-4229-a06e-b09021987ba9
📥 Commits

Reviewing files that changed from the base of the PR and between 4ee0794 and 8563f4a.

📒 Files selected for processing: 4
  • components/settings/panel/Delete.vue
  • services/workspaces.ts
  • test/e2e/settings.spec.ts
  • test/unit/services/workspaces.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Workspace deletion now reports whether OSM cleanup succeeded. If cleanup fails, the settings panel shows an informational toast and continues to the dashboard.

Changes: Workspace deletion

Layer / File(s) Summary
Deletion result and failure handling
services/workspaces.ts, test/unit/services/workspaces.test.ts
deleteWorkspace returns the OSM cleanup outcome. It still rejects when workspace deletion fails. Unit tests cover both outcomes.
Settings feedback and end-to-end validation
components/settings/panel/Delete.vue, test/e2e/settings.spec.ts
The settings panel displays an informational toast when OSM cleanup fails and continues to the dashboard. The end-to-end test checks the toast, navigation, and absence of an error toast.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SettingsDeletePanel
  participant WorkspacesClient
  participant WorkspaceDeletion
  participant OSMCleanup
  participant Toast
  participant Dashboard
  SettingsDeletePanel->>WorkspacesClient: deleteWorkspace
  par Delete workspace
    WorkspacesClient->>WorkspaceDeletion: request deletion
    WorkspaceDeletion-->>WorkspacesClient: deletion outcome
  and Clean up OSM data
    WorkspacesClient->>OSMCleanup: request cleanup
    OSMCleanup-->>WorkspacesClient: fulfillment or rejection
  end
  WorkspacesClient-->>SettingsDeletePanel: cleanup success status
  alt OSM cleanup failed
    SettingsDeletePanel->>Toast: show informational toast
  end
  SettingsDeletePanel->>Dashboard: navigate
Loading

Suggested reviewers: susrisha

Merge Risk: ⚪ Minimal · up to 8563f

The deletion feedback change is mergeable after normal checks; no actionable regression was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: reporting OSM cleanup failure during workspace deletion.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/settings/panel/Delete.vue

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

services/workspaces.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

test/e2e/settings.spec.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

  • 1 others

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

A rabbit watched the cleanup call,
The workspace was gone, despite it all.
A gentle toast shared what remained,
Then dashboard paths were soon regained.
One hop, one nibble, off I sprang!

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

@shweta2101
shweta2101 merged commit dae7c8e into develop Oct 14, 2026
2 checks passed
@shweta2101
shweta2101 deleted the feature-task-4401-workspace-deletion branch October 14, 2026 06:42
jeffmaki added a commit that referenced this pull request Oct 15, 2026
…nction-ci

Resolves a conflict in services/workspaces.ts deleteWorkspace: develop's
PR #151 (report OSM cleanup failure) and this branch both reworked it.
Took develop's version (parallel delete via Promise.allSettled returning
DeleteWorkspaceResult), dropped the now-unused OsmApiClientError import,
and removed this branch's obsolete OSM-first deleteWorkspace tests from
test/unit/services/workspaces-lifecycle.test.ts (develop's workspaces.test.ts
already covers the new behavior).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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