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.
@@ -18,10 +18,10 @@ Every premium page has the same top bar. On the left is where you are, then a ro
18
18
  - **Chat** opens the read-only agent about the page you are on: the Briefing, My work, the board, or the initiative. On Insights, Chat opens the Insight Studio, because the Studio is that page's chat.
19
19
  - **Sources** has a green dot when every source was read recently, and an orange dot when a source is old, was never read, failed, or the page could not read it. Hover to see which. A press opens the Sources dialog (see "Sources" below).
20
20
  - **The bell** counts the same things the Briefing lists under what you need to do, and a press opens the Briefing.
21
- - **The ⋯ menu** holds **Search** (Ctrl K), **Agent sessions** with a count, **Console**, **Theme** (Light, Dark or Auto) and **Settings**. On the Board it also holds **Open initiatives** as Page or Popup. An orange dot on ⋯ means an agent session waits on you.
21
+ - **The ⋯ menu** holds **Search** (Ctrl K), **Agent sessions** with a count, **Console**, **Theme** (Light, Dark or Auto) and **Settings**. On the Board it also holds **Open initiatives** as Page or Popup. An orange dot on ⋯ means a newer PMOS is ready, and **Settings** then shows the version.
22
22
  - **On a phone** the bar is one row: the page name, Chat, the bell and ⋯. Sources moves into the ⋯ menu.
23
23
 
24
- **Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog with two sections. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
24
+ **Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog. **Updates** comes first: the PMOS version you have, the newest published version, **Check now** and, when a newer one is ready, **Update**. Update does what the console's Settings › Updates does: it updates the kit in each workspace that is behind, then PMOS itself, which stops for about a minute and reloads the page. PMOS that runs from a checkout says to use `git pull` instead. Each workspace is a row with its kit version. PMOS checks once a day while a page is open (the console's **Check for updates** setting turns this off). **What's new** lists each published kit, newest first and grouped by day: its version, when it published, and one line per pull request it carries. Each line is copied from the pull request's "After:" paragraph, or its title when it has none, when the kit is published. Kits newer than yours are tinted, and yours is marked. Five show per day; **Show more** opens the rest. Then come two choices. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
25
25
 
26
26
  **Sources** is a dialog that lists each tracked source (Repository, Initiatives, Calendar, Jira status, My work and Tracker items) with its own state and the time it was last read. Each source except the repository has **Refresh**, and **Refresh all** reads them all again. Slack and email are read as part of My work, so they have no row of their own. A source PMOS does not track has no row: the dialog shows only what PMOS can say it read.
27
27
 
@@ -119,7 +119,7 @@ Above the list, with today picked, a ring shows how many of the meetings still a
119
119
 
120
120
  With another day picked, the card lists that day's meetings from the calendar PMOS holds, and the items due that day. It reads the week once when the page opens. If the calendar cannot be read, the card says "Calendar not read" and gives the reason, and does not guess. A meeting in the past is shown dimmer. Picking a day changes only what the card shows and records nothing.
121
121
 
122
- **The full calendar.** The button beside the filter in the card's title row opens the calendar in a dialog. **Day**, **Week** and **Month** each read the calendar PMOS holds for that range; the arrows move one day, week or month, and **Today** comes back. Week is a timeline from Monday to Friday, with Saturday and Sunday only when they hold something; meetings at the same time sit side by side, and the all-day row shows the dated marks the Calendar reads (a promised date, a plan item, a release, a report, your own due items). In a narrow dialog, such as on a phone, Day and Week are a list of days. In Month, press a day to open it. Press a meeting to open its meeting dialog; the calendar stays as a **Calendar** tab beside it, at the same view. An empty range says "No meetings in this week" (or day, or month), and a calendar that cannot be read says "Calendar not read" with the reason.
122
+ **The full calendar.** The button beside the filter in the card's title row opens the calendar in a dialog. **Day**, **Week** and **Month** each read the calendar PMOS holds for that range; the arrows move one day, week or month, and **Today** comes back. The calendar fills the dialog; the dialog's conversation button brings the conversation back beside it. Day and Week are drawn the way the console's Calendar draws them. Week is a timeline from Monday to Sunday, with the weekend shaded and today tinted. Each day's head shows the day (press it to open that day), its meeting hours and a load bar. The **dates** row shows all-day meetings and the dated marks the Calendar reads (a promised date, a plan item, a release, a report, your own due items): four a day in a week, and a **+N** that opens the day. Every hour from 08:00 to 18:00 (wider when a meeting is earlier or later) has its label. Meetings at the same time sit side by side. A routine meeting (a stand-up, a 1:1, or one tied to no initiative, prep or record) is grey. In a narrow dialog, such as on a phone, Week is a list of days and Day stays a timeline. In Month, press a day to open it. Press a meeting to open its meeting dialog; the calendar stays as a **Calendar** tab beside it, at the same view. An empty range says "No meetings in this week" (or day, or month), and a calendar that cannot be read says "Calendar not read" with the reason.
123
123
 
124
124
  Press a meeting, from today or from another day, to open the meeting dialog. It shows the time, the people, and what the meeting is about. It also shows the notes (decisions, next steps and open questions), the material, and, when a recording was kept, its length and the key points. Each part appears only when a record holds it.
125
125
 
@@ -2,9 +2,11 @@
2
2
  /* kit-update.js — check for a newer create-pmos, and update the kit or the workspace app, from the page (workspace-kit-update).
3
3
  *
4
4
  * readKit(root) → { present:false } | { present:true, version, kernelSource, installed, mode }
5
- * status({ root, appVersion, appDir }) → { app: { version, fromCheckout }, kit } local only, no network
5
+ * status({ root, appVersion, appDir }) → { app: { version, fromCheckout }, kit, changes } local only, no network
6
6
  * source(env) → { kind:'npm' } | { kind:'local', path } | { kind:'local', path, error }
7
- * latest({ exec, source }) → Promise<{ ok, version } | { ok:false, error }> npm view create-pmos version
7
+ * latest({ exec, source }) → Promise<{ ok, version, changes } | { ok:false, error }> npm view create-pmos version pmosChanges
8
+ * readChanges(appDir) → [{ v, at, prs: [{ n, s }] }] the installed app's changelog.json, newest first
9
+ * readLastCheck(stateDir) · writeLastCheck(stateDir, { latest, changes }) the last check's answer, kept in the state folder
8
10
  * compare(st, latestVersion) → { appBehind, kitBehind }
9
11
  * updateKit(root, { version, exec }) → Promise<{ ok, output, kit } | { ok:false, error, output }>
10
12
  * upgradeApp(root, { version, logFile, spawn, env }) → { ok, log } | { ok:false, error }
@@ -23,6 +25,10 @@
23
25
  * minute later. The app upgrade stops this server (create-pmos runs `pmos stop`), so it runs DETACHED, writes its output
24
26
  * to a log file, and the page waits for the server to come back.
25
27
  *
28
+ * WHAT'S NEW (premium-updates). kit-publish writes workspace/changelog.json (one summary per kit, copied from its merged PRs)
29
+ * and the newest 20 entries as the package's `pmosChanges` field. The installed list is read from disk; the check reads the
30
+ * newer kits' entries in the same `npm view` call, so the page can say what an update brings before it runs.
31
+ *
26
32
  * NETWORK. These are the workspace's only egress to the npm registry. No HTTP client is opened here: npm and npx open
27
33
  * their own. Every call is reached only from a POST the page sends when the PM presses a button (server.js
28
34
  * /api/kit/check, /api/kit/update, /api/kit/upgrade-app); no timer and no GET reaches them. no-network.test.js holds
@@ -116,9 +122,43 @@ const npxArgs = (src, version, rest) => (src && src.kind === 'local'
116
122
  ? ['-y', `--package=${src.path}`, '--', PKG_NAME, ...rest]
117
123
  : ['-y', `${PKG_NAME}@${version}`, ...rest]);
118
124
 
125
+ /** One changelog entry as the page may show it, or null: a version, a time, and PRs with a number and a summary. */
126
+ function cleanEntry(e) {
127
+ if (!e || !validVersion(e.v)) return null;
128
+ const prs = (Array.isArray(e.prs) ? e.prs : []).filter((p) => p && typeof p.s === 'string' && p.s.trim())
129
+ .map((p) => ({ n: Number.isInteger(p.n) ? p.n : null, s: p.s.trim().slice(0, 400) }));
130
+ return { v: e.v, at: typeof e.at === 'string' && !Number.isNaN(Date.parse(e.at)) ? e.at : null, prs };
131
+ }
132
+ const cleanList = (list) => (Array.isArray(list) ? list.map(cleanEntry).filter(Boolean) : []);
133
+
134
+ /** The installed app's changelog.json (shipped by kit-publish), newest first; [] in a checkout or an older install. */
135
+ function readChanges(appDir) {
136
+ try { return cleanList(JSON.parse(fs.readFileSync(path.join(String(appDir || ''), 'changelog.json'), 'utf8'))); } catch { return []; }
137
+ }
138
+
139
+ const LAST_CHECK = 'kit-last-check.json';
140
+ /** The last check's answer: { at, latest, changes } or null. Written by the check route, read by GET /api/kit/status. */
141
+ function readLastCheck(stateDir) {
142
+ try {
143
+ const j = JSON.parse(fs.readFileSync(path.join(String(stateDir || ''), LAST_CHECK), 'utf8'));
144
+ return j && validVersion(j.latest) && !Number.isNaN(Date.parse(j.at)) ? { at: j.at, latest: j.latest, changes: cleanList(j.changes) } : null;
145
+ } catch { return null; }
146
+ }
147
+ function writeLastCheck(stateDir, { latest: v, changes, at = new Date().toISOString() } = {}) {
148
+ if (!validVersion(v)) return null;
149
+ const rec = { at, latest: v, changes: cleanList(changes) };
150
+ try {
151
+ fs.mkdirSync(String(stateDir), { recursive: true });
152
+ const f = path.join(String(stateDir), LAST_CHECK);
153
+ fs.writeFileSync(f + '.tmp', JSON.stringify(rec) + '\n', { mode: 0o600 });
154
+ fs.renameSync(f + '.tmp', f);
155
+ } catch { /* the page still has the answer it was given */ }
156
+ return rec;
157
+ }
158
+
119
159
  function status({ root, appVersion, appDir, env }) {
120
160
  const src = source(env);
121
- return { app: { version: appVersion || null, fromCheckout: fromCheckout(appDir) }, kit: readKit(root), source: src.kind === 'local' ? { kind: 'local', path: src.path, error: src.error || null } : { kind: 'npm' } };
161
+ return { app: { version: appVersion || null, fromCheckout: fromCheckout(appDir) }, kit: readKit(root), changes: readChanges(appDir), source: src.kind === 'local' ? { kind: 'local', path: src.path, error: src.error || null } : { kind: 'npm' } };
122
162
  }
123
163
 
124
164
  function compare(st, latestVersion) {
@@ -155,15 +195,24 @@ async function latest({ exec = cp.execFile, source: src = source() } = {}) {
155
195
  if (src.kind === 'local') {
156
196
  if (src.error) return { ok: false, error: src.error };
157
197
  if (!src.version) return { ok: false, error: `${src.path} has no version number` };
158
- return { ok: true, version: src.version, source: 'local' };
198
+ let changes = [];
199
+ try { changes = cleanList(JSON.parse(fs.readFileSync(path.join(src.path, 'package.json'), 'utf8')).pmosChanges); } catch { /* a .tgz, or none */ }
200
+ return { ok: true, version: src.version, changes, source: 'local' };
159
201
  }
160
- const r = await run(exec, NPM, ['view', PKG_NAME, 'version', '--json'], { timeout: CHECK_TIMEOUT_MS });
202
+ // pmosChanges: the newest kits' summaries (premium-updates). A package published before it has none, and npm then answers
203
+ // with the version alone, as a plain JSON string.
204
+ const r = await run(exec, NPM, ['view', PKG_NAME, 'version', 'pmosChanges', '--json'], { timeout: CHECK_TIMEOUT_MS });
161
205
  const bad = why(r, 'The check');
162
206
  if (bad) return { ok: false, error: bad };
163
207
  let v = r.stdout.trim();
164
- try { const j = JSON.parse(v); if (typeof j === 'string') v = j; } catch { /* plain text */ }
208
+ let changes = [];
209
+ try {
210
+ const j = JSON.parse(v);
211
+ if (typeof j === 'string') v = j;
212
+ else if (j && typeof j === 'object') { v = j.version; changes = cleanList(j.pmosChanges); }
213
+ } catch { /* plain text */ }
165
214
  if (!validVersion(v)) return { ok: false, error: 'The check did not return a version number' };
166
- return { ok: true, version: v };
215
+ return { ok: true, version: v, changes };
167
216
  }
168
217
 
169
218
  /**
@@ -250,4 +299,4 @@ function upgradeApp(root, { version, logFile, spawn = cp.spawn, env = updateEnv(
250
299
  }
251
300
  }
252
301
 
253
- module.exports = { PKG_NAME, cmpVer, notServedYet, validVersion, source, npxArgs, readKit, fromCheckout, status, compare, latest, updateKit, updateEnv, upgradeApp, whereFrom };
302
+ module.exports = { PKG_NAME, cmpVer, readChanges, readLastCheck, writeLastCheck, notServedYet, validVersion, source, npxArgs, readKit, fromCheckout, status, compare, latest, updateKit, updateEnv, upgradeApp, whereFrom };
@@ -63,7 +63,8 @@ const DEFS = Object.freeze({
63
63
  'sess.idle': one('sessions', 'computer', ['15', '30', '60', 'never'], '30'),
64
64
  'sess.share': one('sessions', 'computer', ['ws', 'job'], 'ws'),
65
65
  'look.start': one('appearance', 'computer', ['brief', 'cal', 'work', 'init', 'rep'], 'brief'),
66
- 'upd.check': one('updates', 'computer', ['press', 'daily'], 'press'),
66
+ // premium-updates: once a day by default. An open page posts the check; the server never schedules one (no-network.test.js).
67
+ 'upd.check': one('updates', 'computer', ['press', 'daily'], 'daily'),
67
68
  'upd.apply': one('updates', 'computer', ['ask', 'idle'], 'ask'),
68
69
  'upd.kits': one('updates', 'computer', ['all', 'each'], 'all'),
69
70
  'upd.channel': one('updates', 'computer', ['stable', 'early'], 'stable'),
@@ -73,6 +74,7 @@ const DEFS = Object.freeze({
73
74
  * shows; `off` is the value that turns the thing off, or null when any value wins. */
74
75
  const ENV = Object.freeze([
75
76
  { key: 'notes.language', env: 'PMOS_WHISPER_LANG', off: null, effect: 'Every line is transcribed in this language, whatever the picker says.' },
77
+ { key: 'upd.check', env: 'PMOS_UPDATE_CHECK', off: 'press', effect: 'Updates are checked only when you press Check on this computer.' },
76
78
  { key: 'rec.echo', env: 'PMOS_NOTES_ECHO', off: 'off', effect: 'Echo removal is off on this computer.' },
77
79
  { key: 'rec.final', env: 'PMOS_NOTES_FINAL', off: 'off', effect: 'The pass after Stop is off on this computer.' },
78
80
  { key: 'notes.wispr', env: 'PMOS_NOTES_WISPR', off: 'off', effect: 'Wispr Flow notes are not fetched on this computer.' },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.329.0",
3
+ "version": "0.330.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.329.0",
9
+ "version": "0.330.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.329.0",
3
+ "version": "0.330.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -85,7 +85,9 @@ const answer = (url, mode) => {
85
85
  ok('R8 the week draws today\'s three meetings as blocks', (await vis(page, '#vcMain .vc-ev')) === 3, String(await vis(page, '#vcMain .vc-ev')));
86
86
  const lanes = await page.evaluate(() => [...document.querySelectorAll('#vcMain .vc-ev')].filter((b) => /sync|meter/.test(b.textContent)).map((b) => b.getBoundingClientRect()));
87
87
  ok('R8 two meetings that overlap sit side by side', lanes.length === 2 && Math.abs(lanes[0].left - lanes[1].left) > 20 && lanes[0].width < 200, JSON.stringify(lanes.map((r) => [r.left, r.width])));
88
- ok('R8 the all-day row carries the dated layer as a mark', await page.evaluate(() => [...document.querySelectorAll('#vcMain .vc-adc .vc-ad')].some((x) => /promised/.test(x.textContent) && x.tagName === 'SPAN')));
88
+ ok('R8 the dates row carries the dated layer as a mark', await page.evaluate(() => [...document.querySelectorAll('#vcMain .vc-sc .vc-ad')].some((x) => /promised/.test(x.textContent) && x.tagName === 'SPAN')));
89
+ ok('R8 a meeting block is filled, not see-through (the console draws a solid block)', await page.evaluate(() => { const b = document.querySelector('#vcMain .vc-ev'); const c = b && getComputedStyle(b).backgroundColor; return !!c && c !== 'transparent' && !/rgba\(.*,\s*0\)$/.test(c); }));
90
+ ok('R8 the first hour of the grid is labelled', await page.evaluate(() => { const i = document.querySelector('#vcMain .vc-gut i'); return !!i && /^\d{2}:00$/.test(i.textContent) && getComputedStyle(i).visibility !== 'hidden' && i.getClientRects().length > 0; }));
89
91
  ok('R8 the now line is drawn on today', (await vis(page, '#vcMain .vc-now')) <= 1);
90
92
  const wk = await title(page);
91
93
  await page.click('#vcMain [data-cn="1"]');
@@ -81,7 +81,7 @@ export const LABELS = Object.freeze({
81
81
  'sess.idle': ['Housekeeping', 'Close a background session idle for', '', { 15: '15 min', 30: '30 min', 60: '1 hour', never: 'Never' }],
82
82
  'sess.share': ['Housekeeping', 'Background jobs', 'Card refresh, imports and final notes can share one session per workspace. It starts faster and costs less.', { ws: 'One session per workspace', job: 'A new session per job' }],
83
83
  'look.start': ['Look', 'Start page', 'The page /c3.html opens on.', { brief: 'Briefing', cal: 'Calendar', work: 'Work', init: 'Initiatives', rep: 'Reports' }],
84
- 'upd.check': ['When', 'Check for updates', 'A check asks the npm registry for the latest version. It is the only request PMOS makes by itself.', { press: 'When I press Check', daily: 'Once a day' }],
84
+ 'upd.check': ['When', 'Check for updates', 'A check asks the npm registry for the latest version and what each newer kit changed. Once a day, an open PMOS page asks by itself. It is the only request PMOS makes by itself.', { press: 'When I press Check', daily: 'Once a day' }],
85
85
  'upd.apply': ['When', 'Install updates', 'An app update restarts PMOS. When idle waits until no recording or session runs.', { ask: 'Ask me', idle: 'When PMOS is idle' }],
86
86
  'upd.kits': ['When', 'Workspace kits', 'Each workspace carries its own copy of the kit.', { all: 'Update all together', each: 'One at a time' }],
87
87
  'upd.channel': ['When', 'Release channel', '', { stable: 'Stable', early: 'Early' }],
@@ -41,7 +41,7 @@ function tbMount() {
41
41
  + '<a role="menuitem" id="toConsole" href="/console.html" aria-label="Open the console">Console</a>'
42
42
  + '<div class="tbrow" id="modeRow" hidden><span>Open initiatives</span></div>'
43
43
  + `<div class="tbrow" role="group" aria-label="Theme"><span>Theme</span><span class="tbseg" id="tbTheme">${TH.map(([k, w]) => `<button role="menuitemradio" data-th="${k}" aria-checked="false">${w}</button>`).join('')}</span></div>`
44
- + '<button role="menuitem" id="settingsBtn" aria-haspopup="dialog">Settings</button></div></span>');
44
+ + '<button role="menuitem" id="settingsBtn" aria-haspopup="dialog">Settings<em class="updpill" id="updPill" hidden></em></button></div></span>');
45
45
  const ms = $('#modeSeg'); if (ms) { $('#modeRow').appendChild(ms); $('#modeRow').hidden = false; }
46
46
  tbTheme();
47
47
  const btn = $('#moreBtn'), menu = $('#moreMenu');
@@ -502,29 +502,163 @@ pvMount();
502
502
  * Workspaces: GET /api/workspaces · POST /api/workspaces, /api/workspaces/forget. Connectors: GET and POST /api/proactive/settings {briefSources}.
503
503
  * Each press saves what the console's section saves, and nothing else. Every other setting runs on a default and stays in the console. */
504
504
  const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
505
+
506
+ /* ── Updates and What's new (initiative premium-updates) ──────────────────────────────────────────────────────────────────────
507
+ * GET /api/kit/status per workspace (versions, the installed changelog, the last check, the daily setting; disk only).
508
+ * POST /api/kit/check (the npm registry: the latest version and the newer kits' summaries), /api/kit/update, /api/kit/upgrade-app:
509
+ * the presses the console's Settings › Updates makes. Once a day an open page posts the check by itself (upd.check, default daily).
510
+ * Every summary is a line kit-publish copied from a merged PR; this page writes none. */
511
+ const UPD = { ws: [], st: {} };
512
+ const cmpVer = (a, b) => { const x = String(a || '0').split('-')[0].split('.').map(Number), y = String(b || '0').split('-')[0].split('.').map(Number); for (let i = 0; i < 3; i++) if ((x[i] || 0) !== (y[i] || 0)) return (x[i] || 0) < (y[i] || 0) ? -1 : 1; return 0; };
513
+ const updHome = () => (UPD.ws[0] && UPD.st[UPD.ws[0].id]) || null;
514
+ const updLatest = () => { const s = updHome(); return (s && (s.latest || (s.lastCheck && s.lastCheck.latest))) || null; };
515
+ const updGit = () => { const s = updHome(); return !!(s && s.app && s.app.fromCheckout && !(s.source && s.source.kind === 'local')); };
516
+ const updKitsBehind = () => UPD.ws.filter((w) => UPD.st[w.id] && UPD.st[w.id].kitBehind);
517
+ const updAppBehind = () => { const s = updHome(); return !!(s && s.appBehind && !updGit()); };
518
+ const updReady = () => updAppBehind() || updKitsBehind().length > 0;
519
+ function updDot() {
520
+ const on = updReady(), d = $('#moreDot'), p = $('#updPill');
521
+ if (d) d.hidden = !on;
522
+ if (p) { p.hidden = !on; p.textContent = on ? updLatest() + ' ready' : ''; }
523
+ const b = $('#settingsBtn'); if (b) b.setAttribute('aria-label', on ? 'Settings, PMOS ' + updLatest() + ' is ready' : 'Settings');
524
+ }
525
+ async function updRead() {
526
+ const w = await pmGet('/api/workspaces');
527
+ UPD.ws = w && Array.isArray(w.workspaces) ? w.workspaces : [];
528
+ await Promise.all(UPD.ws.map(async (x) => { const r = await pmGet('/api/kit/status?ws=' + encodeURIComponent(x.id)); if (r && r.ok) UPD.st[x.id] = r; }));
529
+ updDot();
530
+ }
531
+ /** The check, for every workspace: one registry read each, as the console's Check now. Returns the first error, or ''. */
532
+ async function updCheck() {
533
+ let err = '';
534
+ for (const w of UPD.ws) {
535
+ const r = await pmPost('/api/kit/check', { ws: w.id });
536
+ if (r && r.ok) UPD.st[w.id] = { ...(UPD.st[w.id] || {}), ...r }; else if (!err) err = (r && r.error) || 'The check failed.';
537
+ }
538
+ updDot();
539
+ return err;
540
+ }
541
+ /** On every page: read the versions; once a day (the default) ask the registry when the last check is a day old. */
542
+ (async () => {
543
+ if (!$('#settingsBtn')) return;
544
+ await updRead();
545
+ const s = updHome();
546
+ if (s && s.checkDaily && !document.hidden && (!s.lastCheck || Date.now() - Date.parse(s.lastCheck.at) > 864e5)) await updCheck();
547
+ })();
548
+ /** Installed entries and the newer ones the check read, newest first, one per version. */
549
+ function updList() {
550
+ const s = updHome(); if (!s) return [];
551
+ const all = new Map();
552
+ for (const e of [...((s.lastCheck && s.lastCheck.changes) || []), ...(s.latestChanges || []), ...(s.changes || [])]) if (e && e.v && !all.has(e.v)) all.set(e.v, e);
553
+ return [...all.values()].sort((a, b) => cmpVer(b.v, a.v));
554
+ }
555
+ const pad2 = (n) => String(n).padStart(2, '0');
556
+ const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], DOW = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
557
+ function updDay(iso) {
558
+ const d = iso ? new Date(iso) : null; if (!d || isNaN(d)) return 'Date not recorded';
559
+ const t = new Date(); const y = new Date(t); y.setDate(t.getDate() - 1);
560
+ const dm = d.getDate() + ' ' + MON[d.getMonth()];
561
+ return d.toDateString() === t.toDateString() ? 'Today, ' + dm : d.toDateString() === y.toDateString() ? 'Yesterday, ' + dm : DOW[d.getDay()] + ' ' + dm;
562
+ }
563
+ const updTime = (iso) => { const d = iso ? new Date(iso) : null; return d && !isNaN(d) ? pad2(d.getHours()) + ':' + pad2(d.getMinutes()) : ''; };
564
+ function updWhatsNew(U) {
565
+ const list = updList(), s = updHome(), mine = s && s.app && !updGit() ? s.app.version : null; // a checkout has no published version
566
+ if (!list.length) return '<p class="note">No kit summaries yet. Each kit published from now on carries one, and Check now reads the newest ones.</p>';
567
+ const days = []; for (const e of list) { const k = updDay(e.at); const g = days[days.length - 1]; if (g && g.k === k) g.e.push(e); else days.push({ k, e: [e] }); }
568
+ return days.map((g, i) => {
569
+ const open = U.open.has(g.k) || (i === 0 && !U.shut.has(g.k)), full = U.full.has(g.k);
570
+ const rows = open ? g.e.slice(0, full ? g.e.length : 5).map((e) => {
571
+ const newer = mine && cmpVer(e.v, mine) > 0, yours = mine && e.v === mine;
572
+ const lines = e.prs.length ? e.prs.map((p) => `<p>${esc(p.s)}${p.n ? ` <em>#${esc(p.n)}</em>` : ''}</p>`).join('') : '<p class="note">No summary was recorded for this kit.</p>';
573
+ return `<li class="kver${newer ? ' new' : ''}"><span class="kv"><b>${esc(e.v)}</b>${yours ? '<i>yours</i>' : newer ? '<i class="nw">newer</i>' : ''}<em>${esc(updTime(e.at))}</em></span><div class="kp">${lines}</div></li>`;
574
+ }).join('') : '';
575
+ const more = open && !full && g.e.length > 5 ? `<button type="button" class="kmore" data-kfull="${esc(g.k)}">Show ${g.e.length - 5} more from ${esc(g.k.split(',')[0])}</button>` : '';
576
+ return `<div class="kday"><button type="button" class="kdh" data-kday="${esc(g.k)}" aria-expanded="${open}"><span>${esc(g.k)}</span><em>${g.e.length} ${g.e.length === 1 ? 'kit' : 'kits'}</em></button>${open ? `<ul class="kvl">${rows}</ul>${more}` : ''}</div>`;
577
+ }).join('');
578
+ }
579
+ function updBlock(U) {
580
+ const s = updHome();
581
+ if (!s) return '<p class="note">Reading the versions.</p>';
582
+ const app = (s.app && s.app.version) || '?', latest = updLatest(), kits = updKitsBehind(), appB = updAppBehind(), ready = appB || kits.length > 0;
583
+ const head = U.phase === 'busy' ? `<b>Updating to ${esc(latest)}</b><span class="note" role="status" aria-live="polite">${esc(U.say || 'Working.')}</span>`
584
+ : ready ? `<b>PMOS ${esc(latest)} is ready</b><span class="note">You have ${esc(app)}.${appB ? ' PMOS stops for about a minute while it installs. Open terminals keep running.' : ''}</span>`
585
+ : latest ? `<b>PMOS ${esc(app)} is up to date</b><span class="note">${updGit() && s.appBehind ? esc(latest) + ' is published. This PMOS runs from a checkout: update it with git pull.' : 'The newest published kit is ' + esc(latest) + '.'}</span>`
586
+ : `<b>PMOS ${esc(app)}</b><span class="note">Press Check now to ask for the latest version.</span>`;
587
+ const acts = U.phase === 'busy' ? '' : U.phase === 'confirm'
588
+ ? '<button type="button" class="cta alt" data-upd="cancel">Cancel</button><button type="button" class="cta" data-upd="go">Restart and update</button>'
589
+ : `<button type="button" class="cta alt" data-upd="check"${U.checking ? ' disabled' : ''}>${U.checking ? 'Checking…' : 'Check now'}</button>${ready ? '<button type="button" class="cta" data-upd="update">Update</button>' : ''}`;
590
+ const rows = UPD.ws.map((w) => { const k = UPD.st[w.id], kit = k && k.kit;
591
+ const tag = !k || !(kit && kit.present) ? '' : k.kitBehind && latest ? `<b class="updpill">${esc(latest)} ready</b>` : k.lastCheck || k.latest ? '<b class="updpill ok">Up to date</b>' : '';
592
+ return `<div class="sr"><span class="sn"><b>${esc(w.label || w.name || w.id)}</b><em>${kit && kit.present ? 'kit ' + esc(kit.version || 'vendored by hand') : 'no kit in this workspace'}${w.root ? ' · ' + esc(w.root) : ''}</em></span>${tag}</div>`; }).join('');
593
+ const last = s.lastCheck ? 'Last checked ' + updDay(s.lastCheck.at).replace(/^Today, .*/, 'today').replace(/^Yesterday, .*/, 'yesterday') + ' at ' + updTime(s.lastCheck.at) + '. ' : '';
594
+ return `<div class="updb"><div class="t">${head}</div><div class="a">${acts}</div></div>${rows}
595
+ <p class="note">${esc(last)}${s.checkDaily ? 'PMOS checks once a day while a page is open; Check now asks again.' : 'PMOS checks only when you press Check now.'}</p>`;
596
+ }
597
+ /** The app update stops this server and starts a new one: wait for it, then reload (the console's waitForRestart). */
598
+ async function updWaitRestart(from, log, say) {
599
+ let down = false; const until = Date.now() + 5 * 60000;
600
+ while (Date.now() < until) {
601
+ await new Promise((r) => setTimeout(r, 2000));
602
+ const j = await pmGet('/api/sessions').catch(() => null);
603
+ if (!j || j.ok === false || !j.version) { down = true; continue; }
604
+ if (j.version !== from) { location.reload(); return; }
605
+ if (down) { say('PMOS started again on ' + j.version + ', so the update did not finish. The update log is ' + log + '.'); return; }
606
+ }
607
+ say('PMOS did not come back on this address. Type pmos in a terminal to open it. The update log is ' + log + '.');
608
+ }
609
+
505
610
  export async function openSettings() {
506
611
  const M = { ws: null, src: null, err: '', busy: false };
612
+ const U = { phase: null, say: '', checking: false, open: new Set(), shut: new Set(), full: new Set() };
507
613
  const draw = () => {
508
614
  const w = M.ws, s = M.src;
509
615
  const wsRows = w === null ? '<p class="note">Reading the repositories.</p>' : w.length ? w.map((x) => `<div class="sr"><span class="sn"><b>${esc(x.label || x.name || x.id)}</b><em>${esc(x.root || '')}${x.home ? ' · home' : ''}</em></span>${x.home ? '' : `<button type="button" class="cta alt" data-rm="${esc(x.id)}">Remove</button>`}</div>`).join('') : '<p class="note">No repository is registered yet.</p>';
510
616
  const srcRows = s === null ? '<p class="note">Reading the sources.</p>' : Object.keys(SRC).filter((k) => k in s).map((k) => `<div class="sr"><span class="sn"><b>${esc(SRC[k])}</b><em>${s[k] ? 'The Briefing reads it' : 'The Briefing does not read it'}</em></span><button type="button" class="fchip" role="switch" aria-checked="${s[k]}" aria-label="${esc(SRC[k])}: the Briefing reads it" data-src="${esc(k)}">${s[k] ? 'On' : 'Off'}</button></div>`).join('');
511
617
  $('#oMain').innerHTML = `<article class="paper doc"><div class="addf">
618
+ <div data-upd-block><span class="label">Updates</span>${updBlock(U)}</div>
619
+ <div data-whats-new><span class="label">What's new</span>${updWhatsNew(U)}</div>
512
620
  <div><span class="label">Workspaces</span><p class="note" style="margin:0 0 8px">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>${wsRows}
513
621
  <div class="two" style="margin-top:10px"><label><input id="stP" maxlength="500" placeholder="Folder path of a repository" aria-label="Folder path of a repository"></label><button type="button" class="cta" id="stAdd">Add repository</button></div></div>
514
622
  <div><span class="label">Connectors</span><p class="note" style="margin:0 0 8px">Which sources the Briefing reads. PMOS keeps no passwords or keys; your Claude session reaches each tool through its own connectors.</p>${srcRows}</div>
515
623
  <p class="note" id="stM" role="status" style="margin:0;min-height:1.2em">${esc(M.err)}</p>
516
624
  <p class="note" style="margin:0">Everything else runs on a default. <a href="/console.html?tab=settings">More settings in the console</a>.</p></div></article>`;
517
625
  };
518
- openDlg({ eye: 'Settings · real data', title: 'Settings', say: 'Two choices only: which repositories PMOS works in, and which sources the Briefing reads.', stream: turnA(ptx('Two choices only: which repositories PMOS works in, and which sources the Briefing reads. Each press saves that one record and changes nothing else.')), noteKey: null, pane: '<article class="paper doc"></article>', label: 'Settings' });
626
+ openDlg({ eye: 'Settings · real data', title: 'Settings', say: 'Updates and what each kit changed, then two choices: which repositories PMOS works in, and which sources the Briefing reads.', stream: turnA(ptx('Updates and what each published kit changed, copied from its merged pull requests. Then two choices: which repositories PMOS works in, and which sources the Briefing reads. Each press saves that one record and changes nothing else.')), noteKey: null, pane: '<article class="paper doc"></article>', label: 'Settings' });
519
627
  $('#askF').hidden = true; setMode('detail'); draw();
520
628
  const load = async () => {
521
- const [w, p] = await Promise.all([pmGet('/api/workspaces'), pmGet('/api/proactive/settings')]);
629
+ const [w, p] = await Promise.all([pmGet('/api/workspaces'), pmGet('/api/proactive/settings'), updRead()]);
522
630
  M.ws = w && Array.isArray(w.workspaces) ? w.workspaces : []; M.src = p && p.ok && p.settings ? { ...p.settings.briefSources } : {};
523
631
  if (!w || !Array.isArray(w.workspaces)) M.err = 'The repositories could not be read.'; else if (!p || !p.ok) M.err = 'The sources could not be read.';
524
632
  draw();
525
633
  };
634
+ const say = (t) => { U.phase = null; M.err = t; draw(); };
526
635
  $('#oMain').onclick = async (e) => {
527
636
  if (M.busy) return;
637
+ const day = e.target.closest('[data-kday]'), full = e.target.closest('[data-kfull]'), up = e.target.closest('[data-upd]');
638
+ if (day) { const k = day.dataset.kday, was = day.getAttribute('aria-expanded') === 'true'; if (was) { U.open.delete(k); U.shut.add(k); } else { U.open.add(k); U.shut.delete(k); } draw(); const b = $(`#oMain [data-kday="${CSS.escape(k)}"]`); if (b) b.focus(); return; }
639
+ if (full) { U.full.add(full.dataset.kfull); draw(); return; }
640
+ if (up) {
641
+ const a = up.dataset.upd; M.err = '';
642
+ if (a === 'check') { U.checking = true; draw(); const err = await updCheck(); U.checking = false; M.err = err; draw(); if (!err) toast(updReady() ? 'PMOS ' + updLatest() + ' is ready' : 'Checked. PMOS is up to date'); return; }
643
+ if (a === 'cancel') { U.phase = null; draw(); return; }
644
+ if (a === 'update' && updAppBehind()) { U.phase = 'confirm'; draw(); return; }
645
+ if (a === 'update' || a === 'go') {
646
+ const v = updLatest(), home = updHome(); U.phase = 'busy';
647
+ for (const w of updKitsBehind()) {
648
+ U.say = 'Updating the kit in ' + (w.label || w.name || w.id) + '.'; draw();
649
+ const r = await pmPost('/api/kit/update', { ws: w.id, version: v });
650
+ if (!(r && r.ok)) return say((r && r.error) || 'The kit in ' + (w.label || w.name || w.id) + ' was not updated.');
651
+ UPD.st[w.id] = { ...UPD.st[w.id], ...r, kitBehind: false };
652
+ }
653
+ updDot();
654
+ if (!updAppBehind()) { U.phase = null; draw(); toast('Updated the kits to ' + v + '.'); return; }
655
+ U.say = 'Installing PMOS ' + v + '. This page reloads when the new version starts.'; draw();
656
+ const r = await pmPost('/api/kit/upgrade-app', { ws: UPD.ws[0].id, version: v });
657
+ if (!r || r.ok === false) return say((r && r.error) || 'The update did not start.');
658
+ await updWaitRestart(r.from || (home.app && home.app.version) || '', r.log || '', say);
659
+ }
660
+ return;
661
+ }
528
662
  const rm = e.target.closest('[data-rm]'), sw = e.target.closest('[data-src]');
529
663
  M.err = '';
530
664
  if (rm) {
@@ -12,7 +12,7 @@
12
12
  .vc .vc-w{background:var(--card-solid);border:1px solid var(--hair);border-radius:8px;box-shadow:var(--card-shadow);overflow:hidden}
13
13
  .vc .vc-h{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--hair);flex-wrap:wrap}
14
14
  .vc .vc-t{font-size:var(--fs-3);font-weight:600;color:var(--ink)}
15
- .vc .vc-cap{flex:1;min-width:0;font:400 var(--fs-2) var(--mono);color:var(--ink-3)}
15
+ .vc .vc-cap{flex:1 0 auto;font:400 var(--fs-2) var(--mono);color:var(--ink-3);white-space:nowrap}
16
16
  .vc .vc-ib{width:36px;height:36px;border-radius:6px;display:grid;place-items:center;background:var(--well);color:var(--ink)}
17
17
  .vc .vc-ib .i{width:16px;height:16px}
18
18
  .vc .vc-tdy{min-height:36px;padding:0 12px;border-radius:6px;border:1px solid var(--hair);font-size:var(--fs-2);font-weight:500;color:var(--ink)}
@@ -22,28 +22,48 @@
22
22
  .vc button:focus-visible{outline:2px solid var(--ember);outline-offset:2px}
23
23
  .vc .vc-empty{margin:0;padding:12px 14px;font-size:var(--fs-2);color:var(--ink-3);border-bottom:1px solid var(--hair)}
24
24
  .vc .vc-w>.vc-empty:last-child{border-bottom:0}
25
- /* the timeline (Day and Week) */
25
+ /* the timeline (Day and Week), as the console's Calendar draws it (console3.css .cal3-tg): 46px an hour, every hour labelled */
26
+ .vc{--vc-ev:color-mix(in oklab,var(--ember) 30%,var(--card-solid));--vc-evh:color-mix(in oklab,var(--ember) 42%,var(--card-solid));--vc-we:color-mix(in oklab,var(--well) 70%,transparent);--vc-now:color-mix(in oklab,var(--ember) 9%,transparent)}
27
+ .vc .vc-sx{overflow-x:auto;min-width:0}
26
28
  .vc .vc-g{display:grid;grid-template-columns:48px repeat(var(--tl-n),minmax(0,1fr))}
27
- .vc .vc-dh{padding:8px 6px 6px;font-size:var(--fs-2);color:var(--ink-3);border-left:1px solid var(--hair);text-align:center}
28
- .vc .vc-dh b{display:grid;place-items:center;margin:2px auto 0;width:30px;height:30px;border-radius:6px;font-size:var(--fs-4);font-weight:600;color:var(--ink)}
29
- .vc .vc-dh.now b{background:var(--solid);color:var(--on-solid)}
30
- .vc .vc-adl{border-top:1px solid var(--hair);font:400 var(--fs-1) var(--mono);color:var(--ink-3);padding:6px 4px 0;text-align:right}
31
- .vc .vc-adc{min-height:28px;border-left:1px solid var(--hair);border-top:1px solid var(--hair);padding:3px;display:grid;gap:2px;align-content:start}
32
- .vc .vc-ad{display:block;min-width:0;border-radius:6px;padding:1px 6px;font-size:var(--fs-1);font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;
33
- border-left:3px solid var(--ec,var(--ember));background:color-mix(in oklab,var(--ec,var(--ember)) 12%,transparent);color:var(--ink)}
34
- .vc .vc-ad.meet{--ec:var(--sky)}
29
+ .vc .vc-g:not(.one){min-width:620px}
30
+ .vc .vc-dh{display:grid;gap:4px;align-content:start;min-width:0;padding:6px 4px 4px;border-left:1px solid var(--hair);border-bottom:1px solid var(--hair)}
31
+ .vc .vc-c{border-bottom:1px solid var(--hair)}
32
+ .vc .vc-dl{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:0 6px;min-width:0}
33
+ .vc .vc-dl b,.vc .vc-db{font:500 var(--fs-2) var(--mono);color:var(--ink);white-space:nowrap}
34
+ .vc .vc-db{min-height:24px;padding:2px 4px;border-radius:6px;text-align:left}
35
+ .vc .vc-dh.now .vc-dl b,.vc .vc-dh.now .vc-db{color:var(--ember-ink)}
36
+ .vc .vc-hrs{font:400 var(--fs-1) var(--mono);color:var(--ink-3);white-space:nowrap}
37
+ .vc .vc-lb{display:flex;gap:2px;height:5px;margin:0 4px}
38
+ .vc .vc-lb i{display:block;border-radius:0;background:var(--well)}
39
+ .vc .vc-lb i.tied{width:var(--tl-a,0);background:var(--ember)}
40
+ .vc .vc-lb i.rt{width:var(--tl-b,0);background:var(--ink-3)}
41
+ .vc .vc-lb::after{content:"";flex:1;background:var(--well)}
42
+ .vc .vc-adl{font:400 var(--fs-1) var(--mono);color:var(--ink-3);padding:6px 4px;border-bottom:1px solid var(--hair)}
43
+ .vc .vc-sc{min-width:0;min-height:30px;padding:3px;display:grid;gap:2px;align-content:start;border-left:1px solid var(--hair);border-bottom:1px solid var(--hair)}
44
+ .vc .vc-sc.line{display:flex;flex-wrap:wrap;align-items:center;gap:4px}
45
+ .vc .vc-sc.line .vc-ad{max-width:280px}
46
+ .vc .vc-sc.we,.vc .vc-dh.we{background:var(--vc-we)}
47
+ .vc .vc-none{padding:4px;font:400 var(--fs-1) var(--mono);color:var(--ink-3)}
48
+ .vc .vc-ad{display:block;min-width:0;min-height:22px;border-radius:6px;padding:2px 6px;font-size:var(--fs-1);font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;
49
+ border-left:3px solid var(--ec,var(--ink-3));background:var(--well);color:var(--ink)}
50
+ .vc .vc-ad.meet{border-left-color:var(--ember);background:var(--vc-ev);font-weight:600}
35
51
  .vc .vc-ad.t-warn{--ec:var(--ember)}.vc .vc-ad.t-bad{--ec:var(--bad)}.vc .vc-ad.t-ok{--ec:var(--ok)}
36
- .vc .vc-gut{border-top:1px solid var(--hair);font:400 var(--fs-1) var(--mono);color:var(--ink-3)}
37
- .vc .vc-gut i{display:block;height:44px;font-style:normal;text-align:right;padding-right:6px;transform:translateY(-7px)}
38
- .vc .vc-gut i:first-child{visibility:hidden}
39
- .vc .vc-day{position:relative;height:var(--tl-hh);border-left:1px solid var(--hair);border-top:1px solid var(--hair);background:repeating-linear-gradient(to bottom,transparent 0 43px,var(--hair) 43px 44px)}
40
- .vc .vc-day.past{background-color:color-mix(in oklab,var(--well) 40%,transparent)}
41
- .vc .vc-ev{position:absolute;top:var(--tl-t);height:var(--tl-h);left:calc(var(--tl-l) + 3px);width:calc(var(--tl-w) - 6px);border-radius:6px;padding:3px 7px;font-size:var(--fs-1);line-height:1.3;overflow:hidden;text-align:left;
42
- border-left:3px solid var(--sky);background:color-mix(in oklab,var(--sky) 14%,var(--card-solid));color:var(--ink);z-index:1}
43
- .vc .vc-ev b{display:block;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
44
- .vc .vc-ev small{display:block;font-size:var(--fs-1);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
45
- .vc .vc-ev.sh{padding:0 7px;display:flex;align-items:center}.vc .vc-ev.sh small{display:none}
46
- .vc .vc-ev.past{opacity:.7}
52
+ .vc .vc-more{justify-self:start;min-height:20px;padding:0 6px;border-radius:6px;font:400 var(--fs-1) var(--mono);color:var(--ink-3)}
53
+ .vc .vc-gut{position:relative;height:var(--tl-hh)}
54
+ .vc .vc-gut i{position:absolute;top:var(--tl-t);right:6px;font:400 var(--fs-1) var(--mono);font-style:normal;color:var(--ink-3);line-height:1;padding-top:3px}
55
+ .vc .vc-day{position:relative;height:var(--tl-hh);border-left:1px solid var(--hair);background-image:repeating-linear-gradient(to bottom,var(--hair) 0 1px,transparent 1px 46px)}
56
+ .vc .vc-day.we{background-color:var(--vc-we)}
57
+ .vc .vc-day.now{background-color:var(--vc-now)}
58
+ .vc .vc-ev{position:absolute;top:var(--tl-t);height:var(--tl-h);left:calc(2px + (100% - 4px) * var(--tl-l) / var(--tl-lc));width:calc((100% - 4px) / var(--tl-lc) - 2px);
59
+ display:block;border-radius:6px;padding:3px 6px;font-size:var(--fs-2);line-height:1.3;overflow:hidden;white-space:nowrap;text-align:left;
60
+ background:var(--vc-ev);color:var(--ink);box-shadow:inset 3px 0 0 var(--ember);z-index:1}
61
+ .vc .vc-ev b{display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis}
62
+ .vc .vc-ev small{display:block;font:400 var(--fs-1) var(--mono);color:var(--ink-2);overflow:hidden;text-overflow:ellipsis}
63
+ .vc .vc-ev.rt{background:var(--well);color:var(--ink-2);box-shadow:inset 3px 0 0 var(--ink-3)}
64
+ .vc .vc-ev.rt b{font-weight:500}
65
+ .vc .vc-ev.sh{padding:1px 6px;font-size:var(--fs-1)}
66
+ .vc .vc-ev.past{opacity:.55}
47
67
  .vc .vc-now{position:absolute;top:var(--tl-t);left:0;right:0;height:2px;background:var(--bad);z-index:2;pointer-events:none}
48
68
  .vc .vc-now::before{content:"";position:absolute;left:-4px;top:-3px;width:8px;height:8px;border-radius:6px;background:var(--bad)}
49
69
  /* the day list (Day and Week in a narrow pane) */
@@ -53,44 +73,48 @@
53
73
  .vc .vc-ag h4.now{color:var(--ember-ink)}
54
74
  .vc .vc-ag>.vc-ad{margin:2px 10px}
55
75
  .vc .vc-ar{display:flex;gap:10px;align-items:baseline;width:calc(100% - 20px);min-height:44px;margin:3px 10px;padding:8px 10px;border-radius:8px;text-align:left;
56
- border-left:3px solid var(--sky);background:color-mix(in oklab,var(--sky) 12%,transparent);color:var(--ink);font-size:var(--fs-3)}
76
+ box-shadow:inset 3px 0 0 var(--ember);background:var(--vc-ev);color:var(--ink);font-size:var(--fs-3)}
57
77
  .vc .vc-ar time{width:48px;flex:none;font:400 var(--fs-2) var(--mono);color:var(--ink-2)}
58
78
  .vc .vc-ar span{min-width:0}
59
79
  .vc .vc-ar b{display:block;font-weight:500}
60
80
  .vc .vc-ar small{display:block;font-size:var(--fs-2);color:var(--ink-3)}
81
+ .vc .vc-ar.rt{background:var(--well);box-shadow:inset 3px 0 0 var(--ink-3)}
61
82
  .vc .vc-ar.past{opacity:.7}
62
83
  .vc .vc-none{margin:0;padding:4px 14px 10px;font-size:var(--fs-2);color:var(--ink-3)}
63
- @container (max-width:559px){.vc .vc-g{display:none}.vc .vc-ag{display:block;padding-bottom:8px}}
64
- /* the month */
65
- .vc .vc-mh{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-bottom:1px solid var(--hair)}
66
- .vc .vc-mh span{padding:6px 8px;font:400 var(--fs-1) var(--mono);text-transform:uppercase;letter-spacing:.06em;color:var(--ink-3)}
67
- .vc .vc-mb{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
68
- .vc .vc-md{min-width:0;min-height:96px;padding:4px;border-left:1px solid var(--hair);border-top:1px solid var(--hair);display:flex;flex-direction:column;gap:2px}
69
- .vc .vc-md:nth-child(7n+1){border-left:0}
70
- .vc .vc-md:nth-child(-n+7){border-top:0}
71
- .vc .vc-md.out{background:color-mix(in oklab,var(--well) 50%,transparent)}
72
- .vc .vc-md.out .vc-dn b{color:var(--ink-3)}
73
- .vc .vc-dn{display:flex;align-items:center;gap:6px;min-height:28px;padding:0 4px;border-radius:6px;text-align:left}
74
- .vc .vc-dn b{display:grid;place-items:center;min-width:24px;height:24px;border-radius:6px;font-size:var(--fs-2);font-weight:600;color:var(--ink)}
75
- .vc .vc-md.now .vc-dn b{background:var(--solid);color:var(--on-solid)}
76
- .vc .vc-dn i{display:none;font-style:normal;font:500 var(--fs-1) var(--mono);color:var(--ink-3)}
77
- .vc .vc-me{display:block;min-width:0;border-radius:6px;padding:2px 6px;font-size:var(--fs-1);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;color:var(--ink);
78
- background:color-mix(in oklab,var(--sky) 12%,transparent)}
84
+ @container (max-width:559px){.vc .vc-sx:has(.vc-g:not(.one)){display:none}.vc .vc-ag{display:block;padding-bottom:8px}}
85
+ /* the month, as the console draws it (console3.css .cal3-mg): a card per day, the weekend muted, today outlined */
86
+ .vc .vc-mg{padding:8px}
87
+ .vc .vc-mh{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding-bottom:4px}
88
+ .vc .vc-mh span{padding:2px 8px;font:400 var(--fs-1) var(--mono);text-transform:uppercase;letter-spacing:.06em;color:var(--ink-3)}
89
+ .vc .vc-mb{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
90
+ .vc .vc-md{min-width:0;min-height:96px;padding:4px;border:1px solid var(--hair);border-radius:8px;display:flex;flex-direction:column;gap:2px;background:var(--card-solid)}
91
+ .vc .vc-md:nth-child(7n+6),.vc .vc-md:nth-child(7n){background:var(--vc-we)}
92
+ .vc .vc-md.out{opacity:.55}
93
+ .vc .vc-md.now{border-color:var(--ember);box-shadow:inset 0 0 0 1px var(--ember)}
94
+ .vc .vc-dn{display:flex;align-items:center;gap:6px;min-height:24px;padding:0 4px;border-radius:6px;text-align:left}
95
+ .vc .vc-dn b{font:500 var(--fs-2) var(--mono);color:var(--ink)}
96
+ .vc .vc-md.now .vc-dn b{color:var(--ember-ink)}
97
+ .vc .vc-dn i{font-style:normal;font:400 var(--fs-1) var(--mono);color:var(--ink-3)}
98
+ .vc .vc-me{display:block;min-width:0;min-height:20px;border-radius:6px;padding:1px 6px;font-size:var(--fs-1);font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;color:var(--ink);
99
+ background:var(--vc-ev);box-shadow:inset 3px 0 0 var(--ember)}
79
100
  .vc .vc-me time{font:400 var(--fs-1) var(--mono);color:var(--ink-2);margin-right:4px}
80
101
  .vc .vc-md>.vc-ad{font-size:var(--fs-1)}
81
- .vc .vc-more{align-self:flex-start;padding:1px 6px;border-radius:6px;font-size:var(--fs-1);font-weight:500;color:var(--ink-3)}
102
+ .vc .vc-md>.vc-more{align-self:flex-start}
82
103
  @container (max-width:559px){
104
+ .vc .vc-mg{padding:4px}.vc .vc-mb,.vc .vc-mh{gap:2px}
83
105
  .vc .vc-md{min-height:48px;padding:2px}
84
106
  .vc .vc-md>.vc-me,.vc .vc-md>.vc-more,.vc .vc-md>.vc-ad{display:none}
85
107
  .vc .vc-dn{flex:1;flex-direction:column;justify-content:center;gap:2px;min-height:44px;padding:0}
86
108
  .vc .vc-dn i{display:block}
109
+ .vc .vc-dn b{font-size:var(--fs-2)}
87
110
  .vc .vc-mh span{padding:6px 2px;text-align:center}
88
111
  }
89
- @media (max-width:640px){.vc-open,.vc .vc-ib{width:44px;height:44px}.vc .vc-tdy,.vc .vc-seg button{min-height:44px}}
112
+ @media (max-width:640px){.vc-open,.vc .vc-ib{width:44px;height:44px}.vc .vc-tdy,.vc .vc-seg button,.vc .vc-db,.vc .vc-more,.vc .vc-ad{min-height:44px}.vc .vc-ad{padding-block:0;line-height:44px}}
90
113
  @media (hover:hover){
91
114
  .vc-open:hover{color:var(--ink)}
92
- .vc .vc-ev:hover{background:color-mix(in oklab,var(--sky) 24%,var(--card-solid))}
115
+ .vc .vc-ev:hover,.vc .vc-ad.meet:hover,.vc .vc-me:hover,.vc .vc-ar:hover{background:var(--vc-evh)}
116
+ .vc .vc-ev.rt:hover{background:color-mix(in oklab,var(--ink) 8%,var(--well))}
117
+ .vc .vc-db:hover{background:var(--well)}
93
118
  .vc .vc-dn:hover{background:var(--well)}
94
- .vc .vc-me:hover{background:color-mix(in oklab,var(--sky) 22%,transparent)}
95
119
  .vc .vc-more:hover{color:var(--ink);background:var(--well)}
96
120
  }