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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
correct the useImageRenderSettings docs to the shape it actually returns
[._.]/ Adam Eivye7e054d9fa65
diff --git a/client/src/hooks/README.md b/client/src/hooks/README.mdindex ba670fcecd..c8b74562d8 100644--- a/client/src/hooks/README.md+++ b/client/src/hooks/README.md@@ -66,7 +66,7 @@ grep -i "what you want to do" client/src/hooks/README.md| `useClonedGltf` | Clones a drei-cached GLTF scene with skeleton bindings intact and wires its animations; the colocated `GltfPrimitive` prevents R3F from disposing shared cache resources. Accepts an optional animation transform for derived clip sets. | Any skinned GLTF rendered from `useGLTF`; render its scene through `GltfPrimitive` so remounts cannot inherit disposed geometry or materials. || `usePreviewRoute` | URL-driven `[preview, setPreview]` via `?preview=<filename>`. | Any page hosting `<MediaPreview>` — gives the preview a deep-link. || `useImageGenQueue` | Work-scoped live queue of in-flight image renders. | Pages that show per-work image-gen queue state. |-| `useImageRenderSettings` | Load the pipeline image-gen config once (`getSettings → readPipelineImageSettings`), failing open to `PIPELINE_IMAGE_DEFAULTS`; takes `{ record }` to fold that record's `imageMode`/`imageModelId` pin over the install default; returns `{ imageCfg, availableBackends }`. | A single-image render slot that needs the render config and doesn't already load the full settings blob. Pass `record` whenever the render belongs to a pinnable record (universe, series, sprite). |+| `useImageRenderSettings` | Load the pipeline image-gen config once (`getSettings → readPipelineImageSettings`), failing open to `PIPELINE_IMAGE_DEFAULTS`; takes `{ record, target }` to fold that record's `imageMode`/`imageModelId` pin, then the target's `renderDefaults` pin, over the install default; returns `{ imageCfg }`. | A single-image render slot that needs the render config and doesn't already load the full settings blob. Pass `record` + `target` whenever the render belongs to a pinnable record (universe, series, sprite). || `useUserTimezone` | Resolve the user's configured IANA timezone (`settings.timezone`) once, falling back to the browser zone then UTC; returns the tz string. | A date-scoped surface that must derive "today" the same way the server does (POST launcher/history day keys, #2681). || `useSingleImageRender` | Queue-one-render / wait-for-completion jobId lifecycle: builds opts from `imageCfg`, calls `buildPrompt`, POSTs `generateImage`, tracks the `jobId` head, and runs a once-per-`(key, filename)` completion guard before `onComplete`. | Single-image render slots driven by `EntryThumbSlot`/`MediaJobThumb` (style probe, characters step). Completion SSE stays in the thumb. |diff --git a/client/src/hooks/useImageRenderSettings.js b/client/src/hooks/useImageRenderSettings.jsindex 20fcce0c11..52eb5e37df 100644--- a/client/src/hooks/useImageRenderSettings.js+++ b/client/src/hooks/useImageRenderSettings.js@@ -27,9 +27,12 @@ import {*/export default function useImageRenderSettings({ record = null, target = null } = {}) {// `null` = not fetched yet (or the fetch failed), which is NOT the same as a- // settings blob with no backends enabled — an empty backend list suppresses- // every pin, so collapsing the two would silently drop the record's pin- // whenever /api/settings is slow or down.+ // settings blob with no backends enabled. Holding the raw blob (rather than a+ // derived cfg seeded with `PIPELINE_IMAGE_DEFAULTS` and an `[]` backend list)+ // keeps the two apart: `[]` reads as "loaded, nothing enabled" and would+ // suppress every pin. Until the blob lands there is no install default and no+ // backend list to gate against, so the hook fails open to the bare defaults —+ // no pin — exactly as it did before the ladder existed.const [settings, setSettings] = useState(null);useEffect(() => {diff --git a/client/src/hooks/useImageRenderSettings.test.jsx b/client/src/hooks/useImageRenderSettings.test.jsxindex 11774c9aa4..2bbca9cd4d 100644--- a/client/src/hooks/useImageRenderSettings.test.jsx+++ b/client/src/hooks/useImageRenderSettings.test.jsx@@ -60,9 +60,10 @@ describe('useImageRenderSettings', () => {expect(result.current.imageCfg.mode).toBe('codex');});- it('keeps the pin when the settings fetch fails rather than suppressing it', async () => {- // `[]` backends would gate every pin away; the hook must not conflate- // "settings not loaded" with "no backend enabled".+ it('fails open to the bare defaults when the settings fetch fails', async () => {+ // No settings blob means no install default and no backend list to gate a+ // pin against, so the ladder is skipped entirely rather than applied over+ // a guessed cfg — the pre-ladder fail-open behavior, unchanged.getSettings.mockRejectedValue(new Error('offline'));const { result } = renderHook(() => useImageRenderSettings({ record: { imageMode: 'agy' } }));await waitFor(() => expect(getSettings).toHaveBeenCalled());