Skip to content

fix(remote): deliver durable task completion to HarmonyOS - #2622

Merged
wgqqqqq merged 4 commits into
GCWing:1.0.0-explorefrom
wgqqqqq:codex/remote-poll-persistence-fence
Aug 29, 2026
Merged

fix(remote): deliver durable task completion to HarmonyOS#2622
wgqqqqq merged 4 commits into
GCWing:1.0.0-explorefrom
wgqqqqq:codex/remote-poll-persistence-fence

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep a completed remote turn active until the terminal assistant message for that exact turn is durably projected
  • avoid treating an older assistant message as proof that the current turn has persisted, including replacement-history races
  • consume the optional durable message snapshot on HarmonyOS and replace the local transcript when supplied
  • track running General Chat and remote-control turns on HarmonyOS, request notification permission at task start, and keep only the active completion observer alive while the app is backgrounded
  • publish one localized task-completed notification after durable completion; tapping it opens BitFun
  • clear observation state on foreground completion, failure, cancellation, expiry, and app teardown so stale notifications cannot leak into later sessions
  • keep device and workspace navigation first in the HarmonyOS sidebar, with recent conversations below it in the same scroll
  • filter non-renderable legacy assistant shells before handing history to Repeat.virtualScroll(), preserving its one-entry/one-row contract and preventing adjacent user bubbles from disappearing

Runtime boundary

HarmonyOS transient background execution is intentionally bounded by the OS. On the tested phone it granted 180 seconds. Arbitrarily long detached tasks still need a relay or push delivery path; this change does not silently claim indefinite background execution.

Verification

  • pnpm run harmony:architecture
  • pnpm run i18n:audit
  • HarmonyOS LocalTest via Hvigor: BUILD SUCCESSFUL
  • HarmonyOS signed HAP assemble via Hvigor: BUILD SUCCESSFUL
  • cargo test --locked -p bitfun-services-integrations --no-default-features --features remote-connect --lib remote_connect::tests:: (12 passed)
  • cargo test --locked -p bitfun-services-integrations --no-default-features --features remote-connect --test remote_connect_contracts (58 passed)
  • real HarmonyOS phone 5ZU0226202001116: install succeeded; sent a General Chat task, backgrounded BitFun, observed a 180000 ms transient task, durable assistant persistence, transient-task cancellation, notification publication, and page show after reopening
  • real HarmonyOS phone 5ZU0226202001116: confirmed the sidebar renders devices and workspaces before recent conversations
  • real HarmonyOS phone 5ZU0226202001116: reopened the exact legacy remote transcript containing two user messages and two hollow assistant shells; both user bubbles rendered and both rows emitted item appear
  • git diff --check

Remote control persistence was exercised through focused Rust unit and wire-contract tests. The phone background-notification lifecycle was exercised end to end with General Chat. The legacy hollow-reply rendering path was exercised with a focused HarmonyOS unit regression and on the real remote transcript. Remote workspace execution and detached dispatch behavior are unchanged.

AI-assisted change; focused unit, compatibility-contract, build, and real-device verification completed.

@wgqqqqq wgqqqqq changed the title fix(remote): wait for persisted terminal assistant fix(remote): deliver durable task completion to HarmonyOS Aug 29, 2026
@wgqqqqq
wgqqqqq merged commit d1d8a78 into GCWing:1.0.0-explore Aug 29, 2026
11 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