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
address review (claude): honor the universe pin on batch renders, persist pin on create and series-sidebar change, cover sprite pin logic
[._.]/ Adam Eivy72a3125f2f21
diff --git a/client/src/components/universeBuilder/UniverseBuilderPage.jsx b/client/src/components/universeBuilder/UniverseBuilderPage.jsxindex 76b6f9adcc..75761ae9b5 100644--- a/client/src/components/universeBuilder/UniverseBuilderPage.jsx+++ b/client/src/components/universeBuilder/UniverseBuilderPage.jsx@@ -159,6 +159,17 @@ export default function UniverseBuilder() {updateCompositeSheets,updateDraft,} = useUniverseDraft({ selectedId, goToWorld });+ // Universe render pin (#3231 Phase 3): the record's pinned backend becomes+ // the page's default mode when that backend is available, so an untouched+ // batch form actually renders on the pin (the client always sends an+ // explicit body.mode once settings load — without this, the pin would only+ // ever apply to mode-less API callers). An explicit renderOpts.mode still+ // wins, and an unavailable pinned backend degrades to the install default+ // (mirroring the server ladder's usability gate).+ const effectiveDefaultMode = draft?.imageMode+ && availableBackends.some((b) => b.id === draft.imageMode)+ ? draft.imageMode+ : defaultMode;const {canRender,clearPendingForEntry,@@ -172,7 +183,7 @@ export default function UniverseBuilder() {selectedId,draft,availableBackends,- defaultMode,+ defaultMode: effectiveDefaultMode,runs,setRuns,preflight: flushDraftIfDirty,@@ -723,7 +734,7 @@ export default function UniverseBuilder() {renderOpts={renderOpts}setRenderOpts={setRenderOpts}availableBackends={availableBackends}- defaultMode={defaultMode}+ defaultMode={effectiveDefaultMode}imageModels={imageModels}availableLoras={availableLoras}handleRender={handleRender}diff --git a/client/src/hooks/useUniverseDraft.js b/client/src/hooks/useUniverseDraft.jsindex 0e30f95148..d36c1858a4 100644--- a/client/src/hooks/useUniverseDraft.js+++ b/client/src/hooks/useUniverseDraft.js@@ -253,6 +253,11 @@ export default function useUniverseDraft({ selectedId, goToWorld }) {influences: ensureInfluences(draft.influences),locked: draft.locked || {},llm: draft.llm || {},+ // Per-record render pin (#3231 Phase 3) — included only when set so a+ // pin chosen on a not-yet-saved universe survives the create (the+ // update path is a no-op re-send; setRenderPin already PATCHed it).+ ...(draft.imageMode ? { imageMode: draft.imageMode } : {}),+ ...(draft.imageModelId ? { imageModelId: draft.imageModelId } : {}),};const needsCanonInPayload = !selectedId || canonDirty;let payload = basePayload;diff --git a/client/src/pages/PipelineSeries.jsx b/client/src/pages/PipelineSeries.jsxindex 2e497e2823..0e3337a1f7 100644--- a/client/src/pages/PipelineSeries.jsx+++ b/client/src/pages/PipelineSeries.jsx@@ -519,7 +519,16 @@ function BibleSidebar({ series, universes, patchSeries, onSeriesUpdate, onFlushPlabel="Backend"imageMode={series.imageMode || null}imageModelId={series.imageModelId || null}- onChange={({ imageMode, imageModelId }) => patchSeries({ imageMode, imageModelId })}+ onChange={async ({ imageMode, imageModelId }) => {+ // Persist immediately (the primaryManuscriptType pattern) — a+ // pipeline render from another page must see the pin without+ // requiring a Save on this one; the other two hosts of this row+ // (universe, sprite) also persist on change.+ patchSeries({ imageMode, imageModelId });+ const updated = await updatePipelineSeries(series.id, { imageMode, imageModelId }, { silent: true })+ .catch((err) => { toast.error(err.message || 'Failed to save render pin'); return null; });+ if (updated) onSeriesUpdate?.(updated);+ }}autoLabel="Auto (install / surface default)"/><p className="text-[11px] text-gray-500 mt-1">diff --git a/server/services/sprites/recordsLogic.test.js b/server/services/sprites/recordsLogic.test.jsindex 6859a8abb6..053ab8fd70 100644--- a/server/services/sprites/recordsLogic.test.js+++ b/server/services/sprites/recordsLogic.test.js@@ -79,6 +79,25 @@ describe('applySpriteRecordPatch', () => {expect(applySpriteRecordPatch(base, { kind: 'place' }).kind).toBe('place');expect(applySpriteRecordPatch(base, { kind: 'bogus' }).kind).toBe('character');});++ it('render pin (#3231 Phase 3): seeds at build, clears on auto/null, caps the model id', () => {+ const pinned = buildSpriteRecord(+ { name: 'Hero', imageMode: 'agy', imageModelId: 'gemini-3.6-flash-low' },+ { id: 'hero', now: NOW },+ );+ expect(pinned.imageMode).toBe('agy');+ expect(pinned.imageModelId).toBe('gemini-3.6-flash-low');+ // The 'auto' UI sentinel and null both clear; key-absent preserves.+ expect(applySpriteRecordPatch(pinned, { imageMode: 'auto' }).imageMode).toBeNull();+ expect(applySpriteRecordPatch(pinned, { imageMode: null }).imageMode).toBeNull();+ expect(applySpriteRecordPatch(pinned, { notes: 'x' }).imageMode).toBe('agy');+ expect(applySpriteRecordPatch(pinned, { imageModelId: null }).imageModelId).toBeNull();+ // The model id persists bounded (recordRenderPin's shared cap).+ const long = applySpriteRecordPatch(pinned, { imageModelId: 'm'.repeat(200) });+ expect(long.imageModelId).toHaveLength(64);+ // An unpinned build stores explicit nulls (no pin).+ expect(buildSpriteRecord({ name: 'Plain' }, { id: 'plain', now: NOW }).imageMode).toBeNull();+ });});describe('mergeImportedRecord', () => {