@robono/messaging-react-native 0.20.2 → 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.
@@ -47,7 +47,7 @@ The standard screen accepts the same `components` and `header` options as within
47
47
 
48
48
  The supplied storage adapter prepares, uploads and screens a private staging object, then sends it through the existing Bridge delivery service. The original Bridge owns the delivered attachment. Thumbnails, the standard viewer, waveform display choices and attachment batches are retained. Stored waveforms are not deleted when hidden; the connector withholds them when the Bridge connection disallows receiving them, and the screen also respects the saved display choice.
49
49
 
50
- `onDownloadAttachment` receives an authorized temporary file. Copy it into the host's private Files destination before resolving; the SDK then removes its temporary copy. Honor its cancellation signal. `mediaViewer` controls Share, Forward, Download and Open; `linkHandling` controls URL/address taps and disabled links. These are the same shared options as ordinary Messenger, not a separate Bridge viewer.
50
+ `onDownloadAttachment` receives an authorized temporary file. Copy it into the host's private Files destination before resolving; the SDK then removes its temporary copy. Honor its cancellation signal. `mediaViewer` controls Share, Forward, Download and Delete; the viewer has no external Open action; `linkHandling` controls URL/address taps and disabled links. These are the same shared options as ordinary Messenger, not a separate Bridge viewer.
51
51
 
52
52
  A failed send retries its original `clientMessageId`. The service checks the durable Bridge send receipt before using an attachment URL. If delivery already happened, it returns the original message—or an acknowledgement if retention already removed it. If not, it obtains a fresh source URL for the same staged object. It never resends under a new ID automatically. Staging objects expire after 24 hours; if an undelivered object has expired, the user must choose the file again. Finished deliveries do not depend on staging lifetime.
53
53
 
@@ -125,3 +125,9 @@ The standard bubble shows **Cancel** while processing. Custom hosts may pass an
125
125
  Release together: migrations `20261108040000_standard_bridge_messenger.sql` , `20261108060000_bridge_language_authorization.sql` and `20261109010000_bridge_spoken_translation.sql`, functions `external-app-bridge-messenger` and `external-app-usage`, and the speech worker duration endpoint, API router `/v1/bridge/messenger`, and core/server/Expo/web packages. Verify deployment before publishing supported install versions. Website/API uploads remain owner-operated.
126
126
 
127
127
  Local verification uses synthetic accepted Bridge connections in an isolated service, through the public adapter and standard screens. iPhone and Android checks cover photo, video, document and voice upload/send/download, thumbnails, native voice playback, changing permissions and revoked access. Browser checks cover opening retained history and sending through the standard composer. Service checks cover original IDs, pagination, private access, duplicate prevention after a lost response and recovery after a missed notification. This is not a claim that a new push notification was delivered through Apple's or Google's service in this check.
128
+
129
+ ### Media startup (0.20.3 phone / 0.19.3 web)
130
+
131
+ The shared player uses short-lived original-media access returned with an authorized Bridge thumbnail. This avoids an additional request when that photo or video is opened soon afterward. The history request does not wait for this preparation. Access expires within 60 seconds (earlier when retention ends); expired access falls back to a fresh permission check. Download and Share actions still reauthorize. No URLs are saved in persistent history.
132
+
133
+ Both phone and website players pause speculative original-media downloads while a viewer is open. Already completed recent-media copies remain available, subject to their existing access window. The `preloadRecentMedia` host option remains unchanged. These optimizations require the updated shared player; the thumbnail preparation also requires the service update.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.20.3
2
+
3
+ - Reuse short-lived original-media access returned with Bridge thumbnails to avoid another playback authorization request. Explicit exports still reauthorize; expired or mismatched grants are rejected.
4
+ - Skip outgoing draft-file lookups for remote Bridge and managed-storage attachments.
5
+ - Pause speculative original-media transfers while a viewer is open; resume after closing and keep already completed private copies.
6
+ - Remove the dark overlay behind message options.
7
+
1
8
  ## 0.20.2
2
9
 
3
10
  - Match the original Messenger media viewer: Download, Delete, Forward, Share and Close, with no external Open action. Keep unavailable message actions disabled and preserve customer permission controls.
@@ -17,7 +24,11 @@
17
24
 
18
25
  Adds the standard Expo Bridge connector, original-message read receipts, retained history and shared attachment handling.
19
26
 
20
- ## 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.
21
32
 
22
33
  - Coalesce queued draft updates into one durable write while preserving reads, sends, clears and storage-error handling.
23
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.