Repository navigation
fix(auth-center): keep xAI card visible for Grok Build and align card helpSide - #10030
Merged
farion1231 merged 1 commit intoNov 27, 2026
Merged
Conversation
3 tasks done
… helpSide Include grokbuild in xai_oauth.apps so the xAI account card stays visible when Grok Build is shown without Claude or Codex. Also align codebuddy_oauth at the end of AUTH_CARDS to match APP_SPECS, compute helpSide dynamically across all nine cards, update xaiHelp/copilotHelp across all locales, and expand AuthCenterPanel / AuthCenterGroups unit tests.
jimpablo
force-pushed
the
fix/auth-center-grokbuild-visibility
branch
from
November 26, 2026 16:45
1cc2256 to
180dedf
Compare
2 tasks done
funkpopo
approved these changes
Nov 27, 2026
funkpopo
left a comment
Collaborator
There was a problem hiding this comment.
LGTM,改动清晰聚焦、单测覆盖也很完整,可以直接合并。
已核对:
xai_oauth.apps补齐"grokbuild"后,仅保留 Grok Build 时授权中心 xAI 账号卡可正常展示并随应用排序联动;同时与现有多应用排序策略保持边界清晰(相关讨论留到 #10031)。codebuddy_oauth声明顺序与 JSDoc 已对齐APP_SPECS;9 张卡片均支持并透传helpSide,按实际渲染位置动态切换(仅多卡末尾向上弹、单卡向下弹)逻辑准确。- 8 份语言包的
copilotHelp/xaiHelp与代码defaultValue及实际绑定范围一致,AuthCenterPanel/AuthCenterGroups单测和 CI 检查均已通过。
感谢贡献!
4 tasks done
Owner
|
已合并,感谢您的贡献!只用 Grok Build 的用户现在能看到 xAI 卡了,帮助气泡的方向也顺手理顺了。 |
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.
Human Note / 本人说明
自己在应用页只保留 Grok Build、关掉 Claude 和 Codex 时,发现授权中心里的 xAI 账号卡整个消失了。定位到
AuthCenterPanel.tsx里xai_oauth.apps漏了"grokbuild",顺手把同一处codebuddy_oauth的声明顺序与注释对齐回APP_SPECS,把 9 张卡的helpSide改成按实际渲染位置动态计算(并补齐CopilotAuthSection/CodexOAuthSection传参),同时更新了 8 份语言包里的xaiHelp/copilotHelp帮助文案和AuthCenterPanel/AuthCenterGroups单测。这个 PR 不改动多应用卡片现有的排序算法,只修明确遗漏。Summary / 概述
1. 保留 Grok Build 对应的 xAI 账号卡(
src/components/settings/AuthCenterPanel.tsx)xai_oauth.apps从["claude", "claude-desktop", "codex"]更新为["grokbuild", "claude", "claude-desktop", "codex"],避免隐藏 Claude / Codex、仅显示 Grok Build 时授权中心里的 xAI 卡片消失;在「应用」页将 Grok Build 拖到最前时,xAI 卡片也会同步前移。2. 对齐
AUTH_CARDS默认声明顺序并动态计算helpSide(src/components/settings/AuthCenterPanel.tsx)codebuddy_oauth移至AUTH_CARDS末尾(workbuddy_account之后),与APP_SPECS默认顺序及组件 JSDoc 注释保持一致。AuthCard.render调整为接收动态helpSide:多张卡片时仅最后一张为"top",其余及仅剩 1 张卡片时为"bottom";覆盖全部 9 张卡片(包括此前未传helpSide的CopilotAuthSection、CodexOAuthSection,以及此前写死"top"的WorkBuddyAccountSection)。3. 补齐 xAI / GitHub Copilot 卡片说明文案(
XaiOAuthSection.tsx、CopilotAuthSection.tsx及全部 8 份src/i18n/locales/*.json)chatgptHelp的现有句式,在authCenter.group.xaiHelp中补上 Grok Build 官方登录绑定,在authCenter.group.copilotHelp中补上 Codex 预设与 Copilot CLI 官方登录绑定(非中/英文 6 份语言包按chatgptHelp对应句式对齐翻译,已通过localeParity.test.ts校验)。4. 单元测试(
tests/components/AuthCenterPanel.test.tsx、tests/components/AuthCenterGroups.test.tsx)AuthCenterPanel.test.tsx:将codebuddy纳入cardOrder()校验,更新默认顺序、拖拽排序与全隐藏用例(显式设置grokbuild: false);新增用例覆盖仅显示 Grok Build(含单卡)保留xai、拖拽 Grok Build 到首位、多卡/重排/过滤(含copilot、codex垫底)/单卡/零卡、全隐藏时表单跳转定位单卡以及canSwitchAgy过滤后缩为单卡时的动态helpSide行为。AuthCenterGroups.test.tsx:新增用例验证真实渲染的CopilotAuthSection、CodexOAuthSection、XaiOAuthSection将helpSide透传到HelpTip(data-side)并展示更新后的copilotHelp/xaiHelp说明文案。Related Issue / 关联 Issue
Fixes #10029
Screenshots / 截图
helpSide="top"而垫底的 CodeBuddy 写死"bottom"helpSide(仅多卡最后一张向上弹,单卡向下弹),xaiHelp/copilotHelp说明文案与实际支持的应用一致Checklist / 检查清单
pnpm typecheckpasses / 通过 TypeScript 类型检查pnpm format:checkpasses / 通过代码格式检查(同时通过pnpm knip、pnpm test:unit348/348 全部 4570 项及pnpm build:renderer)cargo clippypasses (if Rust code changed) / 通过 Clippy 检查(N/A — 本 PR 仅修改前端 TypeScript、国际化文案与测试)localeParity.test.ts)