← 返回首页
fix(webui): restore mobile provider source deletion by letr007 · Pull Request #8321 · AstrBotDevs/AstrBot · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

fix(webui): restore mobile provider source deletion#8321

Open
letr007 wants to merge 2 commits into
AstrBotDevs:masterfrom
letr007:fix/mobile-provider-source-delete
Open

fix(webui): restore mobile provider source deletion#8321
letr007 wants to merge 2 commits into
AstrBotDevs:masterfrom
letr007:fix/mobile-provider-source-delete

Conversation

Copy link
Copy Markdown
Contributor

letr007 commented May 25, 2026
edited by sourcery-ai Bot
Loading

Fixes a mobile WebUI regression in the provider configuration page.

When the provider source list collapses into a v-select on mobile screens, the delete action for provider sources disappears, which makes provider sources impossible to remove from mobile layout. This PR restores the delete entrypoint for the currently selected provider source without changing existing backend logic or desktop behavior.

修复 WebUI 提供商配置页面在移动端下的一个回归问题。

当提供商源列表在移动端折叠为 v-select 下拉框后,删除提供商源的入口丢失,导致用户无法在移动端删除提供商源。本 PR 恢复了当前选中提供商源的删除入口,同时不修改现有后端逻辑,也不影响桌面端行为。

Modifications / 改动点

  • Updated dashboard/src/components/provider/ProviderSourcesPanel.vue

  • Added a mobile-only delete button next to the provider source v-select

  • Only shows the delete button when a real provider source is selected (not a placeholder item)

  • Reused the existing delete-provider-source event flow and deletion logic in useProviderSources.ts

  • Kept desktop deletion behavior unchanged

  • 修改了 dashboard/src/components/provider/ProviderSourcesPanel.vue

  • 在移动端提供商源 v-select 旁边补回删除按钮

  • 仅在当前选中真实提供商源时显示删除按钮(不会对 placeholder 显示)

  • 复用了现有 delete-provider-source 事件链路和 useProviderSources.ts 中的删除逻辑

  • 保持桌面端删除行为不变

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

Checklist / 检查清单

  • 😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
    / 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。

  • 👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
    / 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”

  • 🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
    / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txt 和 pyproject.toml 文件相应位置。

  • 😮 My changes do not introduce malicious code.
    / 我的更改没有引入恶意代码。

Summary by Sourcery

Restore mobile WebUI ability to delete provider sources when the source list is rendered as a select on small screens.

Bug Fixes:

  • Reintroduce a delete action for the currently selected provider source in the mobile layout without affecting desktop behavior.

Enhancements:

  • Add conditional logic and styling to only display the mobile delete button for non-placeholder provider sources.

dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. area:provider The bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner. area:webui The bug / feature is about webui(dashboard) of astrbot. labels May 25, 2026
Copy link
Copy Markdown
Contributor

sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Hey - I've left some high level feedback:

  • Consider adding an accessible label/tooltip (e.g., aria-label or title) to the new icon-only delete button so that screen readers and users unfamiliar with the icon can understand its purpose.
Prompt for AI Agents
Please address the comments from this code review: ## Overall Comments - Consider adding an accessible label/tooltip (e.g., `aria-label` or `title`) to the new icon-only delete button so that screen readers and users unfamiliar with the icon can understand its purpose.
Sourcery is free for open source - if you like our reviews please consider sharing them ✨ Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Code Review

This pull request adds a mobile-specific delete button to the provider sources panel, including the logic to determine deletability and emit the deletion event. The review feedback suggests improving accessibility by adding an aria-label to the icon-only button and refactoring the deletability check into a shared helper function to avoid code duplication.

Comment thread dashboard/src/components/provider/ProviderSourcesPanel.vue Show resolved Hide resolved
Comment thread dashboard/src/components/provider/ProviderSourcesPanel.vue Show resolved Hide resolved
dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 25, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:provider The bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner. area:webui The bug / feature is about webui(dashboard) of astrbot. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Footer

© 2026 GitHub, Inc.