Skip to content

[Repo Assist] Split BuildCommand.fs into DocContent.fs, WatchServer.fs, and BuildCommand.fs#1029

Closed
github-actions[bot] wants to merge 4 commits intorepo-assist/feature-811-fsdocs-convert-2cf2c2973fcbd211from
repo-assist/fix-issue-1022-split-buildcommand-fs-7959b14d33fdd86a
Closed

[Repo Assist] Split BuildCommand.fs into DocContent.fs, WatchServer.fs, and BuildCommand.fs#1029
github-actions[bot] wants to merge 4 commits intorepo-assist/feature-811-fsdocs-convert-2cf2c2973fcbd211from
repo-assist/fix-issue-1022-split-buildcommand-fs-7959b14d33fdd86a

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Addresses #1022.

Summary

BuildCommand.fs was 2289 lines — too large to be a cohesive whole. This PR splits it into three focused files with clear responsibilities:

File Lines Responsibility
DocContent.fs ~795 DocContent type: discovers, prepares, and processes markdown/scripts/notebooks into static site output
WatchServer.fs ~500 Serve module: Suave WebSocket dev server for hot-reload watch mode, MIME type map
BuildCommand.fs ~1000 CoreBuildOptions, ConvertCommand, BuildCommand, WatchCommand: CLI verb types and entry points

The split follows the natural boundaries already in the original file (the DocContent type ends cleanly at line 795; the Serve module is bounded by its module Serve = declaration).

Changes

  • DocContent.fs — extracted verbatim; already had namespace + opens
  • WatchServer.fs — new file with minimal Suave/System opens + Serve module
  • BuildCommand.fs — trimmed to CoreBuildOptions and command verb types
  • fsdocs-tool.fsproj — added the two new files to the compilation order before BuildCommand.fs

No logic was changed; this is a pure structural refactor.

Test Status

Passed!  - Failed: 0, Passed: 7, Skipped: 0, Total: 7  (fsdocs-tool.Tests)
Build succeeded. 0 Errors.

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@b87234850bf9664d198f28a02df0f937d0447295. View source at https://github.com/githubnext/agentics/tree/b87234850bf9664d198f28a02df0f937d0447295/workflows/repo-assist.md.

…mmand.fs

BuildCommand.fs was 2289 lines long - too large to be a cohesive whole.
Split into three focused files:

- DocContent.fs (795 lines): DocContent type - converts markdown/scripts
  into static site output files
- WatchServer.fs (~500 lines): Serve module - Suave WebSocket dev server
  for hot-reload watch mode
- BuildCommand.fs (~1000 lines): CoreBuildOptions, ConvertCommand,
  BuildCommand, WatchCommand - CLI verb types and entry points

Addresses #1022. All 7 fsdocs-tool tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme
Copy link
Contributor

dsyme commented Feb 26, 2026

/repo-assist resolve the merge conflicts

- Keep the DocContent/WatchServer split structure from this PR
- Apply _menu template fix from merged main commit to DocContent.fs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

Commit pushed: 9aad6d6

Generated by Repo Assist

@github-actions
Copy link
Contributor Author

🤖 This is an automated response from Repo Assist.

I've resolved the merge conflicts. The conflict was in BuildCommand.fs — the base branch (repo-assist/feature-811-fsdocs-convert-2cf2c2973fcbd211) had been updated with a merge from main that still contained the original monolithic BuildCommand.fs, while this PR had already split it into DocContent.fs, WatchServer.fs, and a slimmed BuildCommand.fs.

Resolution:

Build verified locally: Build succeeded. 0 Errors.

Generated by Repo Assist for issue #1029

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@f2c5cf1e4af58e09a93ba0703c6bf084711b265f. View source at https://github.com/githubnext/agentics/tree/f2c5cf1e4af58e09a93ba0703c6bf084711b265f/workflows/repo-assist.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant