Skip to content

Conversation

@dwgray
Copy link
Member

@dwgray dwgray commented Dec 4, 2025

Describe the PR

The changes I made to build the OTTP sidebar from the document structure are somewhat fragile by design - we want a consistent structure. But the only error was a log in the console and the absence of a useful OTP sidebar.

This change adds a CI test to verify the document structure. I looked at lighter-weight ways to do this at build time, but none worked because we’re pulling the document structure from various places, so we don’t have a verifiable structure until the build is complete. Running a test against the built site seems like the most reliable way to verify that the OTP sidebars will work.

Also fixed a couple of documents that the test caught.

Small replication

See documentation.

PR checklist

What kind of change does this PR introduce? (check at least one)

  • Bugfix 🐛 - fix(...)
  • Feature - feat(...)
  • ARIA accessibility - fix(...)
  • Documentation update - docs(...)
  • Other (please describe)

The PR fulfills these requirements:

  • Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied

Summary by CodeRabbit

  • New Features
    • Docs build and automated docs-structure validation added to CI; docs now support root-level pages and frontmatter title overrides.
  • Tests
    • New page-structure test validates generated docs headers for consistency.
  • Documentation
    • Minor docs formatting adjustments.
  • Chores
    • Lint/test scripts and local docs test tooling updated to include tests and CI runs.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 4, 2025 01:18
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Added docs build and page-structure validation to CI; introduced Vitest/happy-dom/Vite test tooling and configs for the docs app; extended VitePress auto-inject plugin to support root-level Markdown and frontmatter title; added a Vitest test that validates generated HTML header structure; removed a redundant H1 in one doc.

Changes

Cohort / File(s) Summary
CI / Docs Validation
.github/workflows/ci.yaml
Added "Build Docs" (pnpm --filter docs run build) and "Validate Docs Page Structure" (pnpm --filter docs run test:unit:ci) steps in the Build job; adjusted unit test step to exclude docs.
Docs test tooling & workspace
apps/docs/package.json, apps/docs/tsconfig.json, apps/docs/tsconfig.vitest.json, apps/docs/vite.config.mts, vitest.workspace.mjs
Added Vitest/happy-dom/vite devDeps and test scripts; added tsconfig.vitest.json; added Vite test config for docs; registered docs in Vitest workspace; updated tsconfig references.
VitePress plugin
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts
Extended frontmatter type to include optional title; added support for root-level *.md files alongside docs/*; adjusted path matching and header/title resolution to use `frontmatter.title
Page structure test
apps/docs/tests/page-structure.test.ts
New Vitest test using happy-dom to parse built HTML and validate header structure (ensures exactly one root header); discovers .html files under built dist, skips 404.html/index.html, and reports per-file failures.
Docs content tidy
apps/docs/src/docs/directives/BToggle.md
Removed the top-level H1 heading (formatting cleanup).
ESLint test globs
apps/docs/eslint.config.mjs
Included tests/**/*.test.* in the Vitest ESLint files array so test files are linted.
Package bump
packages/bootstrap-vue-next/package.json
Upgraded devDependency happy-dom to ^20.0.11.

Sequence Diagram(s)

sequenceDiagram
  participant CI as GitHub Actions CI
  participant BuildJob as Build job
  participant LibBuild as Library build
  participant DocsBuild as Docs build (pnpm)
  participant Dist as Built docs (dist/)
  participant Vitest as Vitest (happy-dom)
  participant Parser as HTML parser

  CI->>BuildJob: trigger Build job
  BuildJob->>LibBuild: build library
  BuildJob->>DocsBuild: pnpm --filter docs run build
  DocsBuild->>Dist: emit built HTML pages
  BuildJob->>Vitest: pnpm --filter docs run test:unit:ci
  Vitest->>Dist: read .html files
  Vitest->>Parser: parse HTML (happy-dom)
  Parser-->>Vitest: DOM & headers
  Vitest->>Vitest: validate single root header per page
  Vitest-->>BuildJob: pass/fail
  BuildJob-->>CI: job status
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to: apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (path matching, title fallback), apps/docs/tests/page-structure.test.ts (file discovery, header tree logic, exclusions), and test config wiring (apps/docs/vite.config.mts, tsconfig.vitest.json, vitest.workspace.mjs, apps/docs/package.json scripts).

