Conversation
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 6970633 | Triggered | Generic Password | 3280007 | ui/src/locales/en-US.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
✅ Deploy Preview for kcloud-platform-iot ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (120)
WalkthroughThis PR executes a comprehensive system-wide refactoring to migrate internationalization functionality from a message-based to menu-based architecture. It renames database tables ( Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Sorry @KouShenhai, your pull request is larger than the review limit of 150000 diff characters
Review Summary by QodoI18n Menu Management Implementation with Frontend Internationalization and Code Standardization
WalkthroughsDescription• **I18n Menu Management System**: Implemented comprehensive internationalization menu management feature with full CRUD operations, including REST controller, service layer, domain models, and data persistence • **Refactored I18n Message to Menu**: Renamed all I18nMessage related classes to I18nMenu across domain, application, infrastructure, and client layers to better reflect the feature's purpose • **Cache Eviction Enhancement**: Updated cache eviction mechanism from evictIfPresent to evict with 200ms delay in token removal and data cache operations for improved consistency • **Frontend Internationalization**: Added comprehensive i18n support across multiple UI components (menu, user, role, login, device management) with useIntl hook and message key translations • **Frontend Code Formatting**: Standardized code formatting across TypeScript/TSX files including indentation, import organization, function signatures, and CSS properties • **Type Definitions Update**: Renamed i18n types from I18nMessage* to I18nMenu* in TypeScript type definitions for consistency • **MyBatis Mapper Update**: Updated mapper configuration from i18nMessage to i18nMenu namespace and data object types • **Database Documentation**: Updated database design documentation to reflect menu terminology instead of message Diagramflowchart LR
A["I18nMessage<br/>Components"] -->|Refactor| B["I18nMenu<br/>Components"]
B --> C["REST Controller<br/>I18nMenuController"]
B --> D["Service Layer<br/>I18nMenusServiceImpl"]
B --> E["Domain Layer<br/>I18nMenuDomainService"]
B --> F["Infrastructure<br/>Gateway & Mapper"]
G["Frontend<br/>Components"] -->|Add i18n| H["Internationalized<br/>UI Pages"]
H --> I["Menu, User, Role,<br/>Login, Device"]
J["Cache Operations"] -->|Enhance| K["Evict with<br/>200ms Delay"]
L["Code Formatting"] -->|Standardize| M["Consistent Style<br/>Across Codebase"]
File Changes1. laokou-service/laokou-admin/laokou-admin-adapter/src/main/java/org/laokou/admin/web/I18nMenuController.java
|
Code Review by Qodo
1. i18n table mismatch
|
|
| <select id="selectObjectPage" | ||
| resultType="org.laokou.admin.i18nMessage.gatewayimpl.database.dataobject.I18nMessageDO"> | ||
| resultType="org.laokou.admin.i18nMenu.gatewayimpl.database.dataobject.I18nMenuDO"> | ||
| SELECT * | ||
| from sys_i18n_message | ||
| where del_flag = 0 |
There was a problem hiding this comment.
1. I18n table mismatch 🐞 Bug ✓ Correctness
Init SQL creates sys_i18n_menu(code, menu) but i18nMenu MyBatis still queries sys_i18n_message and maps zhMessage/enMessage, causing runtime failures (table/column not found) and a broken i18n-menu feature.
Agent Prompt
### Issue description
The PR changes DB init scripts and menu queries to rely on `sys_i18n_menu(code, menu)`, but the i18nMenu CRUD/paging layer still targets `sys_i18n_message` and expects `zhMessage/enMessage` columns. This will break i18nMenu endpoints at runtime.
### Issue Context
- `doc/db/4.0.0/kcloud_platform.sql` defines `sys_i18n_menu(code, menu)`.
- MyBatis mapper and DO still point to `sys_i18n_message` and `zhMessage/enMessage`.
### Fix Focus Areas
- laokou-service/laokou-admin/laokou-admin-infrastructure/src/main/resources/mapper/i18nMenu/I18nMenuMapper.xml[23-42]
- laokou-service/laokou-admin/laokou-admin-infrastructure/src/main/java/org/laokou/admin/i18nMenu/gatewayimpl/database/dataobject/I18nMenuDO.java[29-47]
- laokou-service/laokou-admin/laokou-admin-client/src/main/java/org/laokou/admin/i18nMenu/dto/clientobject/I18nMenuCO.java[29-50]
- laokou-service/laokou-admin/laokou-admin-domain/src/main/java/org/laokou/admin/i18nMenu/model/I18nMenuE.java[28-49]
- doc/db/4.0.0/kcloud_platform.sql[182-218]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| getCache(cacheManager, name).evict(key); | ||
| LockSupport.parkNanos(TimeUnit.MILLISECONDS.toNanos(200)); | ||
| return point.proceed(); |
There was a problem hiding this comment.
2. 200ms eviction stall 🐞 Bug ➹ Performance
OperateType.DEL now adds a fixed 200ms park after cache eviction; because DataCacheAspectj executes synchronously around annotated endpoints, every DEL cache operation adds hard latency to normal write requests.
Agent Prompt
### Issue description
`OperateType.DEL` introduces a fixed 200ms `parkNanos` delay after eviction. This runs inside an `@Around` advice, adding 200ms latency to every `@DataCache(... operateType = DEL)` request.
### Issue Context
`DataCacheAspectj` is synchronous and executes on the calling thread.
### Fix Focus Areas
- laokou-common/laokou-common-data-cache/src/main/java/org/laokou/common/data/cache/aspectj/OperateType.java[68-84]
- laokou-common/laokou-common-data-cache/src/main/java/org/laokou/common/data/cache/aspectj/DataCacheAspectj.java[47-53]
- laokou-service/laokou-admin/laokou-admin-adapter/src/main/java/org/laokou/admin/web/MenusController.java[79-86]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| select m.id, | ||
| im.code as "name", | ||
| m.pid, | ||
| m."path", | ||
| m.icon | ||
| from sys_menu m | ||
| join sys_i18n_menu im on m."name" = im.menu | ||
| where m."type" = 0 and m.status = 0 and m.del_flag = 0 and m.tenant_id = 0 | ||
| order by m."sort" desc |
There was a problem hiding this comment.
3. Menu join drops menus 🐞 Bug ✓ Correctness
Menu list queries now inner-join sys_i18n_menu on menu name without filtering tenant_id/del_flag; missing or duplicate i18n rows can hide menus or produce duplicate menu rows in results.
Agent Prompt
### Issue description
Menu queries now require a matching `sys_i18n_menu` row via INNER JOIN and do not filter `im.del_flag` or `im.tenant_id`. This can hide menus when mappings are missing and can create duplicates when multiple mappings exist.
### Issue Context
`sys_i18n_menu` is multi-tenant/soft-delete capable (tenant_id, del_flag), but the join doesn’t apply those constraints. The init SQL adds a non-unique index only.
### Fix Focus Areas
- laokou-service/laokou-admin/laokou-admin-infrastructure/src/main/resources/mapper/menu/MenuMapper.xml[81-106]
- doc/db/4.0.0/kcloud_platform.sql[184-218]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5823 +/- ##
=========================================
Coverage 58.31% 58.32%
Complexity 1144 1144
=========================================
Files 270 270
Lines 5357 5358 +1
Branches 339 339
=========================================
+ Hits 3124 3125 +1
Misses 2057 2057
Partials 176 176 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Summary by CodeRabbit
Release Notes
New Features
Improvements
Updates