Skip to content

docs: hide bundles not yet migrated to Conductor from the docs site - #875

Open
martin-henz wants to merge 1 commit into
masterfrom
docs-visible-modules-allowlist
Open

docs: hide bundles not yet migrated to Conductor from the docs site#875
martin-henz wants to merge 1 commit into
masterfrom
docs-visible-modules-allowlist

Conversation

@martin-henz

Copy link
Copy Markdown
Member

Summary

Students browsing https://source-academy.github.io/modules/documentation/ currently see documentation for every bundle in src/bundles/*, including ones that haven't been migrated to Conductor yet and don't actually work correctly in the current Source Academy frontend - which is confusing.

This adds a simple, manually maintained mechanism to control what the docs site shows:

  • conductor-modules.json (repo root) - a plain JSON array of bundle directory names that are ready to be shown. Currently listed: the 12 bundles that already depend on @sourceacademy/conductor (binary_tree, csg, curve, matrix, midi, pix_n_flix, plotly, repeat, repl, rune, scrabble, sound).
  • filterDocsVisibleBundles (new export in lib/repotools/src/manifest.ts) - filters a resolved bundle set down to just the ones named in that file, throwing if the list references a bundle that doesn't exist (typo protection, since it's hand-edited).
  • Wired into getBuildHtmlCommand (lib/buildtools/src/commands/build.ts), which is what yarn buildtools html (part of yarn build:docs) runs before feeding bundles into TypeDoc.
  • Documented alongside the existing build/modules.json docs page (docs/src/modules/5-advanced/manifest.md), since that's the natural spot a contributor migrating a bundle would look. Explicitly calls out that this is unrelated to build/modules.json - it only affects what the docs site shows, not what's actually loadable in the Source Academy IDE.

Going forward, migrating a bundle to Conductor and adding its name to conductor-modules.json should happen in the same PR.

Test plan

  • yarn test passes for lib/repotools (new filterDocsVisibleBundles tests: keeps only allowlisted bundles, empty allowlist hides everything, throws on an unknown bundle name) and lib/buildtools (148 tests, unaffected)
  • yarn tsc passes for both packages
  • yarn eslint passes on all changed files
  • Sanity-checked filterDocsVisibleBundles against the real repo's current bundles: 12 visible (matches conductor-modules.json), 13 correctly hidden

🤖 Generated with Claude Code

https://claude.ai/code/session_01B3LRoXRMQ5ADeYMdVTChCZ

Bundles that haven't been migrated to Conductor don't actually work
correctly in the current Source Academy frontend, so listing them
on the documentation site alongside working ones just confuses
students. Add conductor-modules.json, a manually maintained
allowlist at the repo root, and filter the docs-HTML build
(getBuildHtmlCommand -> filterDocsVisibleBundles) against it before
handing bundles to TypeDoc.

This only affects the generated documentation site - build/modules.json
(what js-slang/the frontend uses to decide which modules are loadable
in the IDE) is untouched, so this is purely cosmetic/informational for
now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3LRoXRMQ5ADeYMdVTChCZ
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@martin-henz
martin-henz requested a review from leeyi45 August 2, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant