mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 11:07:01 +01:00
* feat(channels): podcasts in the follow loop, a leak gate for the packs, and French recorded as the next product Podcasts. A podcast is RSS with an audio enclosure per episode — the same shape as a channel's Atom feed — so the same sweep reads it (lib/channels/rss.ts, source.ts: one Source/Item shape both platforms project onto). A pasted publisher page resolves to its feed through the page's autodiscovery link, an Apple Podcasts link through Apple's keyless lookup; Spotify publishes no feed and the form says so. Every podcast and YouTube row on /listen carries «Folgen», and the channels page suggests the register's podcasts first. An episode plays in the browser's own <audio> element (seek, back five seconds, 0.75× with pitch kept). Its transcript is the publisher's where the feed links one (SRT, WebVTT, the namespace's JSON); otherwise Heidi transcribes the opening minutes herself with the bridge recogniser — the first six megabytes of the enclosure by a Range request, once per episode, shared, labelled as automatic with how far it reaches — and only when the pack trusts a recogniser for the bridge and the register does not call the source dialect, where the recogniser would translate rather than transcribe (§8). Migration 0009 adds kind, feed_url, spoken and image_url to channels and the enclosure columns to items. The leak gate. HEIDI.md's house rule — nothing outside the packs names the variety — now has lib/variety/leak.test.ts behind it: every string literal in lib/ outside the packs, the seams, the dictionaries, the register and the deployment's own config is checked, and the count per file is pinned to a baseline that may only fall. The baseline is the to-do list for the next product. French next. HEIDI.md §4 records the decision (French for Romandie first, Ukrainian after, the French product not named Heidi) and the six-step recipe that makes "now build it" a command: a pack, two seams, the UI languages, the deployment's own facts, the leak baseline, a repo. The roadmap carries it in both languages and ROADMAP.md. Checked signed in, on a 390px viewport, against a local Postgres: sign-up, follow a podcast (Echo der Zeit, page → feed) and a channel (@srfnews), the lists, an episode, a video, settings. No overflow, no console errors. 1207 tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKRxpcVWoZwtg6Gfr9m6Rb * fix(listen): two rows that clipped at 320px in Russian The layout audit (`pnpm run audit:responsive`, de/fr/ru × 320/360/390 × light/dark, 594 renders) found two, both on /listen in Russian at 320px, both the same shape: a word wider than the column the button beside it left. - The «Follow channels» card put its title and «To your channels →» in one row; «Подписаться» alone was wider than the 90px the arrow left. The card stacks below `sm` and goes back to one row from there. - A source row's name sits in a two-column header beside «Folgen»; with the Russian button the name's column is 142px and «Wissenschaftsmagazin» is 177px. The name may now break inside a word, but only when the word alone is wider than the column (`wrap-anywhere`; `break-words` leaves a flex item's minimum at the whole word). After the change the same 594 renders measure 0 with overflow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKRxpcVWoZwtg6Gfr9m6Rb * fix(auth): take accountkit 0.5.2, so signed-in pages see who is signed in The signed-in walkthrough found every server component drawing the signed-out state: accountkit's getSession() returned better-auth's raw user, without the actorId Heidi's pages key on, while the API routes, going through requireUser(), had it. The dashboard and «Your channels» asked you to sign in while the follow itself worked. bitbaum/accountkit#11 (v0.5.2) gives both readers one path. This pins it and records the fix in the changelog. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKRxpcVWoZwtg6Gfr9m6Rb --------- Co-authored-by: Claude <noreply@anthropic.com>
51 lines
1.7 KiB
TypeScript
51 lines
1.7 KiB
TypeScript
/**
|
|
* The one shape every followable thing has, whichever platform it is on.
|
|
*
|
|
* A YouTube channel and a podcast feed both publish items with a date, a
|
|
* title and something to play; the sweep, the store, the lists and the
|
|
* lesson read THIS and never the platform's own shape. `youtube.ts` and
|
|
* `rss.ts` each project their document onto it (`remote.ts`), which is the
|
|
* whole seam: adding a third platform is a parser and a projection.
|
|
*/
|
|
export type SourceKind = "youtube" | "podcast";
|
|
|
|
export type Source = {
|
|
/** `UC…` for YouTube, `f…` for a feed — `rss.ts`. */
|
|
id: string;
|
|
kind: SourceKind;
|
|
name: string;
|
|
/** YouTube's `@handle`, when the channel was added by one. */
|
|
handle: string | null;
|
|
/** The page a person opens: the channel, or the publisher's show page. */
|
|
url: string;
|
|
/** What the sweep reads. */
|
|
feedUrl: string;
|
|
/** The show's artwork; null for a YouTube channel. */
|
|
imageUrl: string | null;
|
|
};
|
|
|
|
export type Item = {
|
|
/** A YouTube video id, or `e…` for an episode. */
|
|
id: string;
|
|
title: string;
|
|
/** ISO 8601. */
|
|
publishedAt: string;
|
|
thumbnailUrl: string | null;
|
|
description: string | null;
|
|
/** The episode's audio; null for a YouTube video, which the iframe plays. */
|
|
mediaUrl: string | null;
|
|
mediaType: string | null;
|
|
durationSeconds: number | null;
|
|
/** A transcript the publisher linked, and its MIME type. */
|
|
transcript: { url: string; type: string } | null;
|
|
};
|
|
|
|
export type SourceFeed = { source: Source; items: Item[] };
|
|
|
|
/** What the register says is spoken on a source, when it lists it. */
|
|
export type Spoken = "dialect" | "standard" | "mixed";
|
|
|
|
export function isSpoken(value: unknown): value is Spoken {
|
|
return value === "dialect" || value === "standard" || value === "mixed";
|
|
}
|