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
fix: keep typography prose out of music-video image/video prompts (#8992)
[._.]/ Adam Eivy5f36c6e1bf93
diff --git a/client/src/hooks/useMusicVideoSceneMedia.js b/client/src/hooks/useMusicVideoSceneMedia.jsindex 1025c480f4..d0da5b3f09 100644--- a/client/src/hooks/useMusicVideoSceneMedia.js+++ b/client/src/hooks/useMusicVideoSceneMedia.js@@ -30,16 +30,23 @@ const REFERENCE_CAPABILITY_CODES = new Set([/*** The project-wide visual direction appended to every generated prompt —- * palette, camera rules and typography from the visual spec (#8965). Kept in- * step with `visualDirection` in server/services/musicVideo/handoff.js, which- * composes the same suffix for the external-tool handoff manifest.+ * palette and camera rules from the visual spec (#8965). Kept in step with+ * `visualDirection` in server/services/musicVideo/handoff.js, which composes+ * the same suffix for the external-tool handoff manifest.+ *+ * Typography is deliberately excluded from this suffix (#8992): the visual+ * spec's font/caption guidance belongs to the separately composited text+ * layer (#8984), not to the image/video model's prompt — describing a font+ * style there works against the "no text, letters, captions" guard the+ * applied treatment adds and encourages text baked into the generated+ * pixels. `spec.typography` still reaches the composition/typography lane+ * directly and the external handoff manifest (`visualSpec.typography`).*/export function visualDirection(spec) {if (!spec) return '';return [spec.palette?.length ? `color palette ${spec.palette.join(' ')}` : '',spec.cameraRules?.trim() ? `camera: ${spec.cameraRules.trim()}` : '',- spec.typography?.trim() ? `typography: ${spec.typography.trim()}` : '',].filter(Boolean).join('; ');}@@ -103,7 +110,7 @@ export default function useMusicVideoSceneMedia({ project, videoSettings, applySconst conditioning = conditioningReferences(project?.visualSpec);// The image prompt for a scene's reference frame: its frame prompt (or the// shot prompt as a fallback) suffixed with the project's global concept style- // and the visual spec's palette/camera/typography direction.+ // and the visual spec's palette/camera direction (typography excluded, #8992).// An applied treatment (#8980) adds the scene's composition constraints last:// focal subject, framing, the region reserved for the composited typography,// and no lettering in the generated pixels. Same order as the server'sdiff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsxindex 322098eeb0..e8cb8c13a9 100644--- a/client/src/pages/MusicVideo.test.jsx+++ b/client/src/pages/MusicVideo.test.jsx@@ -1258,7 +1258,9 @@ describe('MusicVideo visual spec, takes and handoff (#8965)', () => {visualSpec: {palette: ['#112233'],cameraRules: 'locked-off wides',- typography: '',+ // Non-empty on purpose (#8992): typography guidance must stay out of+ // the generated image/video prompt below even when the spec has it.+ typography: 'condensed sans, all caps, lower-third titles',references: [{ id: 'r1', imageId: 'mood.png', role: 'character', label: 'Lead', note: '', condition: true },{ id: 'r2', imageId: 'set.png', role: 'set', label: 'Pier', note: '', condition: false },diff --git a/server/services/musicVideo/handoff.js b/server/services/musicVideo/handoff.jsindex feeb798918..de541b5eae 100644--- a/server/services/musicVideo/handoff.js+++ b/server/services/musicVideo/handoff.js@@ -60,17 +60,21 @@ export function matchSceneByFileTag(scenes, originalName) {}/**- * The project-wide visual direction appended to generated prompts — palette,- * camera rules and typography from the visual spec. Kept in step with- * `visualDirection` in client/src/hooks/useMusicVideoSceneMedia.js, which- * composes the same suffix for PortOS's own renders.+ * The project-wide visual direction appended to generated prompts — palette+ * and camera rules from the visual spec. Kept in step with `visualDirection`+ * in client/src/hooks/useMusicVideoSceneMedia.js, which composes the same+ * suffix for PortOS's own renders.+ *+ * Typography is deliberately excluded from this suffix (#8992): it belongs+ * to the separately composited text layer (#8984), not the image/video+ * prompt handed to an external tool. `visualSpec.typography` still exports+ * on the manifest below for the typography lane and other external tools.*/export function visualDirection(spec) {if (!spec) return '';return [spec.palette?.length ? `color palette ${spec.palette.join(' ')}` : '',spec.cameraRules?.trim() ? `camera: ${spec.cameraRules.trim()}` : '',- spec.typography?.trim() ? `typography: ${spec.typography.trim()}` : '',].filter(Boolean).join('; ');}diff --git a/server/services/musicVideo/handoff.test.js b/server/services/musicVideo/handoff.test.jsindex d11807b845..18366f5062 100644--- a/server/services/musicVideo/handoff.test.js+++ b/server/services/musicVideo/handoff.test.js@@ -16,7 +16,7 @@ vi.mock('../../lib/paths.js', async (importOriginal) => makePathsProxy(await impvi.mock('../settings.js', () => ({ getSettings: vi.fn(async () => ({})) }));const projects = await import('./projects.js');-const { buildHandoffBundle } = await import('./handoff.js');+const { buildHandoffBundle, buildHandoffManifest } = await import('./handoff.js');afterAll(cleanupTempDataRoots);@@ -86,3 +86,27 @@ describe('buildHandoffBundle', () => {expect(Object.keys(entries)).toEqual(['manifest.json']);});});++describe('buildHandoffManifest typography (#8992)', () => {+ it('keeps typography prose out of the exported frame/shot prompts but leaves it in visualSpec', () => {+ const project = {+ id: 'mv-typo', name: 'Typo Project', version: 1,+ concept: { prompt: '', style: 'grainy 16mm' },+ visualSpec: {+ palette: ['#112233'],+ cameraRules: 'locked-off wides',+ typography: 'condensed sans, all caps, lower-third titles',+ references: [],+ },+ scenes: [{ sceneId: 's1', prompt: 'waves', framePrompt: 'harbor at dawn' }],+ };++ const manifest = buildHandoffManifest(project);++ expect(manifest.visualSpec.typography).toBe('condensed sans, all caps, lower-third titles');+ expect(manifest.scenes[0].framePrompt).toBe('harbor at dawn, grainy 16mm, color palette #112233; camera: locked-off wides');+ expect(manifest.scenes[0].shotPrompt).toBe('waves, grainy 16mm, color palette #112233; camera: locked-off wides');+ expect(manifest.scenes[0].framePrompt).not.toMatch(/typography/i);+ expect(manifest.scenes[0].shotPrompt).not.toMatch(/typography/i);+ });+});