@fabriktor/fx 0.0.112 → 0.0.113

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.
@@ -50,7 +50,9 @@ export class ChatSendQueue {
50
50
  }
51
51
  get snapshot() {
52
52
  return {
53
- entries: this.entries,
53
+ entries: this.entries.filter((entry) => !this.cancellations.has(entry.id) ||
54
+ !!entry.server_id ||
55
+ !!entry.chat),
54
56
  confirmed: [...this.confirmed.values()],
55
57
  confirmed_sequences: Object.fromEntries(this.confirmedSequences),
56
58
  error: this.error,
@@ -268,6 +270,7 @@ export class ChatSendQueue {
268
270
  return;
269
271
  }
270
272
  this.cancellations.add(id);
273
+ this.publish();
271
274
  try {
272
275
  // Finish a pending local save before removing its durable record. The
273
276
  // cancellation flag prevents this tab from starting that message meanwhile.
@@ -388,6 +391,11 @@ export class ChatSendQueue {
388
391
  this.startConfirmation(current, owner, signal);
389
392
  }
390
393
  catch {
394
+ // remove() owns deliberate cancellation and removes the durable entry
395
+ // under this same room lock. Do not publish a transient send failure.
396
+ if (this.cancellations.has(entry.id) && !current.server_id) {
397
+ return false;
398
+ }
391
399
  current = {
392
400
  ...current,
393
401
  attempted: current.attempted && (requestStarted || !!current.server_id),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/fx",
3
- "version": "0.0.112",
3
+ "version": "0.0.113",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
5
5
  "type": "module",
6
6
  "exports": {