Skip to content

fix(webui): align Extensions toasts with shared snackbar#6070

Open
stablegenius49 wants to merge 1 commit intoAstrBotDevs:masterfrom
stablegenius49:pr-factory/issue-6022-extension-toast-alignment
Open

fix(webui): align Extensions toasts with shared snackbar#6070
stablegenius49 wants to merge 1 commit intoAstrBotDevs:masterfrom
stablegenius49:pr-factory/issue-6022-extension-toast-alignment

Conversation

@stablegenius49
Copy link
Contributor

@stablegenius49 stablegenius49 commented Mar 11, 2026

Fixes #6022.

Modifications / 改动点

  • This is NOT a breaking change. / 这不是一个破坏性变更。
  • remove the Extensions page's local snackbar state and inline snackbar markup
  • switch the page composable to the shared app-level useToast() helper so dialog-related toasts render through the same global snackbar as the rest of the dashboard
  • keep the diff small and behaviorally equivalent while avoiding the dialog/toast alignment mismatch reported in the issue

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

  • targeted syntax verification for the touched files:
    • dashboard/src/views/extension/useExtensionPage.js
    • dashboard/src/views/ExtensionPage.vue
  • verification script parsed the JS file with TypeScript's parser and parsed/compiled the Vue SFC with @vue/compiler-sfc
  • no new dependencies added

Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ 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.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

Summary by Sourcery

将扩展(Extensions)页面的 toast 处理方式与应用级共享 snackbar 系统对齐。

Bug 修复:

  • 确保与扩展相关的对话框 toast 通过与仪表板其余部分相同的全局 snackbar 渲染,以修复对齐不一致的问题。

功能增强:

  • 移除扩展页面的本地 snackbar 状态和内联 snackbar 组件,改用共享的 useToast() 辅助函数,实现统一的 toast 处理。
Original summary in English

Summary by Sourcery

Align the Extensions page toast handling with the shared app-level snackbar system.

Bug Fixes:

  • Ensure extension-related dialog toasts render through the same global snackbar as the rest of the dashboard to fix alignment inconsistencies.

Enhancements:

  • Remove the Extensions page’s local snackbar state and inline snackbar component in favor of the shared useToast() helper for unified toast handling.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the toast notification system within the Extensions page to align with the global application-level snackbar. By removing the page-specific snackbar implementation and integrating the shared useToast() utility, the change ensures a consistent user interface for notifications across the entire dashboard, improving the overall user experience without altering existing functionality.

Highlights

  • Unified Toast Notifications: The Extensions page now utilizes the shared app-level useToast() helper, ensuring all dialog-related toasts render through the same global snackbar as the rest of the dashboard.
  • Removed Local Snackbar Implementation: The Extensions page's local snackbar state (snack_message, snack_show, snack_success) and its inline <v-snackbar> markup have been removed, simplifying the component.
  • Improved UI Consistency: This change resolves an issue where toasts on the Extensions page had an alignment mismatch with other dashboard notifications, providing a more consistent user experience.
Changelog
  • dashboard/src/views/ExtensionPage.vue
    • Removed local snackbar component and associated state variables from the template and script setup.
  • dashboard/src/views/extension/useExtensionPage.js
    • Imported the global useToast utility.
    • Removed local state variables (snack_message, snack_show, snack_success) and the page-specific toast function.
    • Integrated the global toast function for displaying notifications.
Activity
  • The pull request author, stablegenius49, created this PR to address issue [Bug]弹窗和提示不对齐 #6022, focusing on UI consistency for toast notifications.
  • The author has provided a detailed description including modifications, screenshots, and a checklist, indicating thorough preparation and verification of changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@sourcery-ai 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.

嗨,我已经审阅了你的更改,一切看起来都很棒!


Sourcery 对开源项目是免费的——如果你觉得我们的评审有帮助,请考虑分享它们 ✨
帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English

Hey - I've reviewed your changes and they look great!


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.

@dosubot dosubot bot added the area:webui The bug / feature is about webui(dashboard) of astrbot. label Mar 11, 2026
Copy link
Contributor

@gemini-code-assist 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.

Code Review

This pull request addresses a UI inconsistency by refactoring the toast notifications on the Extensions page. The local snackbar implementation in ExtensionPage.vue and its state management in useExtensionPage.js have been removed. In their place, the shared useToast composable is now used, which aligns the page's notifications with the rest of the application. The changes are concise and effectively migrate the functionality to the shared system, which should resolve the reported alignment issue.

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. size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]弹窗和提示不对齐

1 participant