Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Dec 15, 2025

Summary by CodeRabbit

  • New Features

    • Added versions navigation to the layout.
  • Bug Fixes

    • Normalized heading anchor markup and styling for consistent anchors.
  • Documentation

    • Removed the "Attribute Extensions" section from Markdown docs (en/zh).
  • Chores

    • Bumped Node.js and numerous dependencies; added a changelog/changeset.
    • Simplified locale/config handling and internal config defaults.
  • Style

    • Added/updated global styling and utility classes for TOC and nav interactions.

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

Copilot AI review requested due to automatic review settings December 15, 2025 10:09
@changeset-bot
Copy link

changeset-bot bot commented Dec 15, 2025

🦋 Changeset detected

Latest commit: 0673734

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 Minor

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 15, 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

Coordinated changes: Node.js bump, multiple dependency/version upgrades, removal of "Attribute Extensions" docs, migration of many theme imports from @rspress/core/theme to @rspress/core/theme-original, locale/config simplifications, VersionsNav portal/DOM-observer removal, several UI/formatting tweaks and stylesheet additions.

Changes

Cohort / File(s) Summary
Node / root deps
/.nvmrc, package.json
Node.js bumped 24.11.0 → 24.11.1 and multiple devDependencies updated (eslint, prettier, @types/node, @swc/core, @changesets/*, nano-staged, etc.).
Doom package deps
packages/doom/package.json
Large set of dependency version bumps across tooling, rspress-related packages (RC), runtime libs, and MDX/remark/rehype tooling.
Export package deps
packages/export/package.json
Playwright-related deps bumped: @playwright/browser-chromium, playwright 1.56.1 → 1.57.0.
Docs removed
docs/en/usage/markdown.md, docs/zh/usage/markdown.md
Deleted "Attribute Extensions" section (warning and image attribute examples) from both English and Chinese Markdown docs.
Locale / config refactor
packages/doom/src/cli/load-config.ts
Simplified locale config shape (removed per-language editLink/text fields), removed editLink merging logic, streamlined locales fallback, added rspack ignoreWarnings for flexsearch and ssg.experimentalWorker flag.
Theme import migration (components & theme)
packages/doom/src/runtime/components/*, packages/doom/src/theme/*, packages/doom/src/theme/index.ts
Many files switched imports/re-exports from @rspress/core/theme@rspress/core/theme-original (Badge, Tabs, Toc, JsonViewer, PackageManagerTabs, Steps, Tab, _X, Layout, Search, theme index, VersionsNav imports, etc.).
VersionsNav refactor
packages/doom/src/theme/VersionsNav/index.tsx, NavMenuGroup.tsx, NavMenuSingleItem.tsx
Removed getNavMenu/portal and MutationObserver logic; component now renders inline without portal. Removed compact prop from NavMenuSingleItem and simplified markup/classes.
useEditLink → i18n
packages/doom/src/theme/useEditLink.ts
Replaced useLocaleSiteData with useI18n, using translation key editLinkText for link text and adjusted validation/logic accordingly.
Auth / site overrides tweaks
packages/doom/src/global/AuthCheck/index.tsx, packages/doom/src/global/SiteOverrides/index.tsx
navigate(...) call prefixed with void in AuthCheck; SiteOverrides selector changed from [class^=navBarTitle] > a.rp-nav__title__link.
Formatting / minor type changes
packages/doom/src/login/Button/index.tsx, packages/doom/src/login/index.tsx, packages/doom/src/plugins/replace/types.ts, packages/doom/src/runtime/components/ExternalSiteLink.tsx
Interface/extends formatting changes and a compacted useCallback; no semantic behavior changes.
Remark directives update
packages/doom/src/plugins/directives/remark-directives.ts
Added $$$callout$$$ to container directives set and simplified early-return condition (removed unnamed-node classname fallback).
Heading / overview rendering
packages/doom/src/runtime/components/_HeadingTitle.tsx, Overview.tsx
Anchor class renamed header-anchorrp-header-anchor, anchor rendered before children; Overview uses FallbackHeading instead of inline renderInlineMarkdown.
Styling additions
packages/doom/styles/global.scss, packages/doom/styles/link.module.scss, packages/doom/styles/versions-nav.module.scss
Added TOC hover styles for wide screens, switched pseudo-class exclusion to .rp-header-anchor, and added extensive global utility classes for versions-nav styling.
Re-export source changes
packages/doom/src/runtime/components/Badge.ts, many re-export files
Multiple re-exports now point to @rspress/core/theme-original instead of @rspress/core/theme.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

  • Pay attention to:
    • packages/doom/src/cli/load-config.ts — locale shape and editLink removal; ensure config consumers still receive expected values.
    • packages/doom/src/theme/VersionsNav/index.tsx — removal of portal/observer; verify rendering and behavior across SSR/CSR.
    • Theme import migration (~13 files) — confirm @rspress/core/theme-original exports match prior API and styling/behavior differences are acceptable.
    • packages/doom/src/theme/useEditLink.ts — ensure translation key editLinkText exists in i18n resources.

Possibly related PRs

Suggested labels

dependencies, upstream

Poem

🐇 Hooray — I hopped through code and theme,

swapped old imports for a brighter stream.
Portals gone, the nav sits neat,
Docs trimmed tight, and deps up to beat.
A tiny rabbit cheers this merge with a happy beat.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.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 pull request title 'chore: bump rspress to v2.0.0-rc.2' accurately describes the main objective of the changeset, which involves updating rspress dependencies across the project to version 2.0.0-rc.2 and related adjustments.
✨ 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/bump_rspress

📜 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 b69caa3 and 0673734.

📒 Files selected for processing (2)
  • .changeset/green-cobras-dress.md (1 hunks)
  • packages/doom/src/cli/load-config.ts (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/doom/src/cli/load-config.ts
🧰 Additional context used
🧠 Learnings (3)
📓 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: 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.
📚 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:

  • .changeset/green-cobras-dress.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:

  • .changeset/green-cobras-dress.md
🔇 Additional comments (1)
.changeset/green-cobras-dress.md (1)

1-5: Changeset format is valid.

The YAML front-matter structure and changelog message are properly formatted and clearly communicate the rspress RC2 bump. However, verify that the "minor" version bump level aligns with the scope of coordinated changes across the codebase (imports migration, dependency updates, etc.).


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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 15, 2025

Open in StackBlitz

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

commit: 0673734

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/theme/VersionsNav/NavMenuSingleItem.tsx (1)

10-28: Remove unused compact prop from the interface.

The compact property is declared in NavMenuSingleItemProps (line 12) but is no longer destructured or used in the component. This creates an inconsistency in the public API.

Apply this diff to remove the unused property:

 export interface NavMenuSingleItemProps extends Omit<NavItemWithLink, 'text'> {
   base?: string
-  compact?: boolean
   download?: string | boolean
   pathname?: string
   rightIcon?: ReactNode
   text?: ReactNode
 }
🧹 Nitpick comments (5)
packages/doom/src/global/SiteOverrides/index.tsx (1)

6-18: Confirm new nav selector matches rspress v2 DOM; consider a small fallback.

The only behavioral change here is the selector (.rp-nav__title__link). If this ever drifts from the actual DOM structure, setNavBarSpans will silently no-op and logo text won’t show.

Two suggestions:

  • Double‑check in the running v2.0.0‑rc.2 docs that the nav title anchor indeed uses .rp-nav__title__link.
  • Optionally keep a backward‑compat fallback (old selector or a more resilient selector) if you expect mixing themes or future DOM tweaks.
packages/doom/src/plugins/replace/types.ts (1)

24-27: Add JSDoc documentation for the new anchor property.

The new anchor optional property is correctly typed and doesn't break the interface contract. However, other properties in similar interfaces (e.g., ReferenceItemSource) include JSDoc comments explaining their purpose. For consistency and clarity, consider documenting what the anchor property represents.

Apply this diff to add documentation:

 export interface NormalizedReferenceSource
   extends ReferenceItemRemote, ReferenceItemSource {
+  /**
+   * Anchor link identifier for the reference source
+   */
   anchor?: string
 }
packages/doom/src/cli/load-config.ts (1)

326-330: Reasonable warning suppression for third-party module.

Suppressing build warnings from flexsearch is acceptable if these are known, non-actionable warnings from the library. Consider adding a brief comment explaining why this suppression is needed for future maintainers.

packages/doom/package.json (1)

66-77: Review mermaid 11.12.2 major upgrade and additional dependency bumps.

Multiple significant dependency updates occur in this range, including:

  • mermaid: 11.12.2 (major bump, likely from 10.x)
  • openai: 6.10.0 (major bump)
  • type-fest: 5.3.1 (major bump)
  • typescript-eslint: 8.49.0 (major bump)
  • yaml: 2.8.2 (major bump)

While these appear to be intentional updates supporting rspress 2.0.0-rc.2, verify that documentation generation with mermaid diagrams still renders correctly, and that llms plugin (which uses openai) works as expected with the new major version.

Would you like me to generate a test script to verify that the mermaid diagram rendering and LLMs plugin integration still work correctly with these new major versions?

packages/doom/styles/versions-nav.module.scss (1)

1-118: Consider centralizing shared rp-* utilities outside versions-nav module

The new :global block introduces a broad set of generic layout/typography utility classes (.rp-flex, .rp-text-sm, etc.), which are then consumed by VersionsNav components. This works, but it makes a versions-nav–specific stylesheet responsible for global utilities and may duplicate or override similar classes from the core theme.

