Skip to content

feat(offline): compose runtime capabilities#39

Draft
rdlabo wants to merge 1 commit into
mainfrom
feat/offline-capability-api
Draft

feat(offline): compose runtime capabilities#39
rdlabo wants to merge 1 commit into
mainfrom
feat/offline-capability-api

Conversation

@rdlabo

@rdlabo rdlabo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add capability-based provideOffline composition for independent pull, outbox, and read-fallback use cases
  • keep the existing ProvideOfflineOptions interface and legacy full-runtime configuration source-compatible
  • make delete intent durable with effect: 'delete' and provide OfflineReplicaQueryService for consistent optimistic tombstone visibility
  • validate pull change serverId metadata against the schema-declared serverId() value before persisting or advancing the cursor
  • migrate existing native SQLite outbox tables additively with effect DEFAULT 'upsert'; older web/native commands remain upserts
  • document the capability API, delete visibility, identity validation, and compatibility behavior

Why

Read-only products such as tipsys currently have to register an executor that always fails and a puller that returns no changes. Product request policies also duplicate pending-delete filtering, while pull identity checks differ between products. These are runtime invariants and optional capabilities that belong in the shared kit.

Compatibility

  • existing provideOffline({ commandExecutor, replicaPuller, requestPolicies, ... }) callers retain the same behavior
  • the public ProvideOfflineOptions remains an interface for consumers that extend it
  • removeReplica remains supported for existing executors
  • old commands without effect are interpreted as upsert
  • SQLite adds the new column with a default and does not bump the destructive base storage schema version

Validation

  • npx ng test kit --watch=false — 37 files / 507 tests passed
  • npm run lint — all projects passed
  • npm run test:offline-types:nonstrict — passed
  • npm run prebuild:kit — passed
  • git diff --check — passed

@netlify

netlify Bot commented Jul 25, 2026

Copy link
Copy Markdown

Deploy Preview for rdlabo-ionic-angular-library ready!

Name Link
🔨 Latest commit 3d69634
🔍 Latest deploy log https://app.netlify.com/projects/rdlabo-ionic-angular-library/deploys/6a64a8c753e37b000802c281
😎 Deploy Preview https://deploy-preview-39--rdlabo-ionic-angular-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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