Skip to content

fix(dashboard): give the model provider its own settings category - #4563

Merged
huangruiteng merged 1 commit into
mainfrom
codex/settings-provider-and-capabilities
Sep 16, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/settings-provider-and-capabilities

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

动机

业主报告:机器配置页面出现重叠。现场读回(已安装 Dashboard,修复前的 release)确认了根因与形状:

spill=[".personal-capability-settings clips personal-operator-credential (32 < 389)"]
overlaps=[{ a: "personal-operator-credential-readback", b: "personal-capability-layout", overlapX: 1018, overlapY: 66 }]

.personal-capability-settings 是 grid-template-rows: auto minmax(0, 1fr) 的两行网格,但组件后来长成了三个块(scope note / 操作者模型凭据 / 能力目录工作台):凭据卡被塞进 1fr 那一行、只分到 32px 高度,内容(389px)溢出;能力工作台落到下面的隐式行(y=215),于是凭据卡的"回读"部分正好叠在工作台上,并且挡住了其中的交互。

改动思路

凭据和能力目录回答的是两个不同问题:用哪个 model provider / 哪把 key(一台机器的凭据决定),以及哪些机器默认值会被所有 Goal 继承(能力目录)。共用一块表面既造成上面的布局事故,也让左栏语义含混。因此按业主建议拆成两个左栏项:

  • 模型 Provider 配置:只放操作者模型凭据(write-only,回读只有指纹与 endpoint)。
  • 全局能力配置:只放机器默认值的能力目录与编辑器。

布局上让能力页回到"恰好两个块"的确定性结构:工作台包进一个自身可伸缩的 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。
  • i18n(EN + ZH):settings.modelProvider、settings.globalCapabilities。
  • fixture:新增 /api/chat/operator-credential(只回读指纹,不存 key),让新分类在浏览器测试里可读可验。
  • typed-actions 场景:改用新分类名;新增两条结构性守卫(分类归属 + 不重叠/不溢出)与凭据回读的脱敏断言。

对主干的风险

低到中。这是信息架构变更:左侧多出一项、机器配置 改名为 全局能力配置,凭据面板从能力页移到新页。机器配置与凭据的读写 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,surfaces public_boundary;advisory control-plane-maintainability-ratchet-smoke.py 为 clean origin/main 已知基线。
  • 合并后会重新 promote 本机安装,并用同一个探针复测 spill 与重叠应为空。

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

English verdict: APPROVE

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 huangruiteng left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@huangruiteng
huangruiteng merged commit 18539ea into main Sep 16, 2026
5 of 6 checks passed
@huangruiteng
huangruiteng deleted the codex/settings-provider-and-capabilities branch September 16, 2026 14:40
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.

1 participant