Skip to content

feat(ohos): emit/Channel event bridge, webview drag-drop, bridge facade migration, and cross-platform gating - #75

Open
ljy9812 wants to merge 1 commit into
Eulogizethesun:ohdevfrom
ljy9812:ohdev-adjust
Open

feat(ohos): emit/Channel event bridge, webview drag-drop, bridge facade migration, and cross-platform gating#75
ljy9812 wants to merge 1 commit into
Eulogizethesun:ohdevfrom
ljy9812:ohdev-adjust

Conversation

@ljy9812

@ljy9812 ljy9812 commented Aug 22, 2026

Copy link
Copy Markdown

Changes

  • Plugin emit/Channel event bridge: ArkTS Plugin.emit(channelId, payload) -> NAPI tauri_send_channel_data -> Rust CHANNELS -> Channel.send -> JS callback; used by geolocation watchPosition streaming and notification action dispatch
  • geolocation requestPermissions four-path settle fallback (onForeground / selfPermissionStateChange event / 60s timeout / promise) plus polled permission read — requestPermissionsFromUser promise can hang on the map-preview dialog, and selfPermissionStateChange fires before ATM commit
  • webview file drag-drop, window ignore-cursor-events, print and https-scheme fixes
  • account/updater plugin registration and bridge facade migration with 3-round audit fixes; plugin template relocation + unified HAR discovery
  • unblock mobile cross-compile and Windows native build for the api example (capability split into ohos-plugins.json gated to openHarmony, deep-link permissions kept in the cross-platform capability)
  • entry_mobile template: onForeground/onBackground overrides wired to PluginManager.notifyForeground(), PRINT permission reason/usedScene
  • cross-platform cfg isolation remediation, skills docs, openspec archives
  • test suites: ohos-gap / ohos-init / ohos-mobile-plugins + manual cases

Impact

  • OHOS only, except one alignment: Event::NewEvents(StartCause::Poll) no longer emits RunEvent::Resumed; it is now emitted on Event::Resumed (matches upstream tauri semantics; tao OHOS emits Event::Resumed at platform_impl/ohos/mod.rs:556)
  • Desktop (Windows/macOS/Linux) paths unchanged; all OHOS code behind cfg(target_env = "ohos")

Testing

Verified end-to-end on HUAWEI MateBook Pro (desktop form, API 23):

  • emit/Channel: geolocation watchPosition locationChange -> emit -> Channel -> JS callback chain verified on device
  • permission dialog grant path settles in ~3s with correct granted status (four-path fallback + polled read)
  • webview drag-drop, print dialog, https-scheme, ignore-cursor-events covered by api example manual cases (see doc/manual_tests.md)
  • cargo check clean for both OHOS mobile target and Windows native target
  • Local checklist review passed: 0 Blocker / 0 Major

Related

…de migration, and cross-platform gating

- Plugin emit/Channel event bridge: ArkTS Plugin.emit(channelId, payload) ->
  NAPI tauri_send_channel_data -> Rust CHANNELS -> Channel.send -> JS callback,
  used by geolocation watchPosition streaming and notification action dispatch
- geolocation requestPermissions four-path settle fallback (onForeground /
  selfPermissionStateChange event / 60s timeout / promise) plus polled
  permission read (selfPermissionStateChange fires before ATM commit;
  requestPermissionsFromUser promise can hang on map-preview dialog)
- webview file drag-drop (cfg hygiene, wire-format spec), window
  ignore-cursor-events, print and https-scheme fixes
- account/updater plugin registration and bridge facade migration with
  3-round audit fixes; plugin template relocation + unified HAR discovery
- unblock mobile cross-compile and Windows native build for the api example
- cross-platform cfg isolation remediation, skills docs, openspec archives
- test suites: ohos-gap / ohos-init / ohos-mobile-plugins + manual cases

Verified end-to-end on HUAWEI MateBook Pro (desktop form, API 23).

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Package Changes Through 812db8d

There are 11 changes which include tauri with minor, @tauri-apps/api with minor, tauri-build with minor, tauri-macos-sign with patch, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-cli with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-plugin with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.10.1 2.11.0
tauri-utils 2.8.3 2.9.0
tauri-macos-sign 2.3.3 2.3.4
tauri-bundler 2.8.1 2.9.0
tauri-runtime 2.10.1 2.11.0
tauri-runtime-wry 2.10.1 2.11.0
tauri-codegen 2.5.5 2.5.6
tauri-macros 2.5.5 2.5.6
tauri-plugin 2.5.4 2.6.0
tauri-build 2.5.6 2.6.0
tauri 2.10.3 2.11.0
@tauri-apps/cli 2.10.1 2.11.0
tauri-cli 2.10.1 2.11.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

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