From c26178776f883fe3ba58b533c2bcd78980d8923f Mon Sep 17 00:00:00 2001 From: victorcavero14 Date: Sat, 26 Sep 2026 01:37:04 +0200 Subject: [PATCH] fix(autopilot): "clip it" tells you what happened, next to the button Without the rights confirmation the button only set the page notice, which renders at the top of the tab, far above the video list: the click looked like it did nothing. The confirmation checkbox and the button's feedback (started, not clipped and why, errors) now sit right above the list. Co-Authored-By: Claude Opus 5.5 --- dashboard/src/components/AutopilotTab.jsx | 29 ++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/dashboard/src/components/AutopilotTab.jsx b/dashboard/src/components/AutopilotTab.jsx index e15dc8b..965100a 100644 --- a/dashboard/src/components/AutopilotTab.jsx +++ b/dashboard/src/components/AutopilotTab.jsx @@ -93,6 +93,9 @@ export default function AutopilotTab({ onOpenProject, onUpgrade, justConnected } const [rightsAck, setRightsAck] = useState(false); const [running, setRunning] = useState(null); // video id being submitted const [notice, setNotice] = useState(''); + // Feedback for "clip it", shown next to the list: the page-level notice sits + // at the top of the tab, off screen from the button, so a click looked dead. + const [listNotice, setListNotice] = useState(''); const [opening, setOpening] = useState(null); const pollRef = useRef(null); @@ -180,11 +183,11 @@ export default function AutopilotTab({ onOpenProject, onUpgrade, justConnected } const runNow = useCallback(async (video) => { if (!data?.settings?.rights_ack && !rightsAck) { - setNotice('Confirm you own the content of this channel first.'); + setListNotice('Tick “I own the content…” just above the list first, then clip it again.'); return; } setRunning(video.id); - setNotice(''); + setListNotice(''); try { if (!data?.settings?.rights_ack) await save({ rights_ack: true }); const r = await apiJson('/api/autopilot/run', { @@ -193,11 +196,11 @@ export default function AutopilotTab({ onOpenProject, onUpgrade, justConnected } body: JSON.stringify({ video_id: video.id }), }); track('AutopilotManualRun', { props: { status: r.status } }); - if (r.status === 'processing') setNotice(`Clipping “${video.title || 'your video'}”. We will email you when the clips are ready.`); - else setNotice(`Not clipped: ${REASON_TEXT[r.reason] || r.reason || r.status}.`); + if (r.status === 'processing') setListNotice(`Clipping “${video.title || 'your video'}”. We will email you when the clips are ready.`); + else setListNotice(`Not clipped: ${REASON_TEXT[r.reason] || r.reason || r.status}.`); } catch (e) { - if (e?.name === 'QuotaError') setNotice('You are out of minutes for this period.'); - else setNotice(errText(e, 'Could not start the job.')); + if (e?.name === 'QuotaError') setListNotice('You are out of minutes for this period.'); + else setListNotice(errText(e, 'Could not start the job.')); } finally { setRunning(null); load(); @@ -431,6 +434,20 @@ export default function AutopilotTab({ onOpenProject, onUpgrade, justConnected } + {!s.rights_ack && ( + + )} + {listNotice && ( +
{listNotice}
+ )} {videosError &&

{ERROR_TEXT[videosError] || 'Could not read your channel.'}

} {videos === null &&
} {videos && videos.length === 0 && !videosError && (