Skip to content

feat(shared): 提取 Trump 共享模块 + SettingsPage 拆分#219

Merged
DeliciousBuding merged 2 commits into
dev/delicious233from
feat/integrate-trump-desktop
May 27, 2026
Merged

feat(shared): 提取 Trump 共享模块 + SettingsPage 拆分#219
DeliciousBuding merged 2 commits into
dev/delicious233from
feat/integrate-trump-desktop

Conversation

@DeliciousBuding
Copy link
Copy Markdown
Collaborator

来源

dev/trump 分支(Xavier-Trump)提取的清洁代码。
原 PR: #192-#201, #215 — 全部 MERGED 到 dev/trump,未曾合入主线。

包含

共享模块(全新文件,零冲突)

  • workbenchState.ts — Redux-style reducer,管理 9 个实体集合,15+ 事件类型
  • workbenchDataMode.ts — 5 种数据模式分类器(live/offline/mock/loading/unavailable)
  • hubClient.ts — 类型化 Hub REST client factory,覆盖 auth/IM/devices/agents/OIDC
  • surfaceMetadata.ts — 应用表面元数据注册表
  • 全部带测试文件(8 测试,覆盖边界条件)

SettingsPage 拆分

  • 2734 行单体拆为 52 组件文件(primitives/sections/cards)
  • 纯重构,不改逻辑

审查结论(7 agent 并行审查)

审查维度 评分
代码结构 4/5 — 干净分层,1 个 CSS bug
TypeScript 类型 4/5 — 无 any,派生类型完整
测试质量 4.5/5 — 边界条件覆盖,stale snapshot 测试出色
文档质量 3.5/5 — i18n key fallback 缺失

验证

  • 零冲突——全新文件,dev 无等效代码
  • Shared typecheck(预存 @types/node 问题,非本次引入)

Co-Authored-By: Xavier-Trump 2933243959@qq.com

XavierTrump and others added 2 commits May 27, 2026 23:27
…38 lines)

Extract 27 settings sections, 12 primitives, 13 domain cards, and shared
utilities from the monolithic SettingsPage.tsx into a modular directory
structure under `src/components/settings/`.

Pure file split — no logic, CSS, or behavior changes.
从 dev/trump 提取(原提交: 8a289ff, 47fb14f, 84ebd34, ee69349)。
workbenchState: Redux-style reducer for 9 entity collections, 15+ event types
workbenchDataMode: 5 data modes (live/offline/mock/loading/unavailable)
hubClient: Typed Hub REST client factory with auth, IM, devices, agents
surfaceMetadata: App surface registry with status tracking

Co-Authored-By: Xavier-Trump <2933243959@qq.com>
Copilot AI review requested due to automatic review settings May 27, 2026 15:32
@DeliciousBuding DeliciousBuding merged commit 397836d into dev/delicious233 May 27, 2026
7 of 11 checks passed
@DeliciousBuding DeliciousBuding deleted the feat/integrate-trump-desktop branch May 27, 2026 15:33
@DeliciousBuding DeliciousBuding review requested due to automatic review settings May 27, 2026 15:56
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.

2 participants