Skip to content

fix(dashboard): polish form and disclosure controls - #156

Merged
Fridemn merged 3 commits into
mainfrom
style/dashboard-ui-polish
Jul 27, 2026
Merged

fix(dashboard): polish form and disclosure controls#156
Fridemn merged 3 commits into
mainfrom
style/dashboard-ui-polish

Conversation

@Fridemn

@Fridemn Fridemn commented Jul 27, 2026

Copy link
Copy Markdown
Member

修复新版 Dashboard 中部分组件样式未覆盖、交互控件错位以及下拉菜单出现空白选项的问题,统一相关组件的视觉与无障碍行为。

Summary / 改动概述

  • 修复首次提示弹窗中 Markdown 外部链接被渲染为原生按钮样式的问题,使 GitHub、官网、用户协议和邮箱链接保持统一的链接外观。
  • 新增通用 DisclosureButton 组件,统一折叠按钮的尺寸、对齐、点击区域、图标方向和焦点状态。
  • 优化机器人创建、插件命令、函数工具、人格设置等位置的折叠控件布局。
  • 为折叠按钮补充 aria-expanded、可访问名称和多语言文案。
  • 修复动态配置下拉框无条件生成空白选项的问题;仅在当前配置值无法匹配枚举项时保留隐藏占位。
  • 增加 Markdown 链接、折叠按钮和枚举下拉框的回归测试。

Verification / 验证方式

  • GitHub Actions:Check Dashboard 已通过
    • TypeScript typecheck
    • TypeScript / React lint
    • Style lint
    • Formatting check
    • Tests and coverage thresholds
    • Production bundle build
  • 已增加相关组件的回归测试,覆盖正常状态及旧配置异常值兼容场景。

Checklist / 检查清单

  • This change is not a breaking change. / 此改动不是破坏性变更。
  • I have verified the change locally (and provided logs/screenshots above). / 我已在本地验证并在上方提供日志/截图。
  • If workflows are changed, I attached at least one related Actions run link. / 如果修改了工作流,我已附上至少一个相关 Actions 运行链接。
  • If dependencies are updated, lockfiles are updated accordingly (src-tauri/Cargo.lock, lockfiles under changed package dirs). / 如果引入或升级依赖,已同步更新相关 lock 文件(如 src-tauri/Cargo.lock、对应包目录中的 lock 文件)。
  • This PR does not include malicious code. / 此 PR 不包含恶意代码。

Summary by Sourcery

Unify dashboard disclosure, markdown link, and enum select controls for consistent layout and accessibility.

Bug Fixes:

  • Prevent dynamic enum selects from rendering an empty placeholder option when the current value is valid.
  • Ensure external markdown links render as styled link controls instead of default button appearance.

Enhancements:

  • Introduce a reusable DisclosureButton component with standardized styling, focus behavior, and accessible labelling for collapsible UI sections.
  • Align command, tool, platform, and persona collapsible layouts around the new disclosure control, including improved keyboard and screen reader affordances.

Tests:

  • Extend markdown, shared primitives, and dynamic config form tests to cover external link controls, disclosure behavior, and enum-select placeholder handling.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@Fridemn
Fridemn merged commit 94ac703 into main Jul 27, 2026
6 checks passed
@Fridemn
Fridemn deleted the style/dashboard-ui-polish branch July 30, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant