create-pmos 0.329.0 → 0.330.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.
@@ -3,7 +3,10 @@
3
3
  * Meetings come from the answer's cells; the all-day row also carries the answer's dated layers (an initiative's promised date, a plan item,
4
4
  * a release, a report, your own due items). Nothing is invented: a range with no meeting says so, and a calendar that did not answer says why.
5
5
  * Pressing a meeting opens its detail (premium-meeting.js openRow, the meeting dialog of slice S3) with the calendar as a tab beside it.
6
- * The mockup is the iteration-3 calendar of prototype/premium-conversation-shell/index.html (.calw, .cg, .ev, .agd).
6
+ * The grid follows the console's Calendar (pm/c3-calendar.js timeGrid and monthGrid): 46px an hour from 08:00 (or the earliest meeting) to 18:00
7
+ * (or the latest), every hour labelled; a day head with the day, its meeting hours and a load bar; a "dates" row of all-day meetings and dated
8
+ * marks, four a day in a week and a "+N" that opens the day; overlapping meetings side by side in lanes; a routine meeting (a stand-up, a 1:1,
9
+ * or one tied to no initiative, prep or record) drawn muted. A week is at least 620px wide and scrolls sideways in a narrower pane.
7
10
  * calModel(r, view, date, today) pure · calHtml(M, esc) pure · mountCal(el, st, d) · openCalendar(d, st?) */
8
11
  import { weekView } from './premium-meeting.js';
9
12
  import { vwOpen, vwShow, vwStyle } from './premium-viewer.js';
@@ -20,6 +23,10 @@ const wd = (k) => { const [y, m, d] = parts(k); return (new Date(Date.UTC(y, m -
20
23
  const hasTime = (s) => /T\d{2}:\d{2}/.test(String(s || ''));
21
24
  const minOf = (s) => Number(String(s).slice(11, 13)) * 60 + Number(String(s).slice(14, 16)); // the wall clock as written, like premium-meeting.js hhmm
22
25
  const hh = (m) => `${pad(Math.floor(m / 60))}:${pad(m % 60)}`;
26
+ const PPH = 46; // pixels an hour, the console's PPH_PAGE
27
+ const DAY_LOAD = 6; // the load bar's scale, in hours (c3-calendar.js)
28
+ const STRIP_WEEK = 4, STRIP_DAY = 12; // dates shown in a day's strip before "+N"
29
+ const ROUTINE = /stand-?up|\b1\s*[:/-]\s*1\b|one[- ]on[- ]one/i;
23
30
  export const todayKey = () => { const t = new Date(); return `${t.getFullYear()}-${pad(t.getMonth() + 1)}-${pad(t.getDate())}`; };
24
31
 
25
32
  /** The date one step before (-1) or after (1) `date` in `view`. */
@@ -63,6 +70,10 @@ export function calModel(r, view, date, today) {
63
70
  if (W.state !== 'ok') return { ...base, state: 'error', reason: W.reason, days: [], total: 0, caption: 'Calendar not read' };
64
71
  const layers = Array.isArray(r.layers) ? r.layers.filter((x) => x && x.title && /^\d{4}-\d{2}-\d{2}/.test(String(x.date))) : [];
65
72
  const byKey = new Map(W.days.map((x) => [x.key, x]));
73
+ const raw = new Map(); (Array.isArray(r.cells) ? r.cells : []).forEach((c) => (c.events || []).forEach((e) => { if (e && e.id) raw.set(e.id, e); }));
74
+ // routine, as the console reads it: a stand-up or a 1:1, the event's own routine flag, or a meeting tied to no initiative, prep or record
75
+ const routineOf = (row) => { const e = raw.get(row.id) || {}; const tied = !!(e.initiative || (Array.isArray(e.prep) ? e.prep.length : e.prep) || row.level);
76
+ return e.routine === true || ROUTINE.test(row.title || '') || !tied; };
66
77
  let from = 8 * 60, to = 18 * 60;
67
78
  const dayOf = (key) => {
68
79
  const src = byKey.get(key), rows = src ? src.rows : [];
@@ -73,7 +84,7 @@ export function calModel(r, view, date, today) {
73
84
  const s = minOf(row.at), endSame = row.end && hasTime(row.end) && String(row.end).slice(0, 10) === key;
74
85
  const e = Math.max(s + 15, endSame ? minOf(row.end) : row.end ? 24 * 60 : s + 30);
75
86
  from = Math.min(from, Math.floor(s / 60) * 60); to = Math.max(to, Math.min(24 * 60, Math.ceil(e / 60) * 60));
76
- timed.push({ ref, s, e, title: row.title, time: `${hh(s)}–${hh(e)}`, sub: row.sub, about: row.about, past: row.past, row });
87
+ timed.push({ ref, s, e, title: row.title, time: `${hh(s)}–${hh(e)}`, sub: row.sub, about: row.about, past: row.past, routine: routineOf(row), row });
77
88
  } else allday.push({ ref, title: row.title, sub: row.sub, kind: 'meet', row });
78
89
  });
79
90
  for (const x of layers) {
@@ -81,7 +92,8 @@ export function calModel(r, view, date, today) {
81
92
  if (a <= key && key <= b) allday.push({ title: x.title, kind: x.kind || x.layer || 'mark', tone: x.tone || null });
82
93
  }
83
94
  const [, m, d] = parts(key);
84
- return { key, dow: DOW[wd(key)], n: d, mon: MON[m - 1], label: `${DOW[wd(key)]} ${d} ${MON[m - 1]}`, today: key === today, past: key < today,
95
+ const hrs = timed.reduce((t, b) => t + (b.e - b.s) / 60, 0), tiedHrs = timed.filter((b) => !b.routine).reduce((t, b) => t + (b.e - b.s) / 60, 0);
96
+ return { key, weekend: wd(key) > 4, hrs, tiedHrs, dow: DOW[wd(key)], n: d, mon: MON[m - 1], label: `${DOW[wd(key)]} ${d} ${MON[m - 1]}`, today: key === today, past: key < today,
85
97
  inRange: key >= range.start && key <= range.end, timed: lanes(timed), allday, meetings: rows.length };
86
98
  };
87
99
  let keys = [];
@@ -89,9 +101,7 @@ export function calModel(r, view, date, today) {
89
101
  const first = addDays(range.start, -wd(range.start)), last = addDays(range.end, 6 - wd(range.end));
90
102
  for (let k = first; k <= last; k = addDays(k, 1)) keys.push(k);
91
103
  } else for (let k = range.start; k <= range.end; k = addDays(k, 1)) keys.push(k);
92
- let days = keys.map(dayOf);
93
- // the week shows Saturday and Sunday only when they hold something, or one is today
94
- if (view === 'week') days = days.filter((x) => wd(x.key) < 5 || x.today || x.meetings || x.allday.length);
104
+ const days = keys.map(dayOf); // the week shows all seven days, the weekend muted, as the console does
95
105
  const total = days.filter((x) => x.inRange).reduce((s, x) => s + x.meetings, 0);
96
106
  const none = r.events_source === 'none' ? 'PMOS holds no calendar to read.' : `No meetings ${view === 'day' ? 'on this day' : 'in this ' + view}.`;
97
107
  return { ...base, state: 'ok', days, from, to, total, caption: total ? `${total} ${total === 1 ? 'meeting' : 'meetings'}` : 'No meetings', empty: total ? '' : none };
@@ -104,12 +114,11 @@ const ic = (k) => `<svg class="i" viewBox="0 0 24 24"><path d="${ICON[k]}"/></sv
104
114
 
105
115
  /** The grid's markup. Both the timeline and the list are drawn for Day and Week; the pane's width picks one (premium-vw-cal.css). */
106
116
  export function calHtml(M, esc, nowMin = null) {
107
- const H = 44, top = (m) => ((m - M.from) / 60) * H;
108
117
  const seg = `<div class="vc-seg" role="group" aria-label="Calendar view">${VIEWS.map(([k, l]) => `<button type="button" data-cv="${k}" aria-pressed="${M.view === k}">${l}</button>`).join('')}</div>`;
109
118
  const step = M.view === 'day' ? 'day' : M.view === 'week' ? 'week' : 'month';
110
119
  const head = `<div class="vc-h"><button type="button" class="vc-ib" data-cn="-1" aria-label="Previous ${step}">${ic('back')}</button><button type="button" class="vc-ib" data-cn="1" aria-label="Next ${step}">${ic('next')}</button><button type="button" class="vc-tdy" data-cn="0">Today</button><b class="vc-t">${esc(M.title)}</b><small class="vc-cap">${esc(M.caption)}</small>${seg}</div>`;
111
120
  if (M.state !== 'ok') return `<div class="vc-w">${head}<p class="vc-empty" role="status">Calendar not read. ${esc(M.reason)}</p></div>`;
112
- const chip = (a) => a.row ? `<button type="button" class="vc-ad meet" data-ev="${esc(a.ref)}" title="${esc(a.title)}">${esc(a.title)}</button>` : `<span class="vc-ad ${esc(a.kind)}${a.tone ? ' t-' + esc(a.tone) : ''}" title="${esc(a.title)}">${esc(a.title)}</span>`;
121
+ const chip = (a) => a.row ? `<button type="button" class="vc-ad meet" data-ev="${esc(a.ref)}" title="${esc(a.title + ', all day')}">${esc(a.title)}</button>` : `<span class="vc-ad ${esc(a.kind)}${a.tone ? ' t-' + esc(a.tone) : ''}" title="${esc(a.title)}">${esc(a.title)}</span>`;
113
122
  const empty = M.empty ? `<p class="vc-empty" role="status">${esc(M.empty)}</p>` : '';
114
123
  if (M.view === 'month') {
115
124
  const cells = M.days.map((x) => {
@@ -119,21 +128,32 @@ export function calHtml(M, esc, nowMin = null) {
119
128
  }).join('');
120
129
  return `<div class="vc-w">${head}<div class="vc-mg"><div class="vc-mh">${DOW.map((d) => `<span>${d}</span>`).join('')}</div><div class="vc-mb">${cells}</div></div>${empty}</div>`;
121
130
  }
122
- const n = M.days.length, hours = [];
131
+ const n = M.days.length, one = n === 1, hours = [];
123
132
  for (let m = M.from; m < M.to; m += 60) hours.push(m);
124
- const blk = (e) => `<button type="button" class="vc-ev${e.past ? ' past' : ''}${e.e - e.s < 30 ? ' sh' : ''}" data-ev="${esc(e.ref)}" data-tl="${top(e.s) + 1}px ${Math.max(14, ((e.e - e.s) / 60) * H - 3)}px ${(e.lane / e.lanes) * 100}% ${100 / e.lanes}%" title="${esc(e.title + ' · ' + e.time)}"><b>${esc(e.title)}</b><small>${e.time}</small></button>`;
125
- const grid = `<div class="vc-g" data-tl="${n}"><div class="vc-c"></div>${M.days.map((x) => `<div class="vc-dh${x.today ? ' now' : ''}">${x.dow}<b>${x.n}</b></div>`).join('')}<div class="vc-adl">all day</div>${M.days.map((x) => `<div class="vc-adc">${x.allday.map(chip).join('')}</div>`).join('')}<div class="vc-gut">${hours.map((m) => `<i>${hh(m)}</i>`).join('')}</div>${M.days.map((x) => `<div class="vc-day${x.past ? ' past' : ''}" data-tl="${hours.length * H}px">${x.today && nowMin != null && nowMin >= M.from && nowMin <= M.to ? `<span class="vc-now" data-tl="${top(nowMin)}px" aria-hidden="true"></span>` : ''}${x.timed.map(blk).join('')}</div>`).join('')}</div>`;
126
- const list = `<div class="vc-ag">${M.days.map((x) => { const rows = [...x.allday.filter((a) => a.row), ...x.timed]; return `<h4${x.today ? ' class="now"' : ''}>${x.label}${x.today ? ' · today' : ''}</h4>${x.allday.filter((a) => !a.row).map(chip).join('')}${rows.length ? rows.map((e) => `<button type="button" class="vc-ar${e.past ? ' past' : ''}" data-ev="${esc(e.ref)}"><time>${e.s != null ? hh(e.s) : 'All day'}</time><span><b>${esc(e.title)}</b>${e.sub || e.about ? `<small>${esc([e.sub, e.about].filter(Boolean).join(' · '))}</small>` : ''}</span></button>`).join('') : '<p class="vc-none">No meetings</p>'}`; }).join('')}</div>`;
127
- return `<div class="vc-w">${head}${empty}${grid}${list}</div>`;
133
+ const H = PPH, top = (m) => ((m - M.from) / 60) * H;
134
+ const blk = (e) => `<button type="button" class="vc-ev${e.routine ? ' rt' : ''}${e.past ? ' past' : ''}${e.e - e.s < 30 ? ' sh' : ''}" data-ev="${esc(e.ref)}" data-tl="${top(e.s) + 1}px ${Math.max(16, ((e.e - e.s) / 60) * H - 3)}px ${e.lane} ${e.lanes}" title="${esc(e.title + ', ' + e.time)}"><b>${esc(e.title)}</b>${e.e - e.s >= 30 ? `<small>${e.time}</small>` : ''}</button>`;
135
+ const hrsText = (x) => x.hrs ? `${+x.hrs.toFixed(1)} h` : '';
136
+ const pct = (h) => Math.min(100, (h / DAY_LOAD) * 100).toFixed(1) + '%';
137
+ const dh = (x) => `<div class="vc-dh${x.today ? ' now' : ''}${x.weekend ? ' we' : ''}"><div class="vc-dl">${one ? `<b>${x.label}</b>` : `<button type="button" class="vc-db" data-day="${x.key}" title="Open ${x.label}">${x.label}</button>`}<span class="vc-hrs">${hrsText(x)}</span></div><span class="vc-lb" aria-hidden="true" data-tl="${pct(x.tiedHrs)} ${pct(x.hrs - x.tiedHrs)}"><i class="tied"></i><i class="rt"></i></span></div>`;
138
+ const strip = (x) => {
139
+ const max = one ? STRIP_DAY : STRIP_WEEK, all = [...x.allday.filter((a) => a.row), ...x.allday.filter((a) => !a.row)];
140
+ const more = all.length > max ? `<button type="button" class="vc-more" data-day="${x.key}" aria-label="${all.length - max} more on ${x.label}">+${all.length - max}</button>` : '';
141
+ return `<div class="vc-sc${one ? ' line' : ''}${x.weekend ? ' we' : ''}">${all.slice(0, max).map(chip).join('')}${more}${!all.length && one ? '<span class="vc-none">No dated item on this day</span>' : ''}</div>`;
142
+ };
143
+ const grid = `<div class="vc-sx"><div class="vc-g${one ? ' one' : ''}" data-tl="${n}"><div class="vc-c"></div>${M.days.map(dh).join('')}<div class="vc-adl">dates</div>${M.days.map(strip).join('')}<div class="vc-gut" data-tl="${hours.length * H}px">${hours.map((m, i) => `<i data-tl="${i * H}px">${hh(m)}</i>`).join('')}</div>${M.days.map((x) => `<div class="vc-day${x.past ? ' past' : ''}${x.today ? ' now' : ''}${x.weekend ? ' we' : ''}" data-tl="${hours.length * H}px">${x.today && nowMin != null && nowMin >= M.from && nowMin <= M.to ? `<span class="vc-now" data-tl="${top(nowMin)}px" aria-hidden="true"></span>` : ''}${x.timed.map(blk).join('')}</div>`).join('')}</div></div>`;
144
+ const list = `<div class="vc-ag">${M.days.map((x) => { const rows = [...x.allday.filter((a) => a.row), ...x.timed]; return `<h4${x.today ? ' class="now"' : ''}>${x.label}${x.today ? ' · today' : ''}</h4>${x.allday.filter((a) => !a.row).map(chip).join('')}${rows.length ? rows.map((e) => `<button type="button" class="vc-ar${e.routine ? ' rt' : ''}${e.past ? ' past' : ''}" data-ev="${esc(e.ref)}"><time>${e.s != null ? hh(e.s) : 'All day'}</time><span><b>${esc(e.title)}</b>${e.sub || e.about ? `<small>${esc([e.sub, e.about].filter(Boolean).join(' · '))}</small>` : ''}</span></button>`).join('') : '<p class="vc-none">No meetings</p>'}`; }).join('')}</div>`;
145
+ return `<div class="vc-w">${head}${empty}${grid}${one ? '' : list}</div>`;
128
146
  }
129
147
 
130
- /** The run-time geometry of the timeline: data-tl on a block is "top height left width", on the grid its column count, on a day its height. */
148
+ /** The run-time geometry of the timeline: data-tl on a block is "top height lane lanes", on the grid its column count, on a day and the hour
149
+ * gutter their height, on a load bar its two widths, on an hour label and the now line their top. */
131
150
  export function placeAll(el) {
132
151
  el.querySelectorAll('[data-tl]').forEach((n) => {
133
152
  const v = n.dataset.tl.split(' ');
134
- if (n.classList.contains('vc-ev')) ['--tl-t', '--tl-h', '--tl-l', '--tl-w'].forEach((k, i) => n.style.setProperty(k, v[i]));
153
+ if (n.classList.contains('vc-ev')) ['--tl-t', '--tl-h', '--tl-l', '--tl-lc'].forEach((k, i) => n.style.setProperty(k, v[i]));
154
+ else if (n.classList.contains('vc-lb')) ['--tl-a', '--tl-b'].forEach((k, i) => n.style.setProperty(k, v[i]));
135
155
  else if (n.classList.contains('vc-g')) n.style.setProperty('--tl-n', v[0]);
136
- else if (n.classList.contains('vc-day')) n.style.setProperty('--tl-hh', v[0]);
156
+ else if (n.classList.contains('vc-day') || n.classList.contains('vc-gut')) n.style.setProperty('--tl-hh', v[0]);
137
157
  else n.style.setProperty('--tl-t', v[0]);
138
158
  });
139
159
  }
@@ -169,7 +189,7 @@ export function mountCal(el, st, d) {
169
189
  return { state: () => ({ ...me.st }), reload: read };
170
190
  }
171
191
 
172
- /** The calendar on its own: a dialog whose detail is the grid. d = { openDlg, turnA, ptx, $, pmGet, esc, ws(), openRow(row) } where openRow
192
+ /** The calendar on its own: a dialog whose detail is the grid. d = { openDlg, setMode, turnA, ptx, $, pmGet, esc, ws(), openRow(row) } where openRow
173
193
  * opens the meeting dialog. After a meeting opens, the grid comes back as a tab beside it at the same view and date. */
174
194
  export function openCalendar(d, st) {
175
195
  const open = (row, at) => {
@@ -180,6 +200,7 @@ export function openCalendar(d, st) {
180
200
  d.openDlg({ eye: 'Calendar · real data', title: 'Calendar', stream: d.turnA(d.ptx('This is the calendar PMOS holds. Press a meeting to open its detail; the calendar stays as a tab beside it.')),
181
201
  pane: '<div class="vc" id="vcMain"></div>', label: 'Calendar' });
182
202
  const f = d.$('#askF'); if (f) f.hidden = true;
203
+ if (d.setMode) d.setMode('detail'); // the grid takes the whole dialog; the dialog's own button brings the conversation back
183
204
  return mountCal(d.$('#vcMain'), st || { view: 'week', date: todayKey() }, { ...d, openRow: open });
184
205
  }
185
206
 
@@ -2085,3 +2085,25 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2085
2085
  .where #crIni{max-width:calc(100vw - 316px)}
2086
2086
  .top .tools-top{gap:8px}
2087
2087
  }
2088
+ /* ── Updates and What's new in Settings (initiative premium-updates) ── */
2089
+ .updpill{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:var(--spot);color:var(--ember-ink);font:600 var(--fs-1) var(--mono);font-style:normal;white-space:nowrap;flex:none}
2090
+ .updpill.ok{background:transparent;border:1px solid var(--ok);color:var(--ok)}
2091
+ .updpill[hidden]{display:none}
2092
+ .crmenu .updpill{margin-left:auto;color:var(--ember-ink)}
2093
+ .updb{display:flex;flex-wrap:wrap;align-items:center;gap:12px 14px;padding:14px 16px;border-radius:18px;background:var(--spot);margin-bottom:6px}
2094
+ .updb .t{display:grid;gap:2px;flex:1 1 240px;min-width:0}.updb .t b{font-size:var(--fs-4)}
2095
+ .updb .a{display:flex;flex-wrap:wrap;gap:8px}.updb .cta{height:auto;min-height:44px;padding:0 18px}
2096
+ .kday{border-top:1px solid var(--hair)}
2097
+ .kdh{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;font:600 var(--fs-2) var(--mono);color:var(--ink-2)}
2098
+ .kdh em{font-style:normal;color:var(--ink-3)}
2099
+ .kdh[aria-expanded="false"]::after{content:"Show";font:600 var(--fs-2) var(--sans);color:var(--ink-2)}
2100
+ .doc .kvl{list-style:none;margin:0 0 6px;padding:0;display:grid;gap:2px;max-width:none}
2101
+ .doc .kver{display:grid;grid-template-columns:110px minmax(0,1fr);gap:4px 14px;padding:10px 8px;margin:0;border-radius:14px;color:var(--ink)}
2102
+ .doc .kver.new{background:linear-gradient(90deg,var(--spot),transparent)}
2103
+ .kv{display:grid;gap:2px;align-content:start}.kv b{font:600 var(--fs-3) var(--mono)}
2104
+ .kv i{justify-self:start;font:600 var(--fs-1) var(--mono);font-style:normal;padding:0 7px;border-radius:999px;border:1px solid var(--hair);color:var(--ink-2)}
2105
+ .kv i.nw{border-color:transparent;background:var(--spot);color:var(--ember-ink)}
2106
+ .kv em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}
2107
+ .kp{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.doc .kp p{margin:0;color:var(--ink);max-width:none;line-height:1.5}.kp p em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}
2108
+ .kmore{min-height:44px;font-weight:600;color:var(--ink-2)}
2109
+ @media (max-width:640px){.doc .kver{grid-template-columns:minmax(0,1fr)}.kv{grid-auto-flow:column;justify-content:start;align-items:center;gap:8px}}
@@ -25,7 +25,7 @@ const pinned = new Set();
25
25
 
26
26
  wireRail('brief');
27
27
  const week = mountMeeting({ $, $$, esc, openDlg, toast, pmGet, pmPost, turnA, ptx, kv, H, ws: () => new URLSearchParams(location.search).get('ws'), redraw: () => { if (M) drawTl(); } });
28
- mountCalEntry($('#todayCard'), { $, esc, openDlg, turnA, ptx, pmGet, ws: () => new URLSearchParams(location.search).get('ws'), openRow: week.openRow }); // the full calendar: Day, Week and Month in the viewer
28
+ mountCalEntry($('#todayCard'), { $, esc, openDlg, setMode, turnA, ptx, pmGet, ws: () => new URLSearchParams(location.search).get('ws'), openRow: week.openRow }); // the full calendar: Day, Week and Month in the viewer
29
29
  mountNotes({ $, esc, openDlg, toast, pmGet, pmPost, task: week.task });
30
30
 
31
31
  /* ── a day's baseline, kept on this device, so "N of M done" counts rows that cleared since the page first read today ────── */
@@ -8197,7 +8197,11 @@ async function handleRequest(req, res) {
8197
8197
  if (p === '/api/kit/status' && req.method === 'GET') {
8198
8198
  const w = getWs(url.searchParams.get('ws'));
8199
8199
  if (!w) return json(res, { ok: false, error: 'no workspace' }, 400);
8200
- return json(res, { ok: true, ws: w.id, name: w.name, busy: kitBusy, ...kitUpdate.status({ root: w.root, appVersion: APP_VERSION, appDir: __dirname }) });
8200
+ // premium-updates: the last check's answer (kept in the state folder) and whether an open page checks once a day.
8201
+ const lastCheck = kitUpdate.readLastCheck(STATE);
8202
+ const now = kitUpdate.status({ root: w.root, appVersion: APP_VERSION, appDir: __dirname });
8203
+ return json(res, { ok: true, ws: w.id, name: w.name, busy: kitBusy, ...now, lastCheck, ...(lastCheck ? kitUpdate.compare(now, lastCheck.latest) : {}),
8204
+ checkDaily: require('./lib/settings-store.js').get(STATE, 'upd.check') === 'daily' && String(process.env.PMOS_UPDATE_CHECK || '').toLowerCase() !== 'press' });
8201
8205
  }
8202
8206
  if ((p === '/api/kit/check' || p === '/api/kit/update' || p === '/api/kit/upgrade-app') && req.method === 'POST') {
8203
8207
  let body = {};
@@ -8214,7 +8218,8 @@ async function handleRequest(req, res) {
8214
8218
  const r = await kitUpdate.latest({ source: kitUpdate.source() });
8215
8219
  const now = st();
8216
8220
  if (!r.ok) return json(res, { ok: false, error: r.error, ws: w.id, ...now }, 502);
8217
- return json(res, { ok: true, ws: w.id, ...now, latest: r.version, source: r.source || 'registry', ...kitUpdate.compare(now, r.version) });
8221
+ const lastCheck = kitUpdate.writeLastCheck(STATE, { latest: r.version, changes: r.changes });
8222
+ return json(res, { ok: true, ws: w.id, ...now, latest: r.version, latestChanges: r.changes || [], lastCheck, source: r.source || 'registry', ...kitUpdate.compare(now, r.version) });
8218
8223
  }
8219
8224
  if (kitBusy) return json(res, { ok: false, error: kitBusy === 'app' ? 'The workspace is already updating' : 'A kit update is already running' }, 409);
8220
8225
  if (p === '/api/kit/update') {
@@ -101,6 +101,8 @@ function configure({ name = 'run', port = null } = {}) {
101
101
  // remembered at hundreds of call sites is a convention that will be forgotten at one of them,
102
102
  // which is exactly how this class of defect got in.
103
103
  process.env.PMOS_STATE_DIR = stateDir;
104
+ // No suite's page asks the npm registry by itself: the once-a-day update check (premium-updates) waits for a press.
105
+ process.env.PMOS_UPDATE_CHECK = 'press';
104
106
  // A private tmux socket, never the PM's own ('pmos'), so a suite cannot reach their sessions.
105
107
  const tmuxSock = `pmos-${name}-${process.pid}`;
106
108
  process.env.PMOS_TMUX_SOCK = tmuxSock;