Skip to content

chore(mobile): 审计收口——37 死 i18n 键/WS 死类型/mock-hub 旧路由清理 + hub URL 去重 - #2160

Merged
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-17
Aug 31, 2026
Merged

chore(mobile): 审计收口——37 死 i18n 键/WS 死类型/mock-hub 旧路由清理 + hub URL 去重#2160
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-17

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

范围(Dirac P3 mobile 清理,round-17)

  • i18n/strings.ts:删除 37 个无消费者键(en/zh 同步,key 面 parity 测试保持 325=325)。保留 genericNetworkError/genericServerError/genericAuthError/genericUnknownError——被 categoryToStringKey() 实时消费;messages/thinking 确认无 t()/strings. 消费者。
  • WS 死类型裁剪:HubWsLegacyEventType 只保留 mock-hub 实际生产的 snapshot.updated/run.updated,删除无生产者 thread.updated/approval.updated/presence.updatedhub/web: WS 死协议面 — sync.request 无服务端实现、agent.regenerate/message.edited 无生产者、plan_* 无 Hub 传输 #1362/chore(ws): 删除无生产者死协议面与坏死 useHubWebSocket #1422 死面禁令),App.tsx 监听同步收敛。
  • scripts/mock-hub.mjs:删除无消费者的 /v1/threads REST 与 /v1/events WS 升级路径,只留 /client/sessions//client/contacts//client/ws
  • app.config.tsoidcIssuer 占位默认 https://id.example.com → 空串,缺失时登录显式不可用而不是假装成功;导出 resolveDefaultHubBaseUrl 供 App 复用。
  • App.tsx 删除重复 hub URL 解析;顺带清 2 个存量 lint error(未用 catch 参数、死 import)。

验证(本地已跑)

  • pnpm typecheck
  • pnpm test ✅ 32 files / 397 tests
  • pnpm lint ✅ 0 error(余 1 个存量 warning,master 同源)
  • pnpm mock:hub:check ✅(health/snapshot/CORS 预检/client 路由//client/ws 帧)
  • git diff --check

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 0731abbc-d18c-4980-942c-c396e16a16cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

- strings.ts 删 37 个无消费者键(保留 4 个 categoryToStringKey 消费的 generic* 键)
- HubWsLegacyEventType 裁掉无生产者的 thread/approval/presence.updated,保留 mock-hub 真实生产的 snapshot/run.updated
- mock-hub 删 /v1/threads REST 与 /v1/events WS 旧路径(无消费者,#1422)
- app.config issuer 占位默认改空串,构建缺失时显式失败
- App.tsx 复用 app.config resolveDefaultHubBaseUrl,删重复解析
- 顺带清 2 个存量 lint error(未用 catch 参数 / 死 import)

Co-authored-by: Cursor <cursor@vectorcontrol.tech>
@DeliciousBuding
DeliciousBuding merged commit ad497b7 into master Aug 31, 2026
35 checks passed
@DeliciousBuding
DeliciousBuding deleted the chore/cleanup-round-17 branch August 31, 2026 21:34
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