Skip to content

Conversation

@HakunaMatata078
Copy link

@HakunaMatata078 HakunaMatata078 commented Jan 13, 2026

PR tiny-pro新增

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

Release Notes

  • New Features
    • Added three new exception pages to improve user experience:
      • System Busy: Displays when the system is under heavy load
      • Load Failure: Shown when content fails to load
      • No Search Results: Presented when searches return no matches
    • Added full multi-language support (English and Chinese) for all new exception pages

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Walkthrough

Three new exception pages (system-busy, load-failure, no-search-results) are added across multiple template platforms. This includes translation keys in English and Chinese, menu configurations, routing definitions, and Vue component implementations for the TinyVue template.

Changes

Cohort / File(s) Summary
Locale Translations
template/nestJs/locales.json, template/springboot/src/main/resources/locales.json, template/tinyvue/src/locales.json
Added 18 new i18n keys per file (9 English, 9 Chinese) for system-busy, load-failure, and no-search-results exception flows, including menu labels, descriptions, and permission messages.
Menu Data Configuration
template/nestJs/src/menu/init/menuData.ts, template/springboot/src/main/resources/MenuData.json
Added 3 new menu item entries defining system-busy, load-failure, and no-search-results exception pages with consistent structure (name, order, type, component path, locale keys).
TinyVue Routing
template/tinyvue/src/router/routes/modules/exception.ts
Added 3 new route objects for system-busy, load-failure, and no-search-results with corresponding component imports, metadata (locale, auth requirements, roles), and lazy-loaded Vue components.
TinyVue Exception Components
template/tinyvue/src/views/exception/system-busy/index.vue, template/tinyvue/src/views/exception/load-failure/index.vue, template/tinyvue/src/views/exception/no-search-results/index.vue
Created 3 new Vue 3 single-file components for exception pages, each featuring breadcrumb navigation, illustrative images, localized text, and shared exception styling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Three new error pages hop into place,
With translations spanning English space,
System-busy, load-failure, no results to find,
Routes and menus aligned by design,
Exception flows now running fine! ✨

🚥 Pre-merge checks | ✅ 3
✅ 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 '[Feature] 新增异常页面' (Add exception pages) clearly summarizes the main change - adding three new exception pages (system-busy, load-failure, no-search-results) across multiple template files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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: 4

🤖 Fix all issues with AI agents
In @template/nestJs/locales.json:
- Line 336: Fix the typo in the locale key value for
"menu.exception.no-search-results": change "No Sarch Results" to "No Search
Results" (matching the same correction applied in the corresponding tinyvue
locales file).

In @template/springboot/src/main/resources/locales.json:
- Line 303: Fix the typo in the locales entry "menu.exception.no-search-results"
by changing its value from "No Sarch Results" to "No Search Results" in the
locales.json so the menu label displays correctly to users.
- Line 950: The JSON key "exception.result.systemBusy.d  escription" is
malformed with extra spaces; rename it to
"exception.result.systemBusy.description" so the Vue component can find the
translation, ensuring the value "系统繁忙,请稍后再试" remains unchanged.

In @template/tinyvue/src/locales.json:
- Line 333: Fix the spelling typo in the localization key value for
"menu.exception.no-search-results": change "No Sarch Results" to "No Search
Results" in the locales JSON entry so the menu displays the correct word
"Search".
🧹 Nitpick comments (5)
template/springboot/src/main/resources/MenuData.json (1)

175-200: Inconsistent order values may cause unpredictable menu ordering.

All three new menu items have order: 1, same as existing items like 403 and 500. This could lead to unpredictable ordering in the UI. Consider assigning sequential order values (e.g., 4, 5, 6) to ensure consistent menu display.

Additionally, the name fields use Chinese characters (系统繁忙, 加载失败, 暂无搜索结果) while existing exception items use English (403, 404, 500). Consider using English names for consistency (e.g., SystemBusy, LoadFailure, NoSearchResults) since localization is handled via the locale key.

Suggested fix for order values and naming consistency
       "locale": "menu.exception.500"
       },
       {
-        "name": "系统繁忙",
-        "order": 1,
+        "name": "SystemBusy",
+        "order": 4,
         "menuType": "normal",
         "icon": "",
         "component": "exception/system-busy/index",
         "path": "system-busy",
         "locale": "menu.exception.system-busy"
       },
       {
-        "name": "加载失败",
-        "order": 1,
+        "name": "LoadFailure",
+        "order": 5,
         "menuType": "normal",
         "icon": "",
         "component": "exception/load-failure/index",
         "path": "load-failure",
         "locale": "menu.exception.load-failure"
       },
       {
-        "name": "暂无搜索结果",
-        "order": 1,
+        "name": "NoSearchResults",
+        "order": 6,
         "menuType": "normal",
         "icon": "",
         "component": "exception/no-search-results/index",
         "path": "no-search-results",
         "locale": "menu.exception.no-search-results"
       }
