Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Dec 24, 2025

close CITIC2-546

Summary by CodeRabbit

  • New Features

    • Manual exporting of API documents.
    • LLMS option enabled for static site generation.
  • Dependencies

    • Updated several development and runtime packages to newer minor/patch versions.
  • Bug Fixes

    • Refined API-route exclusion during exports to respect explicit include lists.
    • Ensure page frontmatter defaults to an object to avoid render issues.
    • Improved login route detection across varied file setups.
  • Style

    • Removed an explicit min-height override from the documentation layout.

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

Copilot AI review requested due to automatic review settings December 24, 2025 03:33
@changeset-bot
Copy link

changeset-bot bot commented Dec 24, 2025

🦋 Changeset detected

Latest commit: e7aebe7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alauda/doom Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 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

Adds a changeset for a patch bump and manual API export; bumps multiple dependencies; narrows auto-sidebar API-route exclusion when exporting; removes plugin-llms and enables llms in SSG config; defaults frontmatter in SiteOverrides; removes a doc-container print min-height; adds ESLint disables; and comments out Node 20 in CI matrix.

Changes

Cohort / File(s) Summary
Changeset Documentation
.changeset/smooth-bobcats-admire.md
New changeset recording a patch bump for @alauda/doom and a feature for manual API document exporting.
Root package manifest
package.json
DevDependency bump: @swc/core ^1.15.4^1.15.7.
Package manifests
packages/doom/package.json
Multiple dependency updates (rspress rc.2 → rc.3 group, openai ^6.10.0 → ^6.15.0, @eslint-react/eslint-plugin ^2.3.13 → ^2.4.0, typescript-eslint ^8.49.0 → ^8.50.1); removed @rspress/plugin-llms.
Sidebar plugin logic
packages/doom/src/plugins/auto-sidebar/index.ts
Tightened exclusion: APIS_ROUTES are excluded from sidebar only when export_ is true AND none of onlyIncludeRoutes start with apis/ (previous behavior excluded whenever export_ was truthy).
Walk linting tweak
packages/doom/src/plugins/auto-sidebar/walk.ts
Added ESLint disable comments above default type = 'file' assignments (no behavioral change).
Site overrides
packages/doom/src/global/SiteOverrides/index.tsx
Added frontmatter = {} default in destructuring with an ESLint suppression to ensure frontmatter is an object when undefined.
SSG config
packages/doom/src/cli/load-config.ts
Removed pluginLlms import/usage and set llms: true in SSG config (enable LLMS via config instead of standalone plugin).
Global plugin login path
packages/doom/src/plugins/global/index.ts
Switched to dynamic detection of login/index{.js,.tsx} by probing extensions and choosing the first existing file (loginPath may be undefined if none found).
Print styling
packages/doom/styles/global.scss
Removed min-height: unset; (and its comment) from .doom-doc-layout__doc-container (print-related style change).
CI matrix
.github/workflows/ci.yml
Commented out Node.js 20 entry in the GitHub Actions matrix (effectively removing 20 from active test matrix).

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

feature, dependencies

Poem

🐰 I hopped through diffs with whiskers bright,
Changed exports, styles, and CI by starlight,
Sidebars trimmed and frontmatter snug,
LLMS awake — I gave it a hug,
🥕 Docs exported, ready for flight!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main feature: manual exporting of API documents, which aligns with changes to the CLI config, sidebar exclusion logic, and global plugin for handling login paths—all supporting API documentation export functionality.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/export_apis

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.

Signed-off-by: JounQin <admin@1stg.me>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 24, 2025

Open in StackBlitz

yarn add https://pkg.pr.new/@alauda/doom@227.tgz
yarn add https://pkg.pr.new/@alauda/doom-export@227.tgz

commit: e7aebe7

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 support for exporting API documents manually by allowing selective inclusion of API routes when the export mode is enabled. The changes include a conditional check to prevent automatic exclusion of API routes when they are explicitly included in the onlyIncludeRoutes configuration.

Key changes:

  • Modified the auto-sidebar plugin to conditionally exclude API routes based on whether they are explicitly included
  • Updated multiple dependencies (rspress, typescript-eslint, openai, and other packages)
  • Removed a CSS workaround that was addressing a previously fixed rspress issue

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/doom/src/plugins/auto-sidebar/index.ts Added conditional logic to check if API routes should be excluded during export based on onlyIncludeRoutes configuration
packages/doom/styles/global.scss Removed CSS workaround (min-height: unset) that was previously needed for rspress issue #2909
packages/doom/package.json Updated dependencies: @RsPress packages to 2.0.0-rc.3, @eslint-react to 2.4.0, openai to 6.15.0, typescript-eslint to 8.50.1
package.json Updated @swc/core to 1.15.7
yarn.lock Lockfile updates corresponding to all dependency version bumps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@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: 0

🧹 Nitpick comments (1)
.changeset/smooth-bobcats-admire.md (1)

1-5: Consider using minor version bump for new features.

The changeset specifies a patch version bump, but the change introduces a new feature ("support exporting APIs documents manually"). Per semantic versioning conventions, new features typically warrant a minor version bump.

Suggested adjustment
 ---
-"@alauda/doom": patch
+"@alauda/doom": minor
 ---
 
 feat: support exporting APIs documents manually
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46f5749 and 6752caf.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • .changeset/smooth-bobcats-admire.md
  • package.json
  • packages/doom/package.json
  • packages/doom/src/plugins/auto-sidebar/index.ts
  • packages/doom/styles/global.scss
💤 Files with no reviewable changes (1)
  • packages/doom/styles/global.scss
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,ts,tsx,jsx,json,yml,yaml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Format code with Prettier according to the project's Prettier configuration

Files:

  • packages/doom/package.json
  • packages/doom/src/plugins/auto-sidebar/index.ts
  • package.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript strict mode for type safety

Files:

  • packages/doom/src/plugins/auto-sidebar/index.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow ESLint rules defined in eslint.config.js

Files:

  • packages/doom/src/plugins/auto-sidebar/index.ts
🧠 Learnings (10)
📓 Common learnings
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.
Learnt from: CR
Repo: alauda/doom PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T10:50:06.727Z
Learning: Organize code in monorepo structure with workspaces: main tool in packages/doom/, export functionality in packages/export/, documentation in docs/, and test documentation in fixture-docs/
📚 Learning: 2025-05-26T09:09:21.339Z
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.

Applied to files:

  • packages/doom/package.json
  • .changeset/smooth-bobcats-admire.md
📚 Learning: 2025-05-26T09:09:21.339Z
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: JounQin has mentioned multiple times that the alauda/doom project uses yarn v4, and there are no ESLint import resolution errors for rspress/core subpath imports.

Applied to files:

  • packages/doom/package.json
📚 Learning: 2025-06-06T07:08:55.881Z
Learnt from: JounQin
Repo: alauda/doom PR: 69
File: package.json:101-101
Timestamp: 2025-06-06T07:08:55.881Z
Learning: When a package has peer dependencies that require TypeScript (like `eslint-react/eslint-plugin`), TypeScript should be moved from devDependencies to dependencies to satisfy the peer dependency requirement.

Applied to files:

  • packages/doom/package.json
📚 Learning: 2025-06-09T03:10:41.010Z
Learnt from: JounQin
Repo: alauda/doom PR: 75
File: src/cli/load-config.ts:4-7
Timestamp: 2025-06-09T03:10:41.010Z
Learning: The alauda/doom project uses yarn v4 as the package manager, not npm. Always reference yarn commands when suggesting package management operations.

Applied to files:

  • packages/doom/package.json
  • .changeset/smooth-bobcats-admire.md
📚 Learning: 2025-05-26T08:59:41.491Z
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T08:59:41.491Z
Learning: In rspress/core v2.0.0-beta.7, the '/theme' export is available in the package exports field as `"./theme": { "default": "./theme.ts" }`, so imports like `import { Badge, Button } from 'rspress/core/theme'` are valid even if ESLint shows resolution errors.