If these utilities are or become widely reused, consider moving them into a more central stylesheet (e.g. a global theme utilities file) or clearly documenting that this module intentionally redefines them to avoid surprises.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e238c4b and b69caa3.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (36)
  • .nvmrc (1 hunks)
  • docs/en/usage/markdown.md (0 hunks)
  • docs/zh/usage/markdown.md (0 hunks)
  • package.json (1 hunks)
  • packages/doom/package.json (2 hunks)
  • packages/doom/src/cli/load-config.ts (5 hunks)
  • packages/doom/src/global/AuthCheck/index.tsx (1 hunks)
  • packages/doom/src/global/SiteOverrides/index.tsx (1 hunks)
  • packages/doom/src/login/Button/index.tsx (1 hunks)
  • packages/doom/src/login/index.tsx (1 hunks)
  • packages/doom/src/plugins/directives/remark-directives.ts (2 hunks)
  • packages/doom/src/plugins/replace/types.ts (1 hunks)
  • packages/doom/src/runtime/components/Badge.ts (1 hunks)
  • packages/doom/src/runtime/components/ExternalSiteLink.tsx (1 hunks)
  • packages/doom/src/runtime/components/JsonViewer.tsx (1 hunks)
  • packages/doom/src/runtime/components/K8sCrd.tsx (1 hunks)
  • packages/doom/src/runtime/components/OpenAPIPath.tsx (1 hunks)
  • packages/doom/src/runtime/components/Overview.tsx (2 hunks)
  • packages/doom/src/runtime/components/PackageManagerTabs.ts (1 hunks)
  • packages/doom/src/runtime/components/Steps.ts (1 hunks)
  • packages/doom/src/runtime/components/Tab.ts (1 hunks)
  • packages/doom/src/runtime/components/Tabs.tsx (1 hunks)
  • packages/doom/src/runtime/components/Toc.ts (1 hunks)
  • packages/doom/src/runtime/components/_HeadingTitle.tsx (1 hunks)
  • packages/doom/src/runtime/components/_X.tsx (1 hunks)
  • packages/doom/src/theme/Layout.tsx (3 hunks)
  • packages/doom/src/theme/Search.tsx (1 hunks)
  • packages/doom/src/theme/VersionsNav/NavMenuGroup.tsx (2 hunks)
  • packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx (2 hunks)
  • packages/doom/src/theme/VersionsNav/index.tsx (2 hunks)
  • packages/doom/src/theme/index.ts (1 hunks)
  • packages/doom/src/theme/useEditLink.ts (2 hunks)
  • packages/doom/styles/global.scss (1 hunks)
  • packages/doom/styles/link.module.scss (1 hunks)
  • packages/doom/styles/versions-nav.module.scss (1 hunks)
  • packages/export/package.json (1 hunks)
