Skip to content

Conversation

@Imvedansh
Copy link
Contributor

Implements a confirmation modal for domain deletion that shows detailed impact before proceeding, making it consistent with account deletion

Description

This PR implements a comprehensive domain deletion confirmation dialog, making the domain deletion process consistent with account deletion and providing better warnings to users about the impact of their actions.

Fixes #11497

New Component: DomainDeleteConfirm

  • Created a modal component that shows detailed impact before domain deletion
  • Displays a table with account-wise VM statistics:
    • Account name
    • Total VMs
    • Running VMs
    • Stopped VMs
  • Shows prominent warning about permanent deletion of accounts and VMs
  • Requires user to type the exact domain name to enable deletion
  • Fetches live data using listAccounts and listVirtualMachines APIs

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Screenshot from 2026-01-05 22-34-21 Screenshot from 2026-01-05 22-34-31

How Has This Been Tested?

  1. Navigate to Domains section
  2. Select a domain with multiple accounts and VMs
  3. Click "Delete Domain" action
  4. Verify modal shows:
    • Warning message about permanent deletion
    • Table with accurate account and VM counts
    • Confirmation input field
  5. Try clicking "Delete Domain" without typing name → button should be disabled
  6. Type incorrect domain name → button should remain disabled
  7. Type correct domain name → button should enable
  8. Click "Delete Domain" → domain should be deleted and UI should update

How did you try to break this feature and the system with this change?

  • Domain with no accounts
  • Domain with accounts but no VMs
  • Domain with mix of running and stopped VMs
  • Deleting domain while viewing it (should navigate away)
  • Whitespace handling in domain name input

@Imvedansh
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

@Imvedansh a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-838)

@Imvedansh
Copy link
Contributor Author

@DaanHoogland WDYT?

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland DaanHoogland changed the base branch from 4.19 to 4.20 January 6, 2026 15:10
@DaanHoogland
Copy link
Contributor

@Imvedansh , I moved it to 4.20 as this is the oldest supported LTS.

@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.24%. Comparing base (cd5bb09) to head (a84c486).
⚠️ Report is 26 commits behind head on 4.20.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12380      +/-   ##
============================================
- Coverage     17.10%   16.24%   -0.86%     
- Complexity    13392    13393       +1     
============================================
  Files          5255     5658     +403     
  Lines        466415   499171   +32756     
  Branches      54746    60585    +5839     
============================================
+ Hits          79763    81082    +1319     
- Misses       377768   409050   +31282     
- Partials       8884     9039     +155     
Flag Coverage Δ
uitests 4.02% <ø> (?)
unittests 17.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-839)

@Imvedansh
Copy link
Contributor Author

@DaanHoogland WDYT?

I was working on

@Imvedansh , I moved it to 4.20 as this is the oldest supported LTS.

Yeah , was thinking same.
I was thinking of 4.22 or for now 4.20 is fine?

@Imvedansh Imvedansh requested a review from DaanHoogland January 6, 2026 15:58
Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

Need update for async deleteDomain (try deleting a domain which has an account)

confirmDeleteDomain () {
const params = { id: this.deleteDomainResource.id }
api('deleteDomain', params)
Copy link
Contributor

Choose a reason for hiding this comment

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

@Imvedansh deleteDomain is an async API. You would mostly always get a 200 response as it would return the jobid. So you'll have to poll that job ID instead showing success immediately

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, alrightyy.
I ll shoot changes shortly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification @shwstppr
I’ve updated the UI to treat deleteDomain as an async API by polling the returned jobId using the existing $pollJob helper, consistent with other async actions in the UI.
Success and failure are now shown only after the async job completes.
WDYS?

@abh1sar abh1sar added this to the 4.20.3 milestone Jan 7, 2026
@DaanHoogland DaanHoogland linked an issue Jan 13, 2026 that may be closed by this pull request
@DaanHoogland DaanHoogland requested a review from shwstppr January 13, 2026 16:04
@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-845)

@DaanHoogland
Copy link
Contributor

looks nice but one issue:
Screenshot 2026-01-13 at 20 15 15
I think you mean to delete users with the domain, don’t you?

deleting an empty domain works.

@Imvedansh
Copy link
Contributor Author

Imvedansh commented Jan 14, 2026

looks nice but one issue: Screenshot 2026-01-13 at 20 15 15 I think you mean to delete users with the domain, don’t you?

deleting an empty domain works.

Thanks Daan for checking this out
Let me clarify it ,I spend quite time to understand the architecture last when picked it.

Deleting an empty domain works as expected. When a domain contains accounts, users, or sub-domains, the deletion fails because the CloudStack backend does not allow cascading deletion of users or accounts during domain deletion, in order to avoid catastrophic actions. The error shown is therefore correct and comes from the backend async job result.

The UI change in this PR does not attempt to change backend deletion semantics. Instead, it focuses on:

Correctly handling deleteDomain as an async job .

Improving user awareness by clearly showing associated accounts and instances before attempting deletion

Providing better verbiage around domain deletion expectations, as requested in #11497

Previously, after an unsuccessful domain deletion, users had to manually navigate through accounts and instances to identify what was still associated with the domain, quite not cool
Screenshot 2026-01-14 092054

With the current change, the UI presents the list of associated accounts and active/stopped instances upfront, making it easier to clean up the domain by deleting the related accounts first and then retrying the domain deletion.

So far this is my understanding ,
If I'm mistaken anywhere do let me know I ll be happy to work on that

@DaanHoogland
Copy link
Contributor

Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a cleanup option on the deleteDomain API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.

@Imvedansh
Copy link
Contributor Author

Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a cleanup option on the deleteDomain API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.

Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a cleanup option on the deleteDomain API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.

Gotcha,
I actually didn't used the state ,Let me try it
Thanks

@Imvedansh
Copy link
Contributor Author

Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a cleanup option on the deleteDomain API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.

Just need to add cleanup:true in domainDelete funtion.
It's not much, but may need to be tested seprately for every state ,such as with account, with instance , state :stopped,state:running.
What would you prefer to merge this as in condition , and I can add another PR shortly for same with proper testing. or to do all in this PR
PS. Im working on what you asked as well

@shwstppr
Copy link
Contributor

Delete dialog needs cleanup options.

@Imvedansh I don't think you need to check if all resources are actually cleaned up. That is an existing flag and you just need to make sure API is called with the correct value.

cc @DaanHoogland

@Imvedansh
Copy link
Contributor Author

Delete dialog needs cleanup options.

@Imvedansh I don't think you need to check if all resources are actually cleaned up. That is an existing flag and you just need to make sure API is called with the correct value.

cc @DaanHoogland

I remember after adding the flag cleanup true, i tried deleting the domain with running instance ,It took some time and after some, instance and account did got deleted but domain didn't ,didn't think much of it then and assumed this may need testing.
Let me try it again,maybe I made mistake somewhere.

Implements a confirmation modal for domain deletion that shows detailed
impact before proceeding, making it consistent with account deletion
@Imvedansh
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

@Imvedansh a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-853)

@RosiKyu RosiKyu self-assigned this Jan 22, 2026
@RosiKyu
Copy link
Collaborator

RosiKyu commented Jan 22, 2026

@blueorangutan package

@blueorangutan
Copy link

@RosiKyu a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16499

@sureshanaparti sureshanaparti changed the title UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) Jan 23, 2026
@abh1sar
Copy link
Collaborator

abh1sar commented Jan 23, 2026

@shwstppr Are all your concerns answered?

@shwstppr
Copy link
Contributor

@abh1sar no.
@Imvedansh I think there needs to be a switch element to toggle cleanup in the new form you added or are we considering the operator entering domain name as cleanup=true. Currently, we are simply passing cleanup=true on submit. (I ended up accidentally deleting a domain on QA env 🤦‍♂️ )
I'm not sure about this behaviour and it feels a bit confusing compared to the original UI. Others can share their opinion.

@DaanHoogland
Copy link
Contributor

@shwstppr , I think on entering the name you want a deep clean and being able to do a safe/shallow delete should be possible as well. I am not sure what the right ux element would be. A switch could be used as you suggest. (in short; my opinion is of no value)

@Imvedansh
Copy link
Contributor Author

Imvedansh commented Jan 23, 2026

@abh1sar no. @Imvedansh I think there needs to be a switch element to toggle cleanup in the new form you added or are we considering the operator entering domain name as cleanup=true. Currently, we are simply passing cleanup=true on submit. (I ended up accidentally deleting a domain on QA env 🤦‍♂️ ) I'm not sure about this behaviour and it feels a bit confusing compared to the original UI. Others can share their opinion.

The expected behavior of this PR is to allow deletion of a domain along with all associated accounts and sub-domains (including all resources) while showing any Associated accounts and VM in the gui ( Make's it easier for admin to delete the domains as they can see the list of accounts and any running VM's )

--- This domain may contain accounts, users, or sub-domains. All of these must be removed before the domain can be deleted. This action cannot be undone.--- is the current verbiage for the form ,It should be more like All associated accounts WILL BE DELETED
and to prevent any catastrophic and unintended action ,added the requirement to enter the name of domain.

If a cleanup flag is added and not checked, the API would simply return an error, and it’s unclear if that would provide a good user experience.
Another approach I can think of is to disable the input container till the cleanup flag is true. with a little more clear warning above which states this will remove all the associated accounts,vm etc. I feel this could be good to have maybe in future not a must have for now.

Current solution make it very easy to see all the accounts and vm in single container of parent domain and extra check of entering the domain name their removes the scope of deleting the resources by mistake while keeping it simpler to do action.
Screenshot 2026-01-23 174318

WDYT?

@shwstppr
Copy link
Contributor

Thanks @Imvedansh. I don't have a suggestion at this point. It would be good if any of the real users or the reporter could have a look at it. If the behaviour is accepted by others, then 👍

Copy link
Collaborator

@RosiKyu RosiKyu left a comment

Choose a reason for hiding this comment

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

Testing Summary

Overall Assessment LGTM (with minor observations)

Great work on this PR, @Imvedansh! The domain deletion confirmation dialog is a significant UX improvement. The implementation is solid and handles the key scenarios well.


Test Results

Test Case Description Result
TC1 Delete empty domain PASS
TC2 Delete domain with account (no VMs) PASS
TC3 Delete domain with mixed VM states PASS
TC4 Cascading deletion (parent with children) PASS
TC5 Mass delete (rapid succession) PASS
TC6 Whitespace handling + navigation PARTIAL

What Works Well

  1. Modal displays accurate information - Account/VM breakdown is correct and helpful
  2. Input validation - Exact domain name match required; child domain names correctly rejected
  3. Whitespace handling - .trim() correctly handles leading/trailing spaces
  4. Async job handling - $pollJob implementation works correctly
  5. Cascading deletion - cleanup=true successfully removes child domains, accounts, VMs, and networks
  6. Mass deletion - Multiple rapid deletions queue and complete without conflicts
  7. Dynamic UI updates - Domain tree refreshes correctly after each deletion

Observations & Suggestions

1. Navigation Issue (TC6)

When deleting a domain while viewing it, the UI does not navigate away. The detail panel shows stale data for the deleted domain.

  • Current behavior: Domain tree updates, but detail panel shows deleted domain
  • Expected behavior: Should navigate to /domain after deletion
  • Workaround: Hard browser refresh (F5) fixes it

The code exists but doesn't seem to execute:

if (this.$route.params.id === domain.id) {
  this.$router.push({ path: '/domain' })
}

2. Warning Message Verbiage (Minor)

Current text: "All of these must be removed before the domain can be deleted."

Since cleanup=true is always passed, the resources are removed automatically. Consider updating to something like:

"All associated accounts, users, VMs, and sub-domains will be permanently deleted. This action cannot be undone."

This better reflects the actual behavior and addresses the concern raised by @shwstppr about accidental deletion.

Detailed Test Execution Report

TC1: Delete Empty Domain

Objective:
Verify that an empty domain (no accounts, no VMs, no sub-domains) can be deleted using the new confirmation dialog.

Test Steps:

  1. Login to CloudStack UI as admin
  2. Navigate to Domains section
  3. Expand ROOT → TestDeleteParent → Click on TestChild3
  4. Click Delete Domain action button (trash icon) & Observe the confirmation modal displays
  5. Verify the Account/VM table shows "No Data"
  6. Verify "Delete domain" button is disabled
  7. Type TestChild3 in the confirmation input field (try with whitespaces, etc)
  8. Verify "Delete domain" button becomes enabled only on exact match (or exact match with whitespaces at the beginnin/end)
  9. Click "Delete domain" button
  10. Verify domain is removed from the tree

Expected Result:

  • Modal displays with warning message and empty table
  • Delete button disabled until correct domain name is entered
  • Domain deletes successfully and is removed from UI

Actual Result:

  • Modal displayed correctly with warning: "This domain may contain accounts, users, or sub-domains. All of these must be removed before the domain can be deleted. This action cannot be undone."
  • Table showed "No Data" (empty domain)
  • Delete button was disabled until domain name was typed
  • Domain deleted successfully and removed from tree dynamically
  • Note: No success notification displayed after deletion

Test Evidence:

  • Pre-test: TestChild3 existed (ID: 8a64ede9-b598-4be3-b9b9-e6c01b548443)

  • Post-deletion verification:

(admin) 🐱 > list domains listall=true
{
  "count": 6,
  "domain": [
    { "name": "ROOT", ... },
    { "name": "Test_With_Subdomain", ... },
    { "name": "Test_Sub_1", ... },
    { "name": "TestDeleteParent", ... },
    { "name": "TestChild1", "vmtotal": 2, ... },
    { "name": "TestChild2", "vmtotal": 0, ... }
  ]
}
  • TestChild3 no longer present - deletion confirmed

Status: PASS

  • domain deletion modal
Screenshot from 2026-01-27 16-44-19

TC2: Delete Domain with Account, No VMs + Input Validation

Objective:
Verify that a domain containing an account (but no VMs) displays correctly in the confirmation modal, validates input correctly, and deletes successfully with cleanup=true.

Test Steps:

  1. Navigate to Domains section
  2. Click on TestChild2 (has testuser2 account, 0 VMs)
  3. Click Delete Domain action button
  4. Observe modal displays account in table with VM counts
  5. Verify "Delete domain" button is disabled
  6. Type incorrect name → verify button stays disabled
  7. Type TestChild2 → verify button becomes enabled
  8. Click "Delete domain" button
  9. Verify domain and account are deleted via CLI

Expected Result:

  • Modal shows testuser2 account with 0/0/0 VM counts
  • Input validation prevents deletion until correct name entered
  • Domain and associated account deleted successfully (cleanup=true)

Actual Result:

  • Modal displayed testuser2 account correctly: Total VMs=0, Running=0, Stopped=0
  • Delete button was disabled until correct domain name entered
  • Domain deleted successfully
  • Account testuser2 also deleted (cleanup=true worked)
  • Domain count reduced from 6 to 5
Screenshot from 2026-01-27 16-56-50
Screencast.from.2026-01-27.16-58-53.webm
  • Post-deletion verification:
(admin) 🐱 > list domains listall=true
{
  "count": 5,
  "domain": [
    { "name": "ROOT", ... },
    { "name": "Test_With_Subdomain", ... },
    { "name": "Test_Sub_1", ... },
    { "name": "TestDeleteParent", "vmtotal": 2, ... },
    { "name": "TestChild1", "vmtotal": 2, ... }
  ]
}
  • TestChild2 no longer present
(admin) 🐱 > list accounts domainid=426023be-6fcd-4b20-ad27-b2b64ff79b30 listall=true
🙈 Error: (HTTP 431, error code 4350) Domain id=8 doesn't exist
# Confirms domain and account were deleted

Status: PASS

TC3: Delete Domain with Mixed VM States (cleanup=true)

Objective:
Verify that a domain containing an account with running and stopped VMs displays correct counts in the modal and deletes successfully with cleanup=true (cascading deletion of VMs, networks, and account).

Test Steps:

  1. Navigate to Domains section
  2. Click on TestChild1 (has testuser1 account with 2 VMs)
  3. Click Delete Domain action button
  4. Observe modal displays account with VM breakdown
  5. Verify Running/Stopped VM counts are accurate
  6. Type TestChild1 in confirmation input
  7. Click "Delete domain" button
  8. Observe success notification
  9. Verify domain, account, and VMs deleted via CLI

Expected Result:

  • Modal shows testuser1 with Total=2, Running=1, Stopped=1
  • Domain, account, and all VMs deleted via cleanup=true
  • Success notification displayed

