[backport core/1.39] feat: gate node replacement loading on server feature flag#8940
Conversation
## Summary
Gates the node replacement store's `load()` call behind the
`node_replacements` server feature flag, so the frontend only calls
`/api/node_replacements` when the backend advertises support.
## Changes
- Added `NODE_REPLACEMENTS = 'node_replacements'` to `ServerFeatureFlag`
enum
- Added `nodeReplacementsEnabled` getter to `useFeatureFlags()`
- Added `api.serverSupportsFeature('node_replacements')` guard in
`useNodeReplacementStore.load()`
## Context
Without this guard, the frontend would attempt to fetch node
replacements from backends that don't support the endpoint, causing 404
errors.
Companion backend PR: Comfy-Org/ComfyUI#12362
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8750-feat-gate-node-replacement-loading-on-server-feature-flag-3026d73d365081ec9246d77ad88f5bdc)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Jin Yi <jin12cc@gmail.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: Claude <noreply@anthropic.com>
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 02/17/2026, 07:44:59 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
|
Playwright: ✅ 521 passed, 0 failed · 3 flaky 📊 Browser Reports
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Backport of #8750 to
core/1.39Automatically created by backport workflow.
┆Issue is synchronized with this Notion page by Unito