refactor(workspace): 移除 geo / data_residency 字段(前端) - #99
Conversation
Drop the workspace geo field and data_residency handling from the frontend, matching the backend removal. This was a leftover from aligning with the upstream Anthropic workspace API. - remove data_residency from Workspace / CreateWorkspaceInput types - drop the geo field from CreateWorkspaceDialog - remove the Residency column and geoLabel helper from settings table - clean up related i18n keys (en + zh-CN) and fallback strings - update tests to stop asserting residency
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
DuckPR reviewer: opencode
Model: anthropic/glm-5.2
✅ No new issues found.
Reviewed changes — 前端同步移除工作区 data_residency / workspace_geo 字段与相关 UI、i18n 及测试。
- 移除
Workspace/CreateWorkspaceInput的data_residency类型字段 - 移除
CreateWorkspaceDialog中的只读 geo 输入框与FieldDescription导入 - 移除工作区设置表格的 Residency 列与
geoLabel辅助函数 - 清理
en.json/zh-CN.json中workspace.geo、workspace.geoHelp、settings.workspaces.residency、settings.workspaces.defaultInference等 i18n key - 更新三处测试文件,不再断言或传递 residency 字段
ℹ️ 合并顺序
PR 描述说明后端 #98 已完成数据列与响应字段移除。当前本地 main 分支仍可见后端 data_residency 残留,但前端代码在隔离上正确,且后端对缺失 data_residency 会默认处理为空对象,不会导致运行时崩溃。建议按后端 #98 优先、本 PR 随后合并的顺序发布,以保持语义一致。
anthropic/glm-5.2 | 𝕏



问题背景
承接 #93 的 geo / data_residency 移除工作。后端字段移除已在 #98 完成,本 PR 为配套的前端部分。
方案
移除前端所有 geo / data_residency 相关的 UI、类型、i18n 与测试:
Workspace/CreateWorkspaceInput类型移除data_residency字段CreateWorkspaceDialog去掉 Workspace geo 输入框geoLabel辅助函数与后端的关系
后端 #98 已移除
workspaces.data_residency列及 console/admin 响应中的该字段。本 PR 前端同步不再发送或展示该字段,两个 PR 合并后功能完整移除。改动文件
web/src/shared/workspaces/api.ts、presentation.ts、context.ts、CreateWorkspaceDialog.tsxweb/src/features/settings/WorkspacesSettingsPage.tsxweb/src/shared/i18n/messages/en.json、zh-CN.jsonweb/src/features/settings/WorkspacesSettingsPage.test.tsx、web/src/app/layout/ConsoleLayout.test.tsx、web/src/features/dashboard/DashboardPage.test.tsx验证方式
bun run format:check(Prettier):通过bun test(改动相关 3 文件):52 pass / 0 failbun run build:构建通过just complexity(前端 eslint):0 issuesjust duplicates(前端 TS):通过bun run lint:naming:通过Refs #93