Repository navigation
fix(dispatch): 任务树卡片的标题只截断显示,避免超长标题撑爆卡片 - #2778
Merged
deepcoldy merged 1 commit intoNov 4, 2026
Merged
Conversation
关联 deepcoldy#2756 第 3 条。进展行已有 80 字截断,--title 没有;超长或多行标题 乘以多个节点可能逼近飞书卡片内容上限,patch 失败后只 warn 不重发。 标题在卡片和文字版里合并空白、按字符截到 40 字,派发记录保留原文。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
swtxbling
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
November 4, 2026 09:51
Owner
|
感谢贡献,已 squash 合入 master。 复审中发现 4 个测试覆盖的小缺口(代码行为本身正确,均不阻断),欢迎顺手补一个小 PR:
另外建议后续在 Dashboard 打开 |
|
🚀 Released in v3.57.0 |
deepcoldy
added a commit
to swtxbling/botmux
that referenced
this pull request
Nov 5, 2026
复审发现空标题回退用例只单向断言空/纯空白 → 「编排任务」:卡片 header 或文字版首行若恒退化成常量「编排任务」,现有 22 个用例全部仍绿(双引擎实证)。补一个非空标题用例,钉住两处渲染会显示真实编排标题;两个恒量化变异在新用例上双引擎咬红。 Refs deepcoldy#2778 Co-Authored-By: Claude Code <[email protected]>
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.
关联 #2756 第 3 条
改了什么
任务树卡片的进展行已有 80 字截断(
reportDisplayLine),标题(编排会话标题、子任务--title)没有。超长或多行标题乘以多个节点,可能逼近飞书卡片内容上限,patch 失败后只 warn、不重发。taskTreeDisplayTitle:合并空白成一行、去首尾空白,按字素(Intl.Segmenter,与group-name-avatar.ts同一写法)截到 40 个,超出时第 40 个换成「…」。TITLE_MAX = 40和LINE_MAX放在一起。dispatch tree文字版表头、文字版节点。先截断再escapeMd,不会切出半个&。****。影响面
只影响任务树卡片和
botmux dispatch tree文字输出的显示;派发记录里的标题保留原文,不改数据、不改配置。任务树卡片在 #2760 之后默认关闭,开关打开时才可见。验证
新增用例覆盖:超长和多行标题在卡片与文字版里都被截断、派发记录保留原文、代理对 emoji 和 ZWJ 组合 emoji 不被切开、首尾空白、先截断后转义、空白标题回退。
变异复核(逐个改坏后跑上面第一条命令,再恢复),以下每一项都会让新用例变红:去掉 header、节点、文字版表头、文字版节点任意一处截断;去掉空白合并;去掉 trim;
TITLE_MAX改成 30;按 UTF-16 截断;按 code point 截断(ZWJ 组合 emoji 被切开);先转义后截断。🤖 Generated with Claude Code