#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
优化分类和标签管理页面自动刷新的条件,现在支持检测 `status.permalink` 是否已经生成完毕,如果没有会自动刷新列表。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3376
#### Special notes for your reviewer:
测试方式:
1. 测试添加若干分类和标签,观测在没有生成 permalink 的情况下,是否会自动刷新列表。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端分类和标签管理的自动刷新条件,支持检测固定链接是否已经生成。
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
#### What this PR does / why we need it:
用户被删除时关联到的用户返回 ghost 用户信息
#### Which issue(s) this PR fixes:
Fixes#3356
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
用户被删除时关联到的用户返回 ghost 用户信息
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
使用 [TanStack Query](https://github.com/TanStack/query) 重构文章相关数据请求的相关逻辑。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3360
#### Special notes for your reviewer:
测试方式:
1. 测试文章相关联的页面,包括文章管理、分类、标签。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
Upgrade to Spring Boot 3.0.3. See https://github.com/spring-projects/spring-boot/releases/tag/v3.0.3 for more.
#### Does this PR introduce a user-facing change?
```release-note
Upgrade to Spring Boot 3.0.3.
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
This PR mainly creates two things:
1. Create JsonExtension to represent any extension and make extension modification more convenient
2. Discard watch when we detect that the extension status is changed only. It's useful to prevent infinite loop of reconciler.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3273
#### Special notes for your reviewer:
Try to install test plugin from [plugin-comment-widget.zip](https://github.com/halo-dev/halo/files/10799875/plugin-comment-widget.zip) before checking out this PR. You will get a infinite reconciliation loop.
Then, stop the process and checkout this PR and see the result.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
/kind api-change
#### What this PR does / why we need it:
1. spec 中新增 creationTime
2. 旧数据的 spec.creationTime 默认等于 approvedTime
3. 按照 metadata.creationTimestamp 排序的使用 spec.creationTime 代替
how to test it?
1. 使用迁移插件迁移看评论和回复的排序是否正确
2. 使用评论插件创建评论和回复看顺序是否正确
#### Which issue(s) this PR fixes:
Fixes#3330
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
评论和回复新增创建时间以兼容迁移数据的排序
```
#### What type of PR is this?
/kind bug
/milestone 2.3.x
/area console
#### What this PR does / why we need it:
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3357
#### Special notes for your reviewer:
测试使用主题/插件自定义的元数据信息,是否能够在 console 中显示默认值。
#### Does this PR introduce a user-facing change?
```release-note
使用主题/插件配置的元数据将能够展示默认值
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
使用 [TanStack Query](https://github.com/TanStack/query) 重构附件相关数据请求的相关逻辑。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3360
#### Special notes for your reviewer:
测试方式:
1. 测试附件管理页面的筛选、存储策略、分组等业务。
2. 测试附件选择模态框组件。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
优化用户名的校验规则,目前采用 DNS 名称的规则,即:必须以字母(a-z或A-Z)开头,并包含字母数字字符(a-z,A-Z,0-9)和连字符(-)。每一段名称以字母结尾(a-z或A-Z)。名称以点(.)分隔
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3239
#### Screenshots:
#### Special notes for your reviewer:
测试方式:
1. 新建用户,检查用户名输入规则是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端新建用户时,用户名的校验规则。
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
使用 [TanStack Query](https://github.com/TanStack/query) 重构插件管理列表的数据请求相关逻辑。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3360
#### Special notes for your reviewer:
测试方式:
1. 需要 `pnpm install`
2. 插件管理页面,安装若干插件。
3. 测试分页、条件筛选等逻辑是否正常。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
系统默认初始化一个 ghost 用户,用于表示用户已删除。
#### Which issue(s) this PR fixes:
Fixes#3317
```release-note
NONE
```
#### What type of PR is this?
/kind feature
/milestone 2.3.x
#### What this PR does / why we need it:
#### Which issue(s) this PR fixes:
Fixes#3263
#### Special notes for your reviewer:
测试方法:
1. 使用超级管理员登录
2. 查看接口 /actuator/info 查看是否存在 database 字段。
#### Does this PR introduce a user-facing change?
```release-note
NONE
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
This PR refines problem detail of PluginAlreadyExistsException. Please note the new type `https://halo.run/probs/plugin-alreay-exists` and additional property `pluginName` of problem detail.
Meanwhile
- Before
```json
{
"type": "about:blank",
"title": "Plugin Already Exists Error",
"status": 400,
"detail": "Plugin PluginCommentWidget already exists.",
"instance": "/apis/api.console.halo.run/v1alpha1/plugins/install",
"requestId": "880fe8cd-5",
"timestamp": "2023-02-20T10:17:21.541104Z"
}
```
- After
```json
{
"type": "https://halo.run/probs/plugin-alreay-exists",
"title": "Plugin Already Exists Error",
"status": 400,
"detail": "Plugin PluginCommentWidget already exists.",
"instance": "/apis/api.console.halo.run/v1alpha1/plugins/install",
"pluginName": "PluginCommentWidget",
"requestId": "880fe8cd-5",
"timestamp": "2023-02-20T10:17:21.541104Z"
}
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3164
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
优化插件重复安装错误提示。
```
What type of PR is this?
/kind bug
What this PR does / why we need it:
将ghost用户从用户列表隐藏。
Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3317
```release-note
NONE
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind feature
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes#3188
#### Special notes for your reviewer:
测试方式:
1. 使用 prod 模式启动项目,使用超级管理员登陆
2. 访问 /actuator/logfile 查看是否有日志显示。
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
NONE
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
为后端用户管理提供更多筛选接口,包括关键词、角色、创建时间排序
#### Which issue(s) this PR fixes:
Fixes#3290
```release-note
NONE
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
调整部分日志级别,以及删除部分无用的日志。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
将 https://github.com/halo-sigs/api-client 移动到 Console 的仓库进行管理。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3302
#### Special notes for your reviewer:
测试方式:
1. 需要先 `pnpm install && pnpm build:packages`
2. 测试开发环境(pnpm dev)和构建之后(pnpm build)是否能够正常使用。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.3.x
#### What this PR does / why we need it:
1. 去掉原 TagReconciler 的 requeue 逻辑,来临时解决大量 tag 时 reconciler 空转导致 cpu 下不来的问题,参考: https://github.com/halo-dev/halo/issues/3311
2. 增加 TagRouteReconciler 在启动时注册路由
#### Which issue(s) this PR fixes:
Fixes#3321
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
修复 #3316 引入的 tags 标签的路由没有注册的问题
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
暂时禁用 Tag Reconciler 在启动的时候同步。(临时解决方案)
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3312
#### Does this PR introduce a user-facing change?
```release-note
禁用系统启动时同步标签文章数的功能
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
静默请求所有角色信息,用于显示 displayName。(临时解决方案)
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
#### What this PR does / why we need it:
状态更新时检查是否与之前状态相同,目前先这样解决后续等 status 的 update 出来以后再重构一下 plugin 的 status 结构。
测试:
测试插件在开发模式和生产模式下填写 settingName 后有/无对应 settingName 资源的插件启动情况,看 PluginReconciler 出错时是否很快
步骤:
1. 开发模式下,插件的 plugin.yaml 配置了 settingName 但没有创建名称为 settingName 对应的 Setting 资源看插件启动时控制台是否出现很快的错误日志,期望出现错误的时间间隔会逐渐变长。
2. 与步骤一相同,但 settingName 对应有 Setting 模型的 yaml,期望插件正常启动且能保存配置
3. 生产模式启动插件重复步骤 1 和 2
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind bug
/area core
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
Fixed incorrect number of comments after comment deletion.
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/halo-dev/halo/issues/3287
#### Special notes for your reviewer:
为一篇文章添加多个评论,期望评论数量正确。
删除评论,期望评论数量正常减少。
删除全部评论,期望评论数量归零。
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
修复删除评论后Console端文章和单页评论数量不正确
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
#### What this PR does / why we need it:
Before this PR, halo will throw an FileAlreadyExists exception if users upload file which already exists.
But now, we will rename the attachment automatically on filename conflict. e.g.:
```bash
halo.run -> halo-xyz.run
.run -> xyz.run
halo -> halo-xyz
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3218
#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?
```release-note
附件已存在时自动重命名
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
文章发布用户被删除后,设置这篇文章的发布人为Ghost
#### Which issue(s) this PR fixes:
Fixes#3265
```release-note
NONE
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
将 @LIlGG 添加到 Reviewer 列表。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
将 @LIlGG 添加到 Reviewer 列表。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
#### What this PR does / why we need it:
修改 TemplateEngineManager 中 LRU cache 的缓存 key
see #3242 for more details.
#### Which issue(s) this PR fixes:
Fixes#3242
#### Special notes for your reviewer:
how to test it?
1. 安装几个主题测试预览功能是否正常
2. 特别关注激活主题的预览,激活主题的预览和激活主题直接访问使用的不同的 TemplateEngine
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```