template/tinyvue/src/locales.json (1)

327-335: Inconsistent key naming convention for description keys.

The systemBusy description key uses camelCase (exception.result.systemBusy.description) while load-failure and no-search-results use kebab-case (exception.result.load-failure.description). Consider aligning them for consistency.

Suggested fix for consistency (use kebab-case)
-    "exception.result.systemBusy.description": "The system is busy. Please try again later",
+    "exception.result.system-busy.description": "The system is busy. Please try again later",

Note: If you apply this change, ensure the Vue components referencing this key are updated accordingly.

template/nestJs/src/menu/init/menuData.ts (1)

172-198: Missing parentId property and inconsistent naming convention.

The new menu items are missing the parentId: null property that exists in all other menu entries. Additionally, the name field uses Chinese text while existing items use English (e.g., 'Board', 'Exception', 'User').

Proposed fix
  {
-    name: '系统繁忙',
+    name: 'SystemBusy',
     order: 1,
+    parentId: null,
     menuType: 'normal',
     icon: '',
     component: 'exception/system-busy/index',
     path: 'system-busy',
     locale: 'menu.exception.system-busy',
   },
   {
-    name: '加载失败',
-    order: 1,
+    name: 'LoadFailure',
+    order: 2,
+    parentId: null,
     menuType: 'normal',
     icon: '',
     component: 'exception/load-failure/index',
     path: 'load-failure',
     locale: 'menu.exception.load-failure',
   },
   {
-    name: '暂无搜索结果',
-    order: 1,
+    name: 'NoSearchResults',
+    order: 3,
+    parentId: null,
     menuType: 'normal',
     icon: '',
     component: 'exception/no-search-results/index',
     path: 'no-search-results',
     locale: 'menu.exception.no-search-results',
   },
template/tinyvue/src/router/routes/modules/exception.ts (1)

52-87: Inconsistent naming convention and formatting issues.

  1. The name and label fields use Chinese text while existing routes use identifiers like '403', '404', '500'. Consider using English identifiers for consistency.

  2. Lines 64 and 76 have inconsistent indentation (extra leading space).

Proposed fix
     {
       path: 'system-busy',
-      name: '系统繁忙',
+      name: 'system-busy',
       id: 'system-busy',
-      label: '系统繁忙',
+      label: 'system-busy',
       component: () => import('@/views/exception/system-busy/index.vue'),
       meta: {
         locale: 'menu.exception.system-busy',
         requiresAuth: true,
         roles: [RoleType.admin, RoleType.user],
       },
     },
