docs: Fugue Explorables — interactive, data-first documentation rehaul - #39
Merged
Conversation
Adds an Explorables section: six interactive pages in the tradition of Bret Victor's explorable explanations and 3Blue1Brown's visual math, built on a shared dependency-free canvas library (docs/fugue-viz.js, ~5k lines total, no CDNs, no build step, theme-aware, reduced-motion safe, seeded/reproducible). Every widget centers on live data: draggable observations with priors and posteriors updating in real time. Metropolis and HMC share one Bayesian linear regression as twin-panel views (data space with posterior spaghetti <-> parameter space with the sampler), with live split-R-hat/ESS implementing the 0.2.0 diagnostics math in JS. The monad page performs a Normal-mean model one effect at a time over a draggable dataset with its exact conjugate posterior. SMC shows the filtering distribution and mean band over its particle cloud. Also a 0.2.0 truth pass over all existing pages: fixed broken prob! snippets (raw for-loops the macro cannot parse), a duplicate-address hierarchical sample that would panic, a fabricated ScoreGivenTrace API, dead example references, wrong repo URLs, and stale memory- subsystem claims; every remaining snippet verified against src/. Fixes a live site bug: default-theme was "dark", which is not an mdbook theme name, so light-OS visitors got the light CSS fallback while the html class claimed dark; now navy, and the viz library detects dark/light from mdbook's --bg token instead of class names. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEAKcbnLVP8iSXub2Pqor2
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ages Every widget now autoplays when scrolled into view (pausing offscreen; reduced-motion gets a rich pre-rendered frame, never an empty axis) and heroes pre-warm so first paint already shows a running system. Adds docs/viz/inline.js: ten parameterized ambient micro-widgets (dist-strip, posterior-morph, trace-ticker, rhat-spark, shrinkage, regression-mini, mixture-resp, logistic-boundary, elbo-climb, abc-eps) with real math inside (split-R-hat and ESS ported from src/inference/diagnostics.rs, EM responsibilities, conjugate updates), embedded at the point of discussion across ~20 pages — including a deliberately unconverged rhat-spark on debugging-models and a live partial-pooling shrinkage widget on hierarchical-models. Removes all "new in 0.2.0"-style callouts (13 sites incl. the distributions widget's selector group) — version history lives in the CHANGELOG, not the docs. Browser-verified: all 25 widget-bearing pages animate on arrival, zero console errors, zero >50ms long tasks during ambient play on the busiest pages, reduced-motion renders rich static frames (fixed a resize race that blanked paused micro-widgets). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEAKcbnLVP8iSXub2Pqor2
Fixes the root cause of mobile bugginess: .fv-canvas set touch-action: none on EVERY canvas, so thumb swipes over any figure ate page scroll. Canvases now default to pan-y; full gesture capture is opt-in via a shared FV.drag manager (pointer capture, claims the gesture only when the touch actually hits a draggable, >=22px hit inflation on coarse pointers, grab halo). Killed the same class in inline.js (unconditional preventDefault on touchmove) and in every hero's hand-rolled drag code; monad's machinery strip no longer steals scroll swipes as Steps; flash decay is time-based; layouts audited at 390px and 320px. Adds docs/viz/minis.js — eight page-support figures woven into the explorables' explanation sections: autocorrelation decay and a live sigma-sweep on Metropolis, the double-well momentum-vs-random-walk strip and a divergence-cliff scatter on HMC, an animated bind-chain on the monad page, sequential-update small multiples on Anatomy, an ESS timeline on SMC, and a natural-return-types flow on Distributions. Mobile-verified via emulated 390x844 touch contexts with CDP touch events: swipe-over-widget scrolls the page, point-drags move points without scrolling, zero console errors, zero >50ms long tasks; full desktop regression green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEAKcbnLVP8iSXub2Pqor2
…isibly converge Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB
…ink) Starts at ±3.4 stationary SDs with thin warmup threads (SD 0.32), a held separated phase, then a smoothstep funnel onto the shared band. Before, starts ±2.2 with SD 0.65 meant the merged band spanned nearly the same pixels as the separated chains — nothing visibly converged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB
This was referenced Jul 21, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fugue Explorables — an interactive, data-first docs rehaul
A new Explorables section explorable-explanations grammar with visual math language, plus a full 0.2.0 truth pass over every existing page.
The design system
The six pages
Content truth pass (all existing pages)
Five reviewer agents verified every code snippet against
src/andexamples/. Fixed: brokenfor-loop-in-prob!snippets (the macro can't parse them), a duplicate-address hierarchical sample that panics at runtime, a fabricatedScoreGivenTrace::new().score()API, deadgaussian_meanexample references, wrong repo URLs, stale memory-subsystem claims, and missing 0.2.0 coverage (HMC in the architecture diagram, i64 natural return type, normalized ESS note).Site bug fixed
default-theme = "dark"is not a valid mdbook theme name — light-OS visitors silently got light CSS while<html class="dark">claimed otherwise. Nownavy(+preferred-dark-theme), and the viz library detects dark/light from mdbook's own--bgtoken rather than trusting class names.Verification
mdbook buildclean;node --checkon all 7 JS files; distribution math spot-checked against known values (17 checks).src/(adaptive_mcmc_chain, hmc_chain, ReplayHandler fields, Model enum variants, trampoline shape…).🤖 Generated with Claude Code
https://claude.ai/code/session_01DEAKcbnLVP8iSXub2Pqor2