feat(pos): add storage.keys subscribable types to Storage interface#4235
feat(pos): add storage.keys subscribable types to Storage interface#4235vctrchu wants to merge 1 commit into2026-04-rcfrom
Conversation
Add Subscribable, StorageKeys types and optional keys property to the POS Storage interface. Each key is exposed as Subscribable<T | undefined> for reactive cross-target communication within the same extension. Available on API version 2026-04 and later. Part of: shop/issues-retail#26020 TAG PR: Shopify/ui-api-design#1416 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🚨🚨🚨 Docs migration in progress 🚨🚨🚨We are actively migrating UI extension reference docs to MDX in the
During this migration, please be aware of the following:
Doc comments in Examples that previously lived in this repo are being moved to the What should I do?
Thanks for your patience while we complete the migration! 🙏 |
What
Add
Subscribable,StorageKeystypes and optionalkeysproperty to the POSStorageinterface for reactive cross-target communication.Why
Extensions running across multiple targets (tile, modal, background) need to share state reactively. The
storage.keyssubscribable enables one target to subscribe to a key and react when another target updates it viaset()ordelete().TAG PR: ui-api-design#1416
Issue: shop/issues-retail#26020
How
Single file change to
packages/ui-extensions/src/surfaces/point-of-sale/types/storage.ts:Subscribable<Value>— interface withreadonly value+subscribe(callback)returning unsubscribe functionStorageKeys<T>— mapped type where each key maps toSubscribable<T | undefined>keys?: StorageKeys<BaseStorageTypes>— optional property onStorageinterface, available on API version2026-04+Companion PR
Base Branch
2026-04-rc— ships with the2026-04API version.