Skip to content

feat(lark): 更新飞书卡片默认页脚文案 - #1738

Merged
deepcoldy merged 3 commits into
masterfrom
feat/lark-default-footer
Oct 9, 2026
Merged

deepcoldy merged 3 commits into
masterfrom
feat/lark-default-footer

Conversation

@LucasIcarus

@LucasIcarus LucasIcarus commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • 未配置 brandLabel 时,飞书卡片页脚默认文案改为 Powered by [botmux](https://github.com/deepcoldy/botmux) with :LOVE:。
  • 已自定义签名、或显式留空隐藏签名的 bot 不受影响。Dashboard 占位提示和 bots.json 文档同步成同一句默认文案。
  • 旧卡片回读仍按原来的 [botmux](https://github.com/deepcoldy/botmux) 形态识别页脚,不改解析器。

影响面

  • 共用路径:DEFAULT_BRAND_LABEL(src/im/lark/md-card.ts),所有未自定义页脚的回复卡都会用到,与 CLI / 后端无关。
  • 已配置 brandLabel 的会话保持原样。

Test plan

  • bunx vitest run --project unit test/md-card.test.ts(147 passed)
  • 未配置签名的 bot 发一条飞书回复,确认页脚为新文案

未配置 brandLabel 时,页脚改为 Powered by botmux with :LOVE:。

Co-authored-by: Cursor <[email protected]>
设置页状态、占位和说明与飞书页脚默认句保持同一句原文。

Co-authored-by: Cursor <[email protected]>
@LucasIcarus

Copy link
Copy Markdown
Collaborator Author
image

@deepcoldy

Copy link
Copy Markdown
Owner

你好 @LucasIcarus ,这个 PR 的自动评审群已建好,欢迎进群查看评审进展与讨论(链接一年内有效):
https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=6e5ucc23-c6dc-48f7-90a0-5180712c89e9

目前你还不在自动拉群名单里,也可以把 GitHub 账号和飞书信息补进这个名单文档,补好后后续评审会自动把你拉进群:https://bytedance.larkoffice.com/wiki/WJ1nwWbtxi89erkNGNbcgkt9nUe

本条为自动流程留言,最终评审结论以维护者审阅为准,谢谢贡献!

@deepcoldy

Copy link
Copy Markdown
Owner

你好,感谢这个 PR!自动评审(两位 reviewer 独立核对)已完成,先说结论:改动本身正确,没有阻断问题,回读/剥离靠的是不可见 marker 与品牌文案解耦,自定义签名与关闭签名的路径都不受影响,build / 单测 / CI 均通过。

有两个很小的非阻断建议,方便的话可以在同一个 follow-up commit 里顺手改一下:

1. Dashboard 设置页的 6 处提示文案(src/dashboard/web/i18n.ts,中英各 3 处)

brandLabelHelp / brandLabelPlaceholder / brandStateDefault 这三个 key 渲染在不解析 Markdown 的纯文本位置(输入框 placeholder、<small> 状态行、帮助气泡的纯文本 children),所以页面上会字面显示出 [botmux](https://github.com/deepcoldy/botmux) 的裸方括号语法、完整 URL 以及字面 :LOVE:(浏览器不识别飞书表情短码)。

建议这 6 处换成可读形式,例如用 Unicode ❤ 或纯文字描述默认值;:LOVE: 短码只保留在真正发给飞书卡片的常量(DEFAULT_BRAND_LABEL)里。

2. /botconfig 帮助里有一处陈旧描述(src/services/bot-config-store.ts:109)

brandLabel 的 hint 仍写着「unset 回默认 botmux 链接」,这条文案会出现在 /botconfig help 输出中,改完默认值后它就不准确了,建议同步成新的一句话描述。

另外一个建议真机确认的点::LOVE: 在飞书官方表情码列表内、卡片 Markdown 也官方支持 :EmojiKey: 语法,文档层面没问题;但发布前最好在真机飞书里看一眼未配置签名的卡片页脚,确认表情和链接的实际渲染效果符合预期(回读 API 保留的是原始 Markdown 文本,无法据此判断渲染)。

以上是自动评审的初步意见,仅供参考,最终以维护者审阅为准。

@deepcoldy

Copy link
Copy Markdown
Owner

更正上一条:经维护者核对,你的 GitHub 账号其实已在自动拉群名单内(飞书:卜庆典),上一条说「未收录」是我们自动流程大小写匹配失误造成的误报,无需再补录名单。现已直接把你邀请进本群与 #1672 的评审群,可忽略上一条里的加群链接(仍有效但不再需要)。给你带来困惑抱歉!

Dashboard 纯文本不解析 Markdown 和飞书表情短码;/botconfig 帮助同步新默认值。

Co-authored-by: Cursor <[email protected]>
@LucasIcarus

LucasIcarus commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

已按评审意见改在 8d3dcecb8:

  • Dashboard 的帮助、占位和「当前」状态改成纯文本 Powered by botmux with ❤。这三处不解析 Markdown,也不认识飞书表情短码。
  • 发给飞书卡片的 DEFAULT_BRAND_LABEL 仍是 Powered by [botmux](https://github.com/deepcoldy/botmux) with :LOVE:。
  • /botconfig 里 brandLabel 的说明改成同一句默认文案。

@deepcoldy
deepcoldy merged commit f1147ec into master Oct 9, 2026
15 of 16 checks passed
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🚀 Released in v3.38.0

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