Applied to files:

  • packages/doom/package.json
📚 Learning: 2025-05-29T16:25:28.086Z
Learnt from: JounQin
Repo: alauda/doom PR: 40
File: src/plugins/sitemap/index.ts:7-7
Timestamp: 2025-05-29T16:25:28.086Z
Learning: In rspress/shared v2.0.0-beta.8, the '/logger' export is available in the package exports field, so imports like `import { logger } from 'rspress/shared/logger'` are valid even if ESLint shows resolution errors. This is used throughout the codebase in files like src/cli/translate.ts, src/cli/load-config.ts, src/utils/git.ts, and src/plugins/sitemap/index.ts.

Applied to files:

  • packages/doom/package.json
📚 Learning: 2025-12-15T10:50:06.727Z
Learnt from: CR
Repo: alauda/doom PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T10:50:06.727Z
Learning: Applies to **/*.{js,ts,tsx,jsx} : Follow ESLint rules defined in eslint.config.js

Applied to files:

  • packages/doom/package.json
📚 Learning: 2025-12-15T10:50:06.727Z
Learnt from: CR
Repo: alauda/doom PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T10:50:06.727Z
Learning: Maintain Node.js version 20.19.0 or higher for project setup

Applied to files:

  • package.json
📚 Learning: 2025-12-15T10:50:06.727Z
Learnt from: CR
Repo: alauda/doom PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T10:50:06.727Z
Learning: Organize code in monorepo structure with workspaces: main tool in packages/doom/, export functionality in packages/export/, documentation in docs/, and test documentation in fixture-docs/

Applied to files:

  • .changeset/smooth-bobcats-admire.md
⏰ 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). (4)
  • GitHub Check: publish
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
🔇 Additional comments (4)
packages/doom/src/plugins/auto-sidebar/index.ts (1)

228-230: LGTM! Well-refined exclusion logic.

The updated condition correctly excludes APIS_ROUTES from the sidebar only when exporting and when no API routes are explicitly included via onlyIncludeRoutes. This enables selective manual exporting of API documents as described in the PR objectives.

package.json (1)

38-38: No issues found. Version 1.15.7 is valid (latest on npm) and has no known security advisories.

packages/doom/package.json (2)

52-56: Fix invalid rspress package versions—v2.0.0-rc.3 does not exist on npm.

The rspress packages are pinned to version 2.0.0-rc.3, which is not published on npm. The latest published version of @rspress/core is 1.45.6. Update all five rspress packages (@rspress/core, @rspress/plugin-algolia, @rspress/plugin-llms, @rspress/plugin-sitemap, @rspress/shared) to valid, published versions to resolve installation failures.

⛔ Skipped due to learnings
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: JounQin has mentioned multiple times that the alauda/doom project uses yarn v4, and there are no ESLint import resolution errors for rspress/core subpath imports.
Learnt from: JounQin
Repo: alauda/doom PR: 40
File: src/plugins/sitemap/index.ts:7-7
Timestamp: 2025-05-29T16:25:28.086Z
Learning: In rspress/shared v2.0.0-beta.8, the '/logger' export is available in the package exports field, so imports like `import { logger } from 'rspress/shared/logger'` are valid even if ESLint shows resolution errors. This is used throughout the codebase in files like src/cli/translate.ts, src/cli/load-config.ts, src/utils/git.ts, and src/plugins/sitemap/index.ts.
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T08:59:41.491Z
Learning: In rspress/core v2.0.0-beta.7, the '/theme' export is available in the package exports field as `"./theme": { "default": "./theme.ts" }`, so imports like `import { Badge, Button } from 'rspress/core/theme'` are valid even if ESLint shows resolution errors.
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.

45-45: All three dependencies are published and available on npm with no known security vulnerabilities detected: @eslint-react/eslint-plugin@2.4.0, openai@6.15.0, and typescript-eslint@8.50.1. JSON formatting is correct per Prettier standards.

Copy link

@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: 0

🧹 Nitpick comments (2)
packages/doom/src/plugins/auto-sidebar/walk.ts (1)

247-248: Consider verifying whether the default assignment is truly necessary.

The ESLint rule @typescript-eslint/no-useless-default-assignment indicates that the default value type = 'file' may be redundant according to TypeScript's type system. While disabling the rule suggests this default provides runtime safety, consider:

  1. Verifying whether metaItem.type can actually be undefined at runtime
  2. If the default is necessary, updating the type definitions to reflect this requirement
  3. If the default is truly useless, removing it instead of disabling the rule

The same pattern appears in another file (SiteOverrides), suggesting this might be a systematic issue worth addressing.

🔍 Verify if the default is necessary
#!/bin/bash
# Check the SideMeta type definition to understand if type can be undefined
ast-grep --pattern 'type SideMeta = $$$'
packages/doom/src/global/SiteOverrides/index.tsx (1)

42-43: Consider verifying whether the default assignment is truly necessary.

The ESLint rule @typescript-eslint/no-useless-default-assignment flags the default value frontmatter = {} as potentially redundant. While the default prevents runtime errors when accessing frontmatter.title and frontmatter.titleSuffix (lines 56, 62, 65), consider:

  1. Checking whether page.frontmatter can actually be undefined at runtime
  2. If it can be undefined, updating the type definitions to make this explicit
  3. If the default is unnecessary, removing it instead of disabling the lint rule
  4. Alternatively, using optional chaining (frontmatter?.title) if frontmatter can be undefined

This pattern also appears in walk.ts, suggesting a systematic review of these defaults across the codebase might be beneficial.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6752caf and f45e587.

📒 Files selected for processing (2)
  • packages/doom/src/global/SiteOverrides/index.tsx
  • packages/doom/src/plugins/auto-sidebar/walk.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,ts,tsx,jsx,json,yml,yaml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Format code with Prettier according to the project's Prettier configuration

Files:

  • packages/doom/src/plugins/auto-sidebar/walk.ts
  • packages/doom/src/global/SiteOverrides/index.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript strict mode for type safety

Files:

  • packages/doom/src/plugins/auto-sidebar/walk.ts
  • packages/doom/src/global/SiteOverrides/index.tsx
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow ESLint rules defined in eslint.config.js

Files:

  • packages/doom/src/plugins/auto-sidebar/walk.ts
  • packages/doom/src/global/SiteOverrides/index.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.
Learnt from: CR
Repo: alauda/doom PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T10:50:06.727Z
Learning: Organize code in monorepo structure with workspaces: main tool in packages/doom/, export functionality in packages/export/, documentation in docs/, and test documentation in fixture-docs/
⏰ 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). (9)
  • GitHub Check: publish
  • GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
  • GitHub Check: autofix
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
  • GitHub Check: publish

Copy link

@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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/doom/src/plugins/global/index.ts (1)

88-95: Inconsistent handling of loginPath assertion.

Line 88 uses a non-null assertion (loginPath!) while Line 95 uses loginPath without assertion. This inconsistency suggests uncertainty about whether loginPath can be undefined. With proper typing (string | undefined) and the existence check proposed above, both uses would be safe without assertions.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2c04a8 and 81c63f7.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • packages/doom/package.json
  • packages/doom/src/cli/load-config.ts
  • packages/doom/src/plugins/auto-sidebar/index.ts
  • packages/doom/src/plugins/global/index.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/doom/package.json
  • packages/doom/src/cli/load-config.ts
  • packages/doom/src/plugins/auto-sidebar/index.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,ts,tsx,jsx,json,yml,yaml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Format code with Prettier according to the project's Prettier configuration

Files:

  • packages/doom/src/plugins/global/index.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript strict mode for type safety

Files:

  • packages/doom/src/plugins/global/index.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow ESLint rules defined in eslint.config.js

Files:

  • packages/doom/src/plugins/global/index.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: alauda/doom PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T10:50:06.727Z
Learning: Organize code in monorepo structure with workspaces: main tool in packages/doom/, export functionality in packages/export/, documentation in docs/, and test documentation in fixture-docs/
📚 Learning: 2025-12-15T10:50:06.727Z
Learnt from: CR
Repo: alauda/doom PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T10:50:06.727Z
Learning: Maintain Node.js version 20.19.0 or higher for project setup

Applied to files:

  • .github/workflows/ci.yml
⏰ 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). (4)
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest

Copy link

@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: 0

🧹 Nitpick comments (1)
packages/doom/src/plugins/auto-sidebar/index.ts (1)

228-233: Good refinement of the API routes exclusion logic.

The updated condition properly respects user intent when onlyIncludeRoutes explicitly includes API patterns. This addresses the previous concern about unconditional exclusion.

The current implementation uses simple prefix matching (startsWith), which handles common patterns well. If you encounter edge cases where API routes are nested differently (e.g., 'docs/apis/**' or '**/apis/**'), consider using a more robust pattern matching approach.

💡 Optional: More robust pattern matching

If needed for complex patterns, consider checking for API segments anywhere in the route pattern:

 if (
   export_ &&
   !onlyIncludeRoutes.some(
-    (route) => route.startsWith('apis/') || route.startsWith('*/apis/'),
+    (route) => route.includes('/apis/') || route.startsWith('apis/'),
   )
 ) {
   excludeRoutes.push(...APIS_ROUTES)
 }

