Skip to content

feat(harmonyos): preview desktop MiniApps in native ArkWeb - #2910

Draft
wgqqqqq wants to merge 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/harmony-miniapp-h5
Draft

feat(harmonyos): preview desktop MiniApps in native ArkWeb#2910
wgqqqqq wants to merge 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/harmony-miniapp-h5

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a native HarmonyOS MiniApp preview: users connected to a desktop can list installed MiniApps and run their compiled HTML/CSS/JavaScript locally in ArkWeb. Storage and Worker calls go back through the existing encrypted Remote Connect transport and desktop permission paths.

The preview includes compact and wide navigation, capability refresh after desktop upgrades, connection/version-bound calls, and the real-device ArkWeb loading fix (an empty initial src and a synthetic HTTPS base for in-memory HTML).

Type and Areas

Type: Feature / bug fix

Areas: HarmonyOS native app, desktop/Tauri adapter, Remote Connect protocol, tests and docs.

Motivation / Impact

Desktop MiniApps previously had no native HarmonyOS entry point. This adds an H5 preview without requiring a mobile-web host or uploading the app to a public server. The sandboxed iframe bridge exposes selected MiniApp calls rather than generic desktop invoke, and older hosts return a clear unsupported state.

Verification

  • cargo test --locked -p openbitfun-services-integrations --no-default-features --features remote-connect --lib remote_connect::miniapp::tests:: — 2 passed; rerun during PR preparation.
  • cargo check -p openbitfun-desktop --lib --no-default-features — passed during implementation.
  • From src/apps/mobile/harmonyos, after source scripts/ohos-env.sh:
    • "$HVIGORW" --mode module -p product=default -p module=entry@default assembleHap --no-daemon — passed; signed HAP installed on a real HarmonyOS phone.
    • "$HVIGORW" --mode module -p module=entry@default -p ohos.test.type=LocalTest test --no-daemon — 511 passed.
  • pnpm run harmony:architecture and git diff --check — passed, including in the PR worktree based on current upstream/main.
  • Real device, account-device Remote Connect, unfolded/wide layout: catalog selection, Gomoku rendering and tap-to-place a stone verified. Browser checks also exercised compact and wide H5 rendering with a mocked host.
  • QR transport, live fold/unfold transitions, keyboard input and dark app chrome were not verified end to end. SSH workspace and Peer Device Mode explicitly reject this preview; CLI/Detached Dispatch have no adapter. No remote-workspace execution support is claimed.

Reviewer Notes

Preview limits are documented in the HarmonyOS README: default light page appearance, 2 MiB HTML limit, no inherited workspace, no automatic mutation retries, and unsupported AI/Agent, dialog, clipboard, notification and export calls. Existing apps remain responsible for responsive CSS and touch behavior. Gomoku currently overlaps its bottom controls on narrow layouts and disables panning on the board; those app-specific styles are not changed here.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@wgqqqqq
wgqqqqq marked this pull request as draft September 9, 2026 07:00
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