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: keep the ImageGen connected-mode label map null-prototype

[._.]/ Adam Eivy6e48cb459d50
diff --git a/client/src/pages/ImageGen.jsx b/client/src/pages/ImageGen.jsx
index 4b96e58d51..4f0e7243a2 100644
--- a/client/src/pages/ImageGen.jsx
+++ b/client/src/pages/ImageGen.jsx
@@ -118,7 +118,16 @@ const ERROR_HEADINGS = {
// Labels for the connected-status pill when no model name is reported.
// Deliberately worded differently from `modeLabel()` (imageGenBackends.js) —
// do not unify the two.
+//
+// Null-prototype for the same reason as `RECORD_KIND_LISTERS` in peerSync.js:
+// the ternary chain this replaced compared `status.mode` only against the
+// IMAGE_GEN_MODE values and fell through to 'external SD API' for everything
+// else. A plain literal would instead resolve an inherited Object.prototype
+// member for a mode named 'toString'/'constructor'/'valueOf', making the
+// `|| 'external SD API'` fallback unreachable and rendering a function as a
+// React child. Keeps an unrecognized mode behaving exactly as it did before.
const CONNECTED_MODE_LABELS = {
+ __proto__: null,
[IMAGE_GEN_MODE.LOCAL]: 'mflux/local',
[IMAGE_GEN_MODE.CODEX]: 'codex CLI',
[IMAGE_GEN_MODE.GROK]: 'grok CLI',