fix: actually halt bulk operations on cancel — frontend AbortController + backend guards (#986)

This commit is contained in:
Will Miao
2026-06-17 07:20:32 +08:00
parent 4199c30fec
commit 0906c484e9
16 changed files with 116 additions and 16 deletions

View File

@@ -611,7 +611,9 @@ export class BulkManager {
const result = await apiClient.bulkDeleteModels(filePaths);
if (result.success) {
if (result?.cancelled) {
showToast('toast.api.operationCancelled', {}, 'info');
} else if (result.success) {
const currentConfig = this.getCurrentDisplayConfig();
showToast('toast.models.deletedSuccessfully', {
count: result.deleted_count,

View File

@@ -73,7 +73,7 @@ export class LoadingManager {
if (this.onCancelCallback) {
this.onCancelCallback();
this.cancelButton.disabled = true;
this.cancelButton.textContent = translate('common.status.loading', {}, 'Loading...');
this.cancelButton.textContent = translate('common.status.cancelling', {}, 'Cancelling...');
}
};