💤 Files with no reviewable changes (2)
  • docs/en/usage/markdown.md
  • docs/zh/usage/markdown.md
🧰 Additional context used
🧠 Learnings (9)
📓 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.
📚 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/src/theme/VersionsNav/NavMenuGroup.tsx
  • packages/doom/src/runtime/components/_X.tsx
  • packages/doom/src/theme/index.ts
  • packages/doom/src/runtime/components/Badge.ts
  • packages/doom/src/runtime/components/JsonViewer.tsx
  • packages/doom/src/runtime/components/OpenAPIPath.tsx
  • packages/doom/src/runtime/components/Tab.ts
  • packages/doom/src/runtime/components/PackageManagerTabs.ts
  • packages/doom/src/theme/Search.tsx
  • packages/doom/src/runtime/components/K8sCrd.tsx
  • packages/doom/package.json
  • packages/doom/src/runtime/components/Tabs.tsx
  • packages/doom/src/runtime/components/Steps.ts
  • packages/doom/src/runtime/components/Toc.ts
  • packages/doom/src/theme/Layout.tsx
  • packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx
📚 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/theme/VersionsNav/NavMenuGroup.tsx
  • packages/doom/src/runtime/components/_X.tsx
  • packages/doom/src/theme/index.ts
  • packages/doom/src/runtime/components/JsonViewer.tsx
  • packages/doom/src/runtime/components/OpenAPIPath.tsx
  • packages/doom/src/runtime/components/Tab.ts
  • packages/doom/src/runtime/components/PackageManagerTabs.ts
  • packages/doom/src/theme/Search.tsx
  • packages/doom/package.json
  • packages/doom/src/runtime/components/Tabs.tsx
  • packages/doom/src/runtime/components/Steps.ts
  • packages/doom/src/runtime/components/Toc.ts
  • packages/doom/src/theme/Layout.tsx
📚 Learning: 2025-07-09T02:33:05.638Z
Learnt from: JounQin
Repo: alauda/doom PR: 117
File: src/remark-lint/no-heading-punctuation.ts:4-4
Timestamp: 2025-07-09T02:33:05.638Z
Learning: In the alauda/doom project, JounQin prefers to keep the `toString` import from `mdast-util-to-string` as is, even though it shadows the global toString property. Variable shadowing warnings for this specific case should not be flagged as issues.

Applied to files:

  • packages/doom/src/runtime/components/_X.tsx
  • packages/doom/src/theme/index.ts
  • packages/doom/src/runtime/components/Toc.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/theme/index.ts
  • packages/doom/src/runtime/components/Badge.ts
  • packages/doom/src/runtime/components/Tab.ts
  • packages/doom/src/theme/Search.tsx
  • packages/doom/package.json
  • packages/doom/src/cli/load-config.ts
  • packages/doom/src/runtime/components/Steps.ts
  • packages/doom/src/runtime/components/Toc.ts
📚 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/src/runtime/components/JsonViewer.tsx
  • packages/doom/package.json
📚 Learning: 2025-10-30T06:51:00.220Z
Learnt from: JounQin
Repo: alauda/doom PR: 202
File: packages/doom/styles/login.module.scss:1-14
Timestamp: 2025-10-30T06:51:00.220Z
Learning: In CSS Modules (files with .module.css or .module.scss extension), class selectors are locally scoped by default unless explicitly wrapped in :global(). When reviewing selectors like body:has(.someClass) in CSS Module files, remember that .someClass will be transformed to a unique hashed class name, preventing conflicts with other files.

