Skip to content

Add configurable setting for job delete confirmation dialog#4327

Open
BRGOVIND wants to merge 1 commit into
zowe:mainfrom
BRGOVIND:feature/job-delete-confirmation-setting
Open

Add configurable setting for job delete confirmation dialog#4327
BRGOVIND wants to merge 1 commit into
zowe:mainfrom
BRGOVIND:feature/job-delete-confirmation-setting

Conversation

@BRGOVIND

Copy link
Copy Markdown

Proposed changes

Resolves #4315

Adds a new VS Code setting, zowe.jobs.confirmDelete, that allows users to disable the job deletion confirmation dialog.

The setting defaults to true, preserving the current behavior. When disabled, users can delete jobs without being prompted for confirmation.

The setting is applied to both single-job and multi-job deletion workflows.

Release Notes

Milestone: TBD

Changelog:

  • Added zowe.jobs.confirmDelete setting to control whether users are prompted before deleting jobs.

Types of changes

  • Enhancement (non-breaking change which adds or improves functionality)

Checklist

General

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • All PR dependencies have been merged and published (if applicable)
  • A GIF or screenshot is included in the PR for visual changes
  • The pre-publish command has been executed
  • New ZE APIs are tested with extender types that haven't adopted yet to determine breaking changes

Code coverage

  • There is coverage for the code that I have added
  • I have added new test cases and they are passing
  • I have manually tested the changes

Deployment

  • I have tested new functionality with the FTP extension and profile verifying no extender profile type breakages introduced
  • I have added developer documentation (if applicable)
  • Documentation should be added to Zowe Docs
  • These changes may need ported to the appropriate branches

Further comments

The existing delete confirmation behavior remains unchanged by default. The new setting provides an option for power users and enables easier automation and end-to-end testing scenarios where interactive confirmation dialogs are undesirable.

@zFernand0 zFernand0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@BRGOVIND
BRGOVIND requested a review from anaxceron as a code owner June 16, 2026 03:25
@JTonda
JTonda requested a review from zFernand0 June 16, 2026 15:14

@t1m0thyj t1m0thyj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your work on this @BRGOVIND! Left a few comments

Comment on lines +82 to +97
const confirmDelete = vscode.workspace
.getConfiguration()
.get<boolean>("zowe.jobs.confirmDelete", true);

if (confirmDelete) {
const deleteChoice = await Gui.warningMessage(message, {
items: [deleteButton],
vsCodeOpts: { modal: true },
});

if (!deleteChoice || deleteChoice === "Cancel") {
ZoweLogger.debug(vscode.l10n.t("Delete action was canceled."));
Gui.showMessage(vscode.l10n.t("Delete action was cancelled."));
return;
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please keep the indentation of this code block consistent with the rest of the file.


### New features and enhancements

- Added a new VS Code toggle setting `zowe.jobs.confirmDelete` that allows users to disable the job deletion confirmation dialog. [#4315](https://github.com/zowe/zowe-explorer-vscode/issues/4315)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@traeok Maybe outside the scope of this PR, but I noticed the issue mentions the confirmDelete setting only for the Jobs tree. Wouldn't it be useful to have across all the trees?

Comment thread packages/zowe-explorer/package.json Outdated
"zowe.jobs.confirmDelete": {
"type": "boolean",
"default": true,
"description": "Prompt for confirmation before deleting jobs.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please localize this string by using the same style of placeholder as other setting descriptions and define the description in package.nls.json.

@BRGOVIND
BRGOVIND force-pushed the feature/job-delete-confirmation-setting branch from 8f6def3 to f294f35 Compare June 19, 2026 10:33
@BRGOVIND

Copy link
Copy Markdown
Author

Thanks for the detailed review @t1m0thyj! I've addressed the feedback:

  • Indentation (JobActions.ts): the confirmDelete guard blocks are now indented consistently with the rest of the file in both deleteCommand and deleteMultipleJobs.
  • Localization (package.json): the setting description now uses the %zowe.jobs.confirmDelete% placeholder, with the string defined in package.nls.json, matching the other settings.
  • Failing tests: the test mock for getConfiguration is reset in beforeEach so the confirmDelete default no longer leaks between suites; added a case covering confirmDelete = false.
  • Rebased onto latest main to resolve the CHANGELOG conflict.

Re the cross-tree confirmDelete idea — agreed it'd be useful, but I'd suggest keeping it out of scope here and tracking it as a follow-up so this stays focused on the Jobs tree (#4315). Re-requesting review when you have a moment 🙏

@JTonda
JTonda requested a review from t1m0thyj June 23, 2026 15:11
@BRGOVIND

Copy link
Copy Markdown
Author

Rebased again on latest main — the CHANGELOG conflict is resolved and the branch is mergeable. All earlier feedback (indentation, %zowe.jobs.confirmDelete% localization, and the test mock leak) remains addressed. Re-requesting review, thanks! 🙏

…ialog

- Add zowe.jobs.confirmDelete boolean setting (default: true) to allow
  users to skip the confirmation dialog when deleting jobs
- Localize description via package.nls.json placeholder
- Fix indentation of confirmation logic in deleteSingleJob/deleteMultipleJobs
- Add CHANGELOG entry for the new setting
@BRGOVIND
BRGOVIND force-pushed the feature/job-delete-confirmation-setting branch from 8ce4c3a to ecc9e7f Compare June 29, 2026 15:42
@traeok

traeok commented Jun 30, 2026

Copy link
Copy Markdown
Member

There is one commit incorrectly signed off, triggering DCO failures. Can you please add a sign off to your latest commit?

@zFernand0 zFernand0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes LGTM! 😋

I'd recommend avoiding force pushing since that makes things harder for reviewers.

Also, before I can approve, I'd like to have you join standup to discuss the progression of this PR. 🙏

@BRGOVIND

Copy link
Copy Markdown
Author

@traeok
I, BRGOVIND, hereby sign-off-by all my previous commits in this PR as per the terms of the DCO.

@BRGOVIND

Copy link
Copy Markdown
Author

@zFernand0
Thank you for the review! I'll join standup to discuss the PR. And noted on avoiding force pushes going forward.

@zFernand0

Copy link
Copy Markdown
Member

@zFernand0 Thank you for the review! I'll join standup to discuss the PR. And noted on avoiding force pushes going forward.

Forgot to mention that we have a stand-up for Zowe Explorer on Tuesdays and Thursdays at 11am EDT.
https://zoom-lfx.platform.linuxfoundation.org/meetings/zowe

@zFernand0

Copy link
Copy Markdown
Member

Hey @BRGOVIND,
The DCO check is still failing.
Also, we would want to you to join standup before we can proceed with this PR : )

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

Labels

Projects

Status: Review/QA

Development

Successfully merging this pull request may close these issues.

Add option for job delete confirmation dialog

6 participants