-     {
+    {
       path: 'load-failure',
-      name: '加载失败',
+      name: 'load-failure',
       id: 'load-failure',
-      label: '加载失败',
+      label: 'load-failure',
       component: () => import('@/views/exception/load-failure/index.vue'),
       meta: {
         locale: 'menu.exception.load-failure',
         requiresAuth: true,
         roles: [RoleType.admin, RoleType.user],
       },
     },
-     {
+    {
       path: 'no-search-results',
-      name: '暂无搜索结果',
+      name: 'no-search-results',
       id: 'no-search-results',
-      label: '暂无搜索结果',
+      label: 'no-search-results',
       component: () => import('@/views/exception/no-search-results/index.vue'),
       meta: {
         locale: 'menu.exception.no-search-results',
         requiresAuth: true,
         roles: [RoleType.admin, RoleType.user],
       },
     },
template/nestJs/locales.json (1)

330-338: Same key naming inconsistency as tinyvue locales.

The description key for system-busy uses camelCase (systemBusy) while others use kebab-case. Consider aligning with exception.result.system-busy.description for consistency across both locale files.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b839220 and 2a9b1bb.

⛔ Files ignored due to path filters (3)
  • template/tinyvue/src/assets/images/load-failure.svg is excluded by !**/*.svg
  • template/tinyvue/src/assets/images/no-search-results.svg is excluded by !**/*.svg
  • template/tinyvue/src/assets/images/system-busy.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • template/nestJs/locales.json
  • template/nestJs/src/menu/init/menuData.ts
  • template/springboot/src/main/resources/MenuData.json
  • template/springboot/src/main/resources/locales.json
  • template/tinyvue/src/locales.json
  • template/tinyvue/src/router/routes/modules/exception.ts
  • template/tinyvue/src/views/exception/load-failure/index.vue
  • template/tinyvue/src/views/exception/no-search-results/index.vue
  • template/tinyvue/src/views/exception/system-busy/index.vue
🧰 Additional context used
🧬 Code graph analysis (1)
template/tinyvue/src/router/routes/modules/exception.ts (1)
template/tinyvue/src/store/modules/user/types.ts (1)
  • RoleType (1-1)
🔇 Additional comments (4)
template/springboot/src/main/resources/locales.json (1)

297-305: Approve new English locale entries (with fixes above applied).

The new English translations for the exception pages are well-structured and follow the existing pattern for exception-related keys.

template/tinyvue/src/views/exception/no-search-results/index.vue (1)

1-19: Component structure is consistent with other exception pages.

The SVG asset exists at the correct path, all i18n keys are properly defined in locales.json, and the component follows the established pattern for exception pages.

template/tinyvue/src/views/exception/load-failure/index.vue (1)

1-19: Component structure and assets are valid.

All referenced assets and i18n keys are properly defined. The SVG asset exists, all translation keys (exception.result.load-failure.description, exception.result.permissions.load-failure, menu.exception, menu.exception.load-failure) are present in the locale files, and the Breadcrumb component is properly registered.

template/tinyvue/src/views/exception/system-busy/index.vue (1)

1-19: The Vue 3 component follows the established pattern for exception pages with proper i18n integration and shared styling.

All referenced assets and translation keys exist in the repository. The SVG asset is correctly located at template/tinyvue/src/assets/images/system-busy.svg, the @ alias is properly configured in vite config, and all three translation keys (menu.exception.system-busy, exception.result.systemBusy.description, and exception.result.permissions.system-busy) are defined in both English and Chinese locales.

"menu.exception.load-failure": "Loading failed",
"exception.result.load-failure.description": "The system is busy. Please try again later",
"exception.result.permissions.load-failure": "The system is busy. Try again later",
"menu.exception.no-search-results": "No Sarch Results",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Typo: "Sarch" should be "Search"

Same typo as in template/tinyvue/src/locales.json.

Proposed fix
-    "menu.exception.no-search-results": "No Sarch Results",
+    "menu.exception.no-search-results": "No Search Results",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"menu.exception.no-search-results": "No Sarch Results",
"menu.exception.no-search-results": "No Search Results",
🤖 Prompt for AI Agents
In @template/nestJs/locales.json at line 336, Fix the typo in the locale key
value for "menu.exception.no-search-results": change "No Sarch Results" to "No
Search Results" (matching the same correction applied in the corresponding
tinyvue locales file).

"menu.exception.load-failure": "Loading failed",
"exception.result.load-failure.description": "The system is busy. Please try again later",
"exception.result.permissions.load-failure": "The system is busy. Try again later",
"menu.exception.no-search-results": "No Sarch Results",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Typo: "Sarch" should be "Search".

The menu label has a typo that will be visible to users.

Fix the typo
-    "menu.exception.no-search-results": "No Sarch Results",
+    "menu.exception.no-search-results": "No Search Results",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"menu.exception.no-search-results": "No Sarch Results",
"menu.exception.no-search-results": "No Search Results",
🤖 Prompt for AI Agents
In @template/springboot/src/main/resources/locales.json at line 303, Fix the
typo in the locales entry "menu.exception.no-search-results" by changing its
value from "No Sarch Results" to "No Search Results" in the locales.json so the
menu label displays correctly to users.

"menu.exception.500": "500",
"exception.result.500.description": "抱歉,服务器出了点问题~",
"menu.exception.system-busy": "系统繁忙",
"exception.result.systemBusy.d escription": "系统繁忙,请稍后再试",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Malformed key will cause missing translation.

The key exception.result.systemBusy.d escription has an extra space, making it d escription instead of description. The Vue component references exception.result.systemBusy.description, so this translation will not be found and the UI will display the raw key.

Fix the malformed key
-    "exception.result.systemBusy.d  escription": "系统繁忙,请稍后再试",
+    "exception.result.systemBusy.description": "系统繁忙,请稍后再试",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"exception.result.systemBusy.d escription": "系统繁忙,请稍后再试",
"exception.result.systemBusy.description": "系统繁忙,请稍后再试",
🤖 Prompt for AI Agents
In @template/springboot/src/main/resources/locales.json at line 950, The JSON
key "exception.result.systemBusy.d  escription" is malformed with extra spaces;
rename it to "exception.result.systemBusy.description" so the Vue component can
find the translation, ensuring the value "系统繁忙,请稍后再试" remains unchanged.

"menu.exception.load-failure": "Loading failed",
"exception.result.load-failure.description": "The system is busy. Please try again later",
"exception.result.permissions.load-failure": "The system is busy. Try again later",
"menu.exception.no-search-results": "No Sarch Results",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Typo: "Sarch" should be "Search"

The menu title has a spelling error.

Proposed fix
-    "menu.exception.no-search-results": "No Sarch Results",
+    "menu.exception.no-search-results": "No Search Results",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"menu.exception.no-search-results": "No Sarch Results",
"menu.exception.no-search-results": "No Search Results",
🤖 Prompt for AI Agents
In @template/tinyvue/src/locales.json at line 333, Fix the spelling typo in the
localization key value for "menu.exception.no-search-results": change "No Sarch
Results" to "No Search Results" in the locales JSON entry so the menu displays
the correct word "Search".

@kagol
Copy link
Member

kagol commented Jan 14, 2026

此PR会导致执行命令:pnpm dev:backend 之后无法启动后端。

image

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