Actual Result:

  • Modal correctly displayed: testuser1 | 2 | 1 | 1

  • Success notification appeared upon deletion

  • Domain TestChild1 deleted

  • Account testuser1 deleted

  • Both VMs (testvm1, testvm2) deleted

  • Network resources cleaned up

  • Domain count reduced from 5 to 4

  • VM count reduced from 3 to 1 (only admin's iso-test-vm remains)

  • domain with mixed VM states - displays correctly

image
  • deletion
Screencast.from.2026-01-27.16-58-53.webm
  • Post-deletion - Domains:
(admin) 🐱 > list domains listall=true
{
  "count": 4,
  "domain": [
    { "name": "ROOT", "vmtotal": 1, ... },
    { "name": "Test_With_Subdomain", ... },
    { "name": "Test_Sub_1", ... },
    { "name": "TestDeleteParent", "haschild": false, "vmtotal": 0, ... }
  ]
}
  • TestChild1 deleted, TestDeleteParent now has no children

  • Post-deletion - VMs:

(admin) 🐱 > list virtualmachines listall=true
{
  "count": 1,
  "virtualmachine": [
    { "name": "iso-test-vm", "account": "admin", "domain": "ROOT", ... }
  ]
}
# testvm1 and testvm2 deleted - only admin's VM remains

Status: PASS

TC4: Delete Parent Domain with Children (Cascading Deletion)

Objective:
Verify that deleting a parent domain with child domains triggers cascading deletion of all sub-domains and their associated resources (accounts, users) using cleanup=true.

Test Steps:

  1. Create test hierarchy: TestDeleteParent → CascadeChild1 (with account), CascadeChild2 (empty)
  2. Navigate to Domains section in UI
  3. Click on TestDeleteParent
  4. Click Delete Domain action button
  5. Observe modal shows accounts from child domains
  6. Try typing child domain name (e.g., "CascadeChild1") → verify button stays disabled
  7. Type TestDeleteParent → verify button becomes enabled
  8. Click "Delete domain" button
  9. Verify all domains and accounts deleted via CLI

Expected Result:

  • Modal displays accounts from entire hierarchy
  • Only exact parent domain name enables delete button
  • Parent and all children deleted with cleanup=true
  • All associated accounts deleted

Actual Result:

  • Modal correctly displayed cascadeuser account (from child domain CascadeChild1)
  • Typing child domain name did NOT enable delete button (correct behavior)
  • Only typing exact name "TestDeleteParent" enabled the button
  • Cascading deletion successful:
    • TestDeleteParent deleted
    • CascadeChild1 deleted
    • CascadeChild2 deleted
    • cascadeuser account deleted
  • Domain count reduced from 6 to 3

Test Evidence:

  • Pre-deletion structure (6 domains):
image
  • Modal showed:
Screenshot from 2026-01-27 17-13-41
  • Deletion
Screencast.from.2026-01-27.17-14-06.webm
  • Post-deletion verification:
(admin) 🐱 > list domains listall=true
{
  "count": 3,
  "domain": [
    { "name": "ROOT", ... },
    { "name": "Test_With_Subdomain", ... },
    { "name": "Test_Sub_1", ... }
  ]
}
  • TestDeleteParent, CascadeChild1, CascadeChild2 all deleted
(admin) 🐱 > list accounts listall=true
{
  "count": 3,
  "account": [
    { "name": "admin", ... },
    { "name": "baremetal-system-account", ... },
    { "name": "ACSUser", ... }
  ]
}

  • cascadeuser account deleted - only system accounts remain

Status: PASS

Additional Observation:
Input validation correctly rejects child domain names - only the exact parent domain name enables deletion. This prevents accidental deletion of wrong domain.

TC5: Mass Delete - Multiple Domains in Rapid Succession

Objective:
Verify that multiple domains can be deleted in rapid succession without conflicts, errors, or UI issues. Tests async job handling when multiple deletions are triggered quickly.

Test Steps:

  1. Create 3 test domains: MassDelete1, MassDelete2, MassDelete3 under ROOT
  2. Refresh UI to display all domains
  3. Delete MassDelete1: Click → Delete action → type name → confirm
  4. Immediately delete MassDelete2: Click → Delete action → type name → confirm
  5. Immediately delete MassDelete3: Click → Delete action → type name → confirm
  6. Observe UI behavior during rapid deletions
  7. Verify all domains deleted via CLI

Expected Result:

  • All 3 domains delete without errors
  • Async jobs queue and complete properly
  • UI updates dynamically after each deletion
  • No conflicts between concurrent delete operations

Actual Result:

  • All 3 domains (MassDelete1, MassDelete2, MassDelete3) deleted successfully

  • No UI lag or delays observed

  • No error messages or conflicts

  • Domain tree updated dynamically after each deletion

  • Async jobs handled properly without interference

  • Domain count reduced from 6 to 3

  • Pre-deletion (6 domains):

(admin) 🐱 > list domains listall=true
{
  "count": 6,
  "domain": [
    { "name": "ROOT", ... },
    { "name": "Test_With_Subdomain", ... },
    { "name": "Test_Sub_1", ... },
    { "name": "MassDelete1", "id": "b77d9d7e-20ef-4d52-a1e0-0729a30e8829", ... },
    { "name": "MassDelete2", "id": "93b278bd-ea8a-41f4-a7a4-05a1688fa7e5", ... },
    { "name": "MassDelete3", "id": "9a6a17ad-993c-4ac7-bad2-f09909c97880", ... }
  ]
}
  • Post-deletion (3 domains):
(admin) 🐱 > list domains listall=true
{
  "count": 3,
  "domain": [
    { "name": "ROOT", ... },
    { "name": "Test_With_Subdomain", ... },
    { "name": "Test_Sub_1", ... }
  ]
}
  • All MassDelete domains successfully removed
Screencast.from.2026-01-27.17-21-09.webm

Status: PASS

TC6: Whitespace Handling + Delete While Viewing Domain

Objective:
Verify that (1) domain name input correctly handles leading/trailing whitespace, and (2) UI navigates away when deleting a domain while viewing it.

Test Steps:

  1. Create WhitespaceTest domain under ROOT
  2. Navigate to Domains section and click on WhitespaceTest
  3. Click Delete Domain action button
  4. Type WhitespaceTest (with leading and trailing spaces)
  5. Observe if Delete button becomes enabled
  6. Click "Delete domain" button
  7. Observe if UI navigates away from deleted domain
  8. Click UI Refresh button
  9. Perform hard browser refresh (F5)
  10. Verify domain deleted via CLI

Expected Result:

  • Whitespace trimmed - button should enable despite extra spaces
  • After deletion, UI should navigate away to /domain (domains list)
  • Detail panel should not show stale data

Actual Result:

  • Whitespace handling: PASS - Button enabled with spaces (trim() working correctly)
  • X Navigation after deletion: FAIL - UI did not navigate away
  • X Detail panel showed stale data for deleted domain
  • X UI Refresh button did not clear stale view
  • Hard browser refresh (F5) correctly navigated to ROOT
  • Domain tree correctly removed WhitespaceTest from list
  • Domain deletion successful (confirmed via CLI)

Test Evidence:

  • Whitespace input accepted - button enabled with " WhitespaceTest "
  • Code correctly uses .trim() for comparison:
  • canDelete () { return this.confirmText.trim() === this.domain.name.trim() }

-> After deletion:

  • Domain tree: WhitespaceTest removed

  • Detail panel: Still showing WhitespaceTest (stale)

  • URL: Still on deleted domain's route

  • UI Refresh: No effect

  • Hard refresh (F5): Navigates to ROOT

  • Post-deletion verification:

(admin) 🐱 > list domains listall=true
{
  "count": 3,
  "domain": [
    { "name": "ROOT", ... },
    { "name": "Test_With_Subdomain", ... },
    { "name": "Test_Sub_1", ... }
  ]
}
  • WhitespaceTest successfully deleted but right panel not refreshed even via Refresh button (needs hard bewser refresh)
Screencast.from.2026-01-27.17-29-27.webm

Status: PARTIAL PASS (Whitespace: PASS, Navigation: FAIL - BUG)

@DaanHoogland
Copy link
Contributor

@Imvedansh , can you look at @RosiKyu ’s last test case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: Make Domain Deletion Consistent with Account Deletion

7 participants