create-pmos 0.364.0 → 0.365.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.364.0",
3
+ "version": "0.365.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": {
@@ -32,6 +32,23 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.365.0",
37
+ "at": "2026-10-21T01:17:24.947Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 962,
42
+ "t": "Item fields move out of the chat start into Edit ▾ beside the tabs",
43
+ "s": "Item fields move out of the chat start into Edit ▾ beside the tabs"
44
+ },
45
+ {
46
+ "n": 972,
47
+ "t": "The morning brief is built from the saved reads of your tools (briefing-source-flow, slice 2)",
48
+ "s": "The brief is derived content, following the rule Wawan set on 2026-10-21."
49
+ }
50
+ ]
51
+ },
35
52
  {
36
53
  "v": "0.364.0",
37
54
  "at": "2026-10-21T00:58:08.077Z",
@@ -299,18 +316,6 @@
299
316
  "s": "On a touch screen every premium text field (input, textarea, select) uses 16 px type, so focus does not zoom the page."
300
317
  }
301
318
  ]
302
- },
303
- {
304
- "v": "0.345.0",
305
- "at": "2026-10-20T05:50:20.786Z",
306
- "f": 2,
307
- "prs": [
308
- {
309
- "n": 941,
310
- "t": "Agent results wait in the bell, with deep links to each one",
311
- "s": "The bell is an inbox of what the agent made that waits on the PM."
312
- }
313
- ]
314
319
  }
315
320
  ]
316
321
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@414dedb1
1
+ kernel-source: pmos@9c4cbd3c
2
2
  assembled: 2026-10-21
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-10-21T00:58:05Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T01:17:22Z"}
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-10-21T00:58:05Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T01:17:22Z"}
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-10-21T00:58:05Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T01:17:22Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -24,7 +24,9 @@ const showKey = (pg, key) => pg.evaluate((key) => { const has = () => document.q
24
24
  const results = [];
25
25
  const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
26
26
  /* the dialog's fields (premium-simple-ui): a field opens its panel; When holds Today, Not yet, Not before and Someday */
27
- const field = async (pg, k) => { if (await pg.locator(`#card .ffd[data-k="${k}"][aria-expanded="false"]`).count()) await pg.click(`#card .ffd[data-k="${k}"]`); };
27
+ /* the fields sit in a sheet behind Edit ▾ in the dialog's switch row, closed by default (PM, 2026-10-20) */
28
+ const sheet = async (pg) => { if (await pg.locator('#iTog[aria-expanded="false"]').count()) await pg.click('#iTog'); };
29
+ const field = async (pg, k) => { await sheet(pg); if (await pg.locator(`#card .ffd[data-k="${k}"][aria-expanded="false"]`).count()) await pg.click(`#card .ffd[data-k="${k}"]`); };
28
30
  const more = (pg) => field(pg, 'when');
29
31
  let srv = null; let browser = null;
30
32
  const finish = async (code) => {
@@ -155,11 +157,12 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
155
157
  await openKey('work:item-aaaaaaaaaaa1');
156
158
  const dlg = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, mod: document.querySelector('#dlg').getAttribute('aria-modal'), ask: !!document.querySelector('#askGo'),
157
159
  fields: [...document.querySelectorAll('#card .ffd small')].map((x) => x.textContent).join(), when: document.querySelector('#card .ffd[data-k="when"] b').textContent,
158
- bar: [...document.querySelectorAll('#card .fbar button')].map((b) => b.textContent.trim()).join(), solid: [...document.querySelectorAll('#card .fbar .cta')].length }));
160
+ bar: [...document.querySelectorAll('#card .ibrow button, #card .fbar button')].map((b) => b.textContent.trim()).join(), solid: [...document.querySelectorAll('#card .cta')].length,
161
+ shut: document.querySelector('#iSheet').hidden && !document.querySelector('#dBody .ffd'), row: !!document.querySelector('#dTabs #card [data-p="done"]') }));
159
162
  await more(p); dlg.opts = await p.evaluate(() => [...document.querySelectorAll('#card .fmenu .fopt > span')].map((x) => x.textContent).join());
160
163
  await field(p, 'wait'); dlg.wDis = await p.evaluate(() => document.querySelector('#wBtn').disabled);
