fix(dashboard): 定时任务展示目标群聊 - #802
Merged
deepcoldy merged 3 commits intoAug 10, 2026
Merged
Conversation
deepcoldy
reviewed
Aug 10, 2026
deepcoldy
left a comment
Owner
There was a problem hiding this comment.
检查结论:核心数据流正确,但发现 1 个需修的 UI 边界,修复前不建议合并。
已核对:
- 编辑态只读语义正确:前端 PATCH payload 不包含
chatId/larkAppId,daemon PATCH 也只处理可编辑字段。 - 群名异步时机正确:延迟
/api/groups的浏览器验证确认先显示 chatId,映射完成后列表与已打开弹窗都会重绘成群名;加载失败仍能回退 chatId。 - 匿名只读面没有新增数据边界:schedule 的 chatId 与 groups 的 name 原本已在公开只读响应中保留。
pnpm build通过;dashboard-schedules-ui+dashboard-public-redact共 28/28 通过。- 全量单测为 14311 passed / 3 failed / 1 suite hook timeout;其中两个持续失败的集成测试在当前
origin/master上可同样复现,hook timeout 单文件重跑通过,因此不是本 PR 引入的回归。
合并前还需按仓库规范补齐:中文 PR 标题与中文说明(改动、原因、影响面、实际验证),以及 UI 截图;当前两个 commit 的冒号后描述也仍为英文。
| </div> | ||
| <div className="schedule-chip-strip"> | ||
| <span>{kind}</span> | ||
| {s.chatId ? <span title={String(s.chatId)}>{tr('schedules.form.chat')}: {chatTitle ?? s.chatId}</span> : null} |
Owner
There was a problem hiding this comment.
[P2] 长群名会覆盖右侧操作按钮。这里沿用 .schedule-chip-strip span 的 flex: none + white-space: nowrap,但新增内容没有任何宽度上限。仓库建群输入允许 60 字;浏览器用 51 字群名、1280×720 视口复现时,chat chip 的横向范围是 x=278–939,而 Run Now 是 x=857–949,二者真实重叠。建议给该 chip 单独加 class,并设置 max-width、overflow: hidden、text-overflow: ellipsis;tooltip 同时保留完整群名和 chatId,另补一个长名称布局回归验证。
Owner
There was a problem hiding this comment.
增量验证通过(63a0487),该 P2 已修复。
- 新规则位于基础
.schedule-chip-strip span之后且选择器更具体,声明的inline-block会覆盖inline-flex。在 flex item 上浏览器会将其计算为block,但关键是内容不再按 inline-flex 布局;配合受限宽度、overflow: hidden、white-space: nowrap,实际已渲染省略号。 - 浏览器实测 1280×720:中文 47/60 字、ASCII 51 字三种群名均为 320px,
scrollWidth > clientWidth,与右侧操作区无重叠;1100×720 响应式布局下同样不溢出容器、不重叠。 - tooltip 均保留完整群名与 chatId;无群名映射时只显示原始 chatId,没有重复。
- 新规则插在
.schedule-error-chip之前,没有破坏 error-chip 紧邻.schedule-row-head .schedule-state的既有结构断言。 pnpm exec tsc --noEmit、pnpm build通过;dashboard-schedules-ui+dashboard-public-redact为 29/29 通过。
未发现新的代码问题。合并前仍需按仓库规范补齐中文 PR 标题、中文说明与 UI 截图;未执行合并。
新增的「目标群聊」chip 继承 .schedule-chip-strip span 的 flex:none + white-space:nowrap 但没有宽度上限。仓库建群名允许 60 字,较长的中文群名(实测 ~47 字即触发)会让 chip 在 1280px 视口下越过主列、压到 Run/Edit/Delete 按钮上。 - 给 chip 单独加 .schedule-chat-chip:display:inline-block(base 的 inline-flex 不出 省略号)+ max-width:min(320px,100%) + overflow:hidden + text-overflow:ellipsis - title 同时保留完整群名与 chatId,截断后信息不丢 - 补真实浏览器无重叠回归验证(见 PR 说明) Co-authored-by: 申晗 <deepcoldy@gmail.com>
|
🚀 Released in v3.12.0 |
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.
改动
原因
定时任务此前仅显示 Bot AppID 与执行位置,无法在控制台确认任务实际投递到哪个群聊。
UI 截图
影响面
仅 Dashboard 定时任务列表和编辑态展示;不改变任务创建、调度、投递或 PATCH 的数据语义。
实际验证