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
Cover blank silence cards end to end in a real-Chrome overlay render (#11188)
[._.]/d601bbdee4f6
diff --git a/server/services/musicVideo/compositionRender.test.js b/server/services/musicVideo/compositionRender.test.jsindex 7e1feac437..1fd27d0a0f 100644--- a/server/services/musicVideo/compositionRender.test.js+++ b/server/services/musicVideo/compositionRender.test.js@@ -212,6 +212,36 @@ describe.skipIf(!chrome || !ffmpeg)('music-video typography overlay with real Chawait removeCompositionScratch('job-layers');}, 120000);+ // #11185: a silence card planned with no text shows its spoken line (the+ // " / " joiner becomes a line break) in the lyric type's cream and ink, with+ // its own face shipped, inside the title-safe area and on no plate.+ it('draws a blank card\'s lyric line in the lyric type, inside the safe area', async () => {+ const [w, h] = [384, 256];+ const scenes = [{ sceneId: 'quiet', order: 0, visualLayer: 'card', cardText: '', lyricText: 'Example spoken line / Then the answer', startSec: 0, endSec: 2 }];+ const clips = await resolveSceneClips({ scenes }, { layered: true });+ expect(clips[0].cardText).toBe('Example spoken line / Then the answer');+ const plan = buildMusicVideoFfmpegArgs(clips, null, join(PATHS.data, 'unused.mp4'), { audioDurationSec: 2, frameGrid: true });+ const cues = sectionCardCues(clips, plan.sections, 2);+ expect(cues).toMatchObject([{ text: 'Example spoken line\nThen the answer', card: true }]);+ const overlays = await renderTypographyOverlays({ jobId: 'job-card', cues, style: {}, width: w, height: h, fps: 12, durationSec: 2 });+ expect(existsSync(join(PATHS.data, COMPOSITION_SCRATCH_DIR, 'job-card', 'doc', 'archivo-variable.woff2'))).toBe(true);+ expect(assertInsideSafeArea(overlays[0].path, w, h)).toBeGreaterThan(1000);+ // A mid-card frame shows the cream fill inside its ink outline.+ const raw = frames(overlays[0].path, 'rgba');+ const frame = raw.subarray(12 * w * h * 4, 13 * w * h * 4);+ let cream = 0;+ let ink = 0;+ for (let p = 0; p < w * h; p++) {+ const [r, g, b, a] = frame.subarray(p * 4, p * 4 + 4);+ if (a < 250) continue;+ if (r > 220 && g > 210 && b > 190 && b < r) cream += 1;+ else if (r < 40 && g < 40 && b < 40) ink += 1;+ }+ expect(cream).toBeGreaterThan(300);+ expect(ink).toBeGreaterThan(300);+ await removeCompositionScratch('job-card');+ }, 60000);+it.each([['16:9', 480, 270], ['9:16', 270, 480], ['a small 16:9 frame', 160, 90]])('keeps every motion template inside the title-safe area at %s', async (_label, width, height) => {const long = 'A deliberately long lyric line that has to wrap and shrink to stay inside the frame';const cues = [diff --git a/server/services/musicVideo/render.test.js b/server/services/musicVideo/render.test.jsindex 67ff907b57..d58daaa99c 100644--- a/server/services/musicVideo/render.test.js+++ b/server/services/musicVideo/render.test.js@@ -317,6 +317,17 @@ describe('resolveSceneClips', () => {expect(clips).toEqual([expect.objectContaining({ sceneId: 's1', layer: 'card', cardText: '', cardColor: '#000000', duration: 3 })]);});+ // #11185: the treatment drops the lyric cue under a card, so a blank card is the only place its line can appear.+ it('gives a blank card its sung line, and leaves a wordless card blank', async () => {+ loadHistory.mockResolvedValue([]);+ const clips = await resolveSceneClips({ scenes: [+ { sceneId: 's1', order: 0, visualLayer: 'card', cardText: '', lyricText: 'Example spoken line', startSec: 0, endSec: 2 },+ { sceneId: 's2', order: 1, visualLayer: 'card', cardText: ' Set by hand ', lyricText: 'Example spoken line', startSec: 2, endSec: 4 },+ { sceneId: 's3', order: 2, visualLayer: 'card', cardText: '', startSec: 4, endSec: 6 },+ ] }, { layered: true });+ expect(clips.map((c) => c.cardText)).toEqual(['Example spoken line', 'Set by hand', '']);+ });+// Uniquely catches a draft dropping a footage shot that has a still but no clip yet, or a final render padding with stills.it('shows a clipless footage shot as its still in a layered draft only', async () => {loadHistory.mockResolvedValue([{ id: 'h1', filename: 'a.mp4', width: 768, height: 512, fps: 24, numFrames: 48 }]);