-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(webui): supports force update plugins #4293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Soulter
merged 1 commit into
AstrBotDevs:master
from
clown145:feature/force-update-button
Jan 3, 2026
Merged
feat(webui): supports force update plugins #4293
Soulter
merged 1 commit into
AstrBotDevs:master
from
clown145:feature/force-update-button
Jan 3, 2026
+63
−8
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - 我发现了 1 个问题,并留下了一些整体性的反馈:
- 建议在强制更新确认弹窗的文案中加入目标扩展的名称,这样用户可以清楚知道即将重新安装的是哪个插件。
- 当
confirmForceUpdate触发updateExtension时,更新按钮仍然是可点击状态;你可能需要防止重复点击(例如复用现有的 loading 状态),以避免为同一个扩展排队多个强制更新请求。
给 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- Consider including the target extension’s name in the force update confirmation dialog text so users are clear which plugin is about to be reinstalled.
- When `confirmForceUpdate` triggers `updateExtension`, the update button remains enabled; you may want to guard against duplicate clicks (e.g., by reusing the existing loading state) to avoid queuing multiple forced updates for the same extension.
## Individual Comments
### Comment 1
<location> `dashboard/src/views/ExtensionPage.vue:1133-1134` </location>
<code_context>
- <v-btn icon size="small" @click="updateExtension(item.name)"
- :v-show="item.has_update">
+ <v-btn icon size="small" @click="updateExtension(item.name)">
<v-icon>mdi-update</v-icon>
<v-tooltip activator="parent" location="top">{{ tm('tooltips.update') }}</v-tooltip>
</v-btn>
</code_context>
<issue_to_address>
**suggestion:** Consider aligning the button label/icon with the new reinstall/force-update behavior.
This now calls `updateExtension` even when `item.has_update` is false, potentially triggering a reinstall flow while the icon/tooltip still suggest a normal update. Consider adjusting the icon and tooltip based on `item.has_update` (as with the card menu text) so users can tell when they’re updating vs reinstalling.
Suggested implementation:
```
<v-btn icon size="small" @click="updateExtension(item.name)">
<v-icon>{{ item.has_update ? 'mdi-update' : 'mdi-restart' }}</v-icon>
<v-tooltip activator="parent" location="top">
{{ item.has_update ? tm('tooltips.update') : tm('tooltips.reinstall') }}
</v-tooltip>
</v-btn>
```
1. Ensure there is a corresponding `tooltips.reinstall` key in your i18n messages; if your existing card menu uses a different key for the reinstall/force-update label, reuse that same key instead of `tooltips.reinstall` for consistency.
2. If your design uses a different icon for reinstall/force-update elsewhere (e.g. `mdi-reload` or `mdi-refresh`), swap `'mdi-restart'` for the icon name you already use so the visual language stays consistent across the UI.
</issue_to_address>帮我变得更有用!请对每条评论点 👍 或 👎,我会根据你的反馈来改进后续的评审。
Original comment in English
Hey - I've found 1 issue, and left some high level feedback:
- Consider including the target extension’s name in the force update confirmation dialog text so users are clear which plugin is about to be reinstalled.
- When
confirmForceUpdatetriggersupdateExtension, the update button remains enabled; you may want to guard against duplicate clicks (e.g., by reusing the existing loading state) to avoid queuing multiple forced updates for the same extension.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider including the target extension’s name in the force update confirmation dialog text so users are clear which plugin is about to be reinstalled.
- When `confirmForceUpdate` triggers `updateExtension`, the update button remains enabled; you may want to guard against duplicate clicks (e.g., by reusing the existing loading state) to avoid queuing multiple forced updates for the same extension.
## Individual Comments
### Comment 1
<location> `dashboard/src/views/ExtensionPage.vue:1133-1134` </location>
<code_context>
- <v-btn icon size="small" @click="updateExtension(item.name)"
- :v-show="item.has_update">
+ <v-btn icon size="small" @click="updateExtension(item.name)">
<v-icon>mdi-update</v-icon>
<v-tooltip activator="parent" location="top">{{ tm('tooltips.update') }}</v-tooltip>
</v-btn>
</code_context>
<issue_to_address>
**suggestion:** Consider aligning the button label/icon with the new reinstall/force-update behavior.
This now calls `updateExtension` even when `item.has_update` is false, potentially triggering a reinstall flow while the icon/tooltip still suggest a normal update. Consider adjusting the icon and tooltip based on `item.has_update` (as with the card menu text) so users can tell when they’re updating vs reinstalling.
Suggested implementation:
```
<v-btn icon size="small" @click="updateExtension(item.name)">
<v-icon>{{ item.has_update ? 'mdi-update' : 'mdi-restart' }}</v-icon>
<v-tooltip activator="parent" location="top">
{{ item.has_update ? tm('tooltips.update') : tm('tooltips.reinstall') }}
</v-tooltip>
</v-btn>
```
1. Ensure there is a corresponding `tooltips.reinstall` key in your i18n messages; if your existing card menu uses a different key for the reinstall/force-update label, reuse that same key instead of `tooltips.reinstall` for consistency.
2. If your design uses a different icon for reinstall/force-update elsewhere (e.g. `mdi-reload` or `mdi-refresh`), swap `'mdi-restart'` for the icon name you already use so the visual language stays consistent across the UI.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Soulter
approved these changes
Jan 3, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:webui
The bug / feature is about webui(dashboard) of astrbot.
lgtm
This PR has been approved by a maintainer
size:M
This PR changes 30-99 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / 改动点描述
优化插件页面的更新体验。目前的更新按钮依赖插件市场数据加载逻辑,存在延迟且在未检测到新版本时无法操作。此改动允许用户随时点击更新按钮,并在无新版本时通过弹窗确认进行“强制重新安装”,方便用户手动拉取远程仓库的最新修改。
Modifications / 改动点
ExtensionPage.vue:
updateExtension逻辑:无新版本时弹出强制更新确认对话框。ExtensionCard.vue:
i18n: 添加了中英文对应的翻译文本(强制更新提示、重新安装按钮文本)。
This is NOT a breaking change. / 这不是一个破坏性变更。
Screenshots or Test Results / 运行截图或测试结果
验证步骤 (Verification Steps):
运行截图:

Checklist / 检查清单
Summary by Sourcery
允许用户在任何时间触发扩展更新,并在未检测到新版本时,增加强制重新安装的确认流程。
新功能:
增强项:
Original summary in English
Summary by Sourcery
Enable users to trigger extension updates at any time and add a flow for confirming forced reinstalls when no new version is detected.
New Features:
Enhancements: