Repository navigation
feat(webui): 账号身份行展示套餐名并适配新老套餐 - #7
Merged
Merged
Conversation
Contributor
Author
|
CI 结果说明:三个平台的失败与 main 基线一致,不是本 PR 引入的。
结论:本 PR 没有新增失败,红的是仓库当前的基线。要变绿需要单独修这些存量问题(冻结 oracle、presentation 签名、tile 顺序、lifecycle fence、motion inventory、macOS 平台相关测试),我可以另开一个 CI 基线修复 PR,不和本功能混在一起。 |
- 移除身份行的“本地 · host:port”,未登录显示“请先登录账号!”,已登录显示账号的套餐名(来自配额接口)。 - 套餐名以账户返回为准:新 M Plan 档位(Go / Explore / Build)原样透传;旧账号标识 starter / plus / max / ultra / plus极速版 映射为显示名;订阅态解析不出档位时优先用 planName;数字 combo id 按 subscription_type 兜底为 Token Plan / M Plan。 - 套餐措辞模块发布为 usage-plan.public.ts 供账号业务复用,身份行与“用量与模型”页面共用同一套措辞。 - 同步更新设计文档、冻结路径清单和单元测试。
July-X
force-pushed
the
feat/webui-rail-plan-label
branch
from
November 10, 2026 05:41
8785a11 to
bed3d36
Compare
账号身份行由“本地 · host:port”改为账号套餐名后,浏览器截图基线的左下角随之变化。 本次更新三个平台共 42 张基线: - plugin-catalogue-layout 4 张(add Skill / create Agent / add MCP Server / Git import 对话框) - responsive-baselines 8 张(1440/1280/1024/900/768 的 shell,1440/1024/768 的 workspace panel) - visual-baselines 2 张(shell-and-rail、transcript-and-composer) 基线取自本次 CI 三个平台(linux / darwin / win32)失败时生成的实际截图;diff 图确认变化只落在身份行文字,其余像素不变。
冲突全部是 42 个跨平台视觉基线 PNG:main 的 rail 会话行改动与本分支的账号身份行文案改动都重录了同一批基线。 先取 main 的原生录制结果,再按合并后源码在 darwin / linux / win32 三个平台各采集原生截图补录。 同时重新生成 release/public-source.json,登记 main 新增的 rail-session-navigation.spec.mjs。
冲突的 42 张基线取自合并提交在 CI 的原生截图(ubuntu / windows / macos 各 14 张), 每张与 main 基线的差异只落在 rail 底部的账号身份行矩形内(约 x56..178、y876..888), main 的 rail 会话行改动像素保持原样。
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.
变更
左下角账号身份行改成展示套餐信息:
signedIn/tokenPlanTier/planName/subscriptionType)。starter/plus/max/ultra/plus极速版映射为显示名(大小写、空格不敏感),其余未知值原样透传;订阅态解析不出档位时优先用接口的planName,最后才按subscriptionType兜底为 Token Plan / M Plan。usage-plan.public.ts,账号业务与“用量与模型”页共用同一套措辞(依赖门禁 0 违规);同时移除 shell /main.tsx的hostLabel传参链。涉及文件:
packages/webui/src/client/features/account/ui/UserMenu.tsxpackages/webui/src/client/features/account/projection/usage.public.tspackages/webui/src/client/features/settings/projection/usage-plan.public.ts(由usage-plan.ts重命名)packages/webui/src/client/shell/WebuiClientFoundationApp.tsx、packages/webui/src/client/main.tsxpackages/webui/docs/design/design-language.mdrelease/public-source.json、packages/webui/test/gates/fixtures/path-metadata-f00.jsonpackages/webui/test/unit/webui-account-billing.test.ts、packages/webui/test/unit/webui-usage-quota.test.tspackages/webui/test/browser/**/*-snapshots/*.png(42 张,按与 main 合并后的源码重录)与 main 的冲突处理
0ae2b072)。基线按合并后的源码在三个平台各采集原生截图(CI 上采集,ubuntu / windows / macos 各 14 张,2cb178e4),每张与 main 版基线的差异经逐像素核对只落在 rail 底部的账号身份行矩形内(约 x56..178、y876..888),main 的 rail 改动像素原样保留。release/public-source.json,登记 main 新增的rail-session-navigation.spec.mjs。验证
agent-transcript.test.ts > 真实 agent 渲染与恢复失败(main 自身 run 42769876326 同测试、同断言失败,属存量偶发,与本改动无调用关系)。三平台的浏览器截图门禁均已通过。pnpm typecheck:webui:通过。webui-account-billing33 项、webui-usage-quota28 项),覆盖新档位透传、旧标识显示名、planName兜底和身份行的登录/未登录分支。pnpm check:webui-dependency:0 违规(publication / role / cycles)。pnpm build:webui、pnpm check:webui-boundary:通过。pnpm check:source:通过(文件重命名与 main 新增的测试文件均已登记)。MiniMax Code / 请先登录账号!,无“本地 ·”。pnpm verify(本机全量 vitest 触发大量 5s 默认超时,属本机负载问题,改由 CI 覆盖);登录态的真实接口没有可用账号实测。发布与贡献检查
release/public-source.json,冻结 path 清单登记了新路径;没有新增测试文件(改的是已注册的测试文件)。design-language.md中套餐措辞的规则;中英 README 不涉及,未把离线结果描述为线上验收。维护者交接
发布范围与许可证变更:无。共享源码回移:待合并后由维护者按
docs/source-sync.md处理。