Frontmatter
| id | 8065 |
| title | Enhance Source Code with Intent-Driven Documentation |
| state | Closed |
| labels | documentationairefactoring |
| assignees | tobiu |
| createdAt | Dec 9, 2025, 2:19 AM |
| updatedAt | Dec 9, 2025, 2:28 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8065 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 9, 2025, 2:28 AM |
Enhance Source Code with Intent-Driven Documentation
tobiu assigned to @tobiu on Dec 9, 2025, 2:26 AM

tobiu
Dec 9, 2025, 2:27 AM
Input from Gemini:
✦ Enhancement complete.
Documentation Updates:
src/code/LivePreview.mjs:
- Class: Documented the pluggable renderer architecture, dynamic imports, and component features.
loadRenderer: Explained the lazy-loading strategy and caching mechanism for performance.doRunSource: Detailed the execution orchestration (validation, cleanup, delegation, state update).
src/code/renderer/Base.mjs:
- Class: Defined its role as the abstract Strategy interface for polymorphism.
src/code/renderer/Neo.mjs:
- Class: Documented its role in executing Neo.mjs code dynamically.
render: Detailed the complex logic for import rewriting, environment-aware path adjustments, sandbox execution vianew Function, and namespace cache clearing for HMR.
src/code/renderer/Markdown.mjs:
- Class: Described the extended Markdown processing capabilities.
render: Explained the multi-pass pipeline (Extraction -> Highlighting -> Parsing -> Injection) required to handle mixed content (static markdown + dynamic components) and async highlighting.
apps/portal/view/learn/ContentComponent.mjs:
- Class: Clarified its responsibility as the documentation viewer and delegator to the Markdown renderer.
Intent-driven comments explaining the "why" behind key architectural decisions have been applied.
tobiu closed this issue on Dec 9, 2025, 2:28 AM
Apply the "Knowledge Base Enhancement Strategy" to the recently refactored and touched files to improve discoverability and AI context.
Files to Enhance:
src/code/LivePreview.mjssrc/code/renderer/Base.mjssrc/code/renderer/Neo.mjssrc/code/renderer/Markdown.mjsapps/portal/view/learn/ContentComponent.mjsAction Plan:
@summarytag and detailed descriptions.pluggable renderer,dynamic import,markdown parsing) to aid future queries.Goal: Ensure the new renderer architecture is well-documented for both human developers and future AI sessions.