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
fix: announce hook-suggestion errors and drop tests for the removed publish submit path (#10171)
Adam Eivye0ba47d04be3
diff --git a/client/src/components/musicVideo/ExcerptPanel.jsx b/client/src/components/musicVideo/ExcerptPanel.jsxindex 13c5e764b4..80c00ff3f4 100644--- a/client/src/components/musicVideo/ExcerptPanel.jsx+++ b/client/src/components/musicVideo/ExcerptPanel.jsx@@ -232,7 +232,7 @@ export default function ExcerptPanel({ project, rendering, occupied = rendering,</div>{suggestionError && (<div className="flex items-center justify-between gap-2 text-xs">- <p className="text-port-error">{suggestionError}</p>+ <p role="alert" className="text-port-error">{suggestionError}</p><button type="button" onClick={suggestHooks} disabled={suggesting} className="text-port-accent disabled:opacity-50">Retry</button></div>)}diff --git a/client/src/hooks/useMusicVideoPublishing.test.jsx b/client/src/hooks/useMusicVideoPublishing.test.jsxindex 4b5c01b15e..79623c86b8 100644--- a/client/src/hooks/useMusicVideoPublishing.test.jsx+++ b/client/src/hooks/useMusicVideoPublishing.test.jsx@@ -5,7 +5,6 @@ import PublishPostingPanel from '../components/musicVideo/PublishPostingPanel.jsconst api = vi.hoisted(() => ({prepareMusicVideoPublishDraft: vi.fn(),- submitMusicVideoPublishDraft: vi.fn(),discardMusicVideoPublishDraft: vi.fn(async () => true),getMusicVideoPublishPlatforms: vi.fn(async () => ({ platforms: { youtube: { enabled: true }, reddit: { enabled: true } } })),updateMusicVideoPublishPlatforms: vi.fn(),@@ -31,7 +30,6 @@ function Posting({ id }) {beforeEach(() => {vi.clearAllMocks();api.prepareMusicVideoPublishDraft.mockReset();- api.submitMusicVideoPublishDraft.mockReset();});describe('music-video publishing project boundary', () => {@@ -49,14 +47,12 @@ describe('music-video publishing project boundary', () => {expect(within(row('Reddit')).getByLabelText('Subreddit')).toHaveValue('');view.rerender(<Posting id="project-a" />);expect(screen.queryByText('Example A')).not.toBeInTheDocument();- expect(api.submitMusicVideoPublishDraft).not.toHaveBeenCalled();});it('ignores a late old-project preparation without clearing the current preparation', async () => {const first = deferred();const second = deferred();api.prepareMusicVideoPublishDraft.mockReturnValueOnce(first.promise).mockReturnValueOnce(second.promise);- api.submitMusicVideoPublishDraft.mockResolvedValue({ post: { url: 'https://example.com/post' } });const view = render(<Posting id="project-a" />);await screen.findByText('YouTube', { selector: 'div' });fireEvent.click(within(row('YouTube')).getByRole('button', { name: 'Fill draft' }));@@ -68,7 +64,6 @@ describe('music-video publishing project boundary', () => {await act(async () => { second.resolve({ draftId: 'draft-b', summary: { title: 'Example B' } }); });expect(screen.getByText('Example B')).toBeInTheDocument();expect(screen.queryByRole('button', { name: 'Post to YouTube' })).not.toBeInTheDocument();- expect(api.submitMusicVideoPublishDraft).not.toHaveBeenCalled();expect(screen.queryByLabelText('Instance password to prepare YouTube')).toBeNull();});diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsxindex 4b16c1bff4..3769768d60 100644--- a/client/src/pages/MusicVideo.test.jsx+++ b/client/src/pages/MusicVideo.test.jsx@@ -93,7 +93,6 @@ vi.mock('../services/apiMusicVideo.js', () => ({updateMusicVideoPublishCopy: vi.fn(),selectMusicVideoPublishThumbnail: vi.fn(),prepareMusicVideoPublishDraft: vi.fn(),- submitMusicVideoPublishDraft: vi.fn(),discardMusicVideoPublishDraft: vi.fn(),getMusicVideoPublishPlatforms: vi.fn(async () => ({ platforms: {}, history: {} })),updateMusicVideoPublishPlatforms: vi.fn(),diff --git a/server/routes/musicVideoProductionReview.test.js b/server/routes/musicVideoProductionReview.test.jsindex d837cfd467..23d2aa0ce3 100644--- a/server/routes/musicVideoProductionReview.test.js+++ b/server/routes/musicVideoProductionReview.test.js@@ -343,10 +343,9 @@ describe('human-reviewed Music Video workflow', () => {expect(imported.body.project.productionReview.reviewedRevisions[entry.basis]).toBeTruthy();});- it('never submits an external post, including forged approval and agent credentials', async () => {+ it('exposes no submit route for an external post, including forged approval and agent credentials', async () => {const result = await request(app).post(`${base}/publish/drafts/any-draft/submit`).set('authorization', 'Bearer synthetic-agent').send({ approved: true, password: 'synthetic-operator-password' });- expect(result.status).toBe(403);- expect(result.body.code).toBe('PUBLISH_MANUAL_REQUIRED');+ expect(result.status).toBe(404);auth.authenticated = false;expect((await request(app).post(`${base}/publish/youtube/prepare`).send({})).status).toBe(401);auth.authenticated = true;diff --git a/server/services/musicVideo/publish/index.test.js b/server/services/musicVideo/publish/index.test.jsindex d177f00446..d4d913ce36 100644--- a/server/services/musicVideo/publish/index.test.js+++ b/server/services/musicVideo/publish/index.test.js@@ -14,7 +14,7 @@ vi.mock('../../../lib/paths.js', async (importOriginal) => makePathsProxy(awaitconst { PATHS } = await import('../../../lib/paths.js');const projects = await import('../projects.js');-const { preparePublishDraft, submitPublishDraft, discardPublishDraft, recordPublishPost } = await import('./index.js');+const { preparePublishDraft, discardPublishDraft, recordPublishPost } = await import('./index.js');const platforms = { stackerNews: { enabled: true, account: null }, youtube: { enabled: true, account: null }, x: { enabled: true, account: 'antic' } };@@ -59,9 +59,6 @@ describe('publish drafts (#9282)', () => {expect(draft).toMatchObject({ target: 'stackerNews', summary: { title: 'Song' } });expect(draft.screenshot).toMatch(/^data:image\/jpeg;base64,/);expect(adapters.stackerNews.submit).not.toHaveBeenCalled();-- await expect(submitPublishDraft(id, draft.draftId, { adapters })).rejects.toMatchObject({ status: 403, code: 'PUBLISH_MANUAL_REQUIRED' });- expect(adapters.stackerNews.submit).not.toHaveBeenCalled();expect(pages[0].closed).toBe(false);const { project, post } = await recordPublishPost(id, 'stackerNews', { url: 'https://stacker.news/items/1' });expect(post.url).toBe('https://stacker.news/items/1');@@ -75,22 +72,11 @@ describe('publish drafts (#9282)', () => {const first = await preparePublishDraft(id, 'stackerNews', {}, { connect, adapters, platforms });const second = await preparePublishDraft(id, 'stackerNews', {}, { connect, adapters, platforms });expect(pages[0].closed).toBe(true);- await expect(submitPublishDraft(id, first.draftId, { adapters })).rejects.toMatchObject({ code: 'PUBLISH_MANUAL_REQUIRED' });expect(await discardPublishDraft(id, second.draftId)).toBe(true);expect(pages[1].closed).toBe(true);expect(await discardPublishDraft(id, second.draftId)).toBe(false);});- it('refuses a draft whose tab the director closed', async () => {- const id = await readyProject();- const { connect, pages } = fakeBrowser();- const adapters = { stackerNews: adapter() };- const draft = await preparePublishDraft(id, 'stackerNews', {}, { connect, adapters, platforms });- pages[0].closed = true;- await expect(submitPublishDraft(id, draft.draftId, { adapters })).rejects.toMatchObject({ code: 'PUBLISH_MANUAL_REQUIRED' });- expect(adapters.stackerNews.submit).not.toHaveBeenCalled();- });-it('closes the tab and surfaces the adapter\'s error when a fill fails', async () => {const id = await readyProject();const { connect, pages } = fakeBrowser();