fix(dashboard): give the model provider its own settings category - #4563
Merged
Merged
Conversation
The machine-configuration surface rendered a two-row grid while the component had gained a third block, so the operator credential panel was squeezed into the leftover row and its content ran over the capability catalog below it: the panel kept a 32px box for 389px of content and overlapped the workbench. The credential panel and the capability catalog answer different questions, so they are now two categories: "Model provider" holds the write-only operator credential, and "Global capabilities" holds the machine defaults every Goal inherits. The catalog workbench keeps one body element that owns the flexible row, so the surface stays two rows however many notices the editor needs, and the fixture gained the credential endpoint its new category reads. Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
huangruiteng
commented
Sep 16, 2026
huangruiteng
left a comment
Collaborator
Author
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact head reviewed: 36bb458
动机
业主报告机器配置页面出现重叠。现场读回(修复前的已安装 release)给出根因与形状:容器是两行网格(auto + minmax(0,1fr)),组件却有三个块,于是凭据卡被塞进 1fr 行只分到 32px,内容 389px 溢出,能力工作台落到下一隐式行并与之重叠(1018×66),同时挡住工作台里的按钮交互。
改动思路
凭据和能力目录回答两个不同问题(用哪个 provider/key vs 哪些机器默认值被 Goal 继承),共用一块表面既造成布局事故也让左栏语义含混。按业主建议拆成两个左栏项:模型 Provider 配置(只有 write-only 凭据面板)与全局能力配置(只有能力目录与编辑器);布局上让能力页回到确定性两行结构,工作台包进自身可伸缩的 body。
具体改动
- workspace-settings-page.tsx:新增 provider 分类(KeyRound 图标),machine 分类改名「全局能力配置」。
- machine-configuration-settings.tsx:移除内嵌凭据面板;invalid 提示 + 工作台收进 personal-capability-body。
- personal-workspace.css:.personal-capability-body(flex 列 + min-height:0)与 .personal-provider-settings。
- i18n EN/ZH:settings.modelProvider、settings.globalCapabilities。
- fixture:新增 /api/chat/operator-credential(只回读指纹,不存 key)。
- typed-actions:改用新分类名;新增分类归属守卫、堆叠容器守卫(块不重叠 + 不滚动的块不得溢出自身盒子)、凭据回读脱敏断言。
对主干的风险
低到中,且是信息架构变更:左栏多一项、机器配置改名、凭据面板换位置。读写 API、权限边界、写入门禁均未变(凭据仍 write-only、只回读指纹)。布局修复把不确定的隐式行换成确定两行 + 内部伸缩容器。
我的整体评价
正向且 proportional。业主报的是具体布局事故,根因是两个设置争夺同一表面;拆分类别同时消除重叠与语义含混,新增守卫是通用的,以后同类挤压会立刻失败。
Evidence:
- exact head 36bb458
- 修复前现场取证:.personal-capability-settings clips personal-operator-credential (32 < 389),重叠 1018×66
- 负向对照:把凭据面板放回能力页 → 守卫失败 "The global capability category still hosted the operator credential panel"
- 全量 personal-workspace-browser-smoke:6 个场景通过
- tsc --noEmit、workspace-progressive-loader(32 checks)、goal-order、team-plan-proposal、chat-route、pwa-bundle、workspace-theme 全通过
- loopx canary premerge --from-git-diff:merge_gate_passed true,surfaces public_boundary;advisory 为已知基线
English verdict: APPROVE
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.
动机
业主报告:机器配置页面出现重叠。现场读回(已安装 Dashboard,修复前的 release)确认了根因与形状:
.personal-capability-settings是grid-template-rows: auto minmax(0, 1fr)的两行网格,但组件后来长成了三个块(scope note / 操作者模型凭据 / 能力目录工作台):凭据卡被塞进1fr那一行、只分到 32px 高度,内容(389px)溢出;能力工作台落到下面的隐式行(y=215),于是凭据卡的"回读"部分正好叠在工作台上,并且挡住了其中的交互。改动思路
凭据和能力目录回答的是两个不同问题:用哪个 model provider / 哪把 key(一台机器的凭据决定),以及哪些机器默认值会被所有 Goal 继承(能力目录)。共用一块表面既造成上面的布局事故,也让左栏语义含混。因此按业主建议拆成两个左栏项:
布局上让能力页回到"恰好两个块"的确定性结构:工作台包进一个自身可伸缩的 body,无论编辑器需要多少条提示,容器都保持两行,不再把某个块压进固定行。
具体改动
workspace-settings-page.tsx:新增provider分类(图标KeyRound),machine分类改名为「全局能力配置 / Global capabilities」,两者各自渲染自己的内容。machine-configuration-settings.tsx:移除内嵌的凭据面板;把「invalid 修复提示 + 能力工作台」收进personal-capability-body。personal-workspace.css:新增.personal-capability-body(flex 列,min-height: 0)与.personal-provider-settings。settings.modelProvider、settings.globalCapabilities。/api/chat/operator-credential(只回读指纹,不存 key),让新分类在浏览器测试里可读可验。对主干的风险
低到中。这是信息架构变更:左侧多出一项、
机器配置改名为全局能力配置,凭据面板从能力页移到新页。机器配置与凭据的读写 API、权限边界、写入门禁都没有变化(凭据仍然是 write-only、只回读指纹)。布局修复把不确定的隐式网格行换成确定的两行 + 一个内部伸缩容器。我的整体评价
正向且 proportional:业主报的是一个具体的布局事故,但根因是"两个不同的设置在争夺同一块表面";拆分类别既消除了重叠,也让左栏语义清楚。新增的守卫是通用的(对每个堆叠容器检查"块不重叠"与"不滚动的块不得溢出自身盒子"),以后同类挤压会立刻失败。
Validation:
.personal-capability-settings clips personal-operator-credential (32 < 389)与 1018×66 的重叠。The global capability category still hosted the operator credential panel。personal-workspace-browser-smoke:6 个场景通过(navigation-sorting, chat-recovery, typed-actions, team-plan, execution-chip, progressive-loading)。tsc --noEmit、smoke:workspace-progressive-loader、goal-order、team-plan-proposal、chat-route、pwa-bundle、workspace-theme全通过。loopx canary premerge --from-git-diff→merge_gate_passed: true,surfacespublic_boundary;advisorycontrol-plane-maintainability-ratchet-smoke.py为 cleanorigin/main已知基线。spill与重叠应为空。Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
English verdict: APPROVE