Skip to content

feat(kit): add user-confirmed service worker updates - #102

Merged
rdlabo merged 2 commits into
mainfrom
feat/confirm-app-update
Sep 3, 2026
Merged

feat(kit): add user-confirmed service worker updates#102
rdlabo merged 2 commits into
mainfrom
feat/confirm-app-update

Conversation

@rdlabo

@rdlabo rdlabo commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an opt-in provideKitAppUpdate({ strategy: 'confirm', promptForUpdate }) mode without changing the existing blocking default or background strategy
  • wait until the first render before prompting, then reload only when the user accepts; defer on false and retry presentation on undefined
  • add KitOverlayController.tryAlertConfirm() so callers can distinguish explicit cancellation from an alert that could not be presented
  • detect alerts presented through other Ionic controllers before showing the update confirmation

Compatibility and safety

  • preserve the existing KitAppUpdateOptions interface shape for extends/implements/module augmentation consumers
  • add a separate provider-options union that requires a prompt only for the confirm strategy and rejects it for existing strategies
  • retain runtime guards for untyped JavaScript consumers and package-consumer type checks for valid and invalid combinations
  • never call activateUpdate(), avoiding mixed application generations
  • keep disabled/uncontrolled service-worker environments as no-ops and do not change package versions

Review cycles

  • manager review: approved after 3 rounds
  • OSS maintainer review: approved after 3 rounds

Verification

  • npm run lint
  • npx ng test kit --watch=false (53 files, 1029 tests)
  • npm run prebuild
  • npm run test:package-consumer
  • git diff --check

@rdlabo
rdlabo merged commit 1c53fd4 into main Sep 3, 2026
14 checks passed
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

npm beta packages published

CI passed for the merge commit 1c53fd4f57fa. Install the immutable package set with:

npm install @rdlabo/ionic-angular-kit@22.0.0-beta.pr102.sha1c53fd4f57fa @rdlabo/ionic-angular-photo-editor@22.0.0-beta.pr102.sha1c53fd4f57fa @rdlabo/ionic-angular-scroll-header@22.0.0-beta.pr102.sha1c53fd4f57fa @rdlabo/ngx-cdk-scroll-strategies@22.0.0-beta.pr102.sha1c53fd4f57fa

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