161
- ok('M8 a dialog shows labelled fields (the agent, When, Waiting on, Who does it, Priority · Due) and one bar with Done; When holds Today, Not yet, Not before and Someday; Waiting needs a name', dlg.title === 'Decide how partial refunds are handled'
162
- && dlg.fields === 'The agent,When,Waiting on,Who does it,Priority · Due' && /^Inbox/.test(dlg.when) && dlg.bar === 'Drop it,Done' && dlg.solid === 1
164
+ ok('M8 a dialog shows Edit ▾ and Done in its switch row, the fields closed behind Edit and out of the conversation; the fields are the agent, When, Waiting on, Who does it, Priority · Due; When holds Today, Not yet, Not before and Someday; Waiting needs a name', dlg.title === 'Decide how partial refunds are handled'
165
+ && dlg.fields === 'The agent,When,Waiting on,Who does it,Priority · Due' && /^Inbox/.test(dlg.when) && dlg.bar === 'EditInbox,Done,Drop it' && dlg.solid === 1 && dlg.shut && dlg.row
163
166
  && dlg.opts === 'Today,Later today,Tomorrow,Next week,Not before a date…,Someday' && dlg.mod === 'true' && dlg.ask && dlg.wDis, JSON.stringify(dlg));
164
167
  await more(p);
165
168
  await p.locator('#card [data-p="notyet"][data-when="tomorrow"]').click();
@@ -167,6 +170,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
167
170
  for (const [sel, route, check] of [['[data-p="flag"]', '/api/pm-items/flag', (b) => b.flagged === true], ['[data-p="xt"][data-k="someday"]', '/api/pm-items/someday', (b) => Object.keys(b).join() === 'id'], ['[data-p="done"]', '/api/pm-items/done', (b) => Object.keys(b).join() === 'id'], ['[data-p="remove"]', '/api/pm-items/remove', (b) => Object.keys(b).join() === 'id']]) {
168
171
  await openKey('work:item-aaaaaaaaaaa2'); const n = A.posts.length;
169
172
  if (sel.includes('someday') || sel.includes('flag')) await more(p);
173
+ if (sel.includes('remove')) await sheet(p);
170
174
  await p.locator('#card ' + sel).click();
171
175
  ok(`M8 ${route.split('/').pop()} posts exactly what the Work page's route takes`, await until(() => A.posts.length > n && lastPost().path === route && lastPost().body.id === 'item-aaaaaaaaaaa2' && check(lastPost().body)), JSON.stringify(lastPost()));
172
176
  await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
@@ -179,7 +183,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
179
183
  await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
180
184
  await openKey('work:item-ddddddddddd1');
181
185
  ok('M7 an item on the review list offers Keep, and Keep posts it', await p.evaluate(() => !!document.querySelector('#card [data-p="keep"]')));
182
- await p.click('#card [data-p="keep"]');
186
+ await sheet(p); await p.click('#card [data-p="keep"]');
183
187
  ok('M7 Keep posts the item id only', await until(() => A.posts.some((x) => x.path === '/api/pm-items/keep' && Object.keys(x.body).join() === 'id' && x.body.id === 'item-ddddddddddd1')));
184
188
  await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
185
189
  ok('M8 no press carried a writer field', A.posts.every((x) => !['by', 'via', 'at', 'actor', 'pm', 'nonce'].some((k) => k in x.body)));
@@ -119,10 +119,10 @@ async function waitFor(page, fn, arg, ms = 8000) {
119
119
  ok('R1 Connectors links to Data refresh instead of holding its schedule', await waitFor(page, () => { const a = document.querySelector('[data-c3set-row="conn.cal.refresh"]'); const b = document.querySelector('[data-c3set-row="conn.jira.refresh"]'); return !!a && !!b && !!a.querySelector('button.lk') && /Data refresh/.test(a.textContent) && !a.querySelector('select') && !b.querySelector('select'); }));
120
120
  await page.click('[data-c3set-row="conn.cal.refresh"] button.lk');
121
121
  ok('R2 the link opens the Data refresh section', await waitFor(page, () => !!document.querySelector('[data-c3set-section="refresh"] [data-c3set-rf-card]')));
122
- ok('R3 the section draws 13 source rows in three cards', await waitFor(page, () => document.querySelectorAll('[data-c3set-section="refresh"] [data-c3set-rf]').length === 13 && document.querySelectorAll('[data-c3set-rf-card]').length === 3));
122
+ ok('R3 the section draws 14 source rows in three cards', await waitFor(page, () => document.querySelectorAll('[data-c3set-section="refresh"] [data-c3set-rf]').length === 14 && document.querySelectorAll('[data-c3set-rf-card]').length === 3));
123
123
  ok('R3b the overview, the rules and the log are there', await page.evaluate(() => !!document.querySelector('[data-c3set-rf-sum]') && !!document.querySelector('[data-c3set-rf-all]') && !!document.querySelector('[data-c3set-rf-rules]') && !!document.querySelector('[data-c3set-rf-log]')));
124
124
  ok('R3c a source with its own home says where, and has no editor button', await page.evaluate(() => { const r = document.querySelector('[data-c3set-rf="scan"]'); return !!r && /Set in Initiatives/.test(r.textContent) && !r.querySelector('[data-c3set-rf-open]'); }));
125
- ok('R3d the filter Off lists the sources that are off', await (async () => { await page.click('[data-c3set-section="refresh"] .seg [data-v="off"]'); const n = await page.evaluate(() => document.querySelectorAll('[data-c3set-rf]').length); await page.click('[data-c3set-section="refresh"] .seg [data-v="all"]'); return n > 0 && n < 13; })());
125
+ ok('R3d the filter Off lists the sources that are off', await (async () => { await page.click('[data-c3set-section="refresh"] .seg [data-v="off"]'); const n = await page.evaluate(() => document.querySelectorAll('[data-c3set-rf]').length); await page.click('[data-c3set-section="refresh"] .seg [data-v="all"]'); return n > 0 && n < 14; })());
126
126
 
127
127
  // turning on needs no question
128
128
  await page.click('[data-c3set-rf-on="calendar"]');
@@ -1,4 +1,21 @@
1
1
  [
2
+ {
3
+ "v": "0.365.0",
4
+ "at": "2026-10-21T01:17:24.947Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 962,
9
+ "t": "Item fields move out of the chat start into Edit ▾ beside the tabs",
10
+ "s": "Item fields move out of the chat start into Edit ▾ beside the tabs"
11
+ },
12
+ {
13
+ "n": 972,
14
+ "t": "The morning brief is built from the saved reads of your tools (briefing-source-flow, slice 2)",
15
+ "s": "The brief is derived content, following the rule Wawan set on 2026-10-21."
16
+ }
17
+ ]
18
+ },
2
19
  {
3
20
  "v": "0.364.0",
4
21
  "at": "2026-10-21T00:58:08.077Z",
@@ -271,7 +271,7 @@ My work is the second place on the rail, at `/premium-work.html`. It reads the l
271
271
 
272
272
  **Work queue.** One full-width card holds everything you sort, as tabs in one row: **Today**, **Inbox**, **Upcoming**, **Someday**, **Kept** and **Done**. Each tab shows its count, and the card opens on Today (or on the first tab that has something). On a phone the tabs stay in one row: swipe the row sideways to see the rest. Rows sit in two columns, one column on a narrow screen. The left and right arrow keys move between tabs. **Inbox** shows what is new from Jira and Slack first, then what you added. **Kept** gathers items you pressed Keep on, and **Done** shows what you added and marked done in the last 7 days. An item shows in one place tab only. Kept is a mark on an item, not a place, so a kept item also shows where it was placed. The card replaces the earlier On your plate, With agents and tray cards.
273
273
 
274
- **The item dialog.** The dialog shows one labelled field for each choice. Each field shows its value from the record and opens when you press it: **When** (Today, Later today, Tomorrow, Next week, Not before a date, Someday), **Waiting on**, **Who does it** (the steps) and **Priority · Due** (the edit panel). One bar at the bottom holds **Done**, with **Keep it** and **Drop it** beside it. Every action stays reachable.
274
+ **The item dialog.** The conversation gets the whole body. Two controls sit beside the Detail / Conversation switch, on both tabs: **Edit ▾** and **Done**. On a wide screen the row also shows where the item is. **Edit ▾** opens a sheet with one labelled field for each choice. Each field shows its value from the record and opens when you press it: **When** (Today, Later today, Tomorrow, Next week, Not before a date, Someday), **Waiting on**, **Who does it** (the steps) and **Priority · Due** (the edit panel). **Keep it** and **Drop it** are at the bottom of the sheet. The sheet closes when you press Edit again, press outside it, or press Escape. **Waiting on** is not shown when the item cannot wait and waits on nobody. An agent that only can draft is a field in the sheet. An agent that is working, has a draft, or stopped stays in the conversation, because it needs you. Every action stays reachable.
275
275
 
276
276
  **The agent's draft.** The draft shows as formatted text in the detail panel on the right, labelled as the agent's and not checked, with **Open** and **Copy**. Its heading names the item ("Draft for IDPF-2989", or "Draft for you"), the round and the time of the latest round, and an approved step shows as "Step when you approve". A long draft is cut short, with **Show all**. It appears there as soon as the agent finishes, even while the dialog is open. The left column keeps the conversation (with **View round**) and the decision cards, in the console's words: **Post it to Jira** (marked outward, with exactly the text that goes), **Edit the draft**, **Keep it as a draft** and **Mark it done**. Post asks you to confirm the exact text first, and nothing is posted before that.
277
277
 
@@ -27,6 +27,7 @@ The workspace holds no password or token, and it never calls these services. An
27
27
  | Jira status | jira-sync | 06:30 every day | 26 hours |
28
28
  | My work | my-work-read | when you press Refresh | 26 hours |
29
29
  | Tracker items | tracker-refresh | Friday 15:30 | 8 days |
30
+ | Your tools | sources-read | before the morning briefing, and when you press Refresh | 8 hours |
30
31
 
31
32
  The calendar-sync skill reads today and the next 14 days, read-only, and saves the events with this command:
32
33
 
@@ -44,7 +45,7 @@ The record is kept in your own runtime folder on this machine, never in a reposi
44
45
 
45
46
  ## Your tools: mail, Slack, Wispr Flow, Confluence and the rest
46
47
 
47
- The Briefing uses your tools as sources: Mail, Slack, Wispr Flow, Jira mentions, Confluence, GitHub, Drive, Figma and your websites. The **sources-read** skill reads each tool that is on in Settings › Connectors, with your own connections, and saves what each one says. It saves the raw facts only: who, where, what is asked and the link. It does not rank or plan anything. The brief, insights and reports are built from these saved reads later, so they all use the same read.
48
+ The Briefing uses your tools as sources: Mail, Slack, Wispr Flow, Jira mentions, Confluence, GitHub, Drive, Figma and your websites. The **sources-read** skill reads each tool that is on in Settings › Connectors, with your own connections, and saves what each one says. It saves the raw facts only: who, where, what is asked and the link. It does not rank or plan anything. The morning brief is built from these saved reads and never opens those tools itself, so every part of the Briefing uses the same read. Only the calendar is still read by the brief. When the morning briefing is due, **Your tools** is read first if its last read is older than 2 hours, and the brief waits for it. **Your tools** is on whenever the morning briefing is on, until you set it yourself in Settings › Data refresh.
48
49
 
49
50
  The Sources list shows them as one row, **Your tools**. Its time is the oldest read among the tools that are on, so the row is never fresher than its oldest tool. The row is old after 8 hours. A tool that is on and was never read keeps the row at **not read yet**, and the row names the tools that were not reached and why. **Refresh** on the row starts the skill.
50
51
 
@@ -287,6 +287,8 @@ function create(host) {
287
287
  function ensureOn(id, ws) {
288
288
  const set = R.readSettings(dir); const cur = set.sources[id]; if (!cur) return false;
289
289
  const was = cur.on; cur.on = true; if (ws && !cur.ws) cur.ws = ws;
290
+ // briefing-source-flow: the brief is built from Your tools, so turning the brief on turns its reader on too
291
+ if (id === 'brief' && set.sources.tools && !set.sources.tools.on) { set.sources.tools.on = true; if (ws && !set.sources.tools.ws) set.sources.tools.ws = ws; }
290
292
  set.migrated = true;
291
293
  R.writeSettings(dir, set);
292
294
  if (!was) { const st = R.readState(dir); st[id] = { ...(st[id] || {}), last_slot: R.lastSlot(cur.s, now(), win()) }; R.writeState(dir, st); }
@@ -294,7 +296,7 @@ function create(host) {
294
296
  }
295
297
 
296
298
  /* ── rows ── */
297
- const FRESH_OF = { 'my-work': 'my-work', calendar: 'calendar', jira: 'jira', tracker: 'tracker', initiatives: 'initiatives' };
299
+ const FRESH_OF = { 'my-work': 'my-work', calendar: 'calendar', jira: 'jira', tracker: 'tracker', tools: 'tools', initiatives: 'initiatives' };
298
300
  function rowsFor(ws, set, t) {
299
301
  const state = R.readState(dir);
300
302
  const view = {};
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
  /* refresh.js — what PMOS refreshes, when, and what each refresh did (initiative data-refresh-settings).
3
3
  *
4
- * THE SOURCES. One registry of the 13 places PMOS refreshes data (SOURCES). Each says how it runs (`skill`: a Claude skill this module
4
+ * THE SOURCES. One registry of the 14 places PMOS refreshes data (SOURCES). Each says how it runs (`skill`: a Claude skill this module
5
5
  * schedules; `job`: a PMOS job with its own tick, which this module only gates; `change`: a watcher with no schedule), what it USES (its
6
6
  * inputs, as read in the code: dependencies.md section 3) and the IMPACT line shown when it fails or is off.
7
7
  *
@@ -52,8 +52,13 @@ const SOURCES = Object.freeze([
52
52
  what: 'Plan items brought up to date from the tracker files in the workspace.', uses: [],
53
53
  impact: 'The bi-weekly report says the tracker was not refreshed.',
54
54
  def: { kind: 'weekly', day: 'Fri', times: ['15:30'] } },
55
+ // briefing-source-flow: the brief is derived content, so it reads these saved reads instead of the tools (lib/source-reads.js)
56
+ { id: 'tools', label: 'Your tools', group: 'tools', ic: 'inbox', run: 'skill', skill: 'sources-read', how: 'tool', fresh: 'tools',
57
+ what: 'Mail, Slack, Wispr Flow, Confluence, GitHub, Drive, Figma and your websites, saved as they are for the Briefing. It runs before the morning briefing.', uses: [],
58
+ impact: 'The Briefing is built from the last saved read of your tools.',
59
+ def: { kind: 'manual' } },
55
60
  { id: 'brief', label: 'Morning briefing', group: 'pmos', ic: 'sun', run: 'skill', skill: 'morning-brief', how: 'bg',
56
- what: 'Your Briefing for the day, ranked by what needs you first. When it is due, the sources it is built on that are older than 2 hours are refreshed first.', uses: ['calendar', 'jira', 'mywork'],
61
+ what: 'Your Briefing for the day, ranked by what needs you first. When it is due, the sources it is built on that are older than 2 hours are refreshed first.', uses: ['calendar', 'jira', 'mywork', 'tools'],
57
62
  impact: 'No new Briefing for the day, and the day check has nothing to update.',
58
63
  def: { kind: 'daily', times: ['06:45'] } },
59
64
  { id: 'daycheck', label: 'Day check', group: 'pmos', ic: 'clock', run: 'job', how: 'bg',
@@ -166,7 +171,9 @@ function withDefaults(raw) {
166
171
  const sources = {};
167
172
  for (const src of SOURCES) {
168
173
  const x = (r.sources && r.sources[src.id]) || {};
169
- const on = typeof x.on === 'boolean' ? x.on : src.run !== 'skill'; // a job or watcher is on unless the PM turned it off; a skill source starts off
174
+ let on = typeof x.on === 'boolean' ? x.on : src.run !== 'skill'; // a job or watcher is on unless the PM turned it off; a skill source starts off
175
+ // briefing-source-flow: Your tools feeds the brief, so until the PM sets it, it is on whenever the brief is
176
+ if (src.id === 'tools' && typeof x.on !== 'boolean') on = !!(r.sources && r.sources.brief && r.sources.brief.on === true);
170
177
  const n = src.run === 'skill' && x.s ? normalize(src, x.s) : null;
171
178
  sources[src.id] = { on, s: n && n.ok ? n.s : (src.def ? { ...src.def, ...(src.def.times ? { times: src.def.times.slice() } : {}) } : null), ws: typeof x.ws === 'string' ? x.ws : null };
172
179
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.364.0",
3
+ "version": "0.365.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.364.0",
9
+ "version": "0.365.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.364.0",
3
+ "version": "0.365.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",
@@ -18,7 +18,9 @@ const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for
18
18
  const results = [];
19
19
  const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
20
20
  /* the dialog's fields (premium-simple-ui): a field opens its panel; When holds Today, Not yet, Not before and Someday */
21
- const field = async (pg, k) => { if (await pg.locator(`#card .ffd[data-k="${k}"][aria-expanded="false"]`).count()) await pg.click(`#card .ffd[data-k="${k}"]`); };
21
+ /* the fields sit in a sheet behind Edit ▾ in the dialog's switch row, closed by default (PM, 2026-10-20) */
22
+ const sheet = async (pg) => { if (await pg.locator('#iTog[aria-expanded="false"]').count()) await pg.click('#iTog'); };
23
+ const field = async (pg, k) => { await sheet(pg); if (await pg.locator(`#card .ffd[data-k="${k}"][aria-expanded="false"]`).count()) await pg.click(`#card .ffd[data-k="${k}"]`); };
22
24
  const more = (pg) => field(pg, 'when');
23
25
  let srv = null; let browser = null;
24
26
  const finish = async (code) => {
@@ -69,6 +71,8 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
69
71
  const dlgOff = (p) => until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
70
72
  /* the Work queue shows one tab at a time: bring up the tab that holds a row before pressing it (each press redraws the tab row, so the button is found again) */
71
73
  const showKey = (p, key) => p.evaluate((key) => { const has = () => document.querySelector(`#qBody .wrow[data-key="${key}"], #waitBody .wrow[data-key="${key}"]`); if (has()) return true; for (const k of [...document.querySelectorAll('#qTabs .qtb')].map((b) => b.dataset.tab)) { document.querySelector(`#qTabs [data-tab="${k}"]`).click(); if (has()) return true; } return false; }, key);
74
+ /* Escape closes the fields sheet first, then the dialog */
75
+ const escAll = async (p) => { await p.keyboard.press('Escape'); if (await p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))) { await sleep(100); await p.keyboard.press('Escape'); } await dlgOff(p); };
72
76
  const qTab = (p, k) => p.click(`#qTabs [data-tab="${k}"]`);
73
77
  const openKey = async (p, key) => { await showKey(p, key); await p.locator(`.wrow[data-key="${key}"] .wrh`).first().click(); await dlgOn(p); await sleep(700); };
74
78
  const undoOf = async (p, direct) => { await until(() => p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent))); if (direct) { /* the Undo window is 8 s; on a loaded runner the real-server steps before this can outlast it, so press the button itself rather than race the toast's fade */ await p.evaluate(() => document.querySelector('#toast .undo').click()); } else await p.locator('#toast .undo').click(); await sleep(250); };
@@ -100,7 +104,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
100
104
  ok('W9 Undo of Add the job posts pm-jobs/delete for that job', A.last().path === '/api/pm-jobs/delete' && A.last().body.id === 'job-new', JSON.stringify(A.last()));
101
105
  await p.click('[data-fx="no"]');
102
106
  ok('W6 Not today posts focus/dismiss with the key', await wait(() => A.last().path === '/api/pm-items/focus/dismiss' && A.last().body.key === 'job:job-1' && Object.keys(A.last().body).join() === 'key'), JSON.stringify(A.last()));
103
- await p.keyboard.press('Escape'); await dlgOff(p);
107
+ await escAll(p);
104
108
  { const m = mk((v) => { v.focus = { suggestions: [], accepted: [{ key: 'job:job-1', title: 'to walk in with a decision ready', why: '1 due today', item_ids: ['item-bbbbbbbbbbb2'], job: 'job-1' }], dismissed: [] }; });
105
109
  const R = await open({ model: m }); const t = await R.page.evaluate(() => ({ bar: document.querySelector('#xFocus').textContent, tag: [...document.querySelectorAll('.xfc')].map((x) => x.closest('.wrow').dataset.key) }));
106
110
  ok('W6 an accepted group is named on the bar and tags its Today row with Focus', /Your focus today/.test(t.bar) && t.tag.join() === 'work:item-bbbbbbbbbbb2', JSON.stringify(t));
@@ -144,7 +148,9 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
144
148
  ok('W3 the dialog stays open and the typed step is cleared', await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !!document.querySelector('#xsIn') && document.querySelector('#xsIn').value === '')));
145
149
  const n1 = pc(); await p.click('[data-p="xsadd"]'); await sleep(250);
146
150
  ok('W3 Add with no text posts nothing', pc() === n1);
147
- await p.keyboard.press('Escape'); await dlgOff(p);
151
+ await p.keyboard.press('Escape');
152
+ ok('W3 Escape closes the fields sheet first and leaves the dialog open', await until(() => p.evaluate(() => document.querySelector('#iSheet').hidden && document.querySelector('#iTog').getAttribute('aria-expanded') === 'false' && document.querySelector('#dlg').classList.contains('on'))));
153
+ await escAll(p);
148
154
 
149
155
  /* W4 Not before */
150
156
  await openKey(p, 'work:item-ccccccccccc1');
@@ -184,17 +190,17 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
184
190
  await p.click('[data-p="ag-brief"]');
185
191
  ok('W7 Let the agent draft this posts act brief with the item, the PM\'s words and the workspace', await wait(() => A.last().path === '/api/my-work/act' && A.last().body.action === 'brief' && A.last().body.item === 'item-aaaaaaaaaaa1' && A.last().body.instruction === 'Draft your reply: partial refunds, short' && 'ws' in A.last().body && Object.keys(A.last().body).sort().join() === 'action,instruction,item,ws'), JSON.stringify(A.last()));
186
192
  ok('W7 the dialog stays open', await p.evaluate(() => document.querySelector('#dlg').classList.contains('on')));
187
- await p.keyboard.press('Escape'); await dlgOff(p);
193
+ await escAll(p);
188
194
  await openKey(p, 'work:item-bbbbbbbbbbb3');
189
195
  ok('W7 a working agent shows its state and only Stop', await p.evaluate(() => document.querySelector('.agblk').dataset.state === 'working' && [...document.querySelectorAll('.agblk button')].map((b) => b.textContent.trim()).join() === 'Stop'));
190
196
  await p.click('[data-p="ag-stop"]');
191
197
  ok('W7 Stop posts the item to stop', await wait(() => A.last().path === '/api/my-work/stop' && A.last().body.item === 'item-bbbbbbbbbbb3' && Object.keys(A.last().body).join() === 'item'), JSON.stringify(A.last()));
192
- await p.keyboard.press('Escape'); await dlgOff(p);
198
+ await escAll(p);
193
199
  await openKey(p, 'work:item-ccccccccccc2');
194
200
  ok('W7 a failed run says why, that nothing was sent, and offers Try again and Stop', await p.evaluate(() => { const b = document.querySelector('.agblk'); return b.dataset.state === 'failed' && /the run ended/.test(b.textContent) && /Nothing was sent/.test(b.textContent) && [...b.querySelectorAll('button')].map((x) => x.textContent.trim()).join() === 'Try again,Stop'; }));
195
201
  await p.click('[data-p="ag-retry"]');
196
202
  ok('W7 Try again posts decide retry', await wait(() => A.last().path === '/api/my-work/decide' && A.last().body.action === 'retry' && A.last().body.item === 'item-ccccccccccc2' && Object.keys(A.last().body).sort().join() === 'action,item'), JSON.stringify(A.last()));
197
- await p.keyboard.press('Escape'); await dlgOff(p);
203
+ await escAll(p);
198
204
 
199
205
  /* W7 a ready draft: nothing is posted before the confirm */
200
206
  const RD = await open({ model: mk((v) => { v.work.today[0].origin = 'jira'; v.work.today[0].place = null; }) }), q = RD.page;
@@ -262,7 +268,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
262
268
  ok('W8 a Today row whose draft is ready offers Review on the right, not Done', /Right arrow: Review/.test(await p.evaluate(() => document.activeElement.getAttribute('aria-description'))));
263
269
  await p.keyboard.press('ArrowRight'); await dlgOn(p);
264
270
  ok('W8 …and Review opens the dialog without posting', pc() === n2 + 0 || A.last().path !== '/api/pm-items/done');
265
- await p.keyboard.press('Escape'); await dlgOff(p);
271
+ await escAll(p);
266
272
  { const r = await open(); const t = r.page;
267
273
  await showKey(t, 'work:item-aaaaaaaaaaa4'); await t.locator('#qBody .wrow[data-key="work:item-aaaaaaaaaaa4"] .wrh').focus(); await t.keyboard.press('ArrowRight');
268
274
  ok('W8 the keys work on a row you added too (flag)', await until(() => r.last() && r.last().path === '/api/pm-items/flag' && r.last().body.id === 'item-aaaaaaaaaaa4'), JSON.stringify(r.last()));
@@ -314,7 +320,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
314
320
  g[k] = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [...document.querySelectorAll('#card button, #card input, #card select')].filter((b) => !b.closest('[hidden]') && b.getBoundingClientRect().height > 0 && b.getBoundingClientRect().height < 43.5).map((b) => (b.dataset.p || b.id) + ':' + Math.round(b.getBoundingClientRect().height)) }));
315
321
  }
316
322
  ok(`W12 at 390 px (${theme}) the edit, steps and Not before panels have no sideways scroll and every control is 44 px`, ['edit', 'steps', 'defer'].every((k) => !g[k].over && g[k].small.length === 0), JSON.stringify(g));
317
- await q2.keyboard.press('Escape'); await dlgOff(q2);
323
+ await escAll(q2);
318
324
  await showKey(R.page, 'work:wbs:alpha:4.2'); await R.page.locator('#qBody .wrow[data-key="work:wbs:alpha:4.2"] .wrh').click(); await dlgOn(q2); await sleep(500); await q2.click('#dTabs [data-t="chat"]'); await sleep(900);
319
325
  const ag = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [...document.querySelectorAll('.agblk button')].filter((b) => b.getBoundingClientRect().height < 43.5).map((b) => b.textContent.trim()) }));
320
326
  ok(`W12 at 390 px (${theme}) the agent block has no sideways scroll and its buttons are 44 px`, !ag.over && ag.small.length === 0, JSON.stringify(ag));
@@ -119,7 +119,7 @@ const WHO = [['you', 'You'], ['agent-drafts', 'Agent drafts'], ['agent-does', 'A
119
119
  const PRIS = ['P1', 'P2', 'P3', ''];
120
120
  let dlgKind = null; // 'item' | 'fjobs': what the open dialog shows
121
121
  let ui = {}; // what is typed or opened in the item dialog; kept across a redraw
122
- const freshUi = () => ({ xp: null, ed: null, dd: '', sn: '', ask: null, body: null, editing: false, confirm: false, back: false, note: '', wo: '', pick: null, round: null, more: false, dpick: null, pane: '' });
122
+ const freshUi = () => ({ xp: null, ed: null, dd: '', sn: '', ask: null, body: null, editing: false, confirm: false, back: false, note: '', wo: '', pick: null, round: null, more: false, dpick: null, pane: '', sheet: false });
123
123
  const dlgOpen = () => $('#dlg').classList.contains('on');
124
124
  const paras = (t) => String(t || '').split(/\n{2,}/).filter((x) => x.trim()).map((x) => `<p>${esc(x.trim()).replace(/\n/g, '<br>')}</p>`).join('');
125
125
 
@@ -193,7 +193,7 @@ function agentInner(r) {
193
193
 
194
194
  /* the dialog's fields (initiative premium-simple-ui): one labelled field for each choice, showing its value from the record, with a chevron.
195
195
  * A field opens its panel under it, one at a time. When holds Today, Not yet, Not before and Someday; Waiting on, Who does it and Priority · Due
196
- * hold the Waiting, Steps and Edit panels. One action bar at the bottom: Done, with Keep it and Drop it beside it. Every press is the same route as before. */
196
+ * hold the Waiting, Steps and Edit panels. Since 2026-10-20 they sit in a sheet behind Edit ▾ (see cardInner). Every press is the same route as before. */
197
197
  const CHEV = '<svg class="i chev" viewBox="0 0 24 24"><path d="m6 9 6 6 6-6"/></svg>';
198
198
  const PLACE = { today: ['Today', ''], inbox: ['Inbox', 'not placed yet'], tray: ['Not placed yet', 'you added it'], upcoming: ['Upcoming', ''], waiting: ['Waiting', ''], someday: ['Someday', ''] };
199
199
  function whenOf(r) {
@@ -236,27 +236,45 @@ function panelHtml(r, x) {
236
236
  }
237
237
  return '';
238
238
  }
239
+ /* the fields live at dialog level (PM, 2026-10-20: "accessible on popup level instead of on the beginning of the chat, and hidden when not needed"):
240
+ * one row beside the Detail / Conversation switch holds Edit ▾ and Done; Edit opens a sheet with the fields and Keep it / Drop it, closed by default,
241
+ * so the conversation gets the whole body. A field with nothing to set for this item (Waiting on when the item cannot wait and waits on nobody) is left out. */
242
+ const SLIDERS = '<svg class="i" viewBox="0 0 24 24"><path d="M4 7h10M18 7h2M4 17h4M12 17h8"/><circle cx="16" cy="7" r="2"/><circle cx="10" cy="17" r="2"/></svg>';
239
243
  function cardInner(r) {
240
244
  const d = r.dialog, a = d.write.actions, x = ui.xp || '', S = d.steps || [], e = d.edit, ag = d.agent;
241
245
  const steps = S.length ? S.length + (S.length === 1 ? ' step' : ' steps') : 'no steps yet';
242
246
  const whos = [...new Set(S.map((s) => (WHO.find((w) => w[0] === s.who) || [0, 'You'])[1]))];
243
247
  const fld = (k, label, val, sub, open = x === k) => fieldHtml(k, label, val, sub, open) + (open ? panelHtml(r, k) : '');
244
- const when = whenOf(r);
245
- let h = '';
246
- /* an agent that is working, ready, failed or posted needs the PM's eye, so its block stays open; one that only can draft is a field */
247
- if (ag && ag.state === 'suggest') h += fld('agent', 'The agent', 'Can draft this for you', ag.mine ? 'nothing leaves PMOS' : 'you read it first');
248
- else h += agentHtml(r);
249
- h += `<div class="ffds">`
248
+ const when = whenOf(r), sum = [when[0], e.waiting_on ? 'waiting on ' + e.waiting_on : '', e.priority || '', e.due ? 'due ' + dayLabel(e.due) : ''].filter(Boolean).join(' · ');
249
+ let f = '';
250
+ if (ag && ag.state === 'suggest') f += fld('agent', 'The agent', 'Can draft this for you', ag.mine ? 'nothing leaves PMOS' : 'you read it first');
251
+ f += `<div class="ffds">`
250
252
  + fieldHtml('when', 'When', when[0], when[1], x === 'when' || x === 'defer') + (x === 'when' || x === 'defer' ? panelHtml(r, x) : '')
251
- + fld('wait', 'Waiting on', e.waiting_on || 'Nobody', '')
253
+ + (a.includes('waiting') || e.waiting_on ? fld('wait', 'Waiting on', e.waiting_on || 'Nobody', '') : '')
252
254
  + fld('steps', 'Who does it', whos.length ? whos.join(', ') : 'You', steps)
253
255
  + fld('edit', 'Priority · Due', e.priority || 'None', e.due ? 'due ' + dayLabel(e.due) : 'no date')
254
256
  + `</div>`;
255
- h += `<div class="fbar"><div class="fmeta">${a.includes('keep') ? '<button class="flink" data-p="keep">Keep it</button>' : ''}<button class="flink" data-p="remove">Drop it</button></div>`
256
- + `<button class="cta fdone" data-p="done">${CHECK}<span>Done</span></button></div>`;
257
- return h + '<p class="nodef err" id="cardErr" role="alert" hidden></p>';
257
+ f += `<div class="fbar"><div class="fmeta">${a.includes('keep') ? '<button class="flink" data-p="keep">Keep it</button>' : ''}<button class="flink" data-p="remove">Drop it</button></div></div>`;
258
+ return `<div class="ibrow"><button class="ichip" id="iTog" data-p="sheet" aria-expanded="${!!ui.sheet}" aria-controls="iSheet" title="Edit when, who and priority">${SLIDERS}<span>Edit</span><em class="isum">${esc(sum)}</em>${CHEV}</button>`
259
+ + `<button class="cta fdone" data-p="done">${CHECK}<span>Done</span></button></div>`
260
+ + `<div class="isheet" id="iSheet" role="group" aria-label="Item fields"${ui.sheet ? ' data-esc-layer' : ' hidden'}>${f}</div>`
261
+ + '<p class="nodef err" id="cardErr" role="alert" hidden></p>';
262
+ }
263
+ /* an agent that is working, ready, failed or posted needs the PM's eye, so its block stays in the conversation; one that only can draft is a field in the sheet */
264
+ const agCardInner = (r) => (r.dialog.agent && r.dialog.agent.state !== 'suggest' ? agentHtml(r) : '');
265
+ const agCardHtml = (r) => { const h = agCardInner(r); return h ? `<div class="acard" id="agCard">${h}</div>` : ''; };
266
+ /* the bar sits in the switch row (#dTabs), which the dialog shows at every width while an item is open */
267
+ function mountBar(r) {
268
+ unmountBar();
269
+ $('#dTabs').insertAdjacentHTML('beforeend', `<div class="ibar" id="card">${cardInner(r)}</div>`);
270
+ $('#dlg').classList.add('itm');
271
+ }
272
+ function unmountBar() { const c = $('#card'); if (c) c.remove(); $('#dlg').classList.remove('itm'); }
273
+ function placeSheet() {
274
+ const s = $('#iSheet'); if (!s || s.hidden) return;
275
+ const dl = $('#dlg').getBoundingClientRect(), t = $('#dTabs').getBoundingClientRect();
276
+ s.style.maxHeight = Math.max(200, dl.bottom - t.bottom - 20) + 'px';
258
277
  }
259
- const cardHtml = (r) => `<div class="acard" id="card">${cardInner(r)}</div>`;
260
278
  function paneHtml(r) {
261
279
  const p = r.dialog.pane, ag = r.dialog.agent, dr = ag && ag.draft && (ag.draft.body || ag.draft.summary) ? ag.draft : null;
262
280
  let h = '';
@@ -289,17 +307,19 @@ $('#oMain').addEventListener('click', async (e) => {
289
307
  function openRow(r) {
290
308
  if (!r) return;
291
309
  openR = r; dlgKind = 'item'; ui = freshUi(); const d = r.dialog;
292
- openDlg({ eye: d.eye + ' · real data', title: r.title, sub: r.sub, say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: r.key, pane: paneHtml(r), label: paneLabel(r) });
293
- ui.pane = paneSig(r);
310
+ openDlg({ eye: d.eye + ' · real data', title: r.title, sub: r.sub, say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + agCardHtml(r), noteKey: r.key, pane: paneHtml(r), label: paneLabel(r) });
294
311
  ui.pane = paneSig(r);
312
+ mountBar(r);
295
313
  loadThread(r.key);
296
314
  setTimeout(() => { const b = $('#dBody'); b.scrollTop = b.scrollHeight; }, 120);
297
315
  }
298
316
  /* redraw the card from what the model and the typed state hold; `sel` is the control to focus again */
299
317
  function paint(sel) {
300
318
  const c = $('#card'); if (!c || !openR) return;
301
- c.innerHTML = cardInner(openR);
302
- if (sel) { const f = $(sel, c); if (f) f.focus(); }
319
+ c.innerHTML = cardInner(openR); placeSheet();
320
+ const ac = $('#agCard'), ah = agCardInner(openR);
321
+ if (ac && ah) ac.innerHTML = ah; else if (ac) ac.remove(); else if (ah) $('#dBody .stream').insertAdjacentHTML('beforeend', agCardHtml(openR));
322
+ if (sel) { const f = $(sel, c) || $(sel, $('#dBody')); if (f) f.focus(); }
303
323
  }
304
324
  function showErr(msg) { const e = $('#cardErr'); if (!e) { toast(msg); return; } e.textContent = msg; e.hidden = false; }
305
325
  const sigOf = (r) => JSON.stringify([r.dialog.agent, r.dialog.steps, r.dialog.defer, r.dialog.someday, r.dialog.edit, r.dialog.write.actions]);
@@ -321,7 +341,7 @@ function toastUndo(msg, undo) {
321
341
  clearTimeout(toastUndo.t); toastUndo.t = setTimeout(() => t.classList.remove('on'), 8000);
322
342
  }
323
343
  async function commit(o) {
324
- if (!o.list) $$('#card button').forEach((b) => { b.disabled = true; });
344
+ if (!o.list) $$('#card button, #agCard button').forEach((b) => { b.disabled = true; });
325
345
  const res = await o.send();
326
346
  if (!res || res.ok !== true) {
327
347
  const msg = (res && res.error) || 'The press was not recorded.';
@@ -381,6 +401,7 @@ function dlgClick(b, r) {
381
401
  case 'notyet': return commit({ send: () => post('/api/pm-items/notyet', { id, when: b.dataset.when }), say: SAID.notyet });
382
402
  case 'waiting': return commit({ send: () => post('/api/pm-items/waiting', { id, on: ($('#wOn').value || '').trim() }), say: SAID.waiting });
383
403
  case 'done': return doneP(r);
404
+ case 'sheet': ui.sheet = !ui.sheet; if (!ui.sheet) ui.xp = null; return paint(ui.sheet ? '#iSheet .ffd' : '#iTog');
384
405
  case 'remove': return commit({ send: () => post('/api/pm-items/remove', { id }), say: SAID.remove, undo: () => post('/api/pm-items/undo', { id }) });
385
406
  case 'flag': return todayP(r);
386
407
  case 'keep': return commit({ send: () => post('/api/pm-items/keep', { id }), say: SAID.keep });
@@ -435,7 +456,7 @@ function dlgClick(b, r) {
435
456
  }
436
457
  }
437
458
  const FIELD = { xeT: 'title', xeD: 'due', xeW: 'wo', xeJ: 'job' };
438
- $('#dBody').addEventListener('input', (e) => {
459
+ const onInput = (e) => {
439
460
  const t = e.target, id = t.id;
440
461
  if (id === 'wOn') { ui.wo = t.value; const b = $('#wBtn'); if (b) b.disabled = !t.value.trim(); }
441
462
  else if (ui.ed && FIELD[id]) ui.ed[FIELD[id]] = t.value;
@@ -444,15 +465,25 @@ $('#dBody').addEventListener('input', (e) => {
444
465
  else if (id === 'agAsk') ui.ask = t.value;
445
466
  else if (id === 'agBody') ui.body = t.value;
446
467
  else if (id === 'agNote') { ui.note = t.value; const g = $('[data-p="ag-sendback"]'); if (g) g.disabled = !t.value.trim(); }
447
- });
448
- $('#dBody').addEventListener('change', (e) => { if (ui.ed && e.target.id === 'xeJ') ui.ed.job = e.target.value; });
449
- $('#dBody').addEventListener('click', (e) => {
468
+ };
469
+ const onChange = (e) => { if (ui.ed && e.target.id === 'xeJ') ui.ed.job = e.target.value; };
470
+ const onClick = (e) => {
450
471
  const lt = e.target.closest('#logT');
451
472
  if (lt) { const c = $('#alog').classList.toggle('col'); lt.setAttribute('aria-expanded', !c); return; }
452
473
  const b = e.target.closest('[data-p]');
453
474
  if (!b || b.disabled || !openR || dlgKind !== 'item') return;
454
475
  dlgClick(b, openR);
455
- });
476
+ };
477
+ /* the conversation and the bar in the switch row take the same presses */
478
+ for (const host of [$('#dBody'), $('#dTabs')]) { host.addEventListener('input', onInput); host.addEventListener('change', onChange); host.addEventListener('click', onClick); }
479
+ const shutSheet = (focus) => { if (!ui.sheet) return; ui.sheet = false; ui.xp = null; paint(focus ? '#iTog' : null); };
480
+ /* the sheet closes on a press outside it, and Escape closes it before the dialog */
481
+ document.addEventListener('pointerdown', (e) => { if (ui.sheet && dlgKind === 'item' && !e.target.closest('#card')) shutSheet(false); });
482
+ addEventListener('keydown', (e) => { if (e.key === 'Escape' && ui.sheet && dlgKind === 'item' && $('#iSheet')) { e.stopImmediatePropagation(); shutSheet(true); } }, true);
483
+ addEventListener('resize', placeSheet);
484
+ /* the bar belongs to the item dialog: it goes when the dialog closes or another dialog takes its place */
485
+ new MutationObserver(() => { if ($('#card') && (!dlgOpen() || dlgKind !== 'item' || !openR || $('#dTitle').textContent !== openR.title)) unmountBar(); })
486
+ .observe($('#dlg'), { attributes: true, attributeFilter: ['class'], childList: true, subtree: true, characterData: true });
456
487
 
457
488
  /* ── Focus and jobs: the bar under the add line, and its dialog ─────────────────────────────────────────────────────────────── */
458
489
  const fBody = (f) => ({ key: f.key, title: f.title, why: f.why, item_ids: f.item_ids, job: f.job || null });
@@ -2499,6 +2499,24 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2499
2499
  .askbar .spad-f .cta{width:auto;height:34px;min-height:34px;padding:0 14px;border-radius:var(--r-chip);display:inline-flex;font-size:var(--fs-2);background:var(--card);color:var(--ink)}
2500
2500
  .askbar .spad-f .cta:disabled{opacity:.5;cursor:not-allowed}
2501
2501
  @media (max-width:700px){.spad-h span{display:none}.askbar .spad textarea{font-size:var(--fs-4)}.padt{min-height:44px}}
2502
+ /* Item fields at dialog level (PM, 2026-10-20): Edit ▾ and Done sit in the Detail / Conversation row; Edit opens the fields as a sheet over the body,
2503
+ closed by default, so the conversation keeps the whole body. On a wide dialog the switch is not drawn, so the row holds the bar alone. */
2504
+ .dlg.itm:not(.srl-open) #dTabs{display:flex!important;align-items:center;gap:8px;position:relative}
2505
+ .dlg.itm[data-mode="detail"] #dTabs .seg{display:none}
2506
+ @media (min-width:1000px){.dlg.itm[data-mode="split"] #dTabs .seg,.dlg.itm.full #dTabs .seg{display:none}.dlg.itm #dTabs{margin:4px 0 12px}}
2507
+ .ibar{margin-left:auto;display:grid;gap:6px;min-width:0}
2508
+ .ibrow{display:flex;align-items:center;justify-content:flex-end;gap:8px}
2509
+ .ichip{display:inline-flex;align-items:center;gap:7px;height:44px;padding:0 14px;border-radius:var(--r-chip);background:var(--well);color:var(--ink);font-size:var(--fs-2);font-weight:600;min-width:0;transition:box-shadow .25s}
2510
+ .ichip:hover,.ichip[aria-expanded="true"]{box-shadow:inset 0 0 0 1.5px var(--b3)}
2511
+ .ichip svg{width:17px;height:17px;flex:none}.ichip .isum{font-style:normal;font-weight:400;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:340px}
2512
+ .ichip .isum:empty{display:none}.ichip .isum::before{content:'· '}
2513
+ .ichip .i:last-child{transition:transform .25s var(--ease)}.ichip[aria-expanded="true"] .i:last-child{transform:rotate(180deg)}
2514
+ .ibar .fdone{width:auto;height:44px;padding:0 18px;font-size:var(--fs-2)}
2515
+ .isheet{position:absolute;z-index:6;right:0;top:calc(100% + 8px);width:min(460px,100%);overflow:auto;display:grid;gap:12px;padding:16px;border-radius:var(--r-in);background:var(--card-solid);box-shadow:inset 0 0 0 1px var(--hair),0 24px 60px -24px rgba(20,24,60,.45);animation:rise .3s var(--ease) both;overscroll-behavior:contain}
2516
+ .isheet[hidden]{display:none}
2517
+ .isheet .fbar{padding-top:10px}
2518
+ .ibar #cardErr{margin:0;text-align:right}
2519
+ @media (max-width:699px){.ichip .isum{display:none}.ichip{padding:0 12px}.ibar .fdone{padding:0 14px}.dlg.itm #dTabs .seg button{padding:0 11px}.isheet{left:0;width:auto}}
2502
2520
  /* a compact dialog (the meeting detail) on a phone: a short head, and once the detail scrolls only the title and the tools stay (PM, 2026-10-20) */
2503
2521
  @media (max-width:999px){.dlg.cmp #dEye{display:none}
2504
2522
  .dlg.cmp .dhead{align-items:center}
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: morning-brief
3
3
  label: "Morning brief"
4
- description: "Prepare today's brief and plan the PM's goals for the day: the calendar with a plan for each meeting, Slack, Jira and Confluence, GitHub, Drive, Figma and the PM's websites, the priorities and what is worth asking. Read-only on every source; it submits the brief to the workspace and sends nothing."
4
+ description: "Prepare today's brief and plan the PM's goals for the day from the calendar and the saved reads of the PM's tools (Slack, Jira, Confluence, mail, Wispr Flow, GitHub, Drive, Figma and websites): a plan for each meeting, the priorities and what is worth asking. Read-only on every source; it submits the brief to the workspace and sends nothing."
5
5
  run: agent
6
6
  agent: claude
7
7
  output:
@@ -17,7 +17,7 @@ output:
17
17
 
18
18
  Rules that always hold:
19
19
  1. READ-ONLY on every source. Never send, reply, forward, post, react, comment, create, edit, accept, decline, transition, label, archive, mark read or delete anything in mail, Slack, Jira, Confluence, GitHub, Drive, Figma, a website, calendar, Wispr Flow or any other source.
20
- 2. SETTINGS DECIDE THE SOURCES AND THE SCOPES. Run `pmos proactive settings`. Read a source only if its line under "brief sources" says on. A source that is off is reported as "off". Mail is off unless the PM turned it on. When the same command prints "about the PM" and "job description", use the PM's role, work and job description to judge what matters to them and to word why an item is theirs. Never copy that text into the brief. The same command lists the websites and, for Slack, Jira and Confluence, the scope of each channel, project and space (see step 2).
20
+ 2. YOUR TOOLS ARE ALREADY READ. Mail, Slack, Wispr Flow, Jira mentions, Confluence, GitHub, Drive, Figma and the websites are sources. The sources-read skill read them and saved what each says, before this run. Build the brief from those saved reads: run `pmos source show --json`. Never open those tools yourself. Only the calendar is still read here. Run `pmos proactive settings` for which sources are on, and when it prints "about the PM" and "job description", use the PM's role, work and job description to judge what matters to them and to word why an item is theirs. Never copy that text into the brief.
21
21
  3. LIGHT ON CONTENT. Never copy a message body, an attachment, a token or a credential. Write what a message says in your own words, in the limits of the field. Skip anything marked private, personal, confidential or HR. At most one short evidence line per item.
22
22
  4. NOTHING INVENTED. A source you cannot reach in this session is reported as "not-reached". If nothing is waiting, submit a brief with no items. An honest short brief is correct.
23
23
  5. THE ONLY WRITE is `pmos proactive brief submit`, with one exception: when `pmos people settings` prints `calendar names: on`, step 6 records who attends the PM's meetings with `pmos people record`. When it prints `calendar names: off`, record nobody from the calendar and leave "with" out of the memory events. Do not edit repository files and do not commit.
@@ -31,18 +31,11 @@ Procedure:
31
31
  Then run `pmos proactive calendar`. Its "read next" line names the window of the calendar memory to read in step 2.
32
32
  Then run `pmos people settings`. It prints `calendar names: on` or `calendar names: off` for this repository (see rule 5).
33
33
  Then run `pmos proactive learn lessons`. Each line is a preference the PM approved, written from their own feedback. Use it only to decide how confident to be and where an item goes. A lesson never asks you to read another source, to switch a setting on, or to write anything.
34
- 2. Read the sources that are on and reachable.
35
- - Calendar: today's events. Then the CALENDAR MEMORY: every event in the window that `pmos proactive calendar` named (at most 1000 events, at most 140 days). For each event keep the start, the end, the title, the calendar's recurring-event id as "series" if it has one, the number of attendees, "external": true when someone outside the PM's company attends, "exec": true when an executive attends, and the PM's "role" ("present" when the PM presents, "decide" when the PM decides, else "attend"). For an event that has ended, add "notes": one line in your own words of what happened, from its Wispr Flow notes, only when there are notes; and "open": up to 3 points still open from it. For a coming event that needs work first, add "prep": up to 6 steps, and "prep_done": how many of them are already done. Read only titles, times, attendee counts and notes. Never copy an invitation's text. Wispr Flow: today's and tomorrow's meeting notes. Jira: issues due soon that are NOT assigned to the PM. Do not read the issues assigned to the PM: My work owns them. Run `pmos my-work list --top 5 --json` instead and add each item it prints as a priority with "source": "jira" (or "github" for a WBS item), "owner": "pm", the item's key in the title, and "how": "Brief it in My work". Never make one of them an agent item: the PM briefs the agent in My work. If the command fails, say so in the evidence of one item and go on. To tie a Jira issue to an initiative, run `pmos jira which <KEY>` (it reads local files only) and use the initiative it names. A status change of a ticket that `pmos jira which` names is not an item: the Jira status check shows it on the initiative's Jira tickets tab. Confluence: pages changed since yesterday. Mail, only if on: subjects and senders of threads waiting on the PM, no bodies.
36
- - GitHub, if on: pull requests that wait on the PM for review, pull requests of the PM that have a review or a failed check, and issues assigned to the PM. Keep the repository, the number, the title and the state.
37
- - Drive, if on: files shared with the PM or changed since yesterday that a meeting or a goal names. Keep the name, the owner and the link.
38
- - Figma, if on: files the PM owns or was asked to look at, with new comments since yesterday. Keep the file, the commenter and a short paraphrase of the comment.
39
- - Website, if on: read each address in the websites list once, only to see what changed that matters to a goal or a meeting. Report what changed in one line. Do not follow links to other sites.
40
- - LIST THE PLACES THE PM IS IN, for each of Slack, Jira and Confluence that you read: the Slack channels the PM is a member of (public and private, not direct messages), the Jira projects the PM works in (projects with issues assigned to, reported by or watched by the PM), and the Confluence spaces the PM is a member of or has written in. Keep only the name (for example "#pm-team", "PRICE", "Product") and the link. Report them under "places" (see step 4). This list is how the PM sets a scope for each place, so list every place, not only the busy ones. Read only the names: do not read messages to make this list.
41
- - Slack, Jira and Confluence take a scope for each name. Read the scopes from `pmos proactive settings`. A name with no scope is "search".
42
- - watch: read EVERY message or comment since the last read (yesterday morning if there is none). Then write one digest (see step 4) with the decisions made, the open questions, and what touches a goal. Write the digest, not the messages.
43
- - search: do not read the place. Look only for MENTIONS of the PM and for the words of the PM's goals and initiatives.
44
- - ignore: do not read the place. Do not search it. Do not report it.
45
- - MENTIONS of the PM since yesterday morning, in every place that is not ignored: Slack messages that @-mention the PM or are direct messages to them; Jira issues and comments that mention the PM; Confluence pages and comments that mention the PM. For each, keep only where it is (channel, issue key, page title), who wrote it, the link to the conversation itself, and a short paraphrase of what is asked. Never copy the message itself.
34
+ 2. Read the calendar, and take everything else from the saved reads.
35
+ - Calendar: today's events. Then the CALENDAR MEMORY: every event in the window that `pmos proactive calendar` named (at most 1000 events, at most 140 days). For each event keep the start, the end, the title, the calendar's recurring-event id as "series" if it has one, the number of attendees, "external": true when someone outside the PM's company attends, "exec": true when an executive attends, and the PM's "role" ("present" when the PM presents, "decide" when the PM decides, else "attend"). For an event that has ended, add "notes": one line in your own words of what happened, from the saved Wispr Flow read, only when it has notes for that meeting; and "open": up to 3 points still open from it. For a coming event that needs work first, add "prep": up to 6 steps, and "prep_done": how many of them are already done. Read only titles, times and attendee counts. Never copy an invitation's text.
36
+ - THE SAVED READS. Run `pmos source show --json`. It prints one read per tool: its "state" (read, not-reached or off), its "read_at", its "items" (who, where, what is asked, the link, "mention" when it mentions the PM), its "digests" (one per watched Slack channel, Jira project or Confluence space) and its "places". In the brief, give each tool the state of its saved read. A tool with no saved read, or whose read is older than yesterday morning, is "not-reached": say in the evidence of one item that its read is old. Never add an item of a tool whose state is not "read".
37
+ - Turn the saved items into brief items (step 3). Keep their link, where, who, about, ask, mention, reply_needed, due and thread as they are, and give the item the tool as its "source". Copy each saved digest into "digests" with its tool as "source", and each saved place into "places".
38
+ - Jira issues assigned to the PM are not in the saved reads: My work owns them. Run `pmos my-work list --top 5 --json` and add each item it prints as a priority with "source": "jira" (or "github" for a WBS item), "owner": "pm", the item's key in the title, and "how": "Brief it in My work". Never make one of them an agent item: the PM briefs the agent in My work. If the command fails, say so in the evidence of one item and go on. To tie a Jira issue to an initiative, run `pmos jira which <KEY>` (it reads local files only) and use the initiative it names. A status change of a ticket that `pmos jira which` names is not an item: the Jira status check shows it on the initiative's Jira tickets tab.
46
39
  3. PLAN EACH OPEN GOAL. For each open goal, find what moves it today in what you read and in `pmos proactive today`: a meeting where it is decided, a mention that blocks it, an issue or page it needs, a step an agent can prepare. Write each as an item with "goal": "<the goal id>". An agent step names the initiative it advances, so the PM can prepare it from Today. A calendar event that belongs to a goal also gets "goal". If you find nothing for a goal, write nothing for it: the workspace shows that goal as needing a plan. Never invent a step.
47
40
  Then ANTICIPATE: for each other thing the PM should act on today (a mention waiting on them, a meeting to prepare for, an issue due), write one item with no goal.
48
41
  PLAN EACH MEETING. For each calendar event that is a meeting, write what it is for and how to be ready. Use the Wispr Flow notes of the earlier meetings in the series, the related mail (only if mail is on) and the related Jira, Confluence, Drive and Slack items you read. Do not guess: leave a field out when you have no basis for it.