Skip to content

Documentation dump tool (/docs/generated/ for LLMs and tools like Context7)#1214

Merged
hakenr merged 9 commits intomainfrom
doc-generator
Feb 15, 2026
Merged

Documentation dump tool (/docs/generated/ for LLMs and tools like Context7)#1214
hakenr merged 9 commits intomainfrom
doc-generator

Conversation

@hakenr
Copy link
Member

@hakenr hakenr commented Feb 15, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 15, 2026 01:22
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce4a26ad0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new console tool (RepoDumpGenerator) that generates markdown documentation for all HAVIT Blazor components and types into the docs/generated/ directory. To support this functionality, common code was refactored from the MCP project into shared services within the Havit.Blazor.Documentation project. Additionally, the PR fixes naming inconsistencies in the documentation catalog (InputsSettings → InputSettings, BootstrapTheme → BootstrapFlavor) and removes a debug Console.WriteLine statement.

Changes:

  • Added new RepoDumpGenerator console tool that dumps component and type documentation to markdown files
  • Refactored McpDocMarkdownRenderer and demo-related logic into shared services (DocMarkdownRenderer, ComponentDemosProvider) with corresponding interfaces
  • Fixed documentation catalog naming to match actual type names (InputSettings, BootstrapFlavor)

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Havit.Blazor.sln Added RepoDumpGenerator project to solution
Havit.Blazor.slnLaunch Added launch configuration for RepoDumpGenerator
Havit.Blazor.Documentation/Services/IDocMarkdownRenderer.cs New interface for markdown rendering service
Havit.Blazor.Documentation/Services/IComponentDemosProvider.cs New interface for component demo provider service
Havit.Blazor.Documentation/Services/DocumentationCatalogService.cs Fixed type names (InputSettings, BootstrapFlavor)
Havit.Blazor.Documentation/Services/DocMarkdownRenderer.cs Moved from MCP project, added includeMcpToolHint parameter
Havit.Blazor.Documentation/Services/ComponentDemosProvider.cs New shared implementation for accessing embedded demo resources
Havit.Blazor.Documentation/Services/ApiDocModelBuilder.cs Removed debug Console.WriteLine statement
Havit.Blazor.Documentation.RepoDumpGenerator/Services/DocDumpService.cs New service that generates markdown documentation for components and types
Havit.Blazor.Documentation.RepoDumpGenerator/Program.cs Entry point for the dump generator tool
Havit.Blazor.Documentation.RepoDumpGenerator/Havit.Blazor.Documentation.RepoDumpGenerator.csproj Project file for new console tool
Havit.Blazor.Documentation.Mcp/Tools/GetTypeDocTool.cs Updated to use shared IDocMarkdownRenderer interface
Havit.Blazor.Documentation.Mcp/Tools/GetComponentSamplesTool.cs Refactored to use shared ComponentDemosProvider
Havit.Blazor.Documentation.Mcp/Tools/GetComponentDocsTool.cs Refactored to use shared ComponentDemosProvider
Havit.Blazor.Documentation.Mcp/Program.cs Updated DI registrations to use shared services
Havit.Blazor.Documentation.Mcp/Havit.Blazor.Documentation.Mcp.csproj Added empty Services folder directive (cleanup needed)
Directory.Packages.props Added Microsoft.Extensions.Hosting package reference
Comments suppressed due to low confidence (1)

Havit.Blazor.Documentation/Services/DocMarkdownRenderer.cs:26

  • For consistency with the codebase .editorconfig preferences (csharp_style_var_when_type_is_apparent = false:silent) and the pattern used elsewhere in this file (line 16), use the explicit type StringBuilder instead of var when the type is apparent from the right-hand side.

Copy link
Contributor

Copilot AI commented Feb 15, 2026

@hakenr I've opened a new pull request, #1215, to work on those changes. Once the pull request is ready, I'll request review from you.

hakenr and others added 5 commits February 15, 2026 02:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ervice.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…csproj

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan

* Fix: Include anchor-only components (HxNavLink, HxSubmit) in dump generation

Co-authored-by: hakenr <12828888+hakenr@users.noreply.github.com>

* Add edge case handling for anchor parsing

Co-authored-by: hakenr <12828888+hakenr@users.noreply.github.com>

* Optimize anchor extraction to reduce allocations

Co-authored-by: hakenr <12828888+hakenr@users.noreply.github.com>

* Further optimize component name extraction to avoid allocations

Co-authored-by: hakenr <12828888+hakenr@users.noreply.github.com>

* Add comment documenting path extraction assumption

Co-authored-by: hakenr <12828888+hakenr@users.noreply.github.com>

* Apply review suggestions: avoid double scan and clarify comment

Co-authored-by: hakenr <12828888+hakenr@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hakenr <12828888+hakenr@users.noreply.github.com>

var componentDir = outputRoot;
Directory.CreateDirectory(componentDir);
var filePath = Path.Combine(componentDir, $"{componentName}.md");
// Demos
if (sampleNames.Count > 0)
{
var demosDir = Path.Combine(outputRoot, "demos", componentName);
if (content is not null)
{
var mdFileName = Path.ChangeExtension(sampleName, ".md");
var demoFilePath = Path.Combine(demosDir, mdFileName);
var model = _modelProvider.GetApiDocModel(type);
var markdown = _renderer.RenderTypeDoc(model);

var typesDir = Path.Combine(outputRoot, "types");

var typesDir = Path.Combine(outputRoot, "types");
Directory.CreateDirectory(typesDir);
var filePath = Path.Combine(typesDir, $"{typeName}.md");
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

Havit.Blazor.Documentation/Services/DocMarkdownRenderer.cs:26

  • Inconsistent use of 'var' keyword. Line 16 uses explicit type 'StringBuilder sb = new StringBuilder()' while line 26 uses 'var sb = new StringBuilder()'. The codebase should be consistent in one approach or the other for variable declarations where the type is apparent from the right-hand side.

@hakenr hakenr merged commit d921986 into main Feb 15, 2026
3 checks passed
@hakenr hakenr deleted the doc-generator branch February 15, 2026 02:07
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.

3 participants