Skip to content

refactor(mobile-web): adopt shared mobile component system - #2794

Merged
wgqqqqq merged 4 commits into
GCWing:1.0.0-explorefrom
wgqqqqq:wgq/mobile-web-component-system
Sep 5, 2026
Merged

wgqqqqq merged 4 commits into
GCWing:1.0.0-explorefrom
wgqqqqq:wgq/mobile-web-component-system

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a dedicated @bitfun/ui/mobile entry with shared controls, sheets, composer, list, status, and responsive mobile primitives
  • migrate mobile-web chat, pairing, device, workspace, and session surfaces to shared primitives and app-level composites
  • register the mobile component catalog in Design Lab and add structural contracts that prevent product pages from rebuilding primitive UI
  • keep extracted model controls and remote target ownership covered by their existing Web UI contract tests

Verification

  • pnpm --dir src/mobile-web run test:ui-components
  • pnpm --dir src/mobile-web run type-check
  • BITFUN_MOBILE_WEB_FORCE_BUILD=1 pnpm run build:mobile-web
  • pnpm --dir src/web-ui run test:run src/app/components/RemoteConnectDialog/MobileTargetOwner.contract.test.ts src/app/components/RemoteConnectDialog/RemoteSessionManager.routing.test.ts src/app/components/RemoteConnectDialog/MobileChatSettings.contract.test.ts
  • pnpm run design-system:check
  • pnpm run theme:color-audit:all

Remote scenarios

  • Remote control: exercised through the mobile-web type check, production build, UI contracts, and target-ownership tests.
  • Peer Device Mode: exercised through routing and target-owner contract tests.
  • Remote workspace and Detached Dispatch: not affected by this UI/component ownership refactor.

AI-assisted: yes.

Testing level: fully tested for the changed frontend and design-system surfaces.

…-web-component-system

# Conflicts:
#	design-system/apps/design-lab/src/App.tsx
#	design-system/apps/design-lab/src/main.tsx
#	design-system/apps/design-lab/src/pages/ComponentDetailPage.tsx
#	design-system/apps/design-lab/src/pages/ComponentsPage.tsx
#	pnpm-lock.yaml
#	src/mobile-web/package.json
#	src/mobile-web/src/components/ErrorBoundary.tsx
#	src/mobile-web/src/components/RemoteHomePanel.tsx
#	src/mobile-web/src/main.tsx
#	src/mobile-web/src/pages/ChatPage.tsx
#	src/mobile-web/src/pages/PairingPage.tsx
#	src/mobile-web/src/pages/SessionListPage.tsx
#	src/mobile-web/src/styles/components/adaptive-shell.scss
#	src/mobile-web/src/styles/components/chat-input.scss
#	src/mobile-web/src/styles/components/chat.scss
#	src/mobile-web/src/styles/components/devices.scss
#	src/mobile-web/src/styles/components/harmony-native.scss
#	src/mobile-web/src/styles/components/sessions.scss
#	src/mobile-web/src/styles/components/workspace.scss
@wgqqqqq

wgqqqqq commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

本轮修复已更新:e14e1f8e8。

  • 修复组件化后的 CSS 层级及旧 DOM 选择器问题:高级选项、输入框、设置入口、用户气泡及文件附件布局。
  • 恢复 mobile-web 命令审批的接受/拒绝入口,以及工具状态同步。
  • 将账号认证与桌面设备发现分离:无设备、设备离线或列表请求失败时仍保留登录态;选中设备前不请求桌面工作区、会话或心跳。扫码指定目标不回退到其他设备,保留旧桌面版本的初始选择兼容路径。

验证:

  • UI 回归测试 7/7、账号登录测试 4/4、共享移动组件测试 7/7。
  • TypeScript 检查、mobile-web 生产构建、全部 22 个表面的主题颜色审计通过。
  • 浏览器本地测试服务验证了窄屏/宽屏下的账号登录成功后设备离线、空列表和列表请求失败状态;观察到认证与设备列表请求,无桌面会话/工作区请求。布局检查覆盖紧凑、中间宽度和宽屏,但不作为最终视觉保真的证明。
  • 远程控制场景使用本地模拟 relay 验证;真实账号端到端登录及真实桌面审批尚未复测。未验证 SSH 远程工作区、Peer Device Mode 或 Detached Dispatch。

本次未包含临时截图、日志、配对信息及无关 iOS 工程文件。

@wgqqqqq
wgqqqqq merged commit 8d6d8ef into GCWing:1.0.0-explore Sep 5, 2026
13 checks passed
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