mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-23 14:16:00 +00:00
*PR Created by the Glary-Bot Agent* --- ## Summary - Fixes app mode bug where custom combo inputs (and other widget inputs) unselect and show "Widget not visible" after refreshing or reopening a saved app workflow - Root cause: `resetSelectedToWorkflow()` loads from `changeTracker.activeState` which may not have linearData yet after refresh, and `pruneLinearData()` prunes valid entries during graph loading when nodes aren't yet in the graph - Two defensive guards: fallback to `initialState` for authoritative data, and skip pruning during graph loading ## Changes - `appModeStore.ts`: `resetSelectedToWorkflow()` now falls back to `initialState.extra.linearData` when `activeState` has none - `appModeStore.ts`: `pruneLinearData()` skips node-existence checks when `ChangeTracker.isLoadingGraph` is true - Unit tests: 4 new tests covering both fix paths (pruning during loading, fallback to initialState) - E2E test: Save-as → close → reopen → verify all inputs persist with no "Widget not visible" ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11422-fix-preserve-app-builder-inputs-through-graph-reconfiguration-3476d73d36508166a563f7df3967665c) by [Unito](https://www.unito.io) --------- Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com> Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>