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
drop the unused geometry parameter from grokVideoJobParams
[._.]/ Adam Eivyd427e460bb1e
diff --git a/server/services/creativeDirector/sceneRunner.js b/server/services/creativeDirector/sceneRunner.jsindex f177940b1b..b5e04dc73c 100644--- a/server/services/creativeDirector/sceneRunner.js+++ b/server/services/creativeDirector/sceneRunner.js@@ -210,12 +210,9 @@ export async function runSceneRender(project, scene) {...shared,// Scene duration is authored in the local lane's continuous seconds;// grokVideoJobParams snaps it up to a length Grok actually delivers.- ...grokVideoJobParams(settings, {- sourceImagePath,- durationSeconds: scene.durationSeconds,- width: renderParams.width,- height: renderParams.height,- }),+ // Geometry rides along in `shared` — grok.js reads it to derive the+ // project's aspect ratio for the base image.+ ...grokVideoJobParams(settings, { sourceImagePath, durationSeconds: scene.durationSeconds }),}: {...shared,diff --git a/server/services/videoGen/backendPin.js b/server/services/videoGen/backendPin.jsindex df87a29e5b..581c7325d2 100644--- a/server/services/videoGen/backendPin.js+++ b/server/services/videoGen/backendPin.js@@ -91,18 +91,20 @@ export function resolveVideoBackendPin(project, settings, { target = RENDER_TARG* the shortest clip that still covers the request, which is free: a shorter* request costs the same wall clock and returns the same footage.*- * `width`/`height` are optional and only used by grok.js to derive an aspect- * ratio for the base image it generates; when omitted it falls back to the- * configured `imageGen.grok.aspectRatio`.+ * Returns only the keys that are grok-specific, so a caller merges it over its+ * own params rather than being handed a whole job. That matters for geometry:+ * both callers already carry the project's `width`/`height`, and grok.js+ * derives its base-image aspect ratio from those in preference to the+ * configured `imageGen.grok.aspectRatio` — so this must not restate (or drop)+ * them, only supply the ratio fallback for a caller that has no geometry.*/-export function grokVideoJobParams(settings, { sourceImagePath = null, durationSeconds, width, height } = {}) {+export function grokVideoJobParams(settings, { sourceImagePath = null, durationSeconds } = {}) {const grok = settings?.imageGen?.grok || {};return {mode: VIDEO_GEN_MODE.GROK,videoMode: sourceImagePath ? 'image' : 'text',grokPath: grok.grokPath,duration: nearestGrokDuration(durationSeconds),- ...(Number.isFinite(width) && Number.isFinite(height) ? { width, height } : {}),...(grok.aspectRatio ? { aspectRatio: grok.aspectRatio } : {}),};}diff --git a/server/services/videoGen/backendPin.test.js b/server/services/videoGen/backendPin.test.jsindex 654aac0f2b..75007bbe9c 100644--- a/server/services/videoGen/backendPin.test.js+++ b/server/services/videoGen/backendPin.test.js@@ -112,16 +112,13 @@ describe('grokVideoJobParams', () => {expect(grokVideoJobParams(grokOn, {}).duration).toBe(6);});- it('passes width/height through so grok derives the project aspect ratio', () => {- const params = grokVideoJobParams(grokOn, { durationSeconds: 6, width: 544, height: 960 });- expect(params.width).toBe(544);- expect(params.height).toBe(960);- });-- it('omits width/height when they are not both finite', () => {- const params = grokVideoJobParams(grokOn, { durationSeconds: 6, width: 544 });+ it("never restates geometry, so a caller's own width/height survives the merge", () => {+ // grok.js prefers width/height-derived aspect over the configured one, so+ // emitting either key here would let the helper clobber the project's.+ const params = grokVideoJobParams(grokOn, { durationSeconds: 6 });expect(params).not.toHaveProperty('width');expect(params).not.toHaveProperty('height');+ expect({ width: 544, height: 960, ...params }).toMatchObject({ width: 544, height: 960 });});it('carries the configured aspect ratio only when one is set', () => {