fix(webui): restore mobile provider source deletion#8321
Open
letr007 wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider adding an accessible label/tooltip (e.g.,
aria-labelortitle) 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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
There was a problem hiding this 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.
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
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.
Fixes a mobile WebUI regression in the provider configuration page.
When the provider source list collapses into a
v-selecton 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.vueAdded a mobile-only delete button next to the provider source
v-selectOnly shows the delete button when a real provider source is selected (not a placeholder item)
Reused the existing
delete-provider-sourceevent flow and deletion logic inuseProviderSources.tsKept 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.txtandpyproject.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:
Enhancements: