commit 135519602c6a31627e42804a17e287c0e856cdd6
parent 266881d6363bfaa531aef3bed26ea8f3bce0c582
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 16 Oct 2026 17:03:33 -0400
channels: the ops-only channel operations as buttons — archive.org import, feed backfill, remote listing, one post imported, posts captured
The Download stage's "More ways in": import an archive.org item (preview,
then import), complete records from the channel's feed (preview, then
complete), read an Odysee or BitChute channel's remote listing. A posts
channel's panel: import one post by URL, capture posts by id (screenshot,
media, again).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
5 files changed, 172 insertions(+), 0 deletions(-)
diff --git a/editor/app/channels/[slug]/components/ChannelImportTools.tsx b/editor/app/channels/[slug]/components/ChannelImportTools.tsx
@@ -0,0 +1,99 @@
+"use client";
+
+import { useState } from "react";
+import { StreamActionLog } from "yt-dlp-transcript-common/components/StreamActionLog";
+import { cancelJobAction } from "../../../jobs/actions";
+import { feedMetadataBackfillAction, importArchiveOrgAction, remoteListingAction } from "../pipelineActions";
+
+// Channel operations that were ops-only (release 32), on the Download stage:
+// an archive.org item imported (`import-archive-org`), the records completed
+// from the channel's RSS feed (`feed-metadata`), and an Odysee or BitChute
+// channel's remote listing read against what it holds (`remote-listing`).
+// Each that writes previews first.
+
+export function ChannelImportTools({ slug, remoteListing }: { slug: string; remoteListing: boolean }) {
+ const [item, setItem] = useState("");
+ const [match, setMatch] = useState("");
+ const itemKey = `${item}\u0000${match}`;
+ const [itemPreviewed, setItemPreviewed] = useState<string | null>(null);
+ const [feedPreviewed, setFeedPreviewed] = useState(false);
+ const itemOpts = { item: item.trim(), ...(match.trim() ? { match: match.trim() } : {}) };
+ return (
+ <details aria-label="more ways in" className="rounded border border-border p-3">
+ <summary className="cursor-pointer text-sm font-semibold">More ways in</summary>
+ <div className="mt-3 flex flex-col gap-5">
+ <div className="flex flex-col gap-2">
+ <h4 className="text-sm font-semibold">Import from archive.org</h4>
+ <div className="flex flex-wrap gap-3 text-sm">
+ <label className="flex flex-col gap-0.5">
+ <span className="text-xs text-muted-foreground">Item identifier</span>
+ <input
+ value={item}
+ onChange={(e) => setItem(e.target.value)}
+ aria-label="archive.org item"
+ className="rounded border border-border bg-card px-2 py-1 text-sm font-mono w-72 max-w-full"
+ />
+ </label>
+ <label className="flex flex-col gap-0.5">
+ <span className="text-xs text-muted-foreground">Files matching (optional regex)</span>
+ <input
+ value={match}
+ onChange={(e) => setMatch(e.target.value)}
+ aria-label="archive.org files matching"
+ className="rounded border border-border bg-card px-2 py-1 text-sm font-mono w-56 max-w-full"
+ />
+ </label>
+ </div>
+ <StreamActionLog
+ trigger={() => importArchiveOrgAction(slug, { ...itemOpts, dryRun: true })}
+ cancelAction={cancelJobAction}
+ buttonLabel="Preview import"
+ runningLabel="Reading the item…"
+ label={`Preview archive.org import into ${slug}`}
+ disabled={!item.trim()}
+ onSettled={(started) => setItemPreviewed(started ? itemKey : null)}
+ />
+ <StreamActionLog
+ trigger={() => importArchiveOrgAction(slug, itemOpts)}
+ cancelAction={cancelJobAction}
+ buttonLabel="Import"
+ runningLabel="Importing…"
+ label={`Import from archive.org into ${slug}`}
+ disabled={itemPreviewed !== itemKey}
+ />
+ </div>
+ <div className="flex flex-col gap-2">
+ <h4 className="text-sm font-semibold">Complete records from the feed</h4>
+ <StreamActionLog
+ trigger={() => feedMetadataBackfillAction(slug, true)}
+ cancelAction={cancelJobAction}
+ buttonLabel="Preview feed backfill"
+ runningLabel="Reading the feed…"
+ label={`Preview feed backfill of ${slug}`}
+ onSettled={(started) => setFeedPreviewed(started)}
+ />
+ <StreamActionLog
+ trigger={() => feedMetadataBackfillAction(slug)}
+ cancelAction={cancelJobAction}
+ buttonLabel="Complete from the feed"
+ runningLabel="Completing…"
+ label={`Feed backfill of ${slug}`}
+ disabled={!feedPreviewed}
+ />
+ </div>
+ {remoteListing && (
+ <div className="flex flex-col gap-2">
+ <h4 className="text-sm font-semibold">Remote listing</h4>
+ <StreamActionLog
+ trigger={() => remoteListingAction(slug)}
+ cancelAction={cancelJobAction}
+ buttonLabel="Read the remote listing"
+ runningLabel="Reading…"
+ label={`Remote listing of ${slug}`}
+ />
+ </div>
+ )}
+ </div>
+ </details>
+ );
+}
diff --git a/editor/app/channels/[slug]/components/SocialChannelPanel.tsx b/editor/app/channels/[slug]/components/SocialChannelPanel.tsx
@@ -15,6 +15,7 @@ import {
setPostFetcherAction,
} from "../socialActions";
import type { ForumSessionStatus } from "yt-dlp-transcript-common/social/forumSession";
+import { SocialPostTools } from "./SocialPostTools";
export type SocialChannelState = {
postCount: number;
@@ -387,6 +388,8 @@ export function SocialChannelPanel({
</section>
)}
+ <SocialPostTools slug={slug} />
+
<p className="text-xs text-muted-foreground">
Posts are indexed into the search corpus by the normal build — there is
no per-post download or transcription stage.
diff --git a/editor/app/channels/[slug]/components/SocialPostTools.tsx b/editor/app/channels/[slug]/components/SocialPostTools.tsx
@@ -0,0 +1,62 @@
+"use client";
+
+import { useState } from "react";
+import { StreamActionLog } from "yt-dlp-transcript-common/components/StreamActionLog";
+import { cancelJobAction } from "../../../jobs/actions";
+import { capturePostsAction } from "../socialActions";
+import { importPostAction } from "../importPostAction";
+
+// A posts channel's ops-only operations as buttons (release 32): one post
+// imported by its URL (`import-post`), and specific posts captured — a
+// screenshot and their media (`capture-posts`).
+export function SocialPostTools({ slug }: { slug: string }) {
+ const [url, setUrl] = useState("");
+ const [ids, setIds] = useState("");
+ const [shots, setShots] = useState(true);
+ const [media, setMedia] = useState(true);
+ const [force, setForce] = useState(false);
+ const idList = ids.split(/[\s,]+/).filter(Boolean);
+ const input = "rounded border border-border bg-card px-2 py-1 text-sm font-mono";
+ return (
+ <section aria-label="post tools" className="flex flex-col gap-4 rounded-lg border border-border p-3">
+ <div className="flex flex-col gap-2">
+ <h4 className="text-sm font-semibold">Import one post</h4>
+ <input value={url} onChange={(e) => setUrl(e.target.value)} aria-label="post URL" placeholder="https://…" className={`${input} w-[32rem] max-w-full`} />
+ <StreamActionLog
+ trigger={() => importPostAction(slug, url.trim())}
+ cancelAction={cancelJobAction}
+ buttonLabel="Import post"
+ runningLabel="Importing…"
+ label={`Import post into ${slug}`}
+ disabled={!url.trim()}
+ />
+ </div>
+ <div className="flex flex-col gap-2">
+ <h4 className="text-sm font-semibold">Capture posts</h4>
+ <input value={ids} onChange={(e) => setIds(e.target.value)} aria-label="post ids to capture" placeholder="post ids, comma or space separated" className={`${input} w-[32rem] max-w-full`} />
+ <div className="flex flex-wrap gap-3 text-sm">
+ <label className="flex items-center gap-2">
+ <input type="checkbox" checked={shots} onChange={(e) => setShots(e.target.checked)} />
+ Screenshot
+ </label>
+ <label className="flex items-center gap-2">
+ <input type="checkbox" checked={media} onChange={(e) => setMedia(e.target.checked)} />
+ Attached media
+ </label>
+ <label className="flex items-center gap-2">
+ <input type="checkbox" checked={force} onChange={(e) => setForce(e.target.checked)} />
+ Again, if captured
+ </label>
+ </div>
+ <StreamActionLog
+ trigger={() => capturePostsAction(slug, idList, undefined, shots, media, force)}
+ cancelAction={cancelJobAction}
+ buttonLabel={`Capture ${idList.length || ""} post${idList.length === 1 ? "" : "s"}`.replace(" ", " ")}
+ runningLabel="Capturing…"
+ label={`Capture posts of ${slug}`}
+ disabled={idList.length === 0}
+ />
+ </div>
+ </section>
+ );
+}
diff --git a/editor/app/channels/[slug]/components/stages/DownloadStage.tsx b/editor/app/channels/[slug]/components/stages/DownloadStage.tsx
@@ -5,6 +5,7 @@ import { StreamActionLog } from "yt-dlp-transcript-common/components/StreamActio
import type { AudioIntegrityTally, ExcludedFromDownload } from "yt-dlp-transcript-common/controller/channelSnapshot";
import { FindCopiesControl } from "../../../../components/FindCopiesControl";
import { audioAuditAction } from "../../audioAuditActions";
+import { ChannelImportTools } from "../ChannelImportTools";
import { QueueControl } from "../../../../components/QueueControl";
import {
ShardControl,
@@ -38,6 +39,8 @@ type Props = {
// Release 32: the audio audit's verdicts over the channel (the snapshot's
// tally), or null when the report predates it.
audioIntegrity: AudioIntegrityTally | null;
+ // An Odysee or BitChute channel: its remote listing can be read.
+ remoteListing?: boolean;
missingShard: ShardConfigSummary | null;
};
@@ -54,6 +57,7 @@ export function DownloadStage({
corruptFullSourceIds,
corruptHeldAudioIds,
audioIntegrity,
+ remoteListing = false,
missingShard,
}: Props) {
const [downloadQueue, setDownloadQueue] = useState(defaultQueueKey);
@@ -255,6 +259,7 @@ export function DownloadStage({
existingQueues={existingQueues}
/>
<AudioAuditControl slug={slug} tally={audioIntegrity} />
+ <ChannelImportTools slug={slug} remoteListing={remoteListing} />
</div>
);
}
diff --git a/editor/app/channels/[slug]/page.tsx b/editor/app/channels/[slug]/page.tsx
@@ -81,6 +81,8 @@ import { liveJobRows } from "../../jobs/active/buildActiveJobs";
import { CleanupStage } from "./components/stages/CleanupStage";
import { DiagnosticsStage } from "./components/stages/DiagnosticsStage";
import { DownloadStage } from "./components/stages/DownloadStage";
+import { isRemoteListingPlatform } from "yt-dlp-transcript-common/controller/remoteListing";
+import { detectPlatform as detectUrlPlatform } from "yt-dlp-transcript-common/lib/platform";
import { PlaylistStage } from "./components/stages/PlaylistStage";
import {
MATCHED_PREVIEW_LIMIT,
@@ -515,6 +517,7 @@ export default async function ChannelDetailPage({
corruptFullSourceIds={buckets.corruptFullSource}
corruptHeldAudioIds={buckets.corruptHeldAudio}
audioIntegrity={snapshot.audioIntegrity ?? null}
+ remoteListing={isRemoteListingPlatform(config!.url ? detectUrlPlatform(config!.url) : null)}
missingShard={await shard("download-missing")}
/>
);