Skip to content

Conversation

@wuyiping0628
Copy link
Contributor

@wuyiping0628 wuyiping0628 commented Nov 11, 2025

Summary by CodeRabbit

  • New Features

    • Integrated Tiny Engine docs with comprehensive navigation and sidebar sections (getting started, dev, portal).
    • Added Tiny Engine as a selectable product in the main header.
    • Added repository submodule for Tiny Engine to the project.
  • Style

    • Improved sidebar styling and active-state indicators (including level-2 items and collapsible section spacing).
  • Chores

    • Updated site configuration to support Tiny Engine routes and content rewrites.

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Walkthrough

Adds the Tiny Engine repository as a Git submodule and integrates Tiny Engine into the VitePress site via rewrite rules, expanded theme navigation/sidebars, a new product tab in the header, and additional sidebar CSS styles.

Changes

Cohort / File(s) Summary
Submodule Integration
\.gitmodules
Added [submodule "tiny-engine"] with path = tiny-engine and url = git@github.com:opentiny/tiny-engine.git.
VitePress root config
\.vitepress/config.mts, \.vitepress/config.mts.timestamp-1762559107423-d76c5d5601fb.mjs
New/updated VitePress config: added rewrites mapping tiny-engine docs to /tiny-engine/engines/, /tiny-engine/dev/, /tiny-engine/portal/; added engineNav entries; expanded sidebars for the three tiny-engine route prefixes; registers plugins and site metadata in the exported config.
Header component
\.vitepress/theme/components/CustomHeader.vue
Added TinyEngine entry to productTabs; reformatted attributes and adjusted minor spacing/CSS values. Functional header/tab logic preserved.
Theme styles
\.vitepress/theme/style.css
Added rules for active level-2 sidebar items (text color, weight, indicator), dark-theme adjustments, and layout/padding tweaks for collapsible sidebar sections.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant VitePress as SiteServer
  participant Router
  participant Theme
  Browser->>SiteServer: Request /tiny-engine/docs/...
  SiteServer->>Router: apply rewrite rules
  Router-->>SiteServer: rewritten path (/tiny-engine/engines/ or /dev/ or /portal/)
  SiteServer->>Theme: resolve sidebar & nav (engineNav + sidebars)
  Theme->>Browser: render page with header (productTabs incl. TinyEngine) and styled sidebar
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay extra attention to:
    • .vitepress/config.mts rewrites and sidebar nesting for completeness and correct path patterns.
    • CustomHeader.vue tab integration and any JS/TS typing changes or reactivity implications.
    • CSS selectors in style.css for specificity and dark-mode interactions.

Poem

🐰 I hopped a patch, a tiny tune,
A submodule and docs in bloom,
Tabs and sidebars now align,
Routes rewrite, the pages shine —
I nibble keys and cheer: "All fine!" 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new TinyEngine submodule to the repository, which is reflected in the .gitmodules file changes and corresponding documentation configuration updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e5c2e1 and 672be0a.

📒 Files selected for processing (5)
  • .gitmodules (1 hunks)
  • .vitepress/config.mts (3 hunks)
  • .vitepress/config.mts.timestamp-1762559107423-d76c5d5601fb.mjs (1 hunks)
  • .vitepress/theme/components/CustomHeader.vue (11 hunks)
  • .vitepress/theme/style.css (2 hunks)

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)
.vitepress/config.mts (1)

274-274: Minor formatting inconsistency.

Missing space after the opening brace. For consistency with the rest of the file, consider:

-            {text: "前端及Java服务端docker部署", link: "front-backend-docker-deployment"},
+            { text: "前端及Java服务端docker部署", link: "front-backend-docker-deployment" },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 672be0a and 5d8b49d.

📒 Files selected for processing (1)
  • .vitepress/config.mts (3 hunks)
🔇 Additional comments (4)
.vitepress/config.mts (4)

75-79: LGTM! Custom navigation structure is well-formed.

The engineNav property provides dedicated navigation for Tiny Engine documentation sections. The structure follows VitePress nav conventions with appropriate activeMatch patterns that align with the sidebar route prefixes.

Note: This is a custom theme property that requires the theme (CustomHeader.vue) to be updated to consume and render it, which appears to be handled based on the PR changes.


180-248: LGTM! Engines sidebar structure is well-organized.

The sidebar configuration for /tiny-engine/engines/ is properly structured with clear sections and extension-less links. The nested "路由功能" section (lines 225-235) correctly uses a custom base path for route-related documentation, which will work with the wildcard rewrite pattern.


249-421: LGTM! Dev and portal sidebar configurations are comprehensive.

Both sidebar configurations are well-structured with clear hierarchical organization:

  • Dev section covers getting started, changelog, solutions, extension capabilities, APIs, and practical cases
  • Portal section covers ecosystem, applications, materials, and designer documentation
  • Nested sections (code-output-function, frontend-api, backend-api) use appropriate base paths that align with the rewrite patterns

All links are properly formatted without .md extensions, ensuring correct route resolution.


61-63: Rewrite rules reference uninitialized tiny-engine submodule.

The tiny-engine submodule is declared in .gitmodules but not initialized in the repository. The rewrite rules (lines 61-63) reference tiny-engine/docs/* paths that don't currently exist.

Verify one of the following:

  • The submodule initialization (git submodule update --init tiny-engine) is a prerequisite step documented elsewhere
  • This configuration is intended for future use when the submodule is initialized
  • The rewrite rules should be conditional or deferred until the submodule is available

If the submodule should be present, ensure developers run the necessary submodule initialization commands before using this configuration.

@kagol kagol merged commit e460c6c into opentiny:main Nov 12, 2025
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