create-pmos 0.710.0 → 0.712.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.710.0",
3
+ "version": "0.712.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -33,6 +33,25 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.712.0",
38
+ "at": "2026-11-22T14:42:19.445Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1543,
43
+ "t": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
44
+ "s": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
45
+ "k": "new"
46
+ },
47
+ {
48
+ "n": 1556,
49
+ "t": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
50
+ "s": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
51
+ "k": "new"
52
+ }
53
+ ]
54
+ },
36
55
  {
37
56
  "v": "0.710.0",
38
57
  "at": "2026-11-22T13:35:34.451Z",
@@ -411,19 +430,6 @@
411
430
  "k": "new"
412
431
  }
413
432
  ]
414
- },
415
- {
416
- "v": "0.669.0",
417
- "at": "2026-11-22T04:57:48.469Z",
418
- "f": 4,
419
- "prs": [
420
- {
421
- "n": 1457,
422
- "t": "Create-pmos picks the code profile itself; OKR template the board resolves",
423
- "s": "Create-pmos picks the code profile itself; OKR template the board resolves",
424
- "k": "new"
425
- }
426
- ]
427
433
  }
428
434
  ]
429
435
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@a24ad5a5
1
+ kernel-source: pmos@8fc28b4e
2
2
  assembled: 2026-11-22
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-22T13:35:31Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T14:42:15Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-11-22T13:35:31Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T14:42:15Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-11-22T13:35:31Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T14:42:15Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,23 @@
1
1
  [
2
+ {
3
+ "v": "0.712.0",
4
+ "at": "2026-11-22T14:42:19.445Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1543,
9
+ "t": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
10
+ "s": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
11
+ "k": "new"
12
+ },
13
+ {
14
+ "n": 1556,
15
+ "t": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
16
+ "s": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
17
+ "k": "new"
18
+ }
19
+ ]
20
+ },
2
21
  {
3
22
  "v": "0.710.0",
4
23
  "at": "2026-11-22T13:35:34.451Z",
@@ -137,7 +137,7 @@ const STEPS = [{ text: 'Calendar', state: 'done' }, { text: 'Mail', state: 'done
137
137
  ask: { question: 'Edit?', options: OPTS }, change: { system: 'File', what: 'planning/prd/a-rather-long-folder-name/descope-feature-parity-review-draft.md', from: 'SSO: in scope', to: 'SSO: out of scope', tool: 'Edit' } };
138
138
  await card(page, 'file');
139
139
  await shot(page, 'ask-file-390-' + scheme);
140
- ok(`A7 ${scheme}: on a phone the card and its icons stay inside the width`, await page.evaluate(() => { const w = innerWidth; const c = document.querySelector('#hmLog .hm-askk'); const r = c.getBoundingClientRect(); return r.left >= 0 && r.right <= w + 1 && [...c.querySelectorAll('.acts > button')].every((b) => { const q = b.getBoundingClientRect(); return q.right <= w + 1 && q.height >= 36; }) && document.documentElement.scrollWidth <= w; }));
140
+ ok(`A7 ${scheme}: on a phone the card stays inside the width; a swipe card answers by swipe with its hint shown (job 1540), others keep 36px icons`, await page.evaluate(() => { const w = innerWidth; const c = document.querySelector('#hmLog .hm-askk'); const r = c.getBoundingClientRect(); return r.left >= 0 && r.right <= w + 1 && (c.hasAttribute('data-sw-right') ? !!c.querySelector('[data-sw-yes]') && !!c.querySelector('[data-sw-no]') && c.querySelector('.hm-swh').getBoundingClientRect().height > 0 : [...c.querySelectorAll('.acts > button')].every((b) => { const q = b.getBoundingClientRect(); return q.right <= w + 1 && q.height >= 36; })) && document.documentElement.scrollWidth <= w; }));
141
141
  ok(`A7 ${scheme}: the primary icon reads against the card`, await page.evaluate(() => { const b = document.querySelector('#hmLog .hm-askk .hm-icb.pri'); const cs = getComputedStyle(b); return cs.backgroundColor !== cs.color; }));
142
142
  ok(`A7 ${scheme}: no page errors`, errors.length === 0, errors.join(' | '));
143
143
  await ctx.close();
@@ -7,7 +7,7 @@ timestamp: 2026-11-22
7
7
 
8
8
  # Layout and first run
9
9
 
10
- PMOS has four places: **Today**, **Work**, **Goals** and **Events**. PMOS opens on Today. Until each place gets its new page, Work is the Board and Goals is Intelligence. Home is still there for the links that open it, and a phone uses Home as Today. **Library** and **Routine** join the navigation when their pages ship. The console and its three columns were removed; their old addresses open Today.
10
+ PMOS has four places: **Today**, **Work**, **Goals** and **Events**. PMOS opens on Today. Until each place gets its new page, Work is the Board and Goals is Intelligence. Home is still there for the links that open it, and a phone opens on Today too. **Library** and **Routine** join the navigation when their pages ship. The console and its three columns were removed; their old addresses open Today.
11
11
 
12
12
  ## The design system
13
13
 
@@ -82,7 +82,7 @@ The agenda lists the day's events in time order, each with its start time, and a
82
82
 
83
83
  Under the agenda, after a meeting PMOS recorded and filed in the last 3 hours, a card says what came of it and where PMOS filed it. ✓ keeps it there and the card goes. ✕ takes the recording out of that work, with Undo.
84
84
 
85
- On a phone, Today is one page with no boxes: the overview, the next event with **Record**, and the log. Swipe a row to the right to do or accept it, and to the left to drop it or put it off. Each swipe has **Undo**.
85
+ On a phone, PMOS opens on Today. It is one page with no boxes: **Where it stands**, the next event with **Record**, the log, and the box to log a line at the bottom. Swipe a row to the right to do or accept it, and to the left to drop it or put it off. Each swipe has **Undo**.
86
86
 
87
87
  ## Work
88
88
 
@@ -271,10 +271,10 @@ A key that you type in a field, or in a terminal, goes to the field or the termi
271
271
  A phone has its own layout. It is not the computer's page made smaller. There is no bottom bar and no round button.
272
272
 
273
273
  - **⋯** is at the top right of every screen. It opens **Waiting on you** with a count (only when something waits), **Live now** (only while something runs), **Today**, **Work**, **Ask PMOS** and **Settings**. A blue dot on ⋯ means that something waits on you. When an item is open, its own menu items are at the top of the same menu.
274
- - **Today** is the log for today. Swipe a row to the right to do, accept or send it, and to the left to drop it or put it off. Each swipe shows **Undo**. A row has no ✓ or ✕ and rests flat. After a recording, the first line says where PMOS filed it, with **Undo**.
275
- - **Work** is the list of initiatives: the product, search and filter, **Initiatives** and **Backlog**, and the groups At risk or late, On track and No signal. A Project also shows its end date.
276
- - **An initiative** shows what the popup on a computer shows, in one column: the stage and its days over, the gate, ✦ Overview, where it stands, the Work breakdown with a dot per stage (grey done, blue in progress, an empty ring to do), the Backlog line, Artefacts and **N documents**. Swipe a ✦ line to the right to say yes and to the left to say no. The box at the bottom asks PMOS about this work.
277
- - **Ask PMOS** lists your chats grouped by the work they are about. "Not in a work yet" is last. A blue dot marks a chat that waits for you. Write in the box at the bottom to start a new chat.
274
+ - **Today** opens first. **Where it stands** says what leads today and why, and which dates are late. Under it is at most one ✦ proposal. Press it to read what changes and why, then press ✓ or ✕. The log has the **All** filter: Reply, Do, Decide or Send. A row has two lines: the title, then the job, the work and how late it is. A dot is before each row: red when it is late, blue for today, grey for Can wait. When PMOS has a fix for a row, the fix is under it with ✦. Swipe a row to the right to do, accept or send it, and to the left to drop it or put it off. Each swipe shows **Undo**. **Can wait** is one folded line. The box at the bottom logs a task, an event or a note; where the browser can listen, the microphone writes what you say into the box. After a recording, the first line says where PMOS filed it, with **Undo**.
275
+ - **Work** is the list of initiatives: the product, search and filter, the tabs **Initiatives**, **Backlog** with its count (for example **Backlog 14**) and **Sprint**, a short **Where it stands**, and the groups At risk or late, On track and No signal. A row shows its stage, its next milestone and how many milestones are late. A Project also shows its end date.
276
+ - **An initiative** opens full screen: **Where it stands** with one ✦ proposal and the next 3 dates, the **Stages** as one strip with the stage now marked, the **Work breakdown** of the stage now (a red dot when late, blue in progress, an empty ring to do, a tick when done, the Jira key, subtasks under their task), one line that opens the other stages, **The case**, and **Artefacts**. There is no timeline on a phone. Swipe a ✦ line to the right to say yes and to the left to say no; press it to read why. A task, a milestone or an artefact opens full screen with ← back to the initiative, as one page with no boxes. The box at the bottom asks PMOS about this work.
277
+ - **Ask PMOS** lists your chats grouped by the work they are about, with its product. "Not in a work yet" is last. A blue dot after the time marks a chat that waits for you. Write in the box at the bottom to start a new chat. In a chat, when PMOS asks before it changes or sends something, the ask is a blue-lined line: swipe it to the right to allow it, and to the left to say no. Press **Why** under it to read why PMOS asks. After you allow a change, a line says **Done** with what changed and **Undo**, until you write again.
278
278
  - **Settings** has the theme (Light, Dark or Auto) and the version with **Check update**. Connectors, workspaces and updates are on your computer.
279
279
  - **Recording** shows the red dot, the time, the meeting's name and a small red stop at the top. Under it: the shared screen cut to the slide, with the slides (only while a screen is shared); **So far**, newest first, each point with its time; and **PMOS proposes**, the line to tell the call. Swipe it to the right to copy it, and to the left to put it away. When you stop, Today opens.
280
280
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.710.0",
3
+ "version": "0.712.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.710.0",
9
+ "version": "0.712.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.710.0",
3
+ "version": "0.712.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",
@@ -8,7 +8,7 @@ body.bd-page.bk-on .bd-hd .bd-tools { margin-left: auto; }
8
8
  .bk-sw { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--cz-well); margin-left: var(--space-12); flex: none; }
9
9
  .bk-sw button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: var(--radius-pill); font-size: var(--fs-row); font-weight: var(--fw-regular); color: var(--cz-ink2); }
