mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 13:41:59 +00:00
fix: App mode - Save as not using correct extension or persisting mode on change (#10679)
## Summary With a previously saved workflow, selecting "Save as" in app mode would not correctly change the file extension to the chosen mode, and would require an additional save after to persist the actual mode change. Recreation: - Build app - Save as worklow X, app mode - Select Save as from builder footer [Save | v] chevron button - Select node graph - Save - Check workflow on disk - it's still called X.app.json and doesn't have linearMode: false <-- bug ## Changes - **What**: - pass isApp to save workflow - ensure active graph & initialMode are correctly set when calling saveAs BEFORE the actual saveWorkflow call - add linearMode to workflowShema to prevent casts - tests ## Review Focus e2e tests coming in a follow up PR along with some refactoring of the browser tests (left this PR focused to the actual fix) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10679-fix-App-mode-Save-as-not-using-correct-extension-or-persisting-mode-on-change-3316d73d365081ef985cf57c91c34299) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -164,7 +164,18 @@ test.describe('Builder save flow', { tag: ['@ui', '@subgraph'] }, () => {
|
||||
await successDialog.getByText('Close', { exact: true }).click()
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
// Now click save again — should save directly
|
||||
// Modify the workflow so the save button becomes enabled
|
||||
await appMode.goToInputs()
|
||||
const seedMenu = appMode.getBuilderInputItemMenu('seed')
|
||||
await seedMenu.click()
|
||||
await page.getByText('Delete', { exact: true }).click()
|
||||
await comfyPage.nextFrame()
|
||||
await appMode.goToPreview()
|
||||
await expect(appMode.getFooterButton(/^Save$/)).toBeEnabled({
|
||||
timeout: 5000
|
||||
})
|
||||
|
||||
// Now click save — should save directly without dialog
|
||||
await appMode.clickSave()
|
||||
|
||||
await expect(page.getByRole('dialog')).not.toBeVisible({ timeout: 2000 })
|
||||
|
||||
Reference in New Issue
Block a user