Repository navigation
fix(dashboard): 更正「管理 → 终端」访问范围的提示文案与注释 - #2068
Merged
Merged
Conversation
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 20, 2026 18:01
中心平台对机器 Dashboard(m- 子域)的反代不注入 X-Botmux-Role,只带 actor + scopes;机器端没有角色头就解析成 legacy 管理身份。所以从平台 机器 Dashboard 进来的机器主人和协管者现在就能用宿主终端,带角色头的 终端分享子域(t-)仍被拒。原注释、终端页提示和文档写成「平台身份(含 平台 owner)一律拒、只对本机 owner 开放」,与实际行为不符。 - 终端页无权限提示(中英)改为「本机管理链接,或从中心平台打开的机器 Dashboard」 - host-terminal.ts / dashboard.ts 注释按实际门禁改写 - docs/agent-workbench.md 身份表补充 m- 机器 Dashboard 属于本机管理员 - 新增用例模拟平台 m- 反代请求头(无角色头),钉住现状 运行时代码零改动。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
- host-terminal.ts:注明角色头只在已绑定平台且值合法时生效 - agent-workbench.md 4.10「常驻链接谁能取」与 6.1 身份表对齐:m- 机器 Dashboard 按本机管理员处理 - ui.ts hostTerminal 注释:只有带平台角色头的协管者拿不到宿主 shell Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
force-pushed
the
fix/host-terminal-access-wording
branch
from
October 20, 2026 19:09
155fa39 to
0ab47e7
Compare
|
🚀 Released in v3.48.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.
改了什么
更正「管理 → 终端」(宿主网页终端)访问范围的说法,运行时代码零改动。
#1998 的注释、终端页提示和 PR 描述都写的是「经中心平台进来的身份(含平台 owner)一律拒绝,只对本机 owner 开放」。核对中心平台的反代实现后,这个说法不对:
?t=/ 卡片常驻链接)m-子域)X-Botmux-Actor+X-Botmux-Scopes,不带角色头t-,/s/*)X-Botmux-Rolet-,身份门不认平台角色)平台在 m- 反代上不带角色头是平台侧既定决定(协管者与机器主人等能力),机器端没有角色头就按本机管理员处理。所以 m- 进来的人现在就能用宿主终端,和原来的调试终端一致。这次不改这条边界,只让文案和注释与实际一致:
src/dashboard/web/i18n.ts:无权限时终端页的提示(中英)改为「只对能管理这台机器的人开放:本机管理链接,或从中心平台打开的机器 Dashboard」src/dashboard/host-terminal.ts、src/dashboard.ts:门禁注释按上表改写docs/agent-workbench.md:身份表「本机管理员」一行补充 m- 机器 Dashboardtest/host-terminal.test.ts:新增用例,模拟平台 m- 反代的真实请求头(m- Origin + 活跃 cookie + actor + scopes、无角色头),机器主人和默认档协管者都放行,把现状钉住;原有「带角色头一律拒」的用例不变影响面
#/terminal时看到的提示文字验证
bun run build通过(含 tsc、各项 audit、dashboard bundle)bunx vitest run test/dashboard-i18n.test.ts test/dashboard-i18n-c5.test.ts test/host-terminal.test.ts test/platform-actor-header.test.ts test/dashboard-nav-groups.test.ts:5 个文件 501 个用例全部通过resolveDashboardIdentity改成「没有角色头但带 actor 就当平台身份」,新用例变红(1 failed),其余 4 条边界用例仍绿;恢复后全绿legacy-dashboard,门禁放行;t- 带角色头的解析为platform-dashboard,被拒截图(合成数据)
🤖 Generated with Claude Code