Skip to content

fix: recover native UI synchronization without navigation - #325

Merged
rdlabo merged 4 commits into
mainfrom
fix/native-ui-sync-recovery
Oct 23, 2026
Merged

rdlabo merged 4 commits into
mainfrom
fix/native-ui-sync-recovery

Conversation

@rdlabo

@rdlabo rdlabo commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Native UI synchronization can remain stale without a bridge error: an update reaches native while projection is retained, its acknowledgement is skipped, and the DOM returns to the previously accepted state. Snapshot deduplication then prevents reconciliation until another change, such as navigation, forces an update.

Invalidate the cached snapshot when sending an update so an interrupted acknowledgement cannot suppress the next synchronization. Also retry one rejected update by reading the latest DOM through the existing scheduler, keeping the connection and listeners intact. Do not replay input; reject unacknowledged input between attempts. A second consecutive failure or a revision mismatch retains the existing stop-and-restore behavior.

Tradeoffs:

  • Normal successful synchronization retains deduplication and adds no bridge calls or waits.
  • Recovery adds one state update attempt. Two consecutive update timeouts can spend approximately ten seconds waiting on the bridge, plus reading/scheduling or retention time. An enclosing navigation flush keeps its existing five-second deadline.
  • Unacknowledged input can be discarded during recovery, requiring another tap. Clicks and application actions are not replayed. Native display updates and extension rendering can be reevaluated, as with ordinary snapshots.

Validation:

  • 157 native UI unit tests passed, including horizontal/vertical interrupted acknowledgements, failed-update recovery, no redundant updates after recovery, duplicate-input suppression, retry-budget reset, and immediate stop on revision mismatch.
  • Confirmed the interrupted-acknowledgement regression fails before the fix and that navigation restores synchronization in that reproduction.
  • Confirmed the unacknowledged-input regressions fail before the guard.
  • Final runtime build: 25 Chromium and 25 WebKit tab-handoff/recovery/popover tests passed. Local WebKit required explicitly selecting the iOS27 stylesheet branch: its default feature detection selects the older theme, where 11 popover-arrow opacity assertions fail. The temporary test wrapper changes only that stylesheet capability gate.
  • Native package TypeScript check, package build, and workspace lint passed.
  • Independent supervisor and third-party acceptance reviews approved the implementation and the additional boundary tests/documentation. Latest CI is rerunning after the test/documentation commit.

The reported intermittent Duo tab-switching incident has not been reproduced on the simulator; these tests establish specific failure paths, not its confirmed root cause. This does not re-register a lost event listener or reconnect a stopped runtime.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  485 passed

Details

stats  485 tests across 25 suites
duration  3 minutes, 37 seconds
commit  216cc82
info  This detailed result covers Ionic 9 only. Ionic 8 runs against the same screenshots in a separate matrix job; check the workflow run for both results. To update the screenshots, comment with /update-screenshots.

@rdlabo
rdlabo merged commit 8a1b691 into main Oct 23, 2026
16 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📊 Ionic 9 Playwright Test Report

View the detailed Ionic 9 report after GitHub Pages deployment completes: https://rdlabo-dev.github.io/ionic-theme-ios27/pr-325/

Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

npm beta published

CI passed for the merge commit 8a1b6915815f. Install the immutable version with:

npm install @rdlabo/ionic-theme-ios27@2.0.2-beta.pr325.sha8a1b6915815f @rdlabo/capacitor-native-ui@2.0.2-beta.pr325.sha8a1b6915815f

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