Skip to content

add tooltip instructions#99

Merged
keting merged 2 commits intoketing:mainfrom
leonadoor:add-tooltip
May 9, 2026
Merged

add tooltip instructions#99
keting merged 2 commits intoketing:mainfrom
leonadoor:add-tooltip

Conversation

@leonadoor
Copy link
Copy Markdown
Contributor

Summary

新增了前端可复用的悬浮提示组件(Tooltip),优化了“同服务器”相关表单项的交互体验。

具体修改:

  1. 新增 HelpTooltip 基础组件(含 index.css 样式调整)。
  2. 新增 CoLocatedFieldLabel 组合组件,将原有的纯文本复选框替换为“文案 + ? 提示图标”的形式。
  3. 补充了清晰的提示文案:“勾选则表示该agent所在的机器与项目部署的机器是同一台”。
  4. 在以下入口完成了无缝接入:
    • ProjectNewPage.tsx (创建/编辑项目页面)
    • AgentsPage.tsx (新增/编辑智能体页面)

Closes # 77

Testing

  • cd src/backend && uv run python -m pytest tests/ -v
  • cd src/frontend && npm test
  • cd src/frontend && npm run build
  • 本地热更新与 UI 走查:已在本地环境验证了 ProjectNewPageAgentsPage 的渲染,确认 Tooltip 触发灵敏,文案无误,且不影响原有表单的逻辑。

Checklist

  • The change stays scoped and focused.
  • Related issues are linked when applicable.
  • Docs were updated where behavior, API shape, or setup changed.
  • No secrets, private URLs, or local machine paths were introduced.

@leonadoor leonadoor requested a review from keting as a code owner May 8, 2026 05:30
Copy link
Copy Markdown
Owner

@keting keting left a comment

Choose a reason for hiding this comment

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

整体方向 OK,组件抽象和接入范围都比较清晰,前端测试与构建也通过。合并前请先修一个真实交互问题:

当前 HelpTooltip 渲染在 内部,点击 ? 会触发 label 的默认行为,导致“同服务器”checkbox 被误切换。新用户最可能点击 ? 查看说明,这会直接影响他们正在理解的配置项。建议把 trigger 改成
并阻止 label 默认激活行为,或把 Tooltip 移到 label 外部。

另外建议顺手检查 Tooltip 气泡在项目页右侧卡片和窄屏下的显示。现在气泡固定向右弹出且宽度 240px,有被裁切或溢出视口的风险。

@keting keting merged commit 251422b into keting:main May 9, 2026
5 checks passed
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.

2 participants