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
Tighten the music video header further
Claude45bac56b24f6
diff --git a/client/src/components/musicVideo/MusicVideoLayout.jsx b/client/src/components/musicVideo/MusicVideoLayout.jsxindex 4e0f4b3165..1168b76d8c 100644--- a/client/src/components/musicVideo/MusicVideoLayout.jsx+++ b/client/src/components/musicVideo/MusicVideoLayout.jsx@@ -184,20 +184,35 @@ export default function MusicVideoLayout({<Pencil size={14} aria-hidden="true" /></button>)}+ {/* Settings sits with the title's own controls, not on a row of its own. */}+ {onOpenSettings && (+ <button+ type="button"+ onClick={() => onOpenSettings('project')}+ aria-label="Project settings"+ title="Project settings"+ className="flex min-h-[44px] min-w-[44px] shrink-0 items-center justify-center rounded text-port-text-muted hover:text-port-text sm:min-h-[32px] sm:min-w-[32px]"+ >+ <Settings size={15} aria-hidden="true" />+ </button>+ )}</div>)}- {/* The song usually shares the project's name; name it only when it differs. */}+ {/* The song usually shares the project's name; name it only when it differs,+ and not on a phone, where the line would push the step down (Song shows it). */}{trackLabel && trackLabel !== project.name && (- <p className="flex min-w-0 items-center gap-1 text-xs text-port-text-muted">+ <p className="flex min-w-0 items-center gap-1 text-xs text-port-text-muted max-sm:hidden"><Music size={12} className="shrink-0" aria-hidden="true" /><span className="truncate">{trackLabel}</span></p>)}</div>{status && (- <p role="status" aria-label="Project status" className={`flex min-h-[36px] min-w-0 items-center rounded-lg border px-2.5 text-xs font-medium sm:text-sm ${TONE_CLASSES[status.tone] || TONE_CLASSES.muted}`}>+ // With a next action showing, the status is said by that button (and the+ // step list's "needs you"), so it stays for screen readers only.+ <p role="status" aria-label="Project status" className={nextAction ? 'sr-only' : `flex min-h-[36px] min-w-0 items-center rounded-lg border px-2.5 text-xs font-medium sm:text-sm ${TONE_CLASSES[status.tone] || TONE_CLASSES.muted}`}>{/* A step that needs you is one tap away: from any other step, the status opens it. */}- {needsYouStage && needsYouStage !== stage ? (+ {!nextAction && needsYouStage && needsYouStage !== stage ? (<button type="button" onClick={() => onStageChange(needsYouStage)} className="flex min-h-[36px] items-center gap-1 text-left underline-offset-2 hover:underline">{status.headline} <ArrowRight size={12} aria-hidden="true" /></button>@@ -241,20 +256,9 @@ export default function MusicVideoLayout({</span></Pill>)}- {onOpenSettings && (- <button- type="button"- onClick={() => onOpenSettings('project')}- aria-label="Project settings"- title="Project settings"- className="flex min-h-[44px] min-w-[44px] shrink-0 items-center justify-center rounded-lg border border-port-border text-port-text-muted hover:text-port-text"- >- <Settings size={16} aria-hidden="true" />- </button>- )}+ {attention}</div>{nextAction?.disabled && nextAction.reason && <p role="status" className="text-xs text-port-text-muted">{nextAction.reason}</p>}- {attention}<navaria-label="Steps"className="md:hidden max-md:fixed max-md:inset-x-0 max-md:bottom-0 max-md:z-40 max-md:border-t max-md:border-port-border max-md:bg-port-bg max-md:pb-[env(safe-area-inset-bottom)]"diff --git a/client/src/components/musicVideo/MusicVideoLayout.test.jsx b/client/src/components/musicVideo/MusicVideoLayout.test.jsxindex 746b3fe660..f84a3865b6 100644--- a/client/src/components/musicVideo/MusicVideoLayout.test.jsx+++ b/client/src/components/musicVideo/MusicVideoLayout.test.jsx@@ -89,6 +89,16 @@ describe('music-video step navigation', () => {expect(action.querySelector('.sm\\:hidden')).toHaveTextContent('Board');});+ it('keeps settings beside the title and lets the next action carry the status', () => {+ render(<MusicVideoLayout project={{ id: 'example-project', name: 'Example Project' }} stage="board"+ onStageChange={() => {}} progress={progressFor('board')} spend={{ spentUsd: 0 }} onOpenSettings={() => {}}+ status={{ headline: 'Step 3 of 6: Storyboard needs you', tone: 'warn', needsYouStage: 'board' }}+ nextAction={{ id: 'review-production', kind: 'goto', label: 'Review timed storyboard' }} onNextAction={() => {}} />);+ const title = screen.getByRole('heading', { level: 2, name: 'Example Project' });+ expect(title.parentElement).toContainElement(screen.getByRole('button', { name: 'Project settings' }));+ expect(screen.getByRole('status', { name: 'Project status' })).toHaveClass('sr-only');+ });+it('keeps every step in the phone icon bar, each with its own icon', () => {render(<MusicVideoLayout project={{ id: 'example-project', name: 'Example Project' }} stage="publish"onStageChange={() => {}} progress={progressFor('publish')} spend={{ spentUsd: 0 }} />);diff --git a/client/src/components/musicVideo/NeedsAttentionBanner.jsx b/client/src/components/musicVideo/NeedsAttentionBanner.jsxindex 6086676cfe..beaad64e8d 100644--- a/client/src/components/musicVideo/NeedsAttentionBanner.jsx+++ b/client/src/components/musicVideo/NeedsAttentionBanner.jsx@@ -128,23 +128,22 @@ export default function NeedsAttentionBanner({ items, busy = false, actions = {}if (!items?.length) return null;const countLabel = items.length === 1 ? '1 needs attention' : `${items.length} need attention`;return (+ // Folded to one chip in the header's button row at every width; the rows and+ // their exits open below the row on a tap, so the card never costs a line.<sectionid={ATTENTION_ANCHOR_ID}aria-label="Needs attention"- className="text-xs sm:max-h-[40vh] sm:space-y-1.5 sm:overflow-y-auto sm:rounded sm:border sm:border-port-warning/40 sm:bg-port-warning/5 sm:p-2"+ className={`text-xs ${open ? 'order-last basis-full' : ''}`}><buttontype="button"- className="inline-flex h-8 items-center gap-1 rounded border border-port-warning/40 bg-port-warning/5 px-2 font-medium text-port-warning sm:hidden"+ className="inline-flex min-h-[44px] items-center gap-1 rounded-lg border border-port-warning/50 bg-port-warning/5 px-2.5 text-sm font-medium text-port-warning"aria-expanded={open}onClick={() => setOpen((value) => !value)}>- <AlertTriangle size={12} aria-hidden="true" /> {countLabel}+ <AlertTriangle size={14} aria-hidden="true" /> {countLabel}</button>- <div className={open ? 'max-sm:mt-1.5 max-sm:max-h-[40vh] max-sm:space-y-1.5 max-sm:overflow-y-auto max-sm:rounded max-sm:border max-sm:border-port-warning/40 max-sm:bg-port-warning/5 max-sm:p-2' : 'max-sm:hidden'}>- <h3 className="flex items-center gap-1 font-medium text-port-warning">- <AlertTriangle size={12} aria-hidden="true" /> Needs attention- </h3>+ <div className={open ? 'mt-1.5 max-h-[40vh] space-y-1.5 overflow-y-auto rounded border border-port-warning/40 bg-port-warning/5 p-2' : 'hidden'}><ul className="space-y-1.5">{items.map((item) => (<li key={item.id} className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1">diff --git a/client/src/components/musicVideo/NeedsAttentionBanner.test.jsx b/client/src/components/musicVideo/NeedsAttentionBanner.test.jsxindex bbb98a72dd..7de2948052 100644--- a/client/src/components/musicVideo/NeedsAttentionBanner.test.jsx+++ b/client/src/components/musicVideo/NeedsAttentionBanner.test.jsx@@ -108,14 +108,15 @@ describe('NeedsAttentionBanner (#9940)', () => {expect(within(header).getByRole('status', { name: 'Project status' })).toBeInTheDocument();});- it('collapses to a count chip below sm and expands on tap (#10170)', () => {+ it('folds to a count chip at every width and expands on tap (#10170)', () => {render(<NeedsAttentionBanner items={deriveAttentionItems({ ...stranded, status: 'complete', revisions: [], autoReviews: [] })} actions={actions()} />);const chip = screen.getByRole('button', { name: '1 needs attention' });- expect(chip).toHaveClass('sm:hidden');+ expect(chip).not.toHaveClass('sm:hidden');expect(chip).toHaveAttribute('aria-expanded', 'false');- expect(chip.parentElement.querySelector('.max-sm\\:hidden')).toBeTruthy();+ expect(chip.parentElement.querySelector(':scope > .hidden')).toBeTruthy();fireEvent.click(chip);expect(chip).toHaveAttribute('aria-expanded', 'true');+ expect(chip.parentElement.querySelector(':scope > .hidden')).toBeNull();expect(screen.getByRole('region', { name: 'Needs attention' })).toHaveTextContent('Cast & Sets');});});diff --git a/client/src/lib/musicVideoAttention.js b/client/src/lib/musicVideoAttention.jsindex 13d7db0b76..77b6a848e4 100644--- a/client/src/lib/musicVideoAttention.js+++ b/client/src/lib/musicVideoAttention.js@@ -258,6 +258,8 @@ export function revealAttention() {if (typeof document === 'undefined') return false;const banner = document.getElementById(ATTENTION_ANCHOR_ID);if (!banner) return false;+ // The banner folds to a chip; open it so the exits the toast points at are showing.+ banner.querySelector?.('button[aria-expanded="false"]')?.click?.();banner.scrollIntoView?.({ block: 'nearest', behavior: 'smooth' });banner.querySelector?.('button')?.focus?.({ preventScroll: true });return true;diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsxindex 581f1105f9..d08037e7af 100644--- a/client/src/pages/MusicVideo.jsx+++ b/client/src/pages/MusicVideo.jsx@@ -1074,6 +1074,14 @@ export default function MusicVideo() {else next.delete('mvPanel');return next;}, { replace: !!tab && !!settingsTab });+ // The header's Autopilot button stands in for the attention row's Open: a run+ // waiting on its checkpoint opens Autopilot at the editor, like that row did.+ const openHeaderSettings = (tab) => {+ if (tab !== 'autopilot' || selected?.autonomousRun?.status !== 'awaiting-approval') { setSettingsTab(tab); return; }+ const next = new URLSearchParams(searchParams);+ next.set('mvPanel', 'autopilot');+ navigate({ search: `?${next}`, hash: '#mv-auto-edit' });+ };// The preview: scene cards and storyboard rows seek it. Steps reviewed by// watching put it first (open); elsewhere, below xl, it is a folded row until@@ -1360,7 +1368,7 @@ export default function MusicVideo() {onChange={(e) => selectProject(e.target.value || null)}onFocus={() => setSummariesWanted(true)}disabled={loading || youtube.editJob.active}- 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"+ className="w-40 min-w-0 max-w-[45vw] sm:w-56 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) => (@@ -1541,7 +1549,7 @@ export default function MusicVideo() {status={projectStatus}notes={stepNotes(selected, productionReview.readiness, publish)}autopilot={autopilotStatus(selected)}- onOpenSettings={setSettingsTab}+ onOpenSettings={openHeaderSettings}playerFirst={playerFirst}onRename={handleRename}renameForm={renameForm}@@ -1569,7 +1577,9 @@ export default function MusicVideo() {) : null}attention={(<NeedsAttentionBanner- items={attentionItems}+ // A parked autonomous or production run with nothing to resume is+ // already the header's Autopilot button, which opens it; no second row.+ items={attentionItems.filter((item) => !(['autonomous', 'production'].includes(item.kind) && !item.canResume))}busy={revisions.busy || castSets.busy || autoReview.busy || autonomous.busy || production.busy || renderJob.reattaching}actions={{onResumeRevision: revisions.resume,diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsxindex 67df5fa1b6..2582bbdbc3 100644--- a/client/src/pages/MusicVideo.test.jsx+++ b/client/src/pages/MusicVideo.test.jsx@@ -2661,6 +2661,19 @@ describe('MusicVideo stage tabs (#9243)', () => {expect(dialog.contains(document.getElementById('mv-auto-edit'))).toBe(true);});+ it('lets the header Autopilot button stand in for the attention row of a run awaiting its checkpoint', async () => {+ listMusicVideoProjects.mockResolvedValue([{ ...PROJECT_WITH_CLIP,+ autonomousRun: { id: 'auto-1', status: 'awaiting-approval', awaiting: 'lyrics', stage: 'lyrics', output: { lyrics: 'Example lyric line' }, brief: {} },+ }]);+ renderAt('/music-video/mv-1/setup');+ await screen.findByRole('heading', { level: 2, name: PROJECT_WITH_CLIP.name });+ expect(screen.queryByRole('region', { name: 'Needs attention' })).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: /^Autonomous run/ }));+ const dialog = await screen.findByRole('dialog');+ expect(within(dialog).getByRole('tab', { name: /^Autopilot/ })).toHaveAttribute('aria-selected', 'true');+ await waitFor(() => expect(document.getElementById('mv-auto-edit')).toHaveFocus());+ });+it('leads Storyboard and Make with the player and their approval, closes Look with its approval, keeps the run in Project settings and unsaved planning edits across steps', async () => {listMusicVideoProjects.mockResolvedValue([{ ...PROJECT_WITH_CLIP,autonomousRun: { status: 'needs-human', stage: 'video', output: {}, brief: {} },