Possibly related PRs

Suggested reviewers

  • VividLemon

Poem

🐇
I hopped through built pages, counting each head,
Found one root to crown — no extra spread.
With happy-dom I peeked inside the Tome,
CI hums softly as headings find home.
I nibble code crumbs and twitch my nose in glee. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: add ci test for document structure' clearly and concisely describes the main change: adding a CI test for validating document structure.
Description check ✅ Passed The description includes all required sections: a clear explanation of the problem and solution, mentions that documents were fixed, completes the PR checklist with appropriate selections, and confirms Conventional Commits compliance.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2980851 and e7e7257.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • apps/docs/package.json (2 hunks)
  • packages/bootstrap-vue-next/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: dwgray
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2891
File: apps/docs/.vitepress/plugins/auto-inject-doc-components.ts:106-130
Timestamp: 2025-10-28T03:37:33.172Z
Learning: In apps/docs/.vitepress/plugins/auto-inject-doc-components.ts, the documentation injection logic is intentionally simple and does not need to handle edge cases like partial presence of ComponentReference/imports, existing <script setup> blocks, or nested component directories. The codebase does not use these patterns and does not expect to support them.
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Always validate changes before committing: run `pnpm --filter bootstrap-vue-next run test:lint`, then `pnpm --filter bootstrap-vue-next run test:unit:ci`, then `pnpm --filter bootstrap-vue-next run build` to ensure linting, tests pass, and code is buildable
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Applies to packages/bootstrap-vue-next/src/components/**/*.vue : Edit component files in `packages/bootstrap-vue-next/src/components/` and test using `packages/bootstrap-vue-next/src/App.vue` with hot-reload via `pnpm --filter bootstrap-vue-next run dev`

Applied to files:

  • packages/bootstrap-vue-next/package.json
  • apps/docs/package.json
📚 Learning: 2025-08-19T14:23:46.775Z
Learnt from: xvaara
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2732
File: packages/bootstrap-vue-next/CHANGELOG.md:35-41
Timestamp: 2025-08-19T14:23:46.775Z
Learning: In the bootstrap-vue-next repository, CHANGELOG.md files (e.g., packages/bootstrap-vue-next/CHANGELOG.md) are autogenerated and should be ignored in reviews; do not propose edits for them.

Applied to files:

  • packages/bootstrap-vue-next/package.json
📚 Learning: 2025-09-30T23:57:21.526Z
Learnt from: dwgray
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2866
File: apps/docs/src/docs/components/demo/ModalModel.vue:11-15
Timestamp: 2025-09-30T23:57:21.526Z
Learning: The bootstrap-vue-next documentation project uses unplugin-vue-components to automatically resolve and import Vue components like BModal, BButton, etc. Explicit imports for these components in script sections are not required.

Applied to files:

  • packages/bootstrap-vue-next/package.json
📚 Learning: 2025-10-21T19:31:54.113Z
Learnt from: dwgray
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2882
File: apps/docs/src/docs/components/demo/PlaceholderWidth.vue:1-22
Timestamp: 2025-10-21T19:31:54.113Z
Learning: The bootstrap-vue-next project uses unplugin to automatically import components, so explicit imports in demo/documentation components are not needed.

Applied to files:

  • packages/bootstrap-vue-next/package.json
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Test component changes using the core package dev server at `http://localhost:5174` with `packages/bootstrap-vue-next/src/App.vue` as a test area, and test real-world usage with the playground app at `http://localhost:5173`

Applied to files:

  • packages/bootstrap-vue-next/package.json
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Always validate changes before committing: run `pnpm --filter bootstrap-vue-next run test:lint`, then `pnpm --filter bootstrap-vue-next run test:unit:ci`, then `pnpm --filter bootstrap-vue-next run build` to ensure linting, tests pass, and code is buildable

