From cd556f9c1f412d15985c61945bb3353b7808cd21 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 9 Jul 2026 10:19:03 -0400 Subject: [PATCH] feat(config): wire FEATURE_AUDIO_INGEST flag + lock audio-plan decisions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the Audio/Music/Podcast feature flag to the instance config so a deployer enables/disables it in one place like the other flags. Follows the exact FEATURE_NIP71_INGEST wiring: export in config/instance-config.js → re-export in js/config.js → DEFAULT_FLAGS + runtimeFlags snapshot + `export let` in js/constants.js. Defaults FALSE ("off = no trace") — only an explicit `true` lights it up; with it off nothing audio renders and the shipped audio guard keeps audio-only notes out of the video feeds. No consumers yet (build only). Also locks docs/audio-integration-plan.md decisions D1–D10 to the agreed recommendations (status → DECISIONS LOCKED). Verified: constants + config re-export FEATURE_AUDIO_INGEST === false by default. Lint + build clean. docs/audio-integration-plan.md, TODO #60. Co-Authored-By: Claude Opus 4.8 --- config/instance-config.js | 12 ++++++++++++ docs/audio-integration-plan.md | 23 ++++++++++++----------- js/config.js | 2 ++ js/constants.js | 11 +++++++++++ 4 files changed, 37 insertions(+), 11 deletions(-) diff --git a/config/instance-config.js b/config/instance-config.js index 1959fd2a..53f24d05 100644 --- a/config/instance-config.js +++ b/config/instance-config.js @@ -252,6 +252,18 @@ export const ALLOW_NSFW_CONTENT = false; */ export const FEATURE_NIP71_INGEST = true; +/** + * Whether this deployment enables the Audio / Music / Podcast experience + * (dedicated Audio player, sidebar tab, and the channel / "My Content" Audio + * tabs — see docs/audio-integration-plan.md and TODO #60). + * + * Defaults to `false` — "off = no trace": with it off, nothing audio renders and + * audio-only notes stay filtered out of the video feeds (current behavior). Flip + * to `true` to light up the Audio surfaces. Watch/ingest-first; a separate + * publish flag will gate uploading audio later. + */ +export const FEATURE_AUDIO_INGEST = false; + /** * Card liveness visibility policy — what a non-owner video card does while its * CDN/WebTorrent liveness probes are still running: diff --git a/docs/audio-integration-plan.md b/docs/audio-integration-plan.md index 407851d1..9d16c5a3 100644 --- a/docs/audio-integration-plan.md +++ b/docs/audio-integration-plan.md @@ -1,6 +1,7 @@ # Audio / Music / Podcasts — Dev Plan -Status: **DECISIONS NEEDED (D1–D10)** — no code yet. Sibling of the shorts +Status: **DECISIONS LOCKED (D1–D10, per recommendations, 2026-07-09)** — ready to +build; config flag `FEATURE_AUDIO_INGEST` wired (default off). Sibling of the shorts (`docs/shorts-plan.md`) and live (`docs/live-ingest-plan.md` / `docs/live-publish-plan.md`) plans; shares the media-category model with both. Tracks TODO #60. The near-term "keep audio out of the video feed" guard is @@ -31,7 +32,7 @@ flag-gated from day one (off = no trace), whitelist-scoped like shorts/live. ## Decisions needed -> **DECISION 1 — v1 source scope. 🔵 NEEDED.** +> **DECISION 1 — v1 source scope. ✅ LOCKED (= recommendation below).** > Which sources count as "audio" for the first release? > - **Option A — Native only:** kind 30078 with `imeta m audio/*` (+ a native > `t:audio` marker for new bitvid publishing). Lowest effort — reuses the whole @@ -42,12 +43,12 @@ flag-gated from day one (off = no trace), whitelist-scoped like shorts/live. > PodcastIndex GUIDs). Full podcast client. Biggest — its own phase. > _Recommendation: **A for v1**, B fast-follow, C as a later phase (D7)._ -> **DECISION 2 — Discovery / whitelist scope. 🔵 NEEDED.** +> **DECISION 2 — Discovery / whitelist scope. ✅ LOCKED (= recommendation below).** > Mirror shorts D1 / live D1: list audio only from **whitelisted/trusted authors**? > _Recommendation: **Yes** — same scope as video/shorts/live, one consistent trust > model. (No separate audio allowlist.)_ -> **DECISION 3 — Does audio appear in the main feed, or Audio-tab only? 🔵 NEEDED.** +> **DECISION 3 — Does audio appear in the main feed, or Audio-tab only? ✅ LOCKED (= recommendation below).** > - **Option A — Audio-tab only** (excluded from main/discovery video feeds). > Consistent with the shipped guard that already excludes audio from video feeds, > and with shorts D3 (Shorts-tab only). @@ -55,7 +56,7 @@ flag-gated from day one (off = no trace), whitelist-scoped like shorts/live. > _Recommendation: **Option A** — keeps the video feed clean; audio is a > deliberate destination, not an interruption._ -> **DECISION 4 — Player model. 🔵 NEEDED (biggest UX call).** +> **DECISION 4 — Player model. ✅ LOCKED: A for v1, architected toward B.** > - **Option A — Reuse the player modal in "audio mode":** detect audio → swap the > `