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

Slim the music video page header

Claudefd886f9c01ae
diff --git a/client/src/components/musicVideo/MusicVideoLayout.jsx b/client/src/components/musicVideo/MusicVideoLayout.jsx
index 35dc3385a5..b2ab35dadb 100644
--- a/client/src/components/musicVideo/MusicVideoLayout.jsx
+++ b/client/src/components/musicVideo/MusicVideoLayout.jsx
@@ -186,7 +186,8 @@ export default function MusicVideoLayout({
)}
<p className="flex min-w-0 items-center gap-1 text-xs text-port-text-muted">
<span>v{project.version || 1}</span>
- {trackLabel && (
+ {/* The song usually shares the project's name; say it once. */}
+ {trackLabel && trackLabel !== project.name && (
<>
<span aria-hidden="true">·</span>
<Music size={12} className="shrink-0" aria-hidden="true" />
diff --git a/client/src/components/musicVideo/PreviewDock.jsx b/client/src/components/musicVideo/PreviewDock.jsx
index a7c13c49e5..bc7516e7f8 100644
--- a/client/src/components/musicVideo/PreviewDock.jsx
+++ b/client/src/components/musicVideo/PreviewDock.jsx
@@ -61,7 +61,9 @@ export default function PreviewDock({ project, sources, audioUrl, seekRequest, c
const Chevron = collapsed ? ChevronDown : ChevronUp;
const pickerId = `mv-preview-source-${project.id}`;
return (
- <aside aria-label="Preview" className="space-y-2 rounded-lg border border-port-border bg-port-card p-2">
+ // A flex gap, not space-y: space-y puts a margin under the header row even
+ // when everything after it is hidden, so the folded dock sat off-center.
+ <aside aria-label="Preview" className="flex flex-col gap-2 rounded-lg border border-port-border bg-port-card p-2">
<div className="flex min-w-0 items-center gap-2 text-xs text-port-text-muted">
<MonitorPlay size={14} className="shrink-0 text-port-accent" aria-hidden="true" />
<span className="text-sm font-medium text-port-text">Preview</span>
diff --git a/client/src/components/musicVideo/ProjectManageActions.jsx b/client/src/components/musicVideo/ProjectManageActions.jsx
new file mode 100644
index 0000000000..09140c37a2
--- /dev/null
+++ b/client/src/components/musicVideo/ProjectManageActions.jsx
@@ -0,0 +1,59 @@
+import { Clapperboard, Copy, Trash2 } from 'lucide-react';
+import ConfirmButtonPair from '../ui/ConfirmButtonPair';
+
+const buttonCls = 'flex min-h-[44px] items-center gap-1 rounded border border-port-border bg-port-bg px-2.5 py-1.5 text-sm disabled:opacity-50 sm:min-h-0';
+
+/**
+ * The project's fork and delete controls, in Project settings › Project so the
+ * page header carries only the title, the next step and the settings gear.
+ * `onFork(options)` forks the open project (`{ variant: 'video-generation' }`
+ * for the footage fork); delete asks for an inline confirm first.
+ */
+export default function ProjectManageActions({ project, cloning, onFork, confirmingDelete, onDeleteRequest, onDeleteConfirm, onDeleteCancel }) {
+ const nextVersion = (project.version || 1) + 1;
+ return (
+ <section aria-label="Versions and delete" className="flex min-w-0 flex-wrap items-center gap-2">
+ <button
+ type="button"
+ onClick={() => onFork()}
+ disabled={cloning}
+ title={`Create an editable v${nextVersion}; keep scene media attached and clear the final render`}
+ className={buttonCls}
+ >
+ <Copy size={15} aria-hidden="true" /> {cloning ? 'Forking…' : `Fork v${nextVersion}`}
+ </button>
+ <button
+ type="button"
+ onClick={() => onFork({ variant: 'video-generation' })}
+ disabled={cloning}
+ aria-label="Fork for video generation"
+ title="Fork for video generation: keep the song and storyboard; start fresh cast, sets and mood board with footage rendering. No generation starts."
+ className={buttonCls}
+ >
+ <Clapperboard size={15} aria-hidden="true" /> Fork
+ </button>
+ <div className="ml-auto">
+ {confirmingDelete ? (
+ <ConfirmButtonPair
+ prompt="Delete?"
+ confirmText="Delete"
+ ariaLabel={`Confirm delete project ${project.name}`}
+ confirmAriaLabel={`Confirm delete project ${project.name}`}
+ onConfirm={onDeleteConfirm}
+ onCancel={onDeleteCancel}
+ />
+ ) : (
+ <button
+ type="button"
+ onClick={onDeleteRequest}
+ title="Delete project"
+ aria-label="Delete project"
+ className={`${buttonCls} text-port-error`}
+ >
+ <Trash2 size={15} aria-hidden="true" /> Delete
+ </button>
+ )}
+ </div>
+ </section>
+ );
+}
diff --git a/client/src/components/musicVideo/ProjectSettingsDrawer.jsx b/client/src/components/musicVideo/ProjectSettingsDrawer.jsx
index 4330eef640..c3062ee4ec 100644
--- a/client/src/components/musicVideo/ProjectSettingsDrawer.jsx
+++ b/client/src/components/musicVideo/ProjectSettingsDrawer.jsx
@@ -26,8 +26,9 @@ export const SETTINGS_TAB_IDS = SETTINGS_TABS.map((tab) => tab.id);
* (Audio), the automation brief, production runs and the autonomous run log
* (Autopilot), and every development file, the external handoff and the
* making-of export (Files). `tab` is the open tab, held in the page URL.
+ * `manageActions` (fork and delete) leads the Project tab.
*/
-export default function ProjectSettingsDrawer({ open, tab, onTabChange, onClose, board }) {
+export default function ProjectSettingsDrawer({ open, tab, onTabChange, onClose, board, manageActions = null }) {
if (!board) return null;
const { project, locked, tracks, renderBound, midiBound, separation, midi, takes } = board;
return (
@@ -42,6 +43,7 @@ export default function ProjectSettingsDrawer({ open, tab, onTabChange, onClose,
onTabChange={onTabChange}
closeLabel="Close project settings"
>
+ {tab === 'project' && manageActions}
{tab === 'project' && (
<ProjectOptionsPanel
project={project}
diff --git a/client/src/index.css b/client/src/index.css
index 1154a3bf6f..e2e959e869 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -1846,6 +1846,18 @@ input[type="color"],
`justify-center` buttons are excluded because there the centering is the
intent. Deliberately NOT a blanket `button { text-align: left }` — non-flex
full-width buttons rely on the centered default and would visibly shift. */
+/* A <summary> given a touch-target height (`min-h-[44px]`, `min-h-11`) is a
+ block list-item, so its one line of text sat at the top of the box with the
+ spare height below it — a disclosure that looked oversized and off-center.
+ `align-content: center` centers it in a block container without changing
+ `display` (which would drop the disclosure marker). In `base` so a page's own
+ `content-*` utility still wins. */
+@layer base {
+ summary {
+ align-content: center;
+ }
+}
+
@layer base {
button:where(.flex, .inline-flex):not(
:where([class*="justify-center"], [class*="justify-around"], [class*="justify-evenly"])
diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsx
index 6a1426864f..bfb0f9c813 100644
--- a/client/src/pages/MusicVideo.jsx
+++ b/client/src/pages/MusicVideo.jsx
@@ -3,10 +3,9 @@ import { unfoldToAnchor } from '../lib/unfoldToAnchor.js';
import useMusicVideoProductionReview from '../hooks/useMusicVideoProductionReview.js';
import { useEffect, useState, useCallback, useMemo, useRef } from 'react';
import { useParams, useNavigate, useSearchParams, useLocation } from 'react-router';
-import { Plus, Film, Copy, Trash2, Wand2, Pencil } from 'lucide-react';
+import { Plus, Film, Wand2 } from 'lucide-react';
import toast from '../components/ui/Toast';
import socket from '../services/socket';
-import ConfirmButtonPair from '../components/ui/ConfirmButtonPair';
import { useConfirmDelete } from '../hooks/useConfirmDelete';
import PageHeader from '../components/PageHeader';
import Banner from '../components/ui/Banner.jsx';
@@ -67,6 +66,7 @@ import AutonomousStartDrawer from '../components/musicVideo/AutonomousStartDrawe
import { automationDraftFrom, automationFromDraft } from '../lib/musicVideoAutomation.js';
import { listUniverseNames } from '../services/apiUniverseBuilder.js';
import MusicVideoLayout, { MUSIC_VIDEO_PAGE_ID, MUSIC_VIDEO_SCROLL_ID } from '../components/musicVideo/MusicVideoLayout.jsx';
+import ProjectManageActions from '../components/musicVideo/ProjectManageActions.jsx';
import ProjectSettingsDrawer, { SETTINGS_TAB_IDS } from '../components/musicVideo/ProjectSettingsDrawer.jsx';
import MusicVideoProjectCard from '../components/musicVideo/MusicVideoProjectCard.jsx';
import PreviewDock from '../components/musicVideo/PreviewDock.jsx';
@@ -1319,7 +1319,7 @@ export default function MusicVideo() {
<PageHeader
icon={Film}
title="Music Video"
- subtitle="Beat-aware music videos — autopilot or hands-on"
+ subtitle={selected ? null : 'Beat-aware music videos — autopilot or hands-on'}
actions={(
<>
<label htmlFor="mv-project-picker" className="sr-only">Project</label>
@@ -1329,67 +1329,13 @@ export default function MusicVideo() {
onChange={(e) => selectProject(e.target.value || null)}
onFocus={() => setSummariesWanted(true)}
disabled={loading || youtube.editJob.active}
- className="min-w-0 w-full sm:w-72 bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm disabled:opacity-50"
+ className="w-40 min-w-0 max-w-[45vw] sm:w-72 sm:max-w-none bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm disabled:opacity-50"
>
<option value="">{loading ? 'Loading projects…' : 'Select a project…'}</option>
{sortedProjects.map((project) => (
<option key={project.id} value={project.id}>{formatProjectPickerLabel(project.name)}</option>
))}
</select>
- {selected && (
- <details className="min-w-0">
- <summary className="min-h-[44px] cursor-pointer rounded border border-port-border px-2 py-1.5 text-sm">Project actions · v{selected.version || 1}</summary>
- <div className="flex flex-wrap items-center gap-1 pt-1.5 pb-0">
- <button
- type="button"
- onClick={handleRename}
- title="Rename this version"
- aria-label="Rename project"
- className="flex min-h-[44px] items-center justify-center gap-1 rounded border border-port-border bg-port-bg px-2 py-1.5 text-sm sm:min-h-0"
- >
- <Pencil size={15} aria-hidden="true" /> Rename
- </button>
- <button
- type="button"
- onClick={() => handleClone()}
- disabled={cloning}
- title={`Create an editable v${(selected.version || 1) + 1}; keep scene media attached and clear the final render`}
- className="flex min-h-[44px] min-w-[44px] items-center justify-center gap-1 rounded border border-port-border bg-port-bg px-2 py-1.5 text-sm disabled:opacity-50 sm:min-h-0 sm:min-w-0"
- >
- <Copy size={15} aria-hidden="true" /> <span className="max-sm:sr-only">{cloning ? 'Forking…' : `Fork v${(selected.version || 1) + 1}`}</span>
- </button>
- <button
- type="button"
- onClick={() => handleClone({ variant: 'video-generation' })}
- disabled={cloning}
- title="Keep the song and storyboard; start fresh cast, sets and mood board with footage rendering. No generation starts."
- className="min-h-[44px] rounded border border-port-border bg-port-bg px-2 py-1.5 text-sm disabled:opacity-50 sm:min-h-0"
- >
- Fork for video generation
- </button>
- {isConfirmingDelete(selected.id) ? (
- <ConfirmButtonPair
- prompt="Delete?"
- confirmText="Delete"
- ariaLabel={`Confirm delete project ${selected.name}`}
- confirmAriaLabel={`Confirm delete project ${selected.name}`}
- onConfirm={() => confirmDelete(() => handleDelete(selected.id))}
- onCancel={cancelDelete}
- />
- ) : (
- <button
- type="button"
- onClick={() => handleDeleteRequest(selected.id)}
- title="Delete project"
- aria-label="Delete project"
- className="flex min-h-[44px] min-w-[44px] items-center justify-center rounded border border-port-border px-2 py-1.5 text-sm text-port-error sm:min-h-0 sm:min-w-0"
- >
- <Trash2 size={15} />
- </button>
- )}
- </div>
- </details>
- )}
{!selected && (
<>
<button
@@ -1535,7 +1481,20 @@ export default function MusicVideo() {
</div>
)}
{selected && (
- <ProjectSettingsDrawer open={!!settingsTab} tab={settingsTab || 'project'} onTabChange={setSettingsTab} onClose={() => setSettingsTab(null)} board={board} />
+ <ProjectSettingsDrawer open={!!settingsTab} tab={settingsTab || 'project'} onTabChange={setSettingsTab} onClose={() => setSettingsTab(null)}
+ board={board}
+ manageActions={(
+ <ProjectManageActions
+ project={selected}
+ cloning={cloning}
+ onFork={(options) => handleClone(options)}
+ confirmingDelete={isConfirmingDelete(selected.id)}
+ onDeleteRequest={() => handleDeleteRequest(selected.id)}
+ onDeleteConfirm={() => confirmDelete(() => handleDelete(selected.id))}
+ onDeleteCancel={cancelDelete}
+ />
+ )}
+ />
)}
{selected && (
<MusicVideoLayout
diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsx
index ccca75e1bc..38eada46f0 100644
--- a/client/src/pages/MusicVideo.test.jsx
+++ b/client/src/pages/MusicVideo.test.jsx
@@ -394,7 +394,7 @@ const openCreateForm = clickNewProject;
// Mocked useSseProgress mutates shared state without re-rendering; toggling the
// rename form is a harmless page-level state change that forces a render.
const forceRerender = () => {
- fireEvent.click(screen.getByRole('button', { name: 'Rename project' }));
+ fireEvent.click(screen.getByRole('button', { name: /^Rename v\d+$/ }));
fireEvent.click(screen.getByRole('button', { name: 'Cancel' }));
};
@@ -595,15 +595,17 @@ describe('MusicVideo bounded summary index and project isolation (#10169)', () =
});
describe('MusicVideo project header', () => {
- it('hides New project / Autonomous inside a project and renames it from the header', async () => {
+ it('keeps only the picker beside the page title inside a project; fork and delete live in Project settings', async () => {
await openProject(PROJECT_WITH_CLIP);
expect(screen.queryByRole('button', { name: /New project/i })).toBeNull();
expect(screen.queryByRole('button', { name: /Autonomous/i })).toBeNull();
- fireEvent.click(screen.getByRole('button', { name: 'Rename project' }));
- fireEvent.change(screen.getByLabelText('Project title'), { target: { value: 'Renamed Video' } });
- fireEvent.click(screen.getByRole('button', { name: 'Save' }));
- await waitFor(() => expect(updateMusicVideoProject).toHaveBeenCalledWith(PROJECT_WITH_CLIP.id, { name: 'Renamed Video' }));
- await screen.findByRole('heading', { level: 2, name: 'Renamed Video' });
+ expect(screen.queryByText(/^Project actions/)).toBeNull();
+ expect(screen.queryByRole('button', { name: 'Delete project' })).toBeNull();
+ expect(screen.queryByRole('button', { name: /^Fork/ })).toBeNull();
+ await openSettings('Project');
+ expect(screen.getByRole('button', { name: 'Delete project' })).toBeTruthy();
+ expect(screen.getByRole('button', { name: 'Fork v2' })).toBeTruthy();
+ expect(screen.getByRole('button', { name: 'Fork for video generation' })).toBeTruthy();
});
});
@@ -1393,6 +1395,7 @@ describe('MusicVideo project versions', () => {
it('forks for video generation without rendering or modifying the source', async () => {
cloneMusicVideoProject.mockResolvedValue({ ...PROJECT_WITH_CLIP, id: 'mv-footage', name: 'Footage Variant', version: 2, composition: { mode: 'composed' } });
await openProject({ ...PROJECT_WITH_CLIP, composition: { mode: 'document' } });
+ await openSettings('Project');
fireEvent.click(await screen.findByRole('button', { name: 'Fork for video generation' }));
await waitFor(() => expect(cloneMusicVideoProject).toHaveBeenCalledWith('mv-1', { variant: 'video-generation' }, { silent: true }));
await screen.findByRole('heading', { level: 2, name: 'Footage Variant' });
@@ -1410,15 +1413,16 @@ describe('MusicVideo project versions', () => {
renderHistoryId: null,
});
await openProject(PROJECT_WITH_CLIP);
+ await openSettings('Project');
fireEvent.click(await screen.findByRole('button', { name: /^Fork v2$/ }));
await waitFor(() => expect(cloneMusicVideoProject).toHaveBeenCalledWith('mv-1', {}, { silent: true }));
await screen.findByRole('heading', { level: 2, name: 'Neon Run v2' });
- expect(screen.getByText('Project actions · v2')).toBeTruthy();
+ expect(screen.getByRole('button', { name: 'Rename v2' })).toBeTruthy();
});
- it('omits media type parenthetical in the project picker options and compacts actions padding', async () => {
+ it('omits media type parenthetical in the project picker options', async () => {
const parentheticalProject = {
...PROJECT_WITH_CLIP,
id: 'mv-exp',
@@ -1430,11 +1434,6 @@ describe('MusicVideo project versions', () => {
const option = Array.from(picker.options).find((opt) => opt.value === 'mv-exp');
expect(option).toBeDefined();
expect(option?.textContent).toBe('You Are the Room - Blueprint v7');
-
- const actionsSummary = screen.getByText(/^Project actions ·/);
- const actionsContent = actionsSummary.parentElement?.querySelector('div');
- expect(actionsContent).toHaveClass('pt-1.5');
- expect(actionsContent).toHaveClass('pb-0');
});
});
@@ -1990,6 +1989,7 @@ describe('MusicVideo YouTube audio import (#1945)', () => {
fireEvent.click(within(editInput.closest('div')).getByRole('button', { name: /Import/i }));
await waitFor(() => expect(importTrackFromYoutube).toHaveBeenCalled());
+ await openSettings('Project');
fireEvent.click(screen.getByTitle('Delete project'));
expect(toast.error).toHaveBeenCalledWith(expect.stringMatching(/before deleting this project/i));
expect(deleteMusicVideoProject).not.toHaveBeenCalled();
@@ -1998,6 +1998,7 @@ describe('MusicVideo YouTube audio import (#1945)', () => {
it('asks for confirmation before deleting a project and allows cancelling or confirming', async () => {
deleteMusicVideoProject.mockResolvedValue({});
await openProject(PROJECT_NO_CLIP, 'setup');
+ await openSettings('Project');
fireEvent.click(screen.getByTitle('Delete project'));
expect(deleteMusicVideoProject).not.toHaveBeenCalled();