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

Publish cards: treat an excerpt of unknown inputs as unpostable, as the server does

Claude092807c9d00d
diff --git a/client/src/components/musicVideo/PublishPostingPanel.jsx b/client/src/components/musicVideo/PublishPostingPanel.jsx
index b61f2c858f..c80c9c9f7b 100644
--- a/client/src/components/musicVideo/PublishPostingPanel.jsx
+++ b/client/src/components/musicVideo/PublishPostingPanel.jsx
@@ -45,12 +45,16 @@ const summaryRows = (summary) => Object.entries(summary || {})
const VERTICAL_TARGETS = ['shorts', 'tiktok', 'instagram'];
const fmtSec = (n) => `${Math.floor(n / 60)}:${String(Math.floor(n % 60)).padStart(2, '0')}`;
-/** Postable 9:16 cuts, oldest first (mirrors the server's list and pick in publish/payloads.js). */
+/**
+ * Postable 9:16 cuts, oldest first (mirrors the server's list and pick in publish/payloads.js).
+ * The server refuses any excerpt with a dependency change, which the record presents as a
+ * dependencyState other than 'current' ('stale' or 'unknown').
+ */
function verticalCutChoices(project) {
const kit = project?.publishKit || {};
const cuts = (project?.excerpts || [])
.filter((e) => e?.status === 'complete' && e.aspect === '9:16' && e.filename)
- .map((e) => ({ id: e.id, layout: 'native', stale: e.dependencyState?.status === 'stale', label: `Social cut ${fmtSec(e.startSec ?? 0)}-${fmtSec(e.endSec ?? 0)}` }));
+ .map((e) => ({ id: e.id, layout: 'native', stale: e.dependencyState?.status !== 'current', label: `Social cut ${fmtSec(e.startSec ?? 0)}-${fmtSec(e.endSec ?? 0)}` }));
const crop = (kit.exports || []).find((e) => e.kind === 'vertical-9x16' && e.filename);
if (crop && (kit.master?.renderHistoryId ?? null) === (project?.renderHistoryId ?? null)) {
const layout = crop.layout === 'native' ? 'native' : 'fit';
diff --git a/client/src/components/musicVideo/PublishPostingPanel.test.jsx b/client/src/components/musicVideo/PublishPostingPanel.test.jsx
index feeb3b291b..600c9db1f3 100644
--- a/client/src/components/musicVideo/PublishPostingPanel.test.jsx
+++ b/client/src/components/musicVideo/PublishPostingPanel.test.jsx
@@ -275,9 +275,20 @@ describe('PublishPostingPanel (#9282)', () => {
unmount();
// Once a native cut exists it is the default pick, and the warning goes.
- const native = { ...p, excerpts: [{ id: 'e1', status: 'complete', aspect: '9:16', filename: 'n.mp4', startSec: 20, endSec: 50 }] };
+ const native = { ...p, excerpts: [{ id: 'e1', status: 'complete', aspect: '9:16', filename: 'n.mp4', startSec: 20, endSec: 50, dependencyState: { status: 'current' } }] };
render(<PublishPostingPanel project={native} publishing={hook({ enabledTargets: ['sunoHook'] })} excerpts={excerpts} />);
expandAll();
expect(within(row('Suno Hook')).queryByRole('status')).not.toBeInTheDocument();
});
+
+ it('skips a native cut the server would refuse (made before a change, or of unknown inputs) when picking the default', () => {
+ const fittedKit = { master: { renderHistoryId: null }, exports: [{ kind: 'vertical-9x16', filename: 'v.mp4', startSec: 20, endSec: 50, layout: 'fit' }] };
+ for (const status of ['stale', 'unknown']) {
+ const p = { ...project(fittedKit), excerpts: [{ id: 'e1', status: 'complete', aspect: '9:16', filename: 'n.mp4', startSec: 20, endSec: 50, dependencyState: { status } }] };
+ const { unmount } = render(<PublishPostingPanel project={p} publishing={hook({ enabledTargets: ['sunoHook'] })} />);
+ expandAll();
+ expect(within(row('Suno Hook')).getByRole('status')).toHaveTextContent(/fitted/);
+ unmount();
+ }
+ });
});