Applied to files:

  • packages/bootstrap-vue-next/package.json
  • apps/docs/package.json
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Docs build fails due to OpenCollective API calls (expected). Use `pnpm install --ignore-scripts` to skip problematic prepare scripts and filter builds to specific packages using `pnpm --filter bootstrap-vue-next run build` to avoid docs build failures

Applied to files:

  • apps/docs/package.json
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: NEVER CANCEL build or test commands - set timeouts to 60+ minutes. Individual command timings: `pnpm install --ignore-scripts --frozen-lockfile` (~2s), `pnpm --filter bootstrap-vue-next run build` (~27s), `pnpm --filter bootstrap-vue-next run test:unit:ci` (~40s), `pnpm --filter bootstrap-vue-next run test:lint` (~12s)

Applied to files:

  • apps/docs/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (3)
packages/bootstrap-vue-next/package.json (1)

185-185: Aligned happy-dom upgrade is appropriate.

The version bump from ^18.0.1 to ^20.0.11 aligns with the parallel upgrade in apps/docs/package.json and is compatible with Vitest. Vitest supports Happy DOM out of the box.

apps/docs/package.json (2)

12-16: Script changes align with new testing infrastructure.

The expansion of lint scope to include tests and addition of Vitest scripts are appropriate for the new unit testing setup. The test script now runs both linting and unit tests in CI mode, which is a solid practice.


37-37: Verify Vitest 3.1.5 compatibility with Vite 6.0.7.

Vitest 3.2 is required for Vite 7.0 support, and Vitest 3 is the first version of Vitest that supports Vite 6. However, Vite 6 introduced breaking changes in environment API handling that affect test resolution, and Vitest 3.1.5 (current version in package.json) predates the Vitest 3.2 release.

Consider upgrading to Vitest 3.2.0 or later to ensure proper Vite 6 support, especially if tests will be running in browser-like environments (happy-dom). The current combination (Vitest 3.1.5 + Vite 6.0.7) may encounter resolution or environment configuration issues.

Also applies to: 41-42


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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 adds automated CI testing to validate the document structure of built documentation pages, ensuring consistency required for the On-This-Page (OTP) sidebar generation. The changes include a new test suite that validates HTML output, updates to the auto-inject plugin to support frontmatter title overrides, and fixes for documents that failed validation.

Key Changes

  • Added Vitest test infrastructure to the docs app to validate page header structure
  • Created a comprehensive test that validates all built HTML pages have exactly one root header
  • Enhanced the auto-inject plugin to support frontmatter title field as an override
  • Fixed BToggle.md which had a duplicate header

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vitest.workspace.mjs Adds docs app to the Vitest workspace for test execution
pnpm-lock.yaml Auto-generated lockfile updates for new dependencies (happy-dom, vitest)
apps/docs/vite.config.mts New Vitest configuration for docs tests with happy-dom environment
apps/docs/tsconfig.vitest.json TypeScript configuration for test files
apps/docs/tsconfig.json References the new vitest TypeScript config
apps/docs/tests/page-structure.test.ts New test suite that validates page header structure matches runtime expectations
apps/docs/src/docs/directives/BToggle.md Removed duplicate h1 header (was causing validation failure)
apps/docs/package.json Added test scripts and dependencies (happy-dom, vitest, vite)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts Enhanced to support frontmatter title override and root-level markdown files
.github/workflows/ci.yaml Added docs page structure validation step to CI pipeline
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 4, 2025

  • bsvn-vite-ts

    npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next@2935
    
    npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next/@bootstrap-vue-next/nuxt@2935
    

commit: e7e7257

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/docs/vite.config.mts (1)

1-9: Consider using modern Vitest config import pattern.

The triple-slash reference works but is the older pattern. Vitest 1.x+ recommends importing from vitest/config for better type safety:

