Skip to content

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

fix: give each Music Video card one project entry control (#13137)

Adam Eivyd68475402fec
diff --git a/client/src/components/musicVideo/MusicVideoProjectCard.jsx b/client/src/components/musicVideo/MusicVideoProjectCard.jsx
index 6745840944..fb6eb14578 100644
--- a/client/src/components/musicVideo/MusicVideoProjectCard.jsx
+++ b/client/src/components/musicVideo/MusicVideoProjectCard.jsx
@@ -89,14 +89,12 @@ export default function MusicVideoProjectCard({
{/* Top Header & Identification */}
<div className="space-y-1.5 min-w-0">
<div className="flex flex-wrap items-start justify-between gap-2">
- <button
- type="button"
- onClick={onSelect}
- className="text-left font-semibold text-base text-port-text hover:text-port-accent transition-colors break-words max-w-full flex-1 basis-full sm:basis-auto"
+ <h3
+ className="text-left font-semibold text-base text-port-text break-words max-w-full flex-1 basis-full sm:basis-auto"
title={project.name}
>
{project.name}
- </button>
+ </h3>
<div className="flex items-center gap-1 shrink-0">
{onRename && (
<button
@@ -164,12 +162,7 @@ export default function MusicVideoProjectCard({
)
) : preview.kind === 'video' ? (
<>
- <button
- type="button"
- onClick={onSelect}
- className="block w-full h-full text-left"
- aria-label={`Open project ${project.name}`}
- >
+ <div className="block w-full h-full">
{importedDraft ? <VideoArtifactThumbnail src={preview.src}
className="w-full h-full object-cover"
onLoadedData={() => setDraftMedia({ src: preview.src, available: true })}
@@ -179,7 +172,7 @@ export default function MusicVideoProjectCard({
loading="lazy"
className="w-full h-full object-cover"
/>}
- </button>
+ </div>
<button
type="button"
onClick={() => setPlaying(true)}
@@ -195,12 +188,7 @@ export default function MusicVideoProjectCard({
</>
) : preview.kind === 'image' ? (
<>
- <button
- type="button"
- onClick={onSelect}
- className="block w-full h-full text-left"
- aria-label={`Open project ${project.name}`}
- >
+ <div className="block w-full h-full">
<MediaImage
src={preview.src}
fallbackSrc={preview.fallbackSrc}
@@ -208,21 +196,16 @@ export default function MusicVideoProjectCard({
loading="lazy"
className="w-full h-full object-cover"
/>
- </button>
+ </div>
<span className="port-media-overlay-strong absolute bottom-1.5 left-1.5 px-1.5 py-0.5 rounded text-[10px] font-medium pointer-events-none">
{preview.label}
</span>
</>
) : (
- <button
- type="button"
- onClick={onSelect}
- className="w-full h-full flex flex-col items-center justify-center gap-1.5 text-port-text-muted text-xs hover:bg-port-border/20 transition-colors"
- aria-label={`Open project ${project.name}`}
- >
+ <div className="w-full h-full flex flex-col items-center justify-center gap-1.5 text-port-text-muted text-xs">
<Film size={22} className="opacity-40" aria-hidden="true" />
<span>No render preview yet</span>
- </button>
+ </div>
)}
</div>
@@ -346,8 +329,8 @@ export default function MusicVideoProjectCard({
</details>
{/* Footer Actions */}
- <div className="flex items-center justify-between gap-2 pt-2 border-t border-port-border mt-auto shrink-0">
- <div className="flex items-center gap-1.5">
+ <div className="flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-port-border mt-auto shrink-0">
+ <div className="flex flex-wrap items-center gap-1.5">
<button
type="button"
onClick={onReview || onSelect}
diff --git a/client/src/components/musicVideo/MusicVideoProjectCard.test.jsx b/client/src/components/musicVideo/MusicVideoProjectCard.test.jsx
index 66f2dfe1e9..360cc70c76 100644
--- a/client/src/components/musicVideo/MusicVideoProjectCard.test.jsx
+++ b/client/src/components/musicVideo/MusicVideoProjectCard.test.jsx
@@ -133,24 +133,27 @@ describe('MusicVideoProjectCard', () => {
expect(screen.getByText(/2 scenes · 1 clip/i)).toBeInTheDocument();
});
- it('handles clicking the open button or title to select project', () => {
- const onSelect = vi.fn();
- render(
- <MusicVideoProjectCard
- project={BASE_PROJECT}
- trackLabel="Synth Dreams"
- onSelect={onSelect}
- />,
- );
-
- fireEvent.click(screen.getByRole('button', { name: /^Open$/i }));
- expect(onSelect).toHaveBeenCalledTimes(1);
-
- fireEvent.click(screen.getByRole('button', { name: 'Cyber Horizon' }));
- expect(onSelect).toHaveBeenCalledTimes(2);
-
- fireEvent.click(screen.getByRole('button', { name: 'Open project Cyber Horizon' }));
- expect(onSelect).toHaveBeenCalledTimes(3);
+ it('offers the footer as the single project entry on every preview surface', () => {
+ const src = '/api/music-video/example/dev-artifacts/film/file?version=2';
+ const cases = {
+ placeholder: { ...BASE_PROJECT, preview: { kind: 'none', source: null } },
+ image: { ...BASE_PROJECT, preview: { kind: 'image', source: 'frame', src: '/data/images/example.png', label: 'Frame' } },
+ video: { ...BASE_PROJECT, preview: { kind: 'video', source: 'draft', jobId: 'job-1', poster: '/data/images/example.png', label: 'Draft' } },
+ final: { ...BASE_PROJECT, preview: { kind: 'video', source: 'final', jobId: 'job-1', poster: '/data/images/example.png', label: 'Final' } },
+ imported: { ...BASE_PROJECT, preview: { kind: 'video', source: 'animatic', artifactId: 'film', version: 2, src, poster: null, label: 'Imported draft · v2', reviewStatus: 'pending' } },
+ };
+ for (const [name, project] of Object.entries(cases)) {
+ const onSelect = vi.fn(), onReview = vi.fn();
+ const { unmount } = render(<MusicVideoProjectCard project={project} onSelect={onSelect} onReview={name === 'final' || name === 'imported' ? onReview : undefined} />);
+ expect(screen.getByRole('heading', { name: 'Cyber Horizon' })).toBeInTheDocument();
+ expect(screen.queryByRole('button', { name: 'Cyber Horizon' })).toBeNull();
+ expect(screen.queryByRole('button', { name: /Open project/ })).toBeNull();
+ const entry = screen.getByRole('button', { name: /^(Open|Review video|Review draft)\b/ });
+ fireEvent.click(entry);
+ const expected = name === 'final' || name === 'imported' ? onReview : onSelect;
+ expect(expected).toHaveBeenCalledTimes(1);
+ unmount();
+ }
});
it('renders video preview with play button and handles clicking play', async () => {