feat(ui): phase 3 嵌入指南 — helper text、空状态与对话框文案 (#167)#189
Merged
Conversation
把文档站里访客最容易踩到的点直接塞进管理后台的现有展示位,操作中 无需再跳转文档即可拿到关键提示。 实例表单 - mode 字段补 FormDescription,区分受管 sidecar 与外部服务 - fieldBaseUrlHint / fieldManagementUrlHint 扩充 localhost 陷阱说明, 明确容器网络场景必须使用服务名 连通性检测 - CliproxyConnectionResult 在 unreachable 状态下额外渲染一行 hint, 指出 Docker 网络下的服务名规则,复用现有展示位无新增组件 空状态文案 - cliproxy.noInstances / noAccounts:从「暂无 X」改写为「先做什么」 引导,写明绑定第一个账号或登记 sidecar 的具体路径 - upstreams.noUpstreamsDesc:说明需要至少一个上游客户端 Key 才能调用 - keys.noKeys / noKeysDesc:替换原全大写占位文案,写明 Bearer Token 调用方式与受限模式 对话框 description - poolUpstreamDialogDescription:解释池上游聚合该实例下该服务商的 全部 OAuth 账号 - oauthLoginDescription:写明开始登录、浏览器授权、自动刷新账号的 完整流程 - deleteUpstreamDesc / Warning:写清「客户端 Key 立即无法路由」与 「熔断器/统计/日志保留供审计」 - revokeKeyDesc / Warning:写清「客户端立即 401」与「Key 保留供审计、 需新建 Key 才能恢复」 测试 - cliproxy-instance-form-dialog 增加 mode hint 渲染断言 - 新增 cliproxy-connection-result 测试覆盖 unreachable 时 hint 显示、 其它三种状态不显示的条件分支 i18n 改动同步覆盖 zh-CN 与 en 两份文件。
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #189 +/- ##
==========================================
+ Coverage 74.05% 74.09% +0.03%
==========================================
Files 147 147
Lines 11114 11115 +1
Branches 3846 3847 +1
==========================================
+ Hits 8231 8236 +5
+ Misses 1682 1677 -5
- Partials 1201 1202 +1
🚀 New features to boost your workflow:
|
…#167) review 指出两处问题,本次一并修复。 noKeysDesc 事实错误 - 原文引用「受限模式」/「restricted mode」作为创建 Key 表单的标签, 但 src/components/admin/create-key-dialog.tsx L325-352 实际渲染的 两个选项标签是 unrestrictedAccess / restrictedAccess,i18n 文案 分别对应「不限上游」/「指定上游」「Specific Upstreams」,从未出 现「受限模式」这一字面值。 - 原文还承诺「可以限制可调用的模型或上游」,但 access_mode 字段 仅控制 upstream_ids 白名单,payload 中没有模型限制,从未限制模型。 - 改为指向真实标签「指定上游」/「Specific Upstreams」,并去掉模型 限制的虚假能力承诺。 poolUpstreamDialogDescription 语用调整 - zh 删除起句的「一键」,en 删除「in one click」。 - 与 CLAUDE.md 规范书面用语风格保持一致,避免互联网产品宣传腔。 零代码改动,纯 i18n 文案修复;JSON 合法性、tsc、lint、148 files / 2494 tests 全部通过。
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.
范围
完成 issue #167 Phase 3:把 Phase 2 文档站里访客最容易踩到的关键提示反向嵌入管理后台 UI。改动全部落在已有展示位(
FormDescription/ 空状态文本 /DialogDescription),不新增组件、不新增路由、不引入新依赖。改动清单
实例表单(CLIProxyAPI)
cliproxy-instance-form-dialog.tsx:mode 字段补FormDescription,引用新增 i18n keyfieldModeHintcliproxy.fieldBaseUrlHint/fieldManagementUrlHint:扩充 localhost 陷阱说明,明确容器网络场景必须使用服务名连通性检测
cliproxy-connection-result.tsx:在result.status === "unreachable"时复用现有展示位追加一行testStatus_unreachable_hint,其余状态不显示空状态文案
cliproxy.noInstancescliproxy.noAccountsupstreams.noUpstreamsDesckeys.noKeys/noKeysDesc对话框 description
cliproxy.poolUpstreamDialogDescriptioncliproxy.oauthLoginDescriptionupstreams.deleteUpstreamDesc/deleteUpstreamWarningkeys.revokeKeyDesc/revokeKeyWarning测试
tests/components/cliproxy-instance-form-dialog.test.tsx:补一条断言fieldModeHint/fieldBaseUrlHint/fieldManagementUrlHint三处 hint 渲染tests/components/cliproxy-connection-result.test.tsx:覆盖 unreachable 显示 hint、其余三种状态(success / auth_failed / service_error)不显示本地
pnpm exec tsc --noEmit/pnpm lint/pnpm test:run(148 files, 2494 tests)全过。i18n 双语对齐
src/messages/zh-CN.json与src/messages/en.json同步新增 / 修改 14 条 key,关键新 key:fieldModeHint、testStatus_unreachable_hint。与 Phase 2 的边界
Phase 3 严格不写长文:超过两三行的解释一律留在文档站,UI 内只放摘要。本 PR 未引入文档站到 UI 的双向跳转链接(文档锚点暂未统一规划);若后续把
「了解更多」→ 文档站锚点也嵌入,按 issue 描述也属于 Phase 3 范围内的后续微改。Closes #167 Phase 3 主体。
Test plan
pnpm exec tsc --noEmitpnpm lintpnpm test:run(148 files / 2494 tests pass)