← Back to Pull requests

Add video support to the docs and embed the Discord Developers catalog #8604

Closed
unknown closed this pull request without merging on Sep 29, 2026 21:45 UTC
View on GitHub
unknown unknown commented on Sep 15, 2026 22:29 UTC
Author

Builds out YouTube support for the documentation and uses it to place videos from the Discord Developers channel on the pages they pair with, per the "Video Content in Documentation" plan.

Components
----------
snippets/youtube.jsx — YouTubeEmbed gains two opt-in props:

  • showDuration displays the video's running time under the player. The duration is read from the player itself over the enablejsapi postMessage channel (a "listening" handshake, then infoDelivery events), so there's no API key and no external script.

  • chapters takes the timestamp block pasted straight from a video description. Parsing is deliberately lenient about the formats descriptions use in the wild ("0:00 Title", "* 00:00 - Title", "- 1:02:03: Title"), and skips lines without a timestamp so a verbatim paste works. Chapters render as an overlay dropdown that floats above the page rather than pushing content down; picking one seeks the player and closes the panel, and the chapter matching the current playback position is highlighted.
  • Labels are normalized from the computed seconds rather than echoed back from the description, so an HH:MM:SS source renders as 0:00 / 1:26:10.

    snippets/youtubeplaylist.jsx + styles/youtubeplaylist.css — new

    YouTubePlaylistCarousel for an arbitrary playlist. Slides are thumbnail facades that swap in a real player on click, which keeps YouTube's pre-play chrome off the page and avoids booting a player per video on load. Includes scroll-snap paging with arrows, a subscribe CTA built from oEmbed channel data, and a one-hour localStorage cache that renders last-known data immediately and falls back to it if YouTube is unreachable. Playback pauses when another video starts, when the carousel moves, or when the tab is backgrounded (which covers "Watch on YouTube" opening a new tab).

    Content
    -------
    Videos are placed following the existing convention — no video gets its own heading, and embeds sit in the intro block or at the end of a section, always ahead of trailing Next Steps / Resources / Change Log sections.

    Videos over 5 minutes use showDuration, plus chapters where the description supplies timestamps; five long videos have none, so they show duration only and the dropdown degrades to nothing. Short videos use a plain embed. Chapter text was extracted from each description rather than retyped. The Community Invites chapters are trimmed at the colon, since that description writes each entry as "Short Title: full explanatory sentence."

    Also adds a featured videos carousel to the docs home page, a Learn More section with the Server 101 playlist on the community guide, showDuration on the two existing 10-minute Server 101 embeds, and a change log entry announcing all of the above.

    Diff: 344 lines (+258 / -86) across 4 files Reviewer: markmandel Review duration: 20116m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 344 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8604"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%