docs: hide bundles not yet migrated to Conductor from the docs site - #875
Open
martin-henz wants to merge 1 commit into
Open
docs: hide bundles not yet migrated to Conductor from the docs site#875martin-henz wants to merge 1 commit into
martin-henz wants to merge 1 commit into
Conversation
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
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
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 inlib/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).getBuildHtmlCommand(lib/buildtools/src/commands/build.ts), which is whatyarn buildtools html(part ofyarn build:docs) runs before feeding bundles into TypeDoc.build/modules.jsondocs 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 tobuild/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.jsonshould happen in the same PR.Test plan
yarn testpasses forlib/repotools(newfilterDocsVisibleBundlestests: keeps only allowlisted bundles, empty allowlist hides everything, throws on an unknown bundle name) andlib/buildtools(148 tests, unaffected)yarn tscpasses for both packagesyarn eslintpasses on all changed filesfilterDocsVisibleBundlesagainst the real repo's current bundles: 12 visible (matchesconductor-modules.json), 13 correctly hidden🤖 Generated with Claude Code
https://claude.ai/code/session_01B3LRoXRMQ5ADeYMdVTChCZ