LearnNewsExamplesServices
Frontmatter
id7899
titleClean up Docs App structure by filtering invalid AI modules and pruning empty folders
stateClosed
labels
bugdocumentationenhancement
assigneestobiu
createdAtNov 24, 2025, 2:53 PM
updatedAtNov 24, 2025, 2:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/7899
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 24, 2025, 2:54 PM

Clean up Docs App structure by filtering invalid AI modules and pruning empty folders

Closed v11.10.0 bugdocumentationenhancement
tobiu
tobiu commented on Nov 24, 2025, 2:53 PM

The integration of the ai/ directory into the JSDoc generation process introduced non-class modules (e.g., ai/examples) into the Docs app navigation tree. These items, lacking proper class definitions, caused the Docs app to crash or display empty pages because they often resulted in srcPath: null in the generated structure.json.

Goal

Refine the buildScripts/docs/jsdocx.mjs script to filter out these invalid items and ensure a clean navigation tree.

Implementation Details

  1. Filter Invalid Leaves: Modify jsdocx.mjs to exclude leaf nodes from neoStructure where srcPath is null. This effectively removes items that jsdocx could not resolve to a valid source file path for the Docs app (e.g., scripts in ai/examples).
  2. Prune Empty Folders: Implement a recursive pruning logic to remove directory nodes that become empty after their children are filtered out. This ensures the navigation tree doesn't contain empty folders like ai.examples.
  3. Preserve Roots: Ensure that top-level structure (like src and apps) is preserved if valid content exists.

Verification

  • Confirm that docs/output/structure.json no longer contains items like Neo.ai.examples.benchmark_scientific.
  • Confirm that valid classes like Neo.ai.mcp.server.github-workflow.Server are still present.
  • Verify the Docs app loads without errors when navigating the tree.
tobiu added the bug label on Nov 24, 2025, 2:53 PM
tobiu added the documentation label on Nov 24, 2025, 2:53 PM
tobiu added the enhancement label on Nov 24, 2025, 2:53 PM
tobiu assigned to @tobiu on Nov 24, 2025, 2:53 PM
tobiu referenced in commit c3d4434 - "Clean up Docs App structure by filtering invalid AI modules and pruning empty folders #7899" on Nov 24, 2025, 2:54 PM
tobiu closed this issue on Nov 24, 2025, 2:54 PM