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

test(issue-1817): assert composing:false does not flip project status to planning

[._.]/ Adam Eivy9cf34604c10c
diff --git a/client/src/components/creative-director/OverviewTab.test.jsx b/client/src/components/creative-director/OverviewTab.test.jsx
index a980fdfbe9..8bac30e0bb 100644
--- a/client/src/components/creative-director/OverviewTab.test.jsx
+++ b/client/src/components/creative-director/OverviewTab.test.jsx
@@ -124,4 +124,19 @@ describe('OverviewTab auto-compose (#1817)', () => {
fireEvent.click(screen.getByRole('button', { name: /^Auto-cast$/i }));
await waitFor(() => expect(applyCreativeDirectorAutoCast).toHaveBeenCalledWith('cd-1', {}, { silent: true }));
});
+
+ it('does not flip status to planning when the server did not start composing', async () => {
+ const onProjectUpdate = vi.fn();
+ applyCreativeDirectorAutoCast.mockResolvedValue({
+ project: { id: 'cd-1', cast: [{ ingredientId: 'p1', name: 'The Spire' }] },
+ added: [{ ingredientId: 'p1', name: 'The Spire' }],
+ suggestions: [],
+ // composing absent — server declined (e.g. paused project)
+ });
+ renderTab(baseProject, onProjectUpdate);
+ fireEvent.click(screen.getByLabelText(/\+ treatment/i));
+ fireEvent.click(screen.getByRole('button', { name: /^Auto-cast$/i }));
+ await waitFor(() => expect(onProjectUpdate).toHaveBeenCalled());
+ expect(onProjectUpdate).toHaveBeenCalledWith(expect.not.objectContaining({ status: expect.anything() }));
+ });
});