Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: preserve ImageGen cleaner defaults (#8176)

[._.]/ Adam Eivy81a03a40d441
diff --git a/client/src/hooks/useImageGenForm.js b/client/src/hooks/useImageGenForm.js
index 294bc2a5d9..a28de27ed8 100644
--- a/client/src/hooks/useImageGenForm.js
+++ b/client/src/hooks/useImageGenForm.js
@@ -119,10 +119,10 @@ export function useImageGenForm({ searchParams, setSearchParams, backend }) {
};
const dn = {
external: perMode.external.denoise,
- local: perMode.denoise,
- codex: perMode.denoise,
- grok: perMode.denoise,
- agy: perMode.denoise,
+ local: perMode.local.denoise,
+ codex: perMode.codex.denoise,
+ grok: perMode.grok.denoise,
+ agy: perMode.agy.denoise,
};
const saved = settings?.imageGen?.mode || IMAGE_GEN_MODE.EXTERNAL;
const next = configureBackends(backends, saved);
diff --git a/client/src/pages/ImageGen.probeGating.test.jsx b/client/src/pages/ImageGen.probeGating.test.jsx
index 92873d1d94..0c9c4796d9 100644
--- a/client/src/pages/ImageGen.probeGating.test.jsx
+++ b/client/src/pages/ImageGen.probeGating.test.jsx
@@ -139,6 +139,22 @@ describe('ImageGen backend-probe gating', () => {
expect(state.generateImage.mock.calls[0][0]).toMatchObject({ mediaProviderPeerId: 'peer-example' });
});
+ it('reseeds cleaner defaults when the selected backend changes', async () => {
+ state.settings = {
+ imageGen: {
+ mode: 'local',
+ local: { pythonPath: '/usr/bin/python3', denoise: false },
+ grok: { enabled: true, denoise: true },
+ },
+ };
+ state.getImageGenStatus.mockImplementation(async (mode) => ({ connected: true, mode, model: mode }));
+ await mount();
+
+ expect(screen.getByRole('checkbox', { name: /Denoise/, hidden: true })).not.toBeChecked();
+ fireEvent.click(screen.getByRole('button', { name: /Grok/i }));
+ await waitFor(() => expect(screen.getByRole('checkbox', { name: /Denoise/, hidden: true })).toBeChecked());
+ });
+
it('keeps prompt and Generate ahead of closed mobile Options', async () => {
await mount();