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 art: one "Make a new image" request at a time
Claude15fd60431823
diff --git a/client/src/components/musicVideo/CoverArtPanel.jsx b/client/src/components/musicVideo/CoverArtPanel.jsxindex 8e10227894..c1d48b5a4d 100644--- a/client/src/components/musicVideo/CoverArtPanel.jsx+++ b/client/src/components/musicVideo/CoverArtPanel.jsx@@ -40,7 +40,7 @@ export default function CoverArtPanel({ project, publishKit }) {const [focusX, setFocusX] = useState(Number.isFinite(art.focusX) ? art.focusX : 0.5);const [notes, setNotes] = useState('');const [adjustImage, setAdjustImage] = useState(false);- const busy = publishKit.composing || publishKit.designing;+ const busy = publishKit.composing || publishKit.designing || publishKit.requestingImage;const chosen = art.source ? `${art.source.kind}:${art.source.filename}` : null;const look = () => ({ title: title.trim(), ...(tag !== null ? { tag: tag.trim() } : {}), focusX });const compose = (source) => publishKit.composeCover({ ...(source ? { source: { kind: source.kind, filename: source.filename } } : {}), ...look() });@@ -123,10 +123,10 @@ export default function CoverArtPanel({ project, publishKit }) {className="flex items-center gap-1 bg-port-accent/20 text-port-accent disabled:opacity-50 rounded px-2 py-1.5 min-h-[44px] sm:min-h-0"><Sparkles size={13} /> {publishKit.designing ? 'Designing…' : (art.design ? 'Restyle the lettering' : 'Design the cover')}</button>- {/* Never disabled by `pending`: the server tells a live render from one a restart lost. */}- <button type="button" onClick={generate}- className="flex items-center gap-1 bg-port-accent/20 text-port-accent rounded px-2 py-1.5 min-h-[44px] sm:min-h-0">- <ImageIcon size={13} /> Make a new image+ {/* Disabled only while this click is in flight, never by `pending`: the server tells a live render from one a restart lost. */}+ <button type="button" onClick={generate} disabled={busy}+ className="flex items-center gap-1 bg-port-accent/20 text-port-accent disabled:opacity-50 rounded px-2 py-1.5 min-h-[44px] sm:min-h-0">+ <ImageIcon size={13} /> {publishKit.requestingImage ? (art.design ? 'Queuing the image…' : 'Designing, then queuing…') : 'Make a new image'}</button>{art.source?.kind === 'image' && (<label htmlFor={idFor('adjust-image')} className="flex items-center gap-1.5 min-h-[44px] sm:min-h-0">diff --git a/client/src/components/musicVideo/PublishKitPanel.test.jsx b/client/src/components/musicVideo/PublishKitPanel.test.jsxindex 77cebbcec2..1caaec98f1 100644--- a/client/src/components/musicVideo/PublishKitPanel.test.jsx+++ b/client/src/components/musicVideo/PublishKitPanel.test.jsx@@ -86,5 +86,8 @@ describe('PublishKitPanel (#9281)', () => {fireEvent.click(screen.getByLabelText('Start from the current image'));fireEvent.click(screen.getByRole('button', { name: /Make a new image/ }));expect(k.generateCover).toHaveBeenLastCalledWith({ notes: 'warmer light', reference: { kind: 'image', filename: 'sheet.png' } });+ // While a request is in flight (a first design can take a while) a second click cannot start another.+ rerender(<PublishKitPanel project={{ ...project, publishKit: { ...built, coverArt: { ...art, design: null } } }} publishKit={{ ...k, requestingImage: true }} />);+ expect(screen.getByRole('button', { name: /Designing, then queuing/ })).toBeDisabled();});});diff --git a/client/src/hooks/useMusicVideoPublishKit.js b/client/src/hooks/useMusicVideoPublishKit.jsindex bbb1fd4e79..3e4ab6b0c5 100644--- a/client/src/hooks/useMusicVideoPublishKit.js+++ b/client/src/hooks/useMusicVideoPublishKit.js@@ -30,6 +30,7 @@ export default function useMusicVideoPublishKit({ project, replaceProject } = {}const [saving, setSaving] = useState(false);const [composing, setComposing] = useState(false);const [designing, setDesigning] = useState(false);+ const [requestingImage, setRequestingImage] = useState(false);const reload = (id) => {if (!id) return;@@ -107,7 +108,15 @@ export default function useMusicVideoPublishKit({ project, replaceProject } = {}.catch(() => null).finally(() => setDesigning(false));};- const generateCover = (body) => generateMusicVideoCoverArt(projectId, body).then(apply).catch(() => null);+ // In flight from the click until the request is queued (a song with no design+ // drafts one first); after that the record's `pending` reports progress.+ const generateCover = (body) => {+ setRequestingImage(true);+ return generateMusicVideoCoverArt(projectId, body)+ .then(apply)+ .catch(() => null)+ .finally(() => setRequestingImage(false));+ };return {building: job.active,@@ -123,6 +132,7 @@ export default function useMusicVideoPublishKit({ project, replaceProject } = {}composeCover,designing,designCover,+ requestingImage,generateCover,};}