Repository navigation
Conversation
|
Thanks for the PR. At a6f3e19 the change is not ready: it has no live HarmonyOS evidence, and the new message is wrong on one reachable route. CI is green, and the earlier Body rules failure graded the PR body, not code; the rerun after the body edit passes. HarmonyOS has no CI device, so green CI says nothing about the changed device path. No conflicts. Before merge, the live run below and the two fixes are needed. The change is device-facing: it adds an The foreground read happens before the open options are applied (application-lifecycle-interaction.ts:328). With The warning says "dispatch skipped" (session-open-execution.ts:180). The dispatch is not skipped: Not blocking, take or leave: Could the read live inside the HarmonyOS owner instead? Not verified here: the passthrough premise and the real |
|
Both required fixes are in at 0f36cec:
Live run status: the protocol you specified is staged, but the HarmonyOS unit is currently claimed live by an unrelated workspace's session ( On the ownership question: agreed the live run decides it. If the second dispatch is a no-op, folding the read into |
6b6bfa0 to
454be7c
Compare
|
The Coverage failure here is inherited from main: main HEAD |
|
Thanks for the follow-up. The earlier fixes at 454be7c look right: plain opens only probe now, and clear-app-state and --activity opens skip the probe. The required live run on a HarmonyOS device is still missing. Required live evidence is still missing for the probe in https://github.com/callstack/agent-device/blob/454be7ce2/packages/platform-harmonyos/src/app-state.ts#L38. The change adds an Would it be simpler to keep Not blocking, take or leave: the PR body still names a6f3e19, quotes the old "App already foreground; dispatch skipped." warning, and does not mention the clear-app-state and --activity exclusion, so please update it to the 454be7c wording when the live evidence is posted. Only the Coverage job fails, on run 44929373306. Main at 4075dd1, the merge-base, fails the same job and step, and #4915 (open) documents that main's Coverage has been red because website/docs/docs/commands.md is stale. This PR touches no command help, registry or commands.md, so the failure looks unrelated. Not verified here: a second failure hidden behind the shared one, and the tests were not run locally. Before merge, the live HarmonyOS run at 454be7c must be posted and main's Coverage must go green after #4915. |
…-foreground app A second `open` of an app that already holds the foreground ran its launch dispatch with no visible effect and no output line, so the caller could only guess that `--relaunch` was the restart path. HarmonyOS now reads which bundle holds the foreground before the dispatch, and the open outcome carries that fact; `completeOpenCommand` adds the warning line to the open result beside its other notes. The open keeps its idempotent semantics: the dispatch still runs, and a probe that fails or names another app claims nothing. The read is advisory at the shared direct lifecycle: an owner that does not wire it (Linux, web, Vega) answers exactly as before. Co-Authored-By: Claude Code <noreply@anthropic.com>
…e app A --clear-app-state or --activity open stops or replaces the running app, so the pre-dispatch foreground read has no same-app fact to compare and claimed a re-activation the open itself was about to end. The warning also said "dispatch skipped" when aa start still ran; it now says what happened and names --relaunch. Co-Authored-By: Claude Code <noreply@anthropic.com>
The previous full-suite coverage run raced a parallel PR's run and died mid-suite with no assertion failure; the affected suites pass locally. Co-Authored-By: Claude Code <noreply@anthropic.com>
454be7c to
575227b
Compare
|
The five live runs are in, on the physical unit (华为畅享 90 Plus, (1) Target already foreground — second (2) Another app foreground — no warning. After (3) (4) (5) Latency, alternating blocks (plain open = probe, relaunch = no probe), same bundle and device:
The probe's marginal cost is invisible against open variance (a standalone On the ownership question: the run answers it — the second The Body rules gate reads the refreshed body (454be7c wording, the exclusion, this head). |
|
Thanks for the quick follow-up. The earlier findings from #4860 (comment) are now fixed at 575227b, and the live results you posted in comment 7074486267 cover the main routes. All 16 checks pass at 575227b, and the earlier Coverage failure from main is gone after the rebase onto d6767e0. There are no conflicts. Not verified here: the live HarmonyOS results, since no device or hdc was available for a re-run; the |
Summary
Reopening an app that already holds the foreground ran the launch dispatch with no visible effect and no output, so a caller could only guess that
--relaunchrestarts. HarmonyOS now reads the foreground bundle before the dispatch on plain opens only:--relaunch,--clear-app-state,--activity, and URL/deep-link opens skip the read, since each stops or replaces the running app. The outcome carriesalreadyForegroundand the daemon appends the warningApp was already foreground; open re-activated it without restarting. Use --relaunch to restart.A failed probe, or one naming another app, claims nothing.Before / after
open com.example.appwith that app already foreground (HarmonyOS):Validation
Live at 575227b on the physical unit (华为畅享 90 Plus), per the review protocol: (1) second open on a foreground target warns and the ability pid is unchanged (
40798→40798) — no restart; (2) another app foreground, no warning; (3)--activityopen, no warning and no probe; (4)--relaunchrestarts for real (40752→40798) with no probe; (5) alternating latency blocks show no probe cost (plain 0.46–0.65s vs relaunch 0.56–0.57s). Detail in the evidence comment. Unit tests: contracts probe, app-state parse, daemon warning;tsc -bclean.🤖 Generated with Claude Code