diff --git a/src/components/rightSidePanel/errors/MissingNodeCard.test.ts b/src/components/rightSidePanel/errors/MissingNodeCard.test.ts index 08380b4795..a85a1436d1 100644 --- a/src/components/rightSidePanel/errors/MissingNodeCard.test.ts +++ b/src/components/rightSidePanel/errors/MissingNodeCard.test.ts @@ -57,6 +57,8 @@ const i18n = createI18n({ missingNodePacks: { ossMessage: 'Missing node packs detected. Install them.', cloudMessage: 'Unsupported node packs detected.', + ossManagerDisabledHint: + 'To install missing nodes, first run {pipCmd} in your Python environment to install Node Manager, then restart ComfyUI with the {flag} flag.', applyChanges: 'Apply Changes' } } @@ -146,6 +148,27 @@ describe('MissingNodeCard', () => { }) }) + describe('Manager Disabled Hint', () => { + it('shows hint when OSS and manager is disabled (showInfoButton false)', () => { + mockIsCloud.value = false + const wrapper = mountCard({ showInfoButton: false }) + expect(wrapper.text()).toContain('pip install -U --pre comfyui-manager') + expect(wrapper.text()).toContain('--enable-manager') + }) + + it('hides hint when manager is enabled (showInfoButton true)', () => { + mockIsCloud.value = false + const wrapper = mountCard({ showInfoButton: true }) + expect(wrapper.text()).not.toContain('--enable-manager') + }) + + it('hides hint on Cloud even when showInfoButton is false', () => { + mockIsCloud.value = true + const wrapper = mountCard({ showInfoButton: false }) + expect(wrapper.text()).not.toContain('--enable-manager') + }) + }) + describe('Apply Changes Section', () => { it('hides Apply Changes when manager is not enabled', () => { mockShouldShowManagerButtons.value = false diff --git a/src/components/rightSidePanel/errors/MissingNodeCard.vue b/src/components/rightSidePanel/errors/MissingNodeCard.vue index a5e289fa6e..e58d859c5b 100644 --- a/src/components/rightSidePanel/errors/MissingNodeCard.vue +++ b/src/components/rightSidePanel/errors/MissingNodeCard.vue @@ -1,13 +1,37 @@