@bobfrankston/rmfmail 1.1.95 → 1.1.96

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/.commitmsg CHANGED
@@ -1,5 +1,15 @@
1
- Compose window opens centred near the top, not lower-right
1
+ Alarm/snooze: log decisions to the daemon log so snooze is verifiable
2
2
 
3
- The floating compose/reply overlay was anchored to the bottom-right
4
- corner. It now opens horizontally centred with a small top margin. The
5
- title bar still drags it anywhere; this only changes initial placement.
3
+ On review the snooze keying is actually correct — snoozeItem stores under
4
+ item.uuid, which IS the full per-occurrence key (uuid:startMs@offset for
5
+ calendar, uuid:dueMs for tasks) that collectDueAlarms reads back as
6
+ snoozed[key]. They match.
7
+
8
+ What was missing was visibility: the [alarm] decisions used plain
9
+ console.log, which from the WebView never reaches the daemon log file —
10
+ so "is snooze working?" couldn't be answered after the fact. Added an
11
+ alog() helper that mirrors to the daemon log via logClientEvent, a
12
+ "snooze saved" line (key + minutes + untilMs), and routed the existing
13
+ fire-decision / dismiss / unknown-result logs through it. Next snooze is
14
+ now traceable: the "snooze saved" line and the following "fire decision"
15
+ line confirm the snooze took and for how long.
@@ -4829,6 +4829,13 @@ var alarms_exports = {};
4829
4829
  __export(alarms_exports, {
4830
4830
  startAlarmPoller: () => startAlarmPoller
4831
4831
  });
4832
+ function alog(tag, data) {
4833
+ console.log(`[alarm] ${tag}`, data ?? "");
4834
+ try {
4835
+ logClientEvent(`[alarm] ${tag}`, data);
4836
+ } catch {
4837
+ }
4838
+ }
4832
4839
  function loadDismissed() {
4833
4840
  try {
4834
4841
  return JSON.parse(localStorage.getItem(DISMISSED_KEY) || "{}");
@@ -4903,7 +4910,7 @@ async function collectDueAlarms(now) {
4903
4910
  }
4904
4911
  }
4905
4912
  if (pick) {
4906
- console.log(`[alarm] fire decision key=${pick.key} title="${ev.title || ""}" startMs=${startMs}`);
4913
+ alog("fire decision", { key: pick.key, title: ev.title || "", startMs, effective: pick.effective });
4907
4914
  items.push({
4908
4915
  uuid: pick.key,
4909
4916
  kind: "calendar",
@@ -5176,7 +5183,7 @@ async function firePopupForItem(item) {
5176
5183
  const m = loadDismissed();
5177
5184
  m[item.uuid] = true;
5178
5185
  saveDismissed(m);
5179
- console.log(`[alarm] dismiss saved key=${item.uuid}`);
5186
+ alog("dismiss saved", { key: item.uuid, via: r.button });
5180
5187
  }
5181
5188
  break;
5182
5189
  case "Delete":
@@ -5189,7 +5196,7 @@ async function firePopupForItem(item) {
5189
5196
  deleteCalendarEvent(item.uuid).catch((e) => console.error(` [alarm] delete failed for ${item.uuid}: ${e?.message || e}`));
5190
5197
  break;
5191
5198
  default:
5192
- console.warn(`[alarm] unknown popup result: button=${JSON.stringify(r.button)}, form=${JSON.stringify(r.form)}`);
5199
+ alog("unknown popup result", { button: r.button, form: r.form });
5193
5200
  {
5194
5201
  const m = loadDismissed();
5195
5202
  m[item.uuid] = true;
@@ -5204,6 +5211,7 @@ function snoozeItem(item, minutes) {
5204
5211
  map[item.uuid] = now + minutes * 6e4;
5205
5212
  saveSnoozed(map);
5206
5213
  firedThisSession.delete(item.uuid);
5214
+ alog("snooze saved", { key: item.uuid, minutes, untilMs: map[item.uuid] });
5207
5215
  }
5208
5216
  async function pollAlarms() {
5209
5217
  if (document.hidden)