-/// <reference types="vitest" />
-
-import {defineConfig} from 'vite'
+import {defineConfig} from 'vitest/config'
 
 export default defineConfig({
   test: {
     environment: 'happy-dom',
     include: ['tests/**/*.test.ts'],
   },
 })
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bae3932 and 33e8544.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • .github/workflows/ci.yaml (1 hunks)
  • apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (3 hunks)
  • apps/docs/package.json (2 hunks)
  • apps/docs/src/docs/directives/BToggle.md (0 hunks)
  • apps/docs/tests/page-structure.test.ts (1 hunks)
  • apps/docs/tsconfig.json (1 hunks)
  • apps/docs/tsconfig.vitest.json (1 hunks)
  • apps/docs/vite.config.mts (1 hunks)
  • vitest.workspace.mjs (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/docs/src/docs/directives/BToggle.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use conventional commit format with prefixes like feat:, fix:, docs:, etc. for all commits

Files:

  • apps/docs/tests/page-structure.test.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Always validate changes before committing: run `pnpm --filter bootstrap-vue-next run test:lint`, then `pnpm --filter bootstrap-vue-next run test:unit:ci`, then `pnpm --filter bootstrap-vue-next run build` to ensure linting, tests pass, and code is buildable
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Always validate changes before committing: run `pnpm --filter bootstrap-vue-next run test:lint`, then `pnpm --filter bootstrap-vue-next run test:unit:ci`, then `pnpm --filter bootstrap-vue-next run build` to ensure linting, tests pass, and code is buildable

Applied to files:

  • apps/docs/package.json
  • apps/docs/tests/page-structure.test.ts
  • .github/workflows/ci.yaml
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Docs build fails due to OpenCollective API calls (expected). Use `pnpm install --ignore-scripts` to skip problematic prepare scripts and filter builds to specific packages using `pnpm --filter bootstrap-vue-next run build` to avoid docs build failures

Applied to files:

  • apps/docs/package.json
  • .github/workflows/ci.yaml
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: NEVER CANCEL build or test commands - set timeouts to 60+ minutes. Individual command timings: `pnpm install --ignore-scripts --frozen-lockfile` (~2s), `pnpm --filter bootstrap-vue-next run build` (~27s), `pnpm --filter bootstrap-vue-next run test:unit:ci` (~40s), `pnpm --filter bootstrap-vue-next run test:lint` (~12s)

Applied to files:

  • apps/docs/package.json
  • .github/workflows/ci.yaml
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Applies to packages/bootstrap-vue-next/src/components/**/*.vue : Edit component files in `packages/bootstrap-vue-next/src/components/` and test using `packages/bootstrap-vue-next/src/App.vue` with hot-reload via `pnpm --filter bootstrap-vue-next run dev`

Applied to files:

  • apps/docs/package.json
  • apps/docs/tsconfig.vitest.json
  • .github/workflows/ci.yaml
  • vitest.workspace.mjs
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Applies to packages/bootstrap-vue-next/src/components/**/*.spec.ts : Write tests for new components following existing test patterns in `.spec.ts` files

Applied to files:

  • apps/docs/tsconfig.vitest.json
  • apps/docs/vite.config.mts
  • apps/docs/tests/page-structure.test.ts
📚 Learning: 2025-10-28T03:37:33.172Z
Learnt from: dwgray
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2891
File: apps/docs/.vitepress/plugins/auto-inject-doc-components.ts:106-130
Timestamp: 2025-10-28T03:37:33.172Z
Learning: In apps/docs/.vitepress/plugins/auto-inject-doc-components.ts, the documentation injection logic is intentionally simple and does not need to handle edge cases like partial presence of ComponentReference/imports, existing <script setup> blocks, or nested component directories. The codebase does not use these patterns and does not expect to support them.

Applied to files:

  • apps/docs/tsconfig.vitest.json
  • apps/docs/tests/page-structure.test.ts
  • apps/docs/.vitepress/plugins/auto-inject-doc-components.ts
📚 Learning: 2025-08-19T23:30:52.911Z
Learnt from: dwgray
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2762
File: apps/docs/src/docs/components/tooltip.md:0-0
Timestamp: 2025-08-19T23:30:52.911Z
Learning: VitePress .data.ts files use build-time data loading where the file exports a default object with a load() function, and VitePress processes this at build time to make the loaded data available as a named export {data}. The correct import syntax is `import {data} from './file.data'`, not a default import, even though the .data.ts file itself uses export default.

Applied to files:

  • apps/docs/vite.config.mts
  • vitest.workspace.mjs
🧬 Code graph analysis (1)
apps/docs/tests/page-structure.test.ts (2)
apps/docs/eslint.config.mjs (1)
  • __dirname (7-7)
apps/docs/src/types/index.ts (1)
  • HeaderItem (104-104)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Agent
  • GitHub Check: build
🔇 Additional comments (9)
apps/docs/package.json (2)

14-16: LGTM! Test scripts follow project conventions.

The test script structure (test:unit, test:unit:ci, combined test) aligns well with the patterns used in other packages in this monorepo, as noted in the retrieved learnings.


37-42: Appropriate testing dependencies added.

The combination of vitest, vite, and happy-dom is well-suited for testing documentation structure in a lightweight DOM environment without needing a full browser.

apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (2)

64-70: Root-level matching is appropriately guarded by frontmatter check.

The rootMatch pattern is permissive but the frontmatter description check on line 105 ensures only intended documentation files are processed. This follows the intentionally simple design noted in past discussions.


109-110: Clean title resolution with frontmatter override.

The fallback chain (frontmatter.title || filenameToTitle(...)) provides flexibility for root-level files that may not follow the kebab-case naming convention while maintaining backward compatibility for existing docs.

apps/docs/tsconfig.json (1)

9-12: LGTM! Proper TypeScript project reference added.

The vitest tsconfig reference follows the existing project references pattern for the docs app.

apps/docs/tsconfig.vitest.json (1)

1-9: Verify test import style matches globals configuration.

The vitest/globals type is included in tsconfig.vitest.json, but verification requires checking whether globals: true is set in vite.config.mts. Ensure your tests either:

  1. Use explicit imports: import { describe, it, expect } from 'vitest', or
  2. Add globals: true to the test config if you prefer global APIs
vitest.workspace.mjs (1)

1-8: LGTM!

The workspace configuration correctly adds the docs app vite config, enabling the new page structure tests to run as part of the vitest workspace.

.github/workflows/ci.yaml (1)

52-54: LGTM!

The new CI step is correctly positioned after the build step, ensuring the docs are built before validating the page structure. The pnpm filter syntax correctly targets the docs package.

apps/docs/tests/page-structure.test.ts (1)

141-189: Well-structured test suite.

The test design is solid:

  • First test provides a clear error message when build is missing
  • Second test aggregates all validation failures for easier debugging
  • Skip patterns correctly exclude special pages
  • The 30s timeout is appropriate for processing multiple HTML files

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7e96d5 and 2980851.

📒 Files selected for processing (2)
  • .github/workflows/ci.yaml (2 hunks)
  • apps/docs/tests/page-structure.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use conventional commit format with prefixes like feat:, fix:, docs:, etc. for all commits

Files:

  • apps/docs/tests/page-structure.test.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Always validate changes before committing: run `pnpm --filter bootstrap-vue-next run test:lint`, then `pnpm --filter bootstrap-vue-next run test:unit:ci`, then `pnpm --filter bootstrap-vue-next run build` to ensure linting, tests pass, and code is buildable
Learnt from: dwgray
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2891
File: apps/docs/.vitepress/plugins/auto-inject-doc-components.ts:106-130
Timestamp: 2025-10-28T03:37:33.172Z
Learning: In apps/docs/.vitepress/plugins/auto-inject-doc-components.ts, the documentation injection logic is intentionally simple and does not need to handle edge cases like partial presence of ComponentReference/imports, existing <script setup> blocks, or nested component directories. The codebase does not use these patterns and does not expect to support them.
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Always validate changes before committing: run `pnpm --filter bootstrap-vue-next run test:lint`, then `pnpm --filter bootstrap-vue-next run test:unit:ci`, then `pnpm --filter bootstrap-vue-next run build` to ensure linting, tests pass, and code is buildable

Applied to files:

  • .github/workflows/ci.yaml
  • apps/docs/tests/page-structure.test.ts
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Docs build fails due to OpenCollective API calls (expected). Use `pnpm install --ignore-scripts` to skip problematic prepare scripts and filter builds to specific packages using `pnpm --filter bootstrap-vue-next run build` to avoid docs build failures

Applied to files:

  • .github/workflows/ci.yaml
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: NEVER CANCEL build or test commands - set timeouts to 60+ minutes. Individual command timings: `pnpm install --ignore-scripts --frozen-lockfile` (~2s), `pnpm --filter bootstrap-vue-next run build` (~27s), `pnpm --filter bootstrap-vue-next run test:unit:ci` (~40s), `pnpm --filter bootstrap-vue-next run test:lint` (~12s)

Applied to files:

  • .github/workflows/ci.yaml
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Applies to packages/bootstrap-vue-next/src/components/**/*.vue : Edit component files in `packages/bootstrap-vue-next/src/components/` and test using `packages/bootstrap-vue-next/src/App.vue` with hot-reload via `pnpm --filter bootstrap-vue-next run dev`

Applied to files:

  • .github/workflows/ci.yaml
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Use ONLY pnpm as the package manager (version 10.13.1), never npm or yarn. Always use `--frozen-lockfile` for reproducible installs and workspace filters `--filter <package-name>` for targeted operations

Applied to files:

  • .github/workflows/ci.yaml
📚 Learning: 2025-11-30T17:09:16.288Z
Learnt from: CR
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-30T17:09:16.288Z
Learning: Applies to packages/bootstrap-vue-next/src/components/**/*.spec.ts : Write tests for new components following existing test patterns in `.spec.ts` files

Applied to files:

  • apps/docs/tests/page-structure.test.ts
📚 Learning: 2025-10-28T03:37:33.172Z
Learnt from: dwgray
Repo: bootstrap-vue-next/bootstrap-vue-next PR: 2891
File: apps/docs/.vitepress/plugins/auto-inject-doc-components.ts:106-130
Timestamp: 2025-10-28T03:37:33.172Z
Learning: In apps/docs/.vitepress/plugins/auto-inject-doc-components.ts, the documentation injection logic is intentionally simple and does not need to handle edge cases like partial presence of ComponentReference/imports, existing <script setup> blocks, or nested component directories. The codebase does not use these patterns and does not expect to support them.

Applied to files:

  • apps/docs/tests/page-structure.test.ts
🧬 Code graph analysis (1)
apps/docs/tests/page-structure.test.ts (2)
apps/docs/eslint.config.mjs (1)
  • __dirname (7-7)
apps/docs/src/types/index.ts (1)
  • HeaderItem (104-104)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (6)
.github/workflows/ci.yaml (2)

52-56: LGTM! Past ordering concern resolved.

The docs build now correctly precedes validation, addressing the previous review comment. The workflow properly builds the docs artifacts before running structure validation tests.


136-136: LGTM! Proper test separation.

Excluding docs from the general unit test run is appropriate since docs tests are run separately in their own step with the required build artifacts.

apps/docs/tests/page-structure.test.ts (4)

1-11: LGTM! Appropriate setup.

Imports and directory configuration are correct. The __dirname pattern matches existing conventions in the docs codebase.


23-127: LGTM! Past cleanup concerns fully addressed.

The try-finally block ensures window.close() is always called, even when returning early at line 44. Previous review concerns about resource cleanup have been properly resolved.


132-146: LGTM! Standard recursive traversal.

The recursive HTML file finder follows standard patterns and is appropriate for the test context.


148-154: LGTM! Clear precondition check.

The directory existence test provides helpful guidance if the build hasn't been run, improving developer experience.

@dwgray dwgray requested a review from VividLemon December 4, 2025 20:11
Copy link
Member

@VividLemon VividLemon left a comment

Choose a reason for hiding this comment

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

Probably just make that upgrade the bot talked about, besides that looks fine

@VividLemon VividLemon merged commit 33a6903 into bootstrap-vue-next:main Dec 12, 2025
5 checks passed
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.

2 participants