@bobfrankston/rmfmail 1.2.317 → 1.2.319

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.
Files changed (34) hide show
  1. package/.commitmsg +15 -34
  2. package/.llm/trusted-lists.md +2 -0
  3. package/client/app.bundle.js +47 -4
  4. package/client/app.bundle.js.map +2 -2
  5. package/client/components/calendar-sidebar.js +54 -3
  6. package/client/components/calendar-sidebar.js.map +1 -1
  7. package/client/components/calendar-sidebar.ts +49 -3
  8. package/client/compose/compose.bundle.js +23 -0
  9. package/client/compose/compose.bundle.js.map +2 -2
  10. package/client/compose/editor.js +40 -0
  11. package/client/compose/editor.js.map +1 -1
  12. package/client/compose/editor.ts +37 -0
  13. package/npmchanges.md +62 -0
  14. package/package.json +5 -5
  15. package/packages/mailx-imap/package-lock.json +2 -2
  16. package/packages/mailx-imap/package.json +1 -1
  17. package/packages/mailx-service/google-sync.d.ts +5 -0
  18. package/packages/mailx-service/google-sync.d.ts.map +1 -1
  19. package/packages/mailx-service/google-sync.js +1 -0
  20. package/packages/mailx-service/google-sync.js.map +1 -1
  21. package/packages/mailx-service/google-sync.ts +6 -0
  22. package/packages/mailx-service/index.d.ts +4 -0
  23. package/packages/mailx-service/index.d.ts.map +1 -1
  24. package/packages/mailx-service/index.js +19 -8
  25. package/packages/mailx-service/index.js.map +1 -1
  26. package/packages/mailx-service/index.ts +23 -8
  27. package/packages/mailx-service/package.json +1 -1
  28. package/packages/mailx-settings/package.json +1 -1
  29. package/packages/mailx-store/package.json +1 -1
  30. package/packages/mailx-store-web/package.json +1 -1
  31. package/packages/mailx-types/mailx-api.d.ts +2 -0
  32. package/packages/mailx-types/mailx-api.d.ts.map +1 -1
  33. package/packages/mailx-types/mailx-api.ts +2 -1
  34. package/packages/mailx-types/package.json +1 -1
@@ -2725,7 +2725,7 @@ export class MailxService {
2725
2725
  const all = await gsync.listCalendars(tp);
2726
2726
  return all
2727
2727
  .filter(c => c.selected)
2728
- .map(c => ({ id: c.id, name: c.summary, color: c.backgroundColor || "", primary: c.primary }));
2728
+ .map(c => ({ id: c.id, name: c.summary, color: c.backgroundColor || "", primary: c.primary, accessRole: c.accessRole }));
2729
2729
  }
2730
2730
  catch (e) {
2731
2731
  this.handleGoogleRefreshError("calendar", e);
@@ -2895,10 +2895,13 @@ export class MailxService {
2895
2895
  const acct = this.getPrimaryAccount("calendar");
2896
2896
  if (!acct)
2897
2897
  throw new Error("No primary calendar account");
2898
+ const calendarId = ev.calendarId || "primary";
2898
2899
  const uuid = this.db.upsertCalendarEvent({
2899
- accountId: acct.id, ...ev, dirty: true,
2900
+ accountId: acct.id, ...ev, calendarId, dirty: true,
2900
2901
  });
2901
- this.db.enqueueStoreSync("calendar", "create", acct.id, uuid, ev);
2902
+ // The queue payload carries the calendar: the drain must POST to
2903
+ // THAT calendar's events collection, not primary's (2026-09-10).
2904
+ this.db.enqueueStoreSync("calendar", "create", acct.id, uuid, { ...ev, calendarId });
2902
2905
  this.drainStoreSync().catch(() => { });
2903
2906
  return uuid;
2904
2907
  }
@@ -2918,7 +2921,7 @@ export class MailxService {
2918
2921
  location: patch.location ?? existing.location,
2919
2922
  notes: patch.notes ?? existing.notes,
2920
2923
  });
2921
- this.db.enqueueStoreSync("calendar", "update", existing.accountId, uuid, { providerId: existing.providerId, patch });
2924
+ this.db.enqueueStoreSync("calendar", "update", existing.accountId, uuid, { providerId: existing.providerId, calendarId: existing.calendarId, patch });
2922
2925
  this.drainStoreSync().catch(() => { });
2923
2926
  }
2924
2927
  async deleteCalendarEventLocal(uuid) {
@@ -2927,7 +2930,7 @@ export class MailxService {
2927
2930
  return;
2928
2931
  this.db.deleteCalendarEventLocal(uuid);
2929
2932
  if (ev.providerId) {
2930
- this.db.enqueueStoreSync("calendar", "delete", ev.accountId, uuid, { providerId: ev.providerId });
2933
+ this.db.enqueueStoreSync("calendar", "delete", ev.accountId, uuid, { providerId: ev.providerId, calendarId: ev.calendarId });
2931
2934
  this.drainStoreSync().catch(() => { });
2932
2935
  }
2933
2936
  else {
@@ -3082,16 +3085,24 @@ export class MailxService {
3082
3085
  try {
3083
3086
  if (entry.kind === "calendar") {
3084
3087
  const tp = await this.primaryTokenProvider("calendar");
3088
+ // Every push goes to the event's OWN calendar. Until
3089
+ // 2026-09-10 the calendarId was dropped here and all
3090
+ // three went to "primary": a create landed on the wrong
3091
+ // calendar, and an update or delete of an event that
3092
+ // lives on a shared calendar was a 404 that retried
3093
+ // forever. Rows written before that date carry the id
3094
+ // the pull recorded, so they are right too.
3095
+ const calendarId = entry.payload?.calendarId || "primary";
3085
3096
  if (entry.op === "create") {
3086
- const created = await gsync.createCalendarEvent(tp, gsync.localToCalendarEvent(entry.payload));
3097
+ const created = await gsync.createCalendarEvent(tp, gsync.localToCalendarEvent(entry.payload), calendarId);
3087
3098
  this.db.markCalendarEventClean(entry.targetUuid, created.id, created.etag || "");
3088
3099
  }
3089
3100
  else if (entry.op === "update") {
3090
- const updated = await gsync.updateCalendarEvent(tp, entry.payload.providerId, gsync.localToCalendarEvent(entry.payload.patch));
3101
+ const updated = await gsync.updateCalendarEvent(tp, entry.payload.providerId, gsync.localToCalendarEvent(entry.payload.patch), calendarId);
3091
3102
  this.db.markCalendarEventClean(entry.targetUuid, updated.id, updated.etag || "");
3092
3103
  }
3093
3104
  else if (entry.op === "delete") {
3094
- await gsync.deleteCalendarEvent(tp, entry.payload.providerId);
3105
+ await gsync.deleteCalendarEvent(tp, entry.payload.providerId, calendarId);
3095
3106
  this.db.purgeCalendarEvent(entry.targetUuid);
3096
3107
  }
3097
3108
  }