This would also catch patterns like 'docs/apis/**' or '*/lang/apis/**'.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81c63f7 and e7aebe7.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • packages/doom/package.json
  • packages/doom/src/cli/load-config.ts
  • packages/doom/src/plugins/auto-sidebar/index.ts
  • packages/doom/src/plugins/global/index.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/ci.yml
  • packages/doom/package.json
  • packages/doom/src/plugins/global/index.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,ts,tsx,jsx,json,yml,yaml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Format code with Prettier according to the project's Prettier configuration

Files:

  • packages/doom/src/cli/load-config.ts
  • packages/doom/src/plugins/auto-sidebar/index.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript strict mode for type safety

Files:

  • packages/doom/src/cli/load-config.ts
  • packages/doom/src/plugins/auto-sidebar/index.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow ESLint rules defined in eslint.config.js

Files:

  • packages/doom/src/cli/load-config.ts
  • packages/doom/src/plugins/auto-sidebar/index.ts
🧠 Learnings (2)
📚 Learning: 2025-05-26T09:09:21.339Z
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.

Applied to files:

  • packages/doom/src/cli/load-config.ts
📚 Learning: 2025-05-29T16:25:28.086Z
Learnt from: JounQin
Repo: alauda/doom PR: 40
File: src/plugins/sitemap/index.ts:7-7
Timestamp: 2025-05-29T16:25:28.086Z
Learning: In rspress/shared v2.0.0-beta.8, the '/logger' export is available in the package exports field, so imports like `import { logger } from 'rspress/shared/logger'` are valid even if ESLint shows resolution errors. This is used throughout the codebase in files like src/cli/translate.ts, src/cli/load-config.ts, src/utils/git.ts, and src/plugins/sitemap/index.ts.

Applied to files:

  • packages/doom/src/cli/load-config.ts
⏰ 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). (3)
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
🔇 Additional comments (1)
packages/doom/src/cli/load-config.ts (1)

354-354: The llms: true configuration is correctly supported in @rspress/core v2.0.0-rc.3. This simple boolean flag is the proper way to enable the experimental LLM output feature (which produces llms.txt, llms-full.txt, and per-route Markdown files). The migration from the plugin to this config flag is valid and compatible.

@JounQin JounQin merged commit ca079e6 into main Dec 24, 2025
12 checks passed
@JounQin JounQin deleted the feat/export_apis branch December 24, 2025 07:04
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