Skip to content

refactor(workspace): 移除 geo / data_residency 字段(前端) - #99

Open
Postroggy wants to merge 2 commits into
superduck-ai:mainfrom
Postroggy:refactor/remove-workspace-geo-fe
Open

refactor(workspace): 移除 geo / data_residency 字段(前端)#99
Postroggy wants to merge 2 commits into
superduck-ai:mainfrom
Postroggy:refactor/remove-workspace-geo-fe

Conversation

@Postroggy

Copy link
Copy Markdown
Contributor

问题背景

承接 #93 的 geo / data_residency 移除工作。后端字段移除已在 #98 完成,本 PR 为配套的前端部分。

方案

移除前端所有 geo / data_residency 相关的 UI、类型、i18n 与测试:

  • Workspace / CreateWorkspaceInput 类型移除 data_residency 字段
  • CreateWorkspaceDialog 去掉 Workspace geo 输入框
  • 工作区设置表格移除 Residency 列与 geoLabel 辅助函数
  • 清理相关 i18n key(en + zh-CN)与 fallback 文案
  • 同步调整三处测试,不再断言 residency

与后端的关系

后端 #98 已移除 workspaces.data_residency 列及 console/admin 响应中的该字段。本 PR 前端同步不再发送或展示该字段,两个 PR 合并后功能完整移除。

改动文件

  • web/src/shared/workspaces/api.tspresentation.tscontext.tsCreateWorkspaceDialog.tsx
  • web/src/features/settings/WorkspacesSettingsPage.tsx
  • web/src/shared/i18n/messages/en.jsonzh-CN.json
  • web/src/features/settings/WorkspacesSettingsPage.test.tsxweb/src/app/layout/ConsoleLayout.test.tsxweb/src/features/dashboard/DashboardPage.test.tsx

验证方式

  • bun run format:check(Prettier):通过
  • bun test(改动相关 3 文件):52 pass / 0 fail
  • bun run build:构建通过
  • just complexity(前端 eslint):0 issues
  • just duplicates(前端 TS):通过
  • bun run lint:naming:通过

Refs #93

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
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Postroggy, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b2786a1-18ab-4dc0-b7a1-20a7acec6843

📥 Commits

Reviewing files that changed from the base of the PR and between 4445a4c and 0ed064c.

📒 Files selected for processing (10)
  • web/src/app/layout/ConsoleLayout.test.tsx
  • web/src/features/dashboard/DashboardPage.test.tsx
  • web/src/features/settings/WorkspacesSettingsPage.test.tsx
  • web/src/features/settings/WorkspacesSettingsPage.tsx
  • web/src/shared/i18n/messages/en.json
  • web/src/shared/i18n/messages/zh-CN.json
  • web/src/shared/workspaces/CreateWorkspaceDialog.tsx
  • web/src/shared/workspaces/api.ts
  • web/src/shared/workspaces/context.ts
  • web/src/shared/workspaces/presentation.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@duckpr duckpr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

DuckPR reviewer: opencode
Model: anthropic/glm-5.2

✅ No new issues found.

Reviewed changes — 前端同步移除工作区 data_residency / workspace_geo 字段与相关 UI、i18n 及测试。

  • 移除 Workspace / CreateWorkspaceInputdata_residency 类型字段
  • 移除 CreateWorkspaceDialog 中的只读 geo 输入框与 FieldDescription 导入
  • 移除工作区设置表格的 Residency 列与 geoLabel 辅助函数
  • 清理 en.json / zh-CN.jsonworkspace.geoworkspace.geoHelpsettings.workspaces.residencysettings.workspaces.defaultInference 等 i18n key
  • 更新三处测试文件,不再断言或传递 residency 字段

ℹ️ 合并顺序

PR 描述说明后端 #98 已完成数据列与响应字段移除。当前本地 main 分支仍可见后端 data_residency 残留,但前端代码在隔离上正确,且后端对缺失 data_residency 会默认处理为空对象,不会导致运行时崩溃。建议按后端 #98 优先、本 PR 随后合并的顺序发布,以保持语义一致。

Pullfrog  | View workflow run | Using anthropic/glm-5.2𝕏

@Postroggy Postroggy changed the title 前端:移除工作区 geo / data_residency 字段 [Workspace] 移除 geo / data_residency 字段(前端) Jul 18, 2026
@Postroggy

Copy link
Copy Markdown
Contributor Author
image image

@arthur-zhang
关联 issue #93

@Postroggy Postroggy changed the title [Workspace] 移除 geo / data_residency 字段(前端) refactor(workspace): 移除 geo / data_residency 字段(前端) Jul 19, 2026
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