Skip to content

refactor: v1 regression#224

Merged
GaoNeng-wWw merged 29 commits into
opentiny:refactor/next-nest-js-backendfrom
GaoNeng-wWw:feat/regression
Jul 23, 2026
Merged

refactor: v1 regression#224
GaoNeng-wWw merged 29 commits into
opentiny:refactor/next-nest-js-backendfrom
GaoNeng-wWw:feat/regression

Conversation

@GaoNeng-wWw

@GaoNeng-wWw GaoNeng-wWw commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

PR

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

  • v1 regress test
  • application seeder
  • application endpoint
  • mock endpoint

@GaoNeng-wWw GaoNeng-wWw changed the title Feat/regression fix: regression Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 805e757a-568f-48c3-b4a8-1d233fae57f3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added the bug Something isn't working label Jul 20, 2026
Comment thread template/nest-next/src/auth/auth.guard.ts
@GaoNeng-wWw GaoNeng-wWw changed the title fix: regression refactor: v1 regression Jul 21, 2026
@github-actions github-actions Bot added refactoring The process of restructuring code without changing its external behavior and removed bug Something isn't working labels Jul 21, 2026
@GaoNeng-wWw
GaoNeng-wWw marked this pull request as ready for review July 22, 2026 02:53

@wuyiping0628 wuyiping0628 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review Summary

整体是有价值的 v1 回归修复(角色删除校验、用户已存在、改密确认、API baseURL 统一、items/permission 字段对齐等),但合并前建议先处理下列阻塞项。

Must fix

  1. role-table.vueonPermissionChange 未定义,改权限会运行时报错
  2. interceptor.ts:401 刷新仍有竞态 / 未重试原请求 / 无 refresh 时未 reject;刷新成功用 router.go(0) 偏粗暴
  3. .vscode/settings.json:个人 Lua/Redis 配置不应入库
  4. zhCN/exception.json:缺少 role.NOT_EMPTY / user.PASSWORD_NOT_MATCH 等中文文案(仅改了 enUS)

Should fix

  1. update-role.command.ts:先删后写未包事务,失败会丢权限/菜单
  2. batch-remove-user.tsUserRole 删除未走事务内 em
  3. get-role-total.query.ts:过滤条件缓存与 create/remove 的 incr/decr 不一致
  4. auth.guard.ts:作者曾标注调试完回滚,请确认当前 DomainError 透传是否为正式方案

Nice to have

  • add-role.vue 权限展示建议 item.desc || item.name
  • permissionIds.map(item => item) 可简化
  • i18 batchRemove / remove 校验变弱

感谢贡献,修完上述几项后再合会更稳。

Comment thread template/tinyvue/src/views/role/info/components/role-table.vue Outdated
Comment thread template/tinyvue/src/views/role/info/components/role-table.vue Outdated
Comment thread template/tinyvue/src/api/interceptor.ts Outdated
Comment thread template/nest-next/src/auth/auth.guard.ts
Comment thread .vscode/settings.json
Comment thread template/nest-next/src/role/commands/update-role.command.ts Outdated
Comment thread template/nest-next/src/user/command/batch-remove-user.ts Outdated
Comment thread template/tinyvue/src/views/role/info/components/add-role.vue Outdated
Comment thread template/nest-next/src/user/command/change-password.command.ts
@Post('/batch')
batchRemove(@Body() body: BatchRemoveI18Records) {
return this.i18Service.batchRemove(body.ids);
batchRemove(@Body() body: I18nRecordId[]) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

去掉 BatchRemoveI18Records DTO 后,body 变为裸数组,Swagger 文档和校验都变弱了。若刻意简化,建议至少保留基础校验;remove 去掉 ParseIntPipe 也有同样问题(见上方 :id)。

@GaoNeng-wWw
GaoNeng-wWw requested a review from wuyiping0628 July 22, 2026 07:26
@GaoNeng-wWw
GaoNeng-wWw merged commit 3513fd2 into opentiny:refactor/next-nest-js-backend Jul 23, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring The process of restructuring code without changing its external behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants