Archilyzer · Source

archilyzer

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

commit 2f4615cc30c07f120b45bb3b068a9aa0b467cc59
parent afc918a01e571703f50a8f12ee3335a9ea39f5d6
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri,  9 Oct 2026 20:54:48 -0400

umtool: a slides URL that names a place becomes that place's slide (#s-<n>), as on the export site

ArticleShapes now rewrites `?rv=slides#<anchor>` (a switch from the text,
a link to a section) to the slide's own hash, replacing the entry, as
ReportReader does; it used to stay `#report-head` / `#later`.

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

Diffstat:
Mumtool/components/articles/ArticleShapes.tsx | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/umtool/components/articles/ArticleShapes.tsx b/umtool/components/articles/ArticleShapes.tsx @@ -1,6 +1,6 @@ "use client"; -import { useContext, useMemo, type ReactNode } from "react"; +import { useContext, useEffect, useMemo, type ReactNode } from "react"; import type { ReportPageView } from "yt-dlp-transcript-common/lib/report/views"; import { buildReportSlides, @@ -68,6 +68,14 @@ export default function ArticleShapes({ const slides = useMemo(() => buildReportSlides(view), [view]); const order = useMemo(() => reportPageAnchorIds(view), [view]); const counts = useMemo(() => openNotesBySlide(notes, slides), [notes, slides]); + const index = slideIndexForPlace(slides, place, order); + + // A slides URL that names a place, not a slide (a switch from the text, a + // link to a section): the slide for that place, in the URL — as the export + // site's reader does (ReportReader). + useEffect(() => { + if (place.view === "slides" && place.slide === null && slides.length > 0) go({ view: "slides", slide: index + 1 }, false); + }, [place, index, slides.length, go]); const host = useMemo<SlidesHost>( () => ({ @@ -105,7 +113,7 @@ export default function ArticleShapes({ <ReportSlides slides={slides} view={view} - index={slideIndexForPlace(slides, place, order)} + index={index} onIndex={(i) => go({ view: "slides", slide: i + 1 }, false)} onExit={(s) => onArticle(s.anchorId)} />