Repository navigation
feat(dashboard): ⌘K 可搜 Bot 配置及其分类并按 bot 直达,补齐未收录的页面 - #2137
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 22, 2026 02:32
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
本轮增量(b90d88aba → a32b0bc):处理评审意见P2:高频短词首条被子页面 / 分类抢走(c8cc6d23d)
修后首条(中 / 英界面一致):「会话」→ 会话或「会话控制」;「sessions」→「会话控制」;「设置」→「全局设置」;「权限与安全」「分布」「常用」「高级」「Security」「Distribution」照样直达各自的分类 / 子页面;「机器人配置」「Bot 配置」「bot settings」首条是 Bot 配置页,五个分类全部列出。 新增防回归用例(中英两种界面):
5 处变异各自变红:加回「Bot 设置」、子页面标题去掉父级、子页面关键词改回短名、分类标题去掉父级、分类关键词改回短名。其中两种关键词变异只在英文界面红。 P3 两条(74b29ba0c)
「版本与更新」挪 id 的视觉 两版 CSS 相同,没有任何样式或脚本按 验证
|
Owner
Author
合码回执
Follow-up(不阻断)
|
|
🚀 Released in v3.50.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.
改了什么
#2071 的 ⌘K 全局搜索上线后有几处搜不到的地方,这个 PR 补齐:
#/bot-defaults?tab=<分类>:页面落在该分类,滚到分类栏并闪烁定位,参数用完即清。显式指定的分类优先于「启动被拦的 Bot 自动切到高级」那条首次选择逻辑。#/bot-defaults?bot=<appId>)。cli_xxx搜时,第一条就是那个 bot,不会被一串会话抢在前面。会话仍可按 bot 名(显示在副标题里)搜到。#/monitor-room、Webhook 调用日志#/connectors/logs、团队管理#/team/manage、角色 Profiles#/roles/profile#/insights?tab=…)?tab=深链并收录,由 tab 常量直接生成#/webhook-logs(调用日志的旧别名)、#/agent-workbench-dock(桌面壳嵌入的驾驶舱界面)还有几处页内 tab 目前没有地址、本 PR 未收录:Skill 管理的四个 tab、消息监听的 tab、Agent 的图 / 列表视图、自定义的各步骤。要收录得先给各页面加深链,留作后续。
中英文都能搜:页面、分类、子页面的中英文名都参与匹配,另加了一组叫法别名(如「机器人配置」/「bot settings」「对话」/「conversations」「技能」「智能体」)。
子页面和分类不抢主页面的首条:子页面 / 页内分类的标题写成「父页面 › 子页面」(如「数据洞察 › 会话」「Bot 配置 › 权限与安全」),关键词也是两种语言下带父级的全名,不收光秃秃的短名。否则「会话」「分布」这类短名做标题会全等命中,把「会话控制」等主页面挤下首条;英文界面搜中文短名时也一样。Bot 配置页不收「Bot 设置」这个别名:「设置」会落在它的词首,把「全局设置」从「设置」的首条挤下去。
高频短词的首条与改动前一致:「会话」→ 会话或「会话控制」、「sessions」→「会话控制」、「设置」→「全局设置」,中英两种界面都成立。分类名、子页面名照样直达(「权限与安全」「分布」「常用」「Security」「Distribution」……)。
有意的排序变化:搜「权限」时,首条从全局设置的「访问权限」(子串命中)变为「Bot 配置 › 权限与安全」(词首命中),「访问权限」排第二。
另外,「全部」分类下设置组从最多 4 条调到 5 条,搜「Bot 配置」时五个分类能一屏全部露出。
防止以后漏登记
侧边栏条目和分组从
app.tsx挪到无副作用的nav-items.tsx(同时放「索引子页面」清单和「有意不收录」名单);数据洞察的 tab 列表抽到轻量的insight-tabs.ts;Bot 配置的分类常量挪到bot-defaults.ts。新增test/dashboard-command-palette-index.test.ts:dashboardRoutes里的每个路由,必须在侧边栏、索引子页面、或带理由的排除名单之一里出现;排除名单里不能留已经不存在的路由。新加页面忘了登记会直接红。BOT_DEFAULTS_TABS一一对应,并且和页面上实际渲染的分类按钮文案一致。SettingsBlock都必须有 id 且在索引里(源码结构护栏 K4:区块是页面组件内部的 JSX,导不出来,只能读源码反查)。新加区块没进索引会直接红。原来按文本解析
app.tsx的两个测试(侧边栏分组一致性、桌面壳侧边栏镜像)改成直接 importnav-items.tsx。影响面
app.tsx的侧边栏数据改为从nav-items.tsx导入,渲染逻辑不变。settings-search-flash改名为palette-target-flash。?tab=深链;搜「权限」的首条变化见上文。除此之外没有改动已有行为。验证
bun run build通过(含 tsc 与产物审计)。tsc --noEmit通过,引用 Bot 配置页 / 面板 / 侧边栏 / 会话保存提示模块的 29 个测试文件 877 个用例通过。bun test逐文件通过(新覆盖测试 11、面板 46、侧边栏分组 1、Bot 配置 82);桌面壳镜像测试和 leave-guard 测试用了vi.hoisted,按 runner 规则只在 vitest 下跑,与主干一致。截图(合成数据)
搜「机器人配置」:Bot 配置页排第一,五个分类(带父级前缀)跟在后面
按 app id 搜:直达那个 bot 的配置,不再被会话抢在前面
选中「权限与安全」:Bot 配置页落在该分类并闪烁定位
不在侧边栏的子页面(团队管理)
英文界面搜「bot settings」
高频短词「会话」:首条仍是「会话控制」,子页面和分类带父级排在后面
设置页「系统」组:「版本与更新」挪 id 后与兄弟区块一致,渲染与改动前逐像素相同
🤖 Generated with Claude Code