10
10
  .bk-sw button.on { background: var(--cz-card); color: var(--cz-ink); font-weight: var(--fw-strong); box-shadow: 0 1px 3px rgba(30, 34, 42, .12); }
11
- .bk-sw .k { font-weight: var(--fw-regular); color: var(--cz-ink3); }
11
+ .bk-sw .k, .bk-sw .bk-swn { font-weight: var(--fw-regular); color: var(--cz-ink3); }
12
12
  .bk-sw button:focus-visible, .bk-chip:focus-visible, .bk-gt:focus-visible, .bk-t:focus-visible, .bk-ib:focus-visible, .bk-rvb:focus-visible, .bk-yes:focus-visible, .bk-lnk:focus-visible, .bk-ck:focus-visible, .bk-bar button:focus-visible, .bk-pop button:focus-visible, .bk-go:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
13
13
 
14
14
  .bk-host { max-width: 1272px; padding-bottom: 96px; }
@@ -111,11 +111,17 @@ export async function load() {
111
111
  }
112
112
 
113
113
  /* ── the switch in Work's header ──────────────────────────────────────────────────────────────────────────────── */
114
+ /** Work's three tab names: a desk says "This sprint" and no count; a phone says "Backlog 14" and "Sprint" (PhoneWorkDS, job 1540).
115
+ * Zero is silence: no count when the Backlog is empty or not read yet. */
116
+ export const tabNames = (phone, n) => [['ini', 'Initiatives'], ['bk', 'Backlog' + (phone && n > 0 ? ` <span class="bk-swn">${Number(n)}</span>` : '')], ['sp', phone ? 'Sprint' : 'This sprint']];
117
+ const phoneNow = () => typeof matchMedia === 'function' && matchMedia('(max-width: 760px)').matches;
114
118
  function drawSwitch() {
115
119
  if (!sw) return;
116
120
  const t = tabOf(), tb = (k, n) => `<button type="button" role="tab" aria-selected="${t === k}" class="pm-tab${t === k ? ' on' : ''}" data-bksw="${k}">${n}</button>`;
117
- // one Tabs part for the three (WorkDS); no count on a tab: Where it stands says what matters (say it once)
118
- sw.innerHTML = tb('ini', 'Initiatives') + tb('bk', 'Backlog') + tb('sp', 'This sprint');
121
+ // one Tabs part for the three (WorkDS); no count on a desk tab: Where it stands says what matters (say it once).
122
+ // A phone (PhoneWorkDS, job 1540) has no Where it stands over the Backlog, so its tab carries the count, and the short name "Sprint"
123
+ const ph = phoneNow();
124
+ sw.innerHTML = tabNames(ph, ph && DATA ? backlogOf().length : 0).map(([k, n]) => tb(k, n)).join('');
119
125
  }
120
126
  function apply() {
121
127
  const bk = on();
@@ -700,7 +706,7 @@ export function sync(api) {
700
706
  sw = document.createElement('span'); sw.className = 'bk-sw pm-tabs'; sw.setAttribute('role', 'tablist'); sw.setAttribute('aria-label', 'Work'); // the system's Tabs (design-system ui/components/Tabs)
701
707
  // on a desk the switch sits in the toolbar after the product picker; on a phone the toolbar is full, so it takes its own line above the list
702
708
  const PH = matchMedia('(max-width: 760px)');
703
- const place = () => { if (PH.matches) ib.insertAdjacentElement('beforebegin', sw); else (crumb.closest('.wk-path') || crumb).insertAdjacentElement('afterend', sw); sw.classList.toggle('bk-sw-row', PH.matches); };
709
+ const place = () => { if (PH.matches) ib.insertAdjacentElement('beforebegin', sw); else (crumb.closest('.wk-path') || crumb).insertAdjacentElement('afterend', sw); sw.classList.toggle('bk-sw-row', PH.matches); drawSwitch(); };
704
710
  place(); PH.addEventListener('change', place);
705
711
  sw.addEventListener('click', (e) => { const b = e.target.closest('[data-bksw]'); if (b) setOn(b.dataset.bksw); });
706
712
  host = document.createElement('div'); host.id = 'bkBody'; host.className = 'bk-host'; host.hidden = true;
@@ -109,7 +109,7 @@ export function sugHtml(s, data = '', at = 'data-wksug') {
109
109
  }
110
110
  /** The Where it stands block: the sentences, then one Suggestion. Nothing to say and nothing suggested: no block. */
111
111
  export function standsHtml(rows, o = {}) {
112
- const now = o.now || new Date(), S = standsOf(rows, now);
112
+ const now = o.now || new Date(), S = standsOf(rows, now).slice(0, o.max || Infinity); // o.max: a phone says it short (PhoneWorkDS)
113
113
  const pk = o.sug === false ? null : pickProp(rows, now), sug = pk ? sugHtml(sugOf(pk.r, pk.p, now), `data-ini="${esc(pk.r.id)}" data-key="${esc(pk.r.key)}" data-pid="${esc(pk.p.id)}" data-sig="${esc(pk.p.sig || '')}"`) : '';
114
114
  if (!S.length && !sug) return '';
115
115
  return `<section class="pm-block wk-stands" aria-label="Where it stands"><h2 class="pm-h-sm pm-row">${SV(I.star).replace('pm-ic', 'pm-ic pm-star')}Where it stands</h2>`
@@ -269,7 +269,15 @@ function phoneRow(r) {
269
269
  // a Project (Ph2 checks across kinds): the end date leads the late words, "ends 4 Dec"
270
270
  const em = WK.kindOf(r.kind) === 'project' && /^\d{4}-\d{2}-\d{2}/.test(String(r.end || '')) ? String(r.end).slice(0, 10).split('-') : null;
271
271
  const ends = em ? 'ends ' + (+em[2]) + ' ' + ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][+em[1] - 1] : '';
272
- const sub = [st ? esc(st) : '', ends, say ? `<em class="${t.you ? 'you' : esc(s.tone)}">${esc(say)}</em>` : '', r.owner ? esc(r.owner) : ''].filter(Boolean).join(' · ');
272
+ // PhoneWorkDS (job #1540): the next milestone and how many are late, "Plan · go or kill 25 Nov · 2 late"
273
+ const ms = (r.milestones || []).filter((m) => m && !m.done && /^\d{4}-\d{2}-\d{2}/.test(String(m.date || ''))).sort((a, b) => (a.date < b.date ? -1 : 1));
274
+ const td = new Date(), today = td.getFullYear() + '-' + String(td.getMonth() + 1).padStart(2, '0') + '-' + String(td.getDate()).padStart(2, '0');
275
+ const ahead = ms.find((m) => m.date.slice(0, 10) >= today), nLate = ms.filter((m) => m.date.slice(0, 10) < today).length;
276
+ const dmy = (iso) => { const p = iso.slice(0, 10).split('-'); return (+p[2]) + ' ' + ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][+p[1] - 1]; };
277
+ const nx = ahead ? esc(ahead.name || 'Next milestone') + ' ' + dmy(ahead.date) : '';
278
+ const lt = nLate ? `<em class="late">${nLate} late</em>` : '';
279
+ const stIc = st ? '<svg class="bd-stic" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01"/></svg>' : '';
280
+ const sub = [st ? stIc + esc(st) : '', ends, nx, lt, say ? `<em class="${t.you ? 'you' : esc(s.tone)}">${esc(say)}</em>` : '', r.owner ? esc(r.owner) : ''].filter(Boolean).join(' · ');
273
281
  return `<button type="button" class="bd-lrow ini2${A.sel && A.sel() === r.key ? ' sel' : ''}" data-key="${esc(r.key)}" aria-haspopup="dialog"><i class="cz-dot ${s.tone} ${s.mo || ''}"></i><span class="tx"><span class="t">${nameHtml(r)}</span><span class="s q">${sub}</span></span>${t.you && t.days != null ? `<span class="r">${t.days}d</span>` : ''}${many() ? WF.wfIcon(WF.wfOf(r), 18) : ''}</button>`;
274
282
  }
275
283
  export function phoneListHtml(L) {
@@ -168,3 +168,18 @@ body.bd-page.bk-on [id="bkBody"] { display: flex; flex-direction: column; gap: v
168
168
  /* This sprint: a picked row (the bulk move, initiative work-subtasks, WorkBulkDS) */
169
169
  .wk-spx tr.wk-sr.sel td { background: var(--blue-tint); }
170
170
  .wk-spx tr.wk-sr.sel td:first-child { box-shadow: inset 2px 0 0 var(--blue); }
171
+
172
+ /* PhoneWorkDS (job 1540): Work on a phone. Where it stands said short over the list, the groups as small labels, each row's meta with its
173
+ stage icon and the late count in the alert colour. Tokens only. */
174
+ @media (max-width: 760px) {
175
+ #ibBody > .wk-stands { margin: var(--space-8) 0 var(--space-4); padding: 0 0 var(--space-12); background: none; box-shadow: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
176
+ #ibBody > .wk-stands h2 { font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
177
+ #ibBody > .wk-stands .wk-say a { color: var(--ink); text-decoration: none; font-weight: var(--fw-strong); }
178
+ .bd-plist .bd-ghd { padding: var(--space-16) 0 var(--space-4); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
179
+ .bd-plist .bd-ghd .n { margin-left: var(--space-4); }
180
+ .bd-plist .bd-ghd .n::before { content: '· '; }
181
+ .bd-plist .bd-lrow { padding-left: 0; padding-right: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
182
+ .bd-plist .bd-lrow .s { color: var(--muted); }
183
+ .bd-plist .bd-lrow .s em.late { font-style: normal; color: var(--alert); }
184
+ .bd-stic { vertical-align: -1px; margin-right: var(--space-4); }
185
+ }
@@ -269,6 +269,23 @@ body.cz-home { min-height: 100vh; overflow: hidden; }
269
269
  .hm-askk .ft { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-body); line-height: var(--lh-body); }
270
270
  .hm-askk .ft b { font-weight: var(--fw-strong); }
271
271
  .hm-askk s { color: var(--cz-ink3); }
272
+ /* PhoneTodayDS (job 1540): on a phone a live Allow · No ask is a blue-lined line that swipes; its icon answers stay for the keyboard */
273
+ .hm-swh { display: none; }
274
+ /* tap for why and Done · Undo after an allowed change (PhoneTodayDS, job 1540) */
275
+ .hm-why { margin: var(--space-4) 0 0; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--cz-ink2); }
276
+ .hm-why summary { cursor: pointer; color: var(--cz-blueink); width: max-content; }
277
+ .hm-why summary:focus-visible, .hm-undo:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
278
+ .hm-why p { margin: var(--space-4) 0 0; }
279
+ .hm-done { margin: var(--space-8) 0; font-size: var(--fs-row); color: var(--cz-ink); }
280
+ .hm-undo { all: unset; cursor: pointer; color: var(--cz-blueink); text-decoration: underline; }
281
+ @media (max-width: 760px) {
282
+ .hm-askk[data-sw-right] { background: none; box-shadow: inset 2px 0 0 var(--cz-blue); border-radius: 0; padding: var(--space-4) 0 var(--space-4) var(--space-16); touch-action: pan-y; }
283
+ .hm-askk[data-sw-right] .q { color: var(--cz-blueink); }
284
+ .hm-askk[data-sw-right] .hm-swh { display: block; margin: 0; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
285
+ .hm-askk[data-sw-right] .acts > .hm-icb[data-sw-yes], .hm-askk[data-sw-right] .acts > .hm-icb[data-sw-no] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
286
+ .hm-askk.sw-r { box-shadow: inset 4px 0 0 var(--cz-dot-ok); }
287
+ .hm-askk.sw-l { box-shadow: inset 4px 0 0 var(--cz-dot-q); }
288
+ }
272
289
  .hm-askk .acts, .hm-fix { display: flex; align-items: center; gap: var(--space-8); margin-top: 6px; }
273
290
  .hm-fix { padding-left: 38px; margin-top: 0; }
274
291
  .hm-icb { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
@@ -998,17 +1015,15 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
998
1015
  .pa-top h1 { font-size: var(--fs-display); font-weight: var(--fw-strong); line-height: 1.25; }
999
1016
  .pa-none { margin: var(--space-12) 0; font-size: var(--fs-body); color: var(--cz-ink3); line-height: var(--lh-body); }
1000
1017
  .pa-g { padding-top: var(--space-16); }
1001
- .pa-g h2 { display: flex; align-items: center; gap: 10px; padding: var(--space-4) 0 6px; font-size: var(--fs-body); font-weight: var(--fw-strong); line-height: var(--lh-body); color: var(--cz-ink); }
1002
- .pa-gi { flex: none; width: 24px; height: 24px; border-radius: var(--radius-sm, 7px); display: inline-grid; place-items: center; background: var(--cz-bluebg); color: var(--cz-blue); }
1003
- .pa-gi.loose { background: var(--cz-well); color: var(--cz-ink3); }
1004
- .pa-gt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1005
- .pa-g h2 em { font-style: normal; font-weight: var(--fw-regular); color: var(--cz-ink3); font-size: var(--fs-meta); }
1006
- .pa-r { all: unset; box-sizing: border-box; position: relative; width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--cz-hair); cursor: pointer; }
1018
+ .pa-g h2 { display: flex; align-items: baseline; gap: 6px; padding: var(--space-4) 0 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); letter-spacing: .08em; text-transform: uppercase; line-height: var(--lh-label); color: var(--cz-ink2); }
1019
+ .pa-gt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1020
+ .pa-g h2 em { flex: none; font-style: normal; color: var(--cz-ink3); }
1021
+ .pa-r { all: unset; box-sizing: border-box; position: relative; width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: var(--space-12) 0; border-bottom: 1px solid var(--cz-hair); cursor: pointer; }
1007
1022
  .pa-r:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
1008
- .pa-d { position: absolute; left: 0; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--cz-blue); }
1023
+ .pa-d { flex: none; width: var(--space-8); height: var(--space-8); margin-top: 7px; border-radius: var(--radius-pill); background: var(--cz-blue); } /* PhoneTodayDS: the dot after the time */
1009
1024
  .pa-x { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
1010
1025
  .pa-x b { font-size: var(--fs-row); font-weight: var(--fw-strong); line-height: var(--lh-row); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1011
- .pa-x small { font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1026
+ .pa-x small { font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
1012
1027
  .pa-r time { flex: none; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-row); }
1013
1028
  .pa-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: var(--space-8) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom, 0px)); background: var(--cz-card); }
1014
1029
  .pa-new { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 6px 0 14px; border-radius: var(--radius-pill, 999px); background: var(--cz-well); color: var(--cz-ink3); cursor: text; }
@@ -35,7 +35,7 @@
35
35
  * and no bottom bar. The same button (#czFab) is a ⋯ at the top right of every page, with one small blue dot while something waits on you
36
36
  * (zero is silence). It opens phoneMenuHtml(): "Waiting on you N" (the lines for today plus the chats that wait for you; it opens Today,
37
37
  * or Ask PMOS when only chats wait), "Live now N" while sessions run, then Today, Work, Ask PMOS and Settings. Goals, Events, Library and
38
- * Routine are not in the phone menu for now (their pages still open from a link). Ask PMOS on a phone is Home's page (premium.html?chats=1), which
38
+ * Routine are not in the phone menu for now (their pages still open from a link). Ask PMOS on a phone is Today's page with ?chats=1 (today.html?chats=1; Home is gone, job #1540), which
39
39
  * lists the chats by work (pm/phone-ask.js). The page's own ⋯ (the phone chat) opens the same menu; its own rows are not added on a phone.
40
40
  */
41
41
  import { esc, svg, ICON, wsQ } from './cozy-evui.js';
@@ -65,18 +65,19 @@ const ALL_PLACES = [
65
65
  ];
66
66
  export const PLACES = ALL_PLACES.filter((p) => p.href);
67
67
  /* The phone's places (Ph2_menu): Today, Work, Ask PMOS; Settings is the last row. 'ask' is Home's page (premium.html) on a phone. */
68
+ const ASK_D = 'M4 5h16v11H9l-5 4z'; // PhoneTodayDS: Ask PMOS is the chat bubble, ✦ is Waiting on you
68
69
  const SPARK = 'M12 3l1.8 5.4L19 10.2l-5.2 1.8L12 17.4l-1.8-5.4L5 10.2l5.2-1.8z';
69
70
  const GEAR = 'M12 9a3 3 0 1 0 0 6a3 3 0 1 0 0-6M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z';
70
71
  export const PHONE_PLACES = [
71
72
  { key: 'home', label: 'Today', href: '/today.html', d: RAIL_ICON.today },
72
73
  { key: 'board', label: 'Work', href: '/premium-board.html', d: RAIL_ICON.work },
73
- { key: 'ask', label: 'Ask PMOS', href: '/premium.html?chats=1', d: SPARK }, // ?chats: a bare /premium.html opens Today (server.js)
74
+ { key: 'ask', label: 'Ask PMOS', href: '/today.html?chats=1', d: ASK_D }, // ?chats: Today's page draws the chats by work (home-app.js drawAsk)
74
75
  ];
75
76
  const PHONE_Q = '(max-width: 760px)';
76
77
  /** A phone: the ⋯ at the top right and the phone menu. */
77
78
  export const phoneOn = () => typeof matchMedia === 'function' && matchMedia(PHONE_Q).matches;
78
79
  /** The place a phone page is: Home's page is Ask PMOS there, Today's page (body[data-today]) is Today. */
79
- export const phoneHere = (here, doc = typeof document !== 'undefined' ? document : null) => (here === 'home' && doc && doc.body && !doc.body.hasAttribute('data-today') ? 'ask' : here);
80
+ export const phoneHere = (here, doc = typeof document !== 'undefined' ? document : null) => (here === 'home' && doc && doc.body && (!doc.body.hasAttribute('data-today') || /[?&]chats=/.test((doc.location && doc.location.search) || '')) ? 'ask' : here);
80
81
  const DESK = '(min-width: 761px)';
81
82
  /** The rail is drawn on a desktop; a phone keeps the floating button. */
82
83
  export const railOn = () => typeof matchMedia === 'function' && matchMedia(DESK).matches;
@@ -131,7 +132,7 @@ export function menuHtml(here, o = {}) {
131
132
  export function phoneMenuHtml(here, o = {}) {
132
133
  const wait = (o.calls > 0 ? o.calls : 0) + (o.waiting > 0 ? o.waiting : 0), live = o.live > 0 ? o.live : 0;
133
134
  const n = (v) => `<span class="ev-k">${esc(v > 99 ? '99+' : v)}</span>`;
134
- const top = (wait ? `<button type="button" class="ev-mi ev-x" data-cz-wait aria-label="${esc('Waiting on you: ' + wait)}">${svg(ICON.chat, 18)}<span>Waiting on you</span>${n(wait)}<i class="ev-md you" aria-hidden="true"></i></button>` : '')
135
+ const top = (wait ? `<button type="button" class="ev-mi ev-x" data-cz-wait aria-label="${esc('Waiting on you: ' + wait)}">${svg(SPARK, 18)}<span>Waiting on you</span>${n(wait)}<i class="ev-md you" aria-hidden="true"></i></button>` : '')
135
136
  + (live ? `<button type="button" class="ev-mi ev-x" data-cz-live aria-label="${esc('Live now: ' + live)}">${svg('M12 9a3 3 0 1 0 0 6a3 3 0 1 0 0-6M6 6a8.5 8.5 0 0 0 0 12M18 6a8.5 8.5 0 0 1 0 12', 18)}<span>Live now</span>${n(live)}</button>` : '');
136
137
  // the shown item's own ⋯ rows lead the menu (cozy-viewer.js phoneMoreRows): the page has one ⋯
137
138
  const own = (o.extra || []).map((x, i) => `<button type="button" class="ev-mi${x.danger ? ' bad' : ''}" data-cz-extra="${i}"><span>${esc(x.label)}</span></button>`).join('');
@@ -275,7 +276,7 @@ export function mountNav(here, doc = document, opts = {}) {
275
276
  if ('czWait' in b.dataset) {
276
277
  const to = N.calls > 0 ? 'home' : 'ask', cur = phoneHere(here, doc);
277
278
  if (to === cur) { if (opts.here) opts.here(); else scrollTo(0, 0); return; }
278
- location.assign(to === 'home' ? '/today.html' + wsQ() : '/premium.html?chats=1' + wsQ('&'));
279
+ location.assign(to === 'home' ? '/today.html' + wsQ() : '/today.html?chats=1' + wsQ('&'));
279
280
  return;
280
281
  }
281
282
  if ('czLive' in b.dataset) { doc.dispatchEvent(new CustomEvent('cz:live-open')); return; }
@@ -285,6 +285,50 @@ button.pw-fv .grey { color: var(--cz-ink3); }
285
285
  .pw-pask input::placeholder { color: var(--cz-ink3); }
286
286
  .pw-pask button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cz-solid); color: var(--cz-onsolid); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
287
287
  .pw-pask:focus-within { box-shadow: 0 0 0 2px var(--cz-blue); }
288
+ /* PhoneWorkDS (job 1540): Where it stands with the next 3 dates, the Stages strip, the stage now's tasks (dot, tick, Jira chip, nested),
289
+ the other stages' fold line, the case and the Artefacts. Tokens only. */
290
+ .pw-ph > .pw-pov:first-child { margin-top: var(--space-4); border-top: 0; padding-top: var(--space-8); }
291
+ .pw-pov > p { margin: 0 0 6px; font-size: var(--fs-body); line-height: var(--lh-body); }
292
+ .pw-pwhy { color: var(--cz-ink3); }
293
+ .pw-pnext { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
294
+ .pw-pnext li { display: flex; align-items: baseline; gap: var(--space-12); }
295
+ .pw-pnd { flex: none; width: 76px; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--cz-ink2); }
296
+ .pw-pnext .pw-tt { flex: 1; min-width: 0; text-align: left; border: 0; padding: 0; background: none; font: inherit; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--cz-ink); cursor: pointer; }
297
+ .pw-psec h4 { font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; padding-top: var(--space-16); border-top: 1px solid var(--cz-hair); margin-bottom: var(--space-8); }
298
+ .pw-pstrip { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; }
299
+ .pw-pstrip li { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
300
+ .pw-pstrip i { height: 6px; border-radius: var(--radius-pill); background: var(--cz-well); }
301
+ .pw-pstrip li.dn i { background: var(--leaf); }
302
+ .pw-pstrip li.now i { background: var(--cz-blue); }
303
+ .pw-pstrip b { margin-top: var(--space-4); font-size: var(--fs-meta); font-weight: var(--fw-strong); line-height: var(--lh-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
304
+ .pw-pstrip small { font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
305
+ .pw-pwbs2 { list-style: none; margin: 0; padding: 0; }
306
+ .pw-ptk2 { display: flex; align-items: flex-start; gap: var(--space-12); padding: var(--space-12) 0 var(--space-12) calc(var(--pw-d, 0) * 18px); border-bottom: 1px solid var(--cz-hair); }
307
+ .pw-ptk2 .pw-tt, .pw-ptk2 .pw-dn { text-align: left; border: 0; padding: 0; background: none; font: inherit; font-size: var(--fs-row); font-weight: var(--fw-strong); line-height: var(--lh-row); color: var(--cz-ink); cursor: pointer; overflow-wrap: anywhere; }
308
+ .pw-ptk2 .pw-dn { font-weight: var(--fw-regular); color: var(--cz-ink3); }
309
+ .pw-ptk2.done .pw-tt { color: var(--cz-ink3); font-weight: var(--fw-regular); }
310
+ .pw-ptx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
311
+ .pw-pm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--cz-ink3); }
312
+ .pw-pm i { font-style: normal; }
313
+ .pw-pm em { font-style: normal; color: var(--alert); }
314
+ .pw-pkey { margin-left: var(--space-4); font-family: var(--cz-mono, monospace); }
315
+ .pw-pdot2 { flex: none; width: var(--space-8); height: var(--space-8); margin: 7px 3px 0; border-radius: var(--radius-pill); box-sizing: border-box; }
316
+ .pw-pdot2.late { background: var(--alert); }
317
+ .pw-pdot2.now { background: var(--cz-blue); }
318
+ .pw-pdot2.todo { border: 1.5px solid var(--cz-ink3); }
319
+ .pw-ptick { flex: none; width: 14px; margin-top: 3px; color: var(--cz-ink3); }
320
+ .pw-pfold { width: 100%; display: flex; align-items: center; gap: var(--space-8); min-height: 48px; border: 0; border-bottom: 1px dashed var(--cz-hair); padding: 0; background: none; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink3); text-align: left; cursor: pointer; }
321
+ .pw-pfold b { color: var(--cz-ink); font-weight: var(--fw-strong); }
322
+ .pw-pcase { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-8) var(--space-12); margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); }
323
+ .pw-pcase dt { color: var(--cz-ink3); }
324
+ .pw-pcase dd { margin: 0; min-width: 0; }
325
+ .pw-parts2 { list-style: none; margin: 0; padding: 0; }
326
+ .pw-an2 { width: 100%; display: flex; align-items: flex-start; gap: var(--space-12); padding: var(--space-12) 0; border: 0; border-bottom: 1px solid var(--cz-hair); background: none; font: inherit; color: var(--cz-ink); text-align: left; cursor: pointer; }
327
+ .pw-an2 svg { flex: none; margin-top: 3px; color: var(--cz-ink2); }
328
+ .pw-an2 span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
329
+ .pw-an2 b { font-size: var(--fs-row); font-weight: var(--fw-strong); line-height: var(--lh-row); }
330
+ .pw-an2 small { font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
331
+ .pw-ph :focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
288
332
  @media (max-width: 760px) {
289
333
  /* the item's header on a phone: back and the title; the page's ⋯ (cozy-nav.js) holds the item's own ⋯ items */
290
334
  .cz-vw:has(.pw-ph) .cz-vw-hd .cz-vw-tile, .cz-vw:has(.pw-ph) .cz-vw-hd .cz-vw-kind, .cz-vw:has(.pw-ph) .cz-vw-hd [data-cz-vw="discuss"], .cz-vw:has(.pw-ph) .cz-vw-hd [data-cz-vw-p="kind"] { display: none; }