From 5da573b21901c88cac233e7f1c4a08afb3cde4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Thu, 3 Sep 2026 21:04:32 +0100 Subject: [PATCH] the sync button exists somewhere again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It moved out to the panel's bar beside Build and Publish, and then the bar was removed — so for the last few days there was no way to start a media sync from anywhere in this admin. The API route was fine the whole time; nothing pressed it. Quieter and worse: `SyncButton` is the only caller of `useMediaSyncFeed`, so with it unmounted the progress card in Administration was not being polled either. It would have sat there through a running sync showing nothing. Back beside the two folders it operates on, which is where it was before and where somebody looking after the media already is. Under the status line rather than beside it — that line runs to two clauses and a button sharing the row would move as the counts changed. Sync, Build and Publish still want a home of their own where all three are to hand without opening Administration. This is the one that could not wait for it. Co-Authored-By: Claude Opus 5 (1M context) --- web/MediaSync.tsx | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/web/MediaSync.tsx b/web/MediaSync.tsx index a58dbe0..45558b3 100644 --- a/web/MediaSync.tsx +++ b/web/MediaSync.tsx @@ -1,17 +1,24 @@ import { useEffect } from 'react'; import { CircleAlert } from 'lucide-react'; import { useMediaSync } from './useMediaSync'; +import { SyncButton } from './SyncButton'; /** * What syncing `derived/` is DOING, shown where the two folders are. * - * ── The button is not here any more ── + * ── The button is back, because the bar it left for no longer exists ── * - * It moved to the panel's bar, beside Build and Publish — see SyncButton for why. What stayed is - * everything that needs room to read: how far a run has got, which files failed, and the history. + * It moved out to the panel's bar beside Build and Publish, and then the bar was removed — so for a + * while there was no way to start a sync from anywhere in this admin. Worse quietly: `SyncButton` is + * the only caller of `useMediaSyncFeed`, so with it unmounted this card was not being polled either + * and showed a run that was going nowhere. * - * Both read one `useGlobal` slot, so the button's label and this card cannot disagree about what is - * true. Nothing here fetches: the bar is mounted whenever the plugin is open and does the asking. + * Here is where it was before and where it belongs: beside the two folders it operates on, in the + * section somebody opens to look after the media. Both read one `useGlobal` slot, so the label and + * this card cannot disagree about what is true. + * + * `[open]` Sync, Build and Publish still want a home of their own where all three are to hand without + * opening Administration. This is the one that could not wait for it. * * ── Built and skipped are counted separately ── * @@ -78,6 +85,12 @@ export const MediaSync = ({ onSettled }: { onSettled?: (settled: boolean) => voi : 'Web-ready copies of everything in originals.'}

+ {/* Under the sentence rather than beside it: the line above can run to two clauses, and a button + sharing that row moves as the counts change. */} +
+ +
+ {running && (
{/* Indeterminate until the walk has counted: a bar that starts full and shrinks is worse than