feat(docs): implement documentation build and database workflow with … - #1769
Merged
Conversation
…incremental support
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the Ignite UI documentation database build pipeline in packages/igniteui-mcp/igniteui-doc-mcp by adding a regression test, improving DB compaction behavior, and introducing a manual GitHub Actions workflow to rebuild the committed docs DB safely.
Changes:
- Add a Jasmine regression spec that validates committed docs DB integrity, per-framework counts, and FTS consistency.
- Harden DB build behavior by vacuuming inherited DB files to avoid committing bloated/free-page-heavy DBs.
- Add a workflow + composite action to rebuild per-framework docs sequentially (rate-limit friendly), assemble a single DB, and open a PR with the updated DB/baselines.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/unit/docs-db-counts-spec.ts | New Jasmine spec validating committed docs DB counts, integrity, and FTS behavior. |
| packages/igniteui-mcp/igniteui-doc-mcp/switch-submodules.sh | New helper script to move docs submodules to a target branch during workflow runs. |
| packages/igniteui-mcp/igniteui-doc-mcp/scripts/restore-docs-final.ts | New script to restore dist/docs_final (and optional toc stubs) from the committed DB for clean incremental runs. |
| packages/igniteui-mcp/igniteui-doc-mcp/scripts/compress-angular-docs.ts | Allow compression model override via COMPRESS_MODEL. |
| packages/igniteui-mcp/igniteui-doc-mcp/scripts/compress-react-docs.ts | Allow compression model override via COMPRESS_MODEL. |
| packages/igniteui-mcp/igniteui-doc-mcp/scripts/compress-blazor-docs.ts | Allow compression model override via COMPRESS_MODEL. |
| packages/igniteui-mcp/igniteui-doc-mcp/scripts/compress-wc-docs.ts | Allow compression model override via COMPRESS_MODEL. |
| packages/igniteui-mcp/igniteui-doc-mcp/scripts/build-db.ts | Run VACUUM only when rebuilding over an existing DB file to compact it before committing. |
| .github/workflows/build-docs-db.yml | New manual workflow to rebuild docs DB end-to-end and open a PR with updated artifacts. |
| .github/actions/build-framework-docs/action.yml | New composite action to build/compress a single framework and upload artifacts for assembly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…iteUI/igniteui-cli into dkalinov/mcp-db-git-workflow
kdinev
approved these changes
Aug 6, 2026
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.
Description
Hardens the documentation database build after a partial DB (112 documents instead of 1232) shipped on master unnoticed.
build-db.tsnow runsVACUUM, but only when the DB file already existed before the build.DROP/DELETEfrees pages without shrinking the file, which left the committed DB 90% empty space (33 MB holding 1.8 MB of content). Rebuilding over that file now yields 25 MB with zero free pages.spec/unit/docs-db-counts-spec.tsasserts per-framework document counts, integrity and FTS consistency against the committed DB. Runs in the existing jasmine suite, so it gates CI with no workflow change. Verified to fail against both historical failure modes (an angular-only DB and a 90%-truncated one).restore-docs-final.ts(rebuilds the compressed docs from the committed DB so incremental runs work on a clean checkout), aCOMPRESS_MODELenv override for the compression model, andswitch-submodules.shis now tracked.The DB binary changes in size only — the same 1232 documents, recompacted.
Related Issue
Closes #
Type of Change
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context
Verified locally:
VACUUMover the historical bloated file: 33,764 KB → 25,060 KB,freelist_count = 0, 1232 documents intact.restore-docs-final.tsround-trips byte-identically across all 1232 documents.The full
npm run test/npm run build/npm run lintboxes are left unchecked — only the new spec and its lint were run locally.The workflow itself can only be exercised by dispatching it. Suggested first run:
frameworks: angular,mode: incremental, to validate the chain cheaply before a full rebuild. It requires anOPENAI_API_KEYrepository secret.