Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit c0d5b5b6fe6fc946edd66a5353fb7c2b46ecd35f
parent ec99f6aa6262acf968a3f5e0d4938ce67ce755f5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 16 Oct 2026 17:21:24 -0400

editor: First steps on a fresh install's dashboard — shown while there is no channel: add a channel, whether each enabled worker's model file is there, sync and transcribe, publish; each step says what this install already has

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/app/components/dashboard/DashboardCockpit.tsx | 4++++
Aeditor/app/components/dashboard/FirstRunPanel.tsx | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Meditor/app/page.tsx | 21++++++++++++++++++++-
3 files changed, 109 insertions(+), 1 deletion(-)

diff --git a/editor/app/components/dashboard/DashboardCockpit.tsx b/editor/app/components/dashboard/DashboardCockpit.tsx @@ -8,6 +8,7 @@ import { usePolledPayload, useNow } from "../../lib/usePolledPayload"; import { PipelineBand } from "./PipelineBand"; import { NeedsWorkPanel } from "./NeedsWorkPanel"; import { QuickAddPanel } from "./QuickAddPanel"; +import { FirstRunPanel, type FirstRunState } from "./FirstRunPanel"; import type { ChannelRowView } from "yt-dlp-transcript-common/views/channelRow"; import { ChannelsTable } from "../../channels/components/ChannelsTable"; import { @@ -33,6 +34,8 @@ export type DashboardCockpitInitial = { // client state — so a global AutoRefresh re-seeds them live. channels: ChannelRowView[]; changelogSource: string | null; + // Set while the corpus has no channel (app/page.tsx): the first-run checklist. + firstRun?: FirstRunState | null; }; // The mission-control cockpit. A server component (app/page.tsx) SSRs the @@ -74,6 +77,7 @@ export function DashboardCockpit({ return ( <div className="flex flex-col gap-6"> <h1 className="sr-only">Dashboard</h1> + {initial.firstRun && <FirstRunPanel state={initial.firstRun} />} <PipelineBand jobs={jobs} workers={workers} diff --git a/editor/app/components/dashboard/FirstRunPanel.tsx b/editor/app/components/dashboard/FirstRunPanel.tsx @@ -0,0 +1,85 @@ +import Link from "next/link"; + +// What a fresh install has and lacks, gathered by app/page.tsx (server side) +// when the corpus has no channel yet. Every line is a fact about this install; +// a step already done says so rather than being left out. +export type FirstRunState = { + // Enabled local transcription workers, each with the model file it would run + // and whether that file is there. + workers: { name: string; model: string; present: boolean }[]; + siteCount: number; +}; + +function Step({ + n, + done, + title, + href, + action, + children, +}: { + n: number; + done: boolean; + title: string; + href: string; + action: string; + children?: React.ReactNode; +}) { + return ( + <li className="flex gap-3" data-done={done ? "true" : "false"}> + <span + aria-hidden="true" + className={`mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border font-mono text-[11px] ${ + done ? "border-brand bg-brand/15 text-brand" : "border-border text-muted-foreground" + }`} + > + {done ? "✓" : n} + </span> + <div className="flex min-w-0 flex-col gap-0.5"> + <div className="flex flex-wrap items-baseline gap-x-3"> + <span className="text-sm font-medium text-foreground">{title}</span> + <Link href={href} className="text-xs text-brand underline underline-offset-2 hover:text-foreground"> + {action} + </Link> + </div> + {children && <div className="text-xs text-muted-foreground break-words">{children}</div>} + </div> + </li> + ); +} + +// The dashboard's first-run checklist: shown only while there is no channel. +export function FirstRunPanel({ state }: { state: FirstRunState }) { + const ready = state.workers.filter((w) => w.present); + return ( + <section aria-label="First steps" className="rounded-md border border-brand/40 bg-card px-4 py-3"> + <h2 className="font-mono text-xs uppercase tracking-[0.14em] text-brand mb-3">First steps</h2> + <ol className="flex flex-col gap-3"> + <Step n={1} done={false} title="Add a channel" href="/channels/new" action="Paste a URL" /> + <Step + n={2} + done={ready.length > 0} + title="A transcription worker with a model" + href="/workers" + action="Workers page" + > + {state.workers.length === 0 + ? "No transcription worker is enabled." + : state.workers.map((w) => ( + <span key={w.name} className="block"> + {w.name}: {w.present ? "model ready" : "model missing"} — <code>{w.model || "none named"}</code> + </span> + ))} + </Step> + <Step n={3} done={false} title="Sync, then transcribe" href="/channels" action="Channels page"> + Sync downloads captions and audio; Transcribe covers the videos without captions. + </Step> + <Step n={4} done={state.siteCount > 0} title="Publish a site" href="/sites" action="Sites page"> + {state.siteCount > 0 + ? `${state.siteCount} site${state.siteCount === 1 ? "" : "s"} configured.` + : "No site yet."} + </Step> + </ol> + </section> + ); +} diff --git a/editor/app/page.tsx b/editor/app/page.tsx @@ -1,4 +1,4 @@ -import { readFileSync } from "node:fs"; +import { existsSync, readFileSync } from "node:fs"; import type { Metadata } from "next"; import { getPaths } from "yt-dlp-transcript-common/lib/paths"; import { inspectChannelMedia } from "yt-dlp-transcript-common/lib/channelMedia"; @@ -27,6 +27,8 @@ import { } from "yt-dlp-transcript-common/views/channelRow"; import { buildWidgetActionablePayload } from "yt-dlp-transcript-common/views/widgetActionable"; import type { ActionableRow } from "./lib/actionable/loadActionable"; +import type { FirstRunState } from "./components/dashboard/FirstRunPanel"; +import type { Paths } from "yt-dlp-transcript-common/lib/paths"; export const dynamic = "force-dynamic"; @@ -38,6 +40,22 @@ export async function generateMetadata(): Promise<Metadata> { return { title: `Dashboard — ${settings.adminTitle}` }; } +// The first-run checklist's facts (only computed while there is no channel): +// each enabled local worker's model — its own, else the engine's default, as +// the doctor reads it — and whether the file is there; how many sites exist. +function firstRunState(paths: Paths): FirstRunState { + const settings = getSettings(); + const workers = settings.workers + .filter((w) => w.enabled && w.kind === "local") + .map((w) => { + const own = typeof w.config?.model === "string" ? w.config.model.trim() : ""; + const model = + own || (w.appId === "whisper-cpp" ? paths.whisperModel : w.appId === "parakeet" ? paths.parakeetModel : ""); + return { name: w.name || w.id, model, present: model !== "" && existsSync(model) }; + }); + return { workers, siteCount: listSiteIds(paths).length }; +} + function loadChangelog(): string | null { try { return readFileSync(getPaths().editorChangelogFile, "utf8"); @@ -131,6 +149,7 @@ export default async function Dashboard({ sync, channels, changelogSource, + firstRun: summary.rows.length === 0 ? firstRunState(paths) : null, }} /> );