Applied to files:

  • packages/doom/styles/link.module.scss
  • packages/doom/styles/versions-nav.module.scss
📚 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:

  • package.json
  • 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
🔇 Additional comments (40)
packages/doom/src/runtime/components/ExternalSiteLink.tsx (1)

20-20: Formatting improvement approved.

The interface declaration has been consolidated to a single-line extends clause, which aligns with modern style practices. No functional changes to the component or its public API.

packages/doom/src/runtime/components/OpenAPIPath.tsx (1)

2-2: Badge import swap looks correct and consistent with rspress migration

Switching Badge to @rspress/core/theme-original keeps usage unchanged and matches the broader theme import migration in this PR. No issues spotted here.

packages/doom/src/runtime/components/K8sCrd.tsx (1)

5-5: Import migration to @rspress/core/theme-original looks consistent with the rspress v2 bump

This redirect of Badge and Button to @rspress/core/theme-original matches the PR’s goal and keeps the rest of the component unchanged. Please just confirm that this module exists in v2.0.0-rc.2 and that Badge/Button props remain compatible so build and type‑checks pass.

packages/doom/src/runtime/components/PackageManagerTabs.ts (1)

1-4: Re-export path change keeps the API stable

Named and default exports for PackageManagerTabs are preserved while only the source module switches to @rspress/core/theme-original, which aligns with the rest of the PR’s theme migration. This looks good; just ensure the new subpath is exported by @rspress/core in v2.0.0-rc.2 (build/tests should confirm).

packages/doom/src/global/AuthCheck/index.tsx (1)

31-40: Explicitly marking navigation as fire-and-forget looks good

Using void navigate(...) makes it clear that this redirect is intentionally non-awaited and keeps the callback synchronous, matching the existing void authCheck() pattern elsewhere in this file. No behavioral change, just clearer intent and avoids stray promise warnings.

packages/doom/src/plugins/replace/types.ts (1)

24-27: The anchor property in the NormalizedReferenceSource interface is actively consumed in resolve-reference.ts (lines 98, 111–112, 116), where it is used to find matching table of contents entries by ID or text. The implementation includes proper existence checks and error handling when an anchor is not found.

packages/doom/src/plugins/directives/remark-directives.ts (1)

14-15: Callout container inclusion and simplified filter look correct; confirm AST shape and fallback behavior

Adding $$$callout$$$ to CONTAINER_DIRECTIVE_TYPES and using CONTAINER_DIRECTIVE_TYPES.has(node.name) for the early-return makes sense: callout containers will now be left to the upstream Rspress/remark pipeline, consistent with the existing admonition types.

Two things worth double‑checking:

  • Verify that in Rspress 2.0 the callout container nodes really come through with node.type === 'containerDirective' and node.name === '$$$callout$$$'; any mismatch here would cause them to fall through to the default toMarkdown → text replacement path.
  • Given the removal of the previous unnamed containerDirective fallback (per the PR summary), ensure there are no remaining docs that still rely on unnamed containerDirective nodes with Rspress-specific classes — those will now be rendered back as literal directive syntax text via the default branch.

If both assumptions hold, the change looks good and keeps this plugin narrowly scoped to Doom-specific directives.

Also applies to: 30-33

packages/doom/src/cli/load-config.ts (3)

65-77: LGTM! Locale config type simplification is well-designed.

The Omit<LocaleConfig, 'lang'> type correctly reflects that lang is added separately when building locale entries (line 196), and removing embedded editLink/text fields aligns with the migration to i18n-driven text retrieval.


208-208: LGTM!

The non-null assertion is safe since zh is statically defined in KNOWN_LOCALE_CONFIGS.


268-276: LGTM! Clean conditional configuration.

The editLink is now conditionally included only when both editRepoEnabled and editRepoBaseUrl are truthy, which properly guards against incomplete configurations. The locale fallback logic is straightforward.

packages/doom/src/runtime/components/Overview.tsx (2)

7-11: Import source @rspress/core/theme-original is not documented in rspress v2.0.0-rc.2 official exports

The rspress v2.0.0-rc.2 package.json only documents @rspress/core/theme (not theme-original), and the official API docs do not list FallbackHeading, Link, or renderInlineMarkdown as available exports. However, this codebase uses @rspress/core/theme-original throughout—including in packages/doom/src/theme/index.ts which re-exports from it. Verify whether theme-original is an internal/stable path supported by your rspress version, or check if a public export should be used instead.


220-225: FallbackHeading treats title as plain text — verify no markdown loss in group.name

FallbackHeading's title prop does not support inline markdown; it renders content as plain text only. This change replaces <h2> + renderInlineMarkdown(group.name) with <FallbackHeading level={2} title={group.name} />, which means any inline markdown formatting in group.name will no longer be processed. If sidebar group labels in this project should support markdown (e.g., bold, italics, links), this substitution will silently break that formatting. Confirm that group names are plain strings or that markdown support was not intended.

.nvmrc (1)

1-1: LGTM!

Node.js patch version bump is straightforward and compatible with all engine requirements (>=20.19.0) specified across the monorepo.

packages/export/package.json (1)

25-25: LGTM!

Playwright 1.57.0 upgrade should have no functional impact—tests are expected to continue passing with no breaking changes. The bump aligns the browser package with the main playwright package.

Also applies to: 30-30

package.json (1)

34-62: LGTM!

All development dependency updates are minor or patch version bumps with no known breaking changes. ESLint, SWC, and tooling versions stay well-aligned. TypeScript definitions and core tools updated consistently.

packages/doom/package.json (3)

44-50: LGTM—Rsbuild plugins aligned correctly.

The Rsbuild plugin versions are appropriately updated (1.2.x → 1.4.x) and should be compatible with rspress 2.0.0-rc.2. Ensure that any new Rsbuild plugin APIs introduced in these minor versions are leveraged where applicable.

As per learnings, the alauda/doom project uses yarn v4 for dependency management, which should handle all the module resolutions correctly. Confirm yarn installation completes without errors after these bumps.


52-56: Theme migration to rspress 2.0.0-rc.2 is complete.

All imports from @rspress/core/theme have been successfully migrated to @rspress/core/theme-original throughout the codebase. No stale imports remain.


61-61: No compatibility issues found with chokidar 5.0.0.

The package.json already satisfies all chokidar v5 requirements: the project is configured as an ESM module ("type": "module") and requires Node.js ≥ 20.19.0. The file watcher implementation in packages/doom/src/cli/index.ts uses only standard, stable APIs (watch paths with standard options like ignoreInitial, ignored, and cwd), with no reliance on deprecated glob expansion patterns. The watch API signature and event handling remain unchanged and compatible with v5.0.0.

packages/doom/src/runtime/components/_X.tsx (1)

1-1: Verify that @rspress/core/theme-original is the correct import path for rspress v2.0.0-rc.2.

Official rspress documentation shows imports should use @rspress/core/theme (not theme-original), and published versions (v1.x) only export ./theme. The codebase consistently uses @rspress/core/theme-original across all files, but this path is not documented in available sources and does not appear in published package exports. Confirm with the rspress team or release notes whether theme-original is valid in v2.0.0-rc.2, or if the imports should be @rspress/core/theme instead.

packages/doom/src/runtime/components/_HeadingTitle.tsx (1)

41-47: Anchor class rename and ordering look consistent

Renaming to rp-header-anchor and rendering the anchor before the heading text aligns with the updated link styles and should be fine given aria-hidden on the anchor. No functional issues spotted.

packages/doom/src/theme/VersionsNav/NavMenuGroup.tsx (1)

2-2: Nav menu theme-original import and text sizing look correct

Switching Tag to @rspress/core/theme-original and adding rp-text-sm on the wrapper are consistent with the theme-original migration and the new utility classes; behavior should remain the same apart from intended typography tweaks. Please just confirm the build/TS types are clean with the new rspress version.

Based on learnings, Yarn v4 should resolve these subpath imports correctly.

Also applies to: 135-135

packages/doom/src/runtime/components/JsonViewer.tsx (1)

1-1: JsonViewer theme-original import matches the migration

Updating CodeBlockRuntime, Tab, and Tabs to import from @rspress/core/theme-original keeps behavior intact while aligning with the rest of the theme changes.

Please confirm the new rc.2 exposes these exports under theme-original as expected.
Based on learnings, Yarn v4 should handle the subpath resolution correctly.

packages/doom/src/runtime/components/Steps.ts (1)

1-1: Steps re-export source update is straightforward

Re-exporting Steps (and default) from @rspress/core/theme-original preserves the public surface and matches the rest of the theme-original migration.

Please confirm Steps is actually exported from theme-original in rspress v2.0.0-rc.2.

packages/doom/src/theme/Search.tsx (1)

2-2: Search fallback to theme-original looks good

Pointing OriginalSearch at @rspress/core/theme-original keeps the existing “Algolia if envs set, otherwise default search” behavior the same.

Please double-check that Search is exported from theme-original in rspress v2.0.0-rc.2 and that bundling/env handling still behaves as expected.
Based on learnings, Yarn v4 should resolve this subpath without issues.

packages/doom/styles/link.module.scss (1)

25-31: Header anchor exclusion correctly updated

Switching the exclusion to :not(:global(.rp-header-anchor)) matches the new class used in _HeadingTitle and keeps the global header anchors from inheriting the generic .link styling inside this CSS module.

Based on learnings, the :global usage is appropriate in this CSS Modules context.

packages/doom/src/login/index.tsx (1)

19-19: onLoggedIn callback refactor is a no-op behaviorally

Inlining the navigate call into a single-expression useCallback is a clean style improvement with identical behavior.

packages/doom/src/runtime/components/Tab.ts (1)

1-1: LGTM!

The re-export path migration to @rspress/core/theme-original aligns with the rspress v2.0.0-rc.2 upgrade pattern. Based on learnings, yarn v4 handles package exports correctly.

packages/doom/styles/global.scss (1)

112-126: LGTM!

The TOC styling improvements provide good visual feedback on hover with consistent use of CSS variables. The :not(.rp-toc-item--active) selector correctly preserves active item styling while updating inactive items.

packages/doom/src/runtime/components/Badge.ts (1)

1-1: LGTM!

Consistent re-export path migration to @rspress/core/theme-original.

packages/doom/src/runtime/components/Toc.ts (1)

1-1: LGTM!

Consistent re-export path migration to @rspress/core/theme-original.

packages/doom/src/runtime/components/Tabs.tsx (1)

1-1: LGTM!

Import path migration to @rspress/core/theme-original is consistent with the PR-wide upgrade pattern. The component logic remains unchanged.

packages/doom/src/theme/useEditLink.ts (1)

1-32: i18n migration looks good overall.

The shift from useLocaleSiteData to useI18n with t('editLinkText') centralizes translation handling. The validation logic on line 10 correctly guards against missing editLinkText translations.

packages/doom/src/login/Button/index.tsx (1)

4-7: LGTM!

Formatting change only. The multi-line extends clause improves readability without altering type semantics.

packages/doom/src/theme/Layout.tsx (3)

143-143: LGTM!

The inline style addition for consistent spacing is appropriate.


19-20: I need the review comment to rewrite. Please provide the original review comment (within <review_comment> tags) along with any necessary context about the code under review.


2-5: Incorrect import path: should be 'rspress/theme' not '@rspress/core/theme-original'.

The import source should be 'rspress/theme' according to rspress official documentation for theme customization. The export path @rspress/core/theme-original does not exist in published rspress versions. Update the import to:

import {
  Layout as OriginalLayout,
  getCustomMDXComponent,
} from 'rspress/theme'

Likely an incorrect or invalid review comment.

packages/doom/src/theme/index.ts (1)

3-3: LGTM!

The barrel export update is consistent with the theme migration across the codebase.

packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx (2)

2-2: LGTM!

Tag import source updated consistently with the theme migration.


46-48: LGTM!

The className simplification removes compact-dependent styling and the redundant rspress-nav-menu-item-active class, resulting in cleaner code.

packages/doom/src/theme/VersionsNav/index.tsx (1)

109-127: Excellent refactoring!

Removing the portal-based rendering and DOM manipulation logic significantly improves maintainability. The component now renders inline via the afterNavMenu prop in Layout, eliminating brittle DOM queries and MutationObserver usage.

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 upgrades rspress from v2.0.0-beta.34 to v2.0.0-rc.2 along with related dependency updates. The upgrade includes breaking API changes requiring code modifications to adapt to the new version.

  • Updated rspress packages from beta.34 to rc.2
  • Migrated from @rspress/core/theme to @rspress/core/theme-original import path
  • Updated API usage (useLocaleSiteData → useI18n, editLink text retrieval)
  • Refactored VersionsNav component (removed React portal pattern)

Reviewed changes

Copilot reviewed 36 out of 39 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/export/package.json Updated Playwright dependencies from 1.56.1 to 1.57.0
packages/doom/package.json Updated rspress packages to 2.0.0-rc.2 and numerous other dependency updates
package.json Updated devDependencies including @changesets, @swc/core, @types/node, prettier, etc.
packages/doom/src/theme/index.ts Changed export from '@rspress/core/theme' to '@rspress/core/theme-original'
packages/doom/src/theme/useEditLink.ts Migrated from useLocaleSiteData to useI18n for retrieving edit link text
packages/doom/src/theme/VersionsNav/index.tsx Removed React portal usage and MutationObserver for nav menu detection
packages/doom/src/theme/VersionsNav/SvgWrapper.tsx Added new component for handling SVG icons (string or React component)
packages/doom/src/theme/VersionsNav/Down.tsx Added Down arrow SVG component
packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx Updated class names, removed rspress-nav-menu-item-active class
packages/doom/src/theme/VersionsNav/NavMenuGroup.tsx Changed import path and added rp-text-sm class
packages/doom/src/theme/Search.tsx Changed import from '@rspress/core/theme' to '@rspress/core/theme-original'
packages/doom/src/theme/Layout.tsx Changed imports and added afterNavMenu prop with inline style for PDF link
packages/doom/src/runtime/components/_HeadingTitle.tsx Updated class name and reordered anchor link before children
packages/doom/src/runtime/components/*.ts Updated all imports from '@rspress/core/theme' to '@rspress/core/theme-original'
packages/doom/src/runtime/components/Overview.tsx Added FallbackHeading import and replaced renderInlineMarkdown usage
packages/doom/src/plugins/directives/remark-directives.ts Added '$$$callout$$$' directive and removed rspress issue workaround
packages/doom/src/login/index.tsx Simplified onLoggedIn callback to inline arrow function
packages/doom/src/global/SiteOverrides/index.tsx Updated selector from attribute selector to class selector for nav links
packages/doom/src/global/AuthCheck/index.tsx Added void operator to navigate call
packages/doom/src/cli/load-config.ts Removed locale-specific config defaults, updated editLink configuration, added rspack ignoreWarnings
packages/doom/styles/versions-nav.module.scss Added extensive utility classes (rp-* prefixed)
packages/doom/styles/global.scss Added styles for rp-link hover and rp-toc-item__text
packages/doom/styles/link.module.scss Updated class name from .header-anchor to .rp-header-anchor
docs/*/usage/markdown.md Removed "Attribute Extensions" section
.nvmrc Updated Node.js version from 24.11.0 to 24.11.1

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

@JounQin JounQin merged commit 2e3453c into main Dec 15, 2025
14 checks passed
@JounQin JounQin deleted the feat/bump_rspress branch December 15, 2025 10:49
github-actions bot pushed a commit that referenced this pull request Dec 15, 2025
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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