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

Keep the attention row when the Autopilot button reports no run

Claude2e86f30c04b9
diff --git a/client/src/components/musicVideo/NeedsAttentionBanner.test.jsx b/client/src/components/musicVideo/NeedsAttentionBanner.test.jsx
index 7de2948052..d24b582d09 100644
--- a/client/src/components/musicVideo/NeedsAttentionBanner.test.jsx
+++ b/client/src/components/musicVideo/NeedsAttentionBanner.test.jsx
@@ -1,10 +1,10 @@
import { describe, expect, it, vi } from 'vitest';
-import { fireEvent, render, screen, within } from '@testing-library/react';
+import { fireEvent, render, screen, within, act } from '@testing-library/react';
import { MemoryRouter } from 'react-router';
import NeedsAttentionBanner from './NeedsAttentionBanner.jsx';
import MusicVideoLayout from './MusicVideoLayout.jsx';
import { MUSIC_VIDEO_STAGES } from '../../lib/musicVideoStages.js';
-import { deriveAttentionItems } from '../../lib/musicVideoAttention.js';
+import { deriveAttentionItems, revealAttention } from '../../lib/musicVideoAttention.js';
const renderWithRouter = (ui) => render(<MemoryRouter>{ui}</MemoryRouter>);
@@ -108,6 +108,19 @@ describe('NeedsAttentionBanner (#9940)', () => {
expect(within(header).getByRole('status', { name: 'Project status' })).toBeInTheDocument();
});
+ it('opens the folded chip when a refusal toast reveals it', () => {
+ render(<NeedsAttentionBanner items={deriveAttentionItems({ ...stranded, status: 'complete', revisions: [], autoReviews: [] })} actions={actions()} />);
+ const chip = screen.getByRole('button', { name: '1 needs attention' });
+ let revealed;
+ act(() => { revealed = revealAttention(); });
+ expect(revealed).toBe(true);
+ expect(chip).toHaveAttribute('aria-expanded', 'true');
+ expect(chip).toHaveFocus();
+ // A second reveal leaves the open banner open.
+ act(() => { revealAttention(); });
+ expect(chip).toHaveAttribute('aria-expanded', 'true');
+ });
+
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' });
diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsx
index d08037e7af..00bdcd00e1 100644
--- a/client/src/pages/MusicVideo.jsx
+++ b/client/src/pages/MusicVideo.jsx
@@ -1577,9 +1577,10 @@ export default function MusicVideo() {
) : null}
attention={(
<NeedsAttentionBanner
- // 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))}
+ // A parked autonomous or production run with nothing to resume, while the
+ // header's Autopilot button reports that run, is that button (which opens it); no second row.
+ items={autopilotStatus(selected).label === 'Autopilot' ? attentionItems
+ : 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.jsx
index 2582bbdbc3..1413b45acc 100644
--- a/client/src/pages/MusicVideo.test.jsx
+++ b/client/src/pages/MusicVideo.test.jsx
@@ -2879,6 +2879,17 @@ describe('MusicVideo stage tabs (#9243)', () => {
await waitFor(() => expect(stopMusicVideoProduction).toHaveBeenCalledWith('mv-3', 'run-1', { silent: true }));
});
+ it('keeps the attention row for a parked production run the Autopilot button does not report', async () => {
+ const run = {
+ id: 'run-2', status: 'needs-human', interrupted: false, directive: '', stopReason: 'Example stop reason', error: null, pool: [],
+ limits: { maxGenerations: 12, maxReviewAttempts: 3, spendCapUsd: 20 }, usage: { generations: 3, spentUsd: 4.5 }, steps: [],
+ };
+ await openProject({ ...PROJECT_ANALYZED, productionRuns: [run] }, 'board');
+ // "needs-human" has no Resume and the header's Autopilot button stays plain, so the row is the only signal.
+ const banner = screen.getByRole('region', { name: 'Needs attention' });
+ expect(within(banner).getByText('Production needs you')).toBeTruthy();
+ });
+
it('takes a finished project on to its release (#9281)', async () => {
await openProject({ ...PROJECT_WITH_CLIP, audioAnalysis: PROJECT_ANALYZED.audioAnalysis, renderHistoryId: 'rh-9' }, 'board');
fireEvent.click(screen.getByRole('button', { name: 'Build the publishing kit' }));