Skip to content

[fix] Fix "Require confirmation before clearing workflow" setting not working #4587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions browser_tests/tests/groupNode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,15 @@ test.describe('Group Node', () => {
test('Copies and pastes group node after clearing workflow', async ({
comfyPage
}) => {
// Set setting
await comfyPage.setSetting('Comfy.ConfirmClear', false)

// Clear workflow
await comfyPage.menu.topbar.triggerTopbarCommand([
'Edit',
'Clear Workflow'
])

await comfyPage.ctrlV()
await verifyNodeLoaded(comfyPage, 1)
})
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useCoreCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function useCoreCommands(): ComfyCommand[] {
function: () => {
const settingStore = useSettingStore()
if (
!settingStore.get('Comfy.ComfirmClear') ||
!settingStore.get('Comfy.ConfirmClear') ||
confirm('Clear workflow?')
) {
app.clean()
Expand Down
1 change: 0 additions & 1 deletion src/schemas/apiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ const zSettings = z.object({
'LiteGraph.Canvas.LowQualityRenderingZoomThreshold': z.number(),
'Comfy.Canvas.SelectionToolbox': z.boolean(),
'LiteGraph.Node.TooltipDelay': z.number(),
'Comfy.ComfirmClear': z.boolean(),
'LiteGraph.ContextMenu.Scaling': z.boolean(),
'LiteGraph.Reroute.SplineOffset': z.number(),
'Comfy.Toast.DisableReconnectingToast': z.boolean(),
Expand Down