Skip to content

feat(harmonyos): integrate account-based remote control#1756

Open
wgqqqqq wants to merge 2 commits into
GCWing:mainfrom
wgqqqqq:feat/mobile-agent-chat
Open

feat(harmonyos): integrate account-based remote control#1756
wgqqqqq wants to merge 2 commits into
GCWing:mainfrom
wgqqqqq:feat/mobile-agent-chat

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

HarmonyOS architecture

  • reduce AppRoot to lifecycle/bootstrap wiring and move orchestration into AppRootRuntime
  • separate presentation actions, route state, conversation intents, UI models, host adapters, and remote/general-chat view models
  • introduce lifecycle gates and focused coordinators for connection, workspace, session, activity, and timeline behavior
  • split the large HarmonyOS unit-test fixture by responsibility and retain device smoke coverage

Account-based remote control

  • implement the desktop-compatible account login challenge on HarmonyOS with native Argon2id and AES-based key unwrap
  • persist the relay token and master key through HarmonyOS HUKS encryption; restore, expire, and clear account sessions explicitly
  • list account devices, hide the current phone, show online/offline presence, and connect directly to an online desktop
  • keep QR/manual pairing available and allow a QR-paired desktop to delegate its authenticated account identity
  • abstract remote commands behind room-pairing and account-device transports, with generation checks that reject stale replies after target switches
  • clear the previous target projection and show reconnecting state while a newly selected desktop is loading

Remote sessions and mobile UX

  • add a compose-first remote session screen with desktop and workspace selectors
  • create a Claw assistant session when no workspace is selected; create a workspace session when one is selected
  • let project actions choose Code or Cowork sessions
  • group remote history by project and assistant sessions, showing projects and sessions in batches of three
  • preserve QR scanner alignment, stabilize device-list loading with skeleton rows, and refine remote icons and popup placement
  • save generated remote files through the HarmonyOS document picker

Timeline, tools, permissions, and recovery

  • route local and remote conversation updates through a transport-neutral conversation event model
  • distinguish optimistic from persisted user messages to prevent duplicate user bubbles during send
  • merge active tool rows by stable tool id and prevent delayed poll snapshots from regressing completed states
  • preserve in-progress assistant history so interrupted Cowork/Code output is visible after reopening a session
  • hydrate pending desktop permission requests into remote polling and support approve/reject replies from HarmonyOS
  • expose the desktop global permission mode as Need approval, Auto approve, or Full access; preserve custom rules and require confirmation before enabling Full access
  • render running Task tools as subagent blocks, derive their titles from task input, and use animated dots for thinking/running states

Scope notes

  • cloud session sync currently fetches and decrypts remote bundles and reports the count; it does not import them into the local session list

Verification

  • built and signed the HarmonyOS HAP, then installed and exercised it on a physical device
  • verified permission-mode read/write and Full access confirmation on the physical device, then restored Need approval
  • cargo check -p bitfun-core -p bitfun-services-integrations
  • cargo build -p bitfun-desktop
  • git diff --check

@wgqqqqq
wgqqqqq force-pushed the feat/mobile-agent-chat branch 2 times, most recently from 331808c to 02a6562 Compare July 25, 2026 06:37
@wgqqqqq
wgqqqqq force-pushed the feat/mobile-agent-chat branch from 02a6562 to 540fcc5 Compare July 25, 2026 07:57
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