@pmate/chat-sdk 0.13.0-profile.10 → 0.13.0-profile.11
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/README.md
CHANGED
|
@@ -399,3 +399,15 @@ Thread assignment carries group controls and metadata, child discussions, readin
|
|
|
399
399
|
The upgrade regression starts with an obsolete cached projection containing inaccessible discussion children, a locally played voice and a failed outgoing message. It interrupts the rebuild with HTTP 503, reopens the owner, resumes the same generation and verifies group/discussion metadata, reading and the exact durable outgoing message without clearing any store. Full SDK suite: 766 passed, one production-only test skipped.
|
|
400
400
|
|
|
401
401
|
Duplicate Inbox events, registrations and already-read observations are rejected as no-op batches before opening an IndexedDB write transaction; queue and store tests verify zero transactions as well as unchanged revisions.
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
### Profile disposal (0.13.0-profile.11)
|
|
405
|
+
|
|
406
|
+
Final `ProfileCoordinator.close()` releases its UI memory entities, page caches,
|
|
407
|
+
reading indexes and subscriptions after pending startup/recovery settles. It also
|
|
408
|
+
terminates the Worker. Previously, retaining a closed coordinator retained its
|
|
409
|
+
full UI projection. Already published message/page objects remain unchanged.
|
|
410
|
+
Worker recovery keeps the same prepared UI store until its replacement snapshot
|
|
411
|
+
is validated; it must not call the final disposal path. Direct memory-store users
|
|
412
|
+
may call `dispose()` when permanently discarding that Profile. This release does
|
|
413
|
+
not claim that process RSS immediately falls or resolve all recovery peak memory.
|
|
@@ -48,6 +48,10 @@ export declare class ProfileMemoryStore {
|
|
|
48
48
|
private readingIndices;
|
|
49
49
|
private presentedPages;
|
|
50
50
|
constructor(onError?: (error: unknown) => void, profileId?: string);
|
|
51
|
+
/** Release a disposed Profile without mutating snapshots held by React.
|
|
52
|
+
* Worker replacement deliberately keeps this store alive; only final close
|
|
53
|
+
* may discard its entities and subscriptions. */
|
|
54
|
+
dispose(): void;
|
|
51
55
|
private notify;
|
|
52
56
|
getStatus(): {
|
|
53
57
|
phase: "ready" | "restoring";
|
|
@@ -35,6 +35,33 @@ export class ProfileMemoryStore {
|
|
|
35
35
|
this.onError = onError;
|
|
36
36
|
this.profileId = profileId;
|
|
37
37
|
}
|
|
38
|
+
/** Release a disposed Profile without mutating snapshots held by React.
|
|
39
|
+
* Worker replacement deliberately keeps this store alive; only final close
|
|
40
|
+
* may discard its entities and subscriptions. */
|
|
41
|
+
dispose() {
|
|
42
|
+
this.windowRows.clear();
|
|
43
|
+
this.messageWindows.clear();
|
|
44
|
+
this.windowPages.clear();
|
|
45
|
+
this.windowAccess.clear();
|
|
46
|
+
this.windowIds.clear();
|
|
47
|
+
this.windowListeners.clear();
|
|
48
|
+
this.windowListListeners.clear();
|
|
49
|
+
this.dirtyWindows.clear();
|
|
50
|
+
this.entities.clear();
|
|
51
|
+
this.threads.clear();
|
|
52
|
+
this.directories.clear();
|
|
53
|
+
this.listeners.clear();
|
|
54
|
+
this.listListeners.clear();
|
|
55
|
+
this.messageListeners.clear();
|
|
56
|
+
this.pageCache.clear();
|
|
57
|
+
this.epochs.clear();
|
|
58
|
+
this.presented.clear();
|
|
59
|
+
this.readingIndices.clear();
|
|
60
|
+
this.presentedPages = new WeakMap();
|
|
61
|
+
this.list = [];
|
|
62
|
+
this.current = undefined;
|
|
63
|
+
this.phase = "restoring";
|
|
64
|
+
}
|
|
38
65
|
notify(listener) { try {
|
|
39
66
|
listener();
|
|
40
67
|
}
|
package/package.json
CHANGED