@robono/messaging-react-native 0.20.3 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -24,7 +24,11 @@
24
24
 
25
25
  Adds the standard Expo Bridge connector, original-message read receipts, retained history and shared attachment handling.
26
26
 
27
- ## Unreleased
27
+ ## 0.21.0
28
+
29
+ - Match photo tap-to-hide controls, display cached previews while originals load, preserve voice-player shape with captions, reset completed waveform progress, and tighten message status curves.
30
+
31
+ - Add configurable maintenance for SDK-owned disposable disk files, preserving active media and draft files. Expose configureExpoMessagingCache and maintainExpoMessagingCache through the Expo entry point.
28
32
 
29
33
  - Coalesce queued draft updates into one durable write while preserving reads, sends, clears and storage-error handling.
30
34
 
package/README.md CHANGED
@@ -589,3 +589,39 @@ Open an already accepted external-app user ↔ Robono-user connection in the sta
589
589
  ### Standard media viewer
590
590
 
591
591
  Photos and videos use the same viewer: Download, Delete, Forward, Share and Close, subject to customer permissions. There is no external-player Open action. Photos use original files, support pinch/pan and tap-to-expand; video uses the native playback controls, seeking and fullscreen. Close remains available on expanded photos.
592
+
593
+ ## Disposable storage maintenance (0.21.0)
594
+
595
+ Call once at app startup, outside the render path:
596
+
597
+ ```ts
598
+ import {configureExpoMessagingCache, maintainExpoMessagingCache}
599
+ from '@robono/messaging-react-native/expo';
600
+ configureExpoMessagingCache({
601
+ maxBytes: 150 * 1024 * 1024,
602
+ maxAgeMs: 24 * 60 * 60 * 1000,
603
+ minFreeBytes: 100 * 1024 * 1024,
604
+ });
605
+ await maintainExpoMessagingCache();
606
+ ```
607
+
608
+ The SDK also checks at first allocation, periodically before new files, and when
609
+ space is low before a download. `requiredBytes` requests room for an upcoming
610
+ transfer. Limits are soft: active transfers, playback, viewers, and draft copies
611
+ are protected even above the target. `limitReached` and `protectedBytes` explain
612
+ why space could not be reclaimed. Never delete an active file to enforce a cap.
613
+
614
+ On account changes, close/dispose the old Messenger and call
615
+ `maintainExpoMessagingCache({clearUnused: true})`. Cleanup may run with Messenger
616
+ open: live files remain leased. Persistent outbox drafts and saved messages live
617
+ outside this disposable cache; unfinished selected/recorded copies have persistent
618
+ draft markers and survive crash cleanup. Explicit downloads in the host's Files
619
+ or photo library are outside its scope. The cache is app-wide, not a permission
620
+ cache: clearing files does not grant or revoke access.
621
+
622
+ Only SDK-owned `robono-messaging` files are swept. Streaming video uses
623
+ `useCaching: false`, and audio does not request download-before-playback. Returned
624
+ native thumbnail temporaries are deleted when their job finishes. Shared Expo/OS
625
+ cache directories are not swept: a native operation that crashes before returning
626
+ its temporary filename cannot safely be attributed to Robono. Unfinished native
627
+ recordings are preserved rather than treated as disposable files.