create-pmos 0.291.0 → 0.293.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.291.0",
3
+ "version": "0.293.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": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@f217528
1
+ kernel-source: pmos@4c0d137
2
2
  assembled: 2026-10-19
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-19T03:45:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T04:24:11Z"}
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-19T03:45:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T04:24:11Z"}
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-19T03:45:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T04:24:11Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -19,6 +19,7 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
19
19
  const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
20
20
  const results = [];
21
21
  const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
22
+ const more = async (pg) => { if (await pg.locator('#card [data-p="more"][aria-expanded="false"]').count()) await pg.click('#card [data-p="more"]'); };
22
23
  let srv = null; let browser = null;
23
24
  const finish = async (code) => {
24
25
  if (browser) await browser.close().catch(() => {});
@@ -125,7 +126,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
125
126
  {
126
127
  const n = A.posts.length;
127
128
  await p.locator('.wrow[data-key="work:wbs:alpha:4.2"] .wck.dec').click(); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(500);
128
- ok('M8 the eye circle opens the item to review the draft and posts nothing', A.posts.length === n && (await p.textContent('#dTitle')) === 'Sign off the fit-out contractor shortlist' && /Agent draft, not checked/.test(await p.textContent('#oMain')));
129
+ ok('M8 the eye circle opens the item to review the draft and posts nothing', A.posts.length === n && (await p.textContent('#dTitle')) === 'Sign off the fit-out contractor shortlist' && /Agent draft · not checked/.test(await p.textContent('#oMain')));
129
130
  await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
130
131
  }
131
132
  const openKey = async (key) => { await p.locator(`.wrow[data-key="${key}"] .wrh`).first().click(); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(700); };
@@ -138,18 +139,21 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
138
139
  await p.locator('#toast .undo').click();
139
140
  ok('M8 Undo posts Reopen for that item', await until(() => A.posts.some((x) => x.path === '/api/pm-items/reopen' && x.body.id === 'item-bbbbbbbbbbb2')));
140
141
  await openKey('work:item-aaaaaaaaaaa1');
141
- const dlg = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, btn: [...document.querySelectorAll('#card button')].map((b) => b.textContent.trim()), mod: document.querySelector('#dlg').getAttribute('aria-modal'), ask: !!document.querySelector('#askGo'), wDis: document.querySelector('#wBtn').disabled }));
142
- ok('M8 a dialog offers the agent, Done, Not yet, Move to, the tool row, Waiting and Drop, and the agent box; Keep only where the review list holds the item', dlg.title === 'Decide how partial refunds are handled' && dlg.btn.slice(3).join() === 'Let the agent draft this,Done,Later today,Tomorrow,Next week,Do today,Edit,Who does each step,Not before…,Someday,Wait for them,Drop it' && dlg.mod === 'true' && dlg.ask && dlg.wDis, JSON.stringify(dlg));
142
+ const dlg = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, btn: [...document.querySelectorAll('#card button')].map((b) => b.textContent.trim()), mod: document.querySelector('#dlg').getAttribute('aria-modal'), ask: !!document.querySelector('#askGo'), wDis: true }));
143
+ const quiet = dlg.btn.slice(3).join();
144
+ await more(p); dlg.btn = [...(await p.evaluate(() => [...document.querySelectorAll('#card button')].map((b) => b.textContent.trim())))]; dlg.wDis = await p.evaluate(() => document.querySelector('#wBtn').disabled);
145
+ ok('M8 a dialog offers the agent, Done, Not yet, Do today, More and Drop it; More opens the tool row and Waiting, and the agent box; Keep only where the review list holds the item', dlg.title === 'Decide how partial refunds are handled' && quiet === 'Let the agent draft this,Done,Later today,Tomorrow,Next week,Do today,More,Drop it' && dlg.btn.slice(3).join() === 'Let the agent draft this,Done,Later today,Tomorrow,Next week,Do today,Fewer options,Drop it,Edit,Who does each step,Not before…,Someday,Wait for them' && dlg.mod === 'true' && dlg.ask && dlg.wDis, JSON.stringify(dlg));
143
146
  await p.locator('#card [data-p="notyet"][data-when="tomorrow"]').click();
144
147
  ok('M8 Not yet posts the item and the day, and closes the dialog', await until(() => A.posts.some((x) => x.path === '/api/pm-items/notyet' && x.body.id === 'item-aaaaaaaaaaa1' && x.body.when === 'tomorrow' && Object.keys(x.body).sort().join() === 'id,when')) && await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on'))));
145
148
  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']]) {
146
149
  await openKey('work:item-aaaaaaaaaaa2'); const n = A.posts.length;
150
+ if (sel.includes('someday')) await more(p);
147
151
  await p.locator('#card ' + sel).click();
148
152
  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()));
149
153
  await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
150
154
  }
151
155
  ok('M8 Done and Drop offer Undo for a short time', await p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent)));
152
- await openKey('work:item-aaaaaaaaaaa3'); await p.fill('#wOn', ' Priya ');
156
+ await openKey('work:item-aaaaaaaaaaa3'); await more(p); await p.fill('#wOn', ' Priya ');
153
157
  ok('M8 Waiting needs a name', await p.evaluate(() => !document.querySelector('#wBtn').disabled));
154
158
  await p.click('#wBtn');
155
159
  ok('M8 Waiting posts the name', await until(() => A.posts.some((x) => x.path === '/api/pm-items/waiting' && x.body.id === 'item-aaaaaaaaaaa3' && x.body.on === 'Priya')));
@@ -189,7 +189,13 @@ My work is the second place on the rail, at `/premium-work.html`. It reads the l
189
189
 
190
190
  **Row suggestions and buttons.** A row shows a suggestion line only when a record backs it: an agent's offer on the item, a draft that is ready, or a date. A row also has one button: Today, Tomorrow, Review, or Give to agent. Give to agent opens the item, where you start the agent. A row from Jira shows its Jira key.
191
191
 
192
- **The agent's draft.** In an item's dialog the draft shows as formatted text, with a list of the agent's turns under it. **View round** opens the text of that round.
192
+ **Weekly review.** A card lists five steps: sort the inbox, place your tray, check who owes you, review agent drafts, and look at what sat untouched. Each step shows a count from your list and opens its first item. **Start the review** opens the first step that has something. On a Friday the card reads Friday review. PMOS keeps no review schedule and no timing, so the card shows none. The tray's tabs are drawn from your own items (see below). Answers, ideas and reports an agent files by itself are not shown, because PMOS holds no records for them.
193
+
194
+ **Tray tabs.** The tray has six tabs, each built from your item records: **To place**, **Ready** (an agent draft is ready), **Working** (an agent is running), **Kept** (you pressed Keep), **Used** (done in the last 7 days) and **Compost** (untouched for the review days). A row shows a button that fits its tab: Today, Review, Use it, or Let go.
195
+
196
+ **The item dialog.** The dialog shows **Done**, **Not yet** (Later today, Tomorrow, Next week, Do today) and **Drop it**. **More** opens the rest: Edit, Who does each step, Not before, Someday and Waiting on someone. Every action stays reachable.
197
+
198
+ **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**. 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.
193
199
 
194
200
  **An agent's offer.** When an agent has offered to draft an item, the dialog shows three choices: let the agent draft it (suggested), do it today, or not before next Monday. You pick one and press its button. A row with steps says how many it has and how many an agent can do. PMOS does not record that a step is done, so it shows no "done" count.
195
201
 
@@ -209,7 +215,7 @@ My work is the second place on the rail, at `/premium-work.html`. It reads the l
209
215
  - **Focus** sits under the add line. It shows the first of the (at most three) things PMOS suggests for today, grouped by the job they serve, with **Accept**. **See all** lists them with Accept, Not today and Clear, and your jobs with their open counts, and **Add a job** takes one line (`when …, I want …, so …`). An accepted group tags its Today rows with Focus. Focus starts empty each day. Editing and deleting a job stay in the console.
210
216
  - **Keys and swipe** work on the rows of the plate and the tray. J and K move between rows. The right arrow, or a drag to the right past 90 px, does Done on a Today row and In Today elsewhere; the left arrow, or a drag to the left, does Tomorrow on a Today row and Someday elsewhere. A Today row whose draft is ready offers Review on the right. A row in Waiting has none. Each one offers Undo, and under reduced motion the row does not slide.
211
217
 
212
- Not drawn, because no record backs them: the tray's lifecycle states, the shelf, "fold the laundry", the week bars and the capacity figure, and the mockup's suggested place on an inbox item.
218
+ Not drawn, because no record backs them: answers and ideas an agent files by itself, "fold the laundry", the week bars and the capacity figure, and the mockup's suggested place on an inbox item.
213
219
 
214
220
  ## Board
215
221
 
@@ -23,6 +23,7 @@ const dateLine = (ms) => { const d = new Date(ms); return WEEKDAYS[d.getDay()] +
23
23
  const isoDay = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? new Date(+m[1], +m[2] - 1, +m[3]) : null; };
24
24
  const shortDate = (iso) => { const d = isoDay(iso); return d ? d.getDate() + ' ' + MON[d.getMonth()] : ''; };
25
25
  const daysBetween = (fromIso, toIso) => { const a = isoDay(fromIso), b = isoDay(toIso); return a && b ? Math.round((b - a) / 86400000) : null; };
26
+ const daysAgo = (iso, n) => { const d = isoDay(iso); d.setDate(d.getDate() - n); return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()); };
26
27
  const clip = (s, n) => { s = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return s.length > n ? s.slice(0, n - 1).trimEnd() + '…' : s; };
27
28
  const MAX_PER = 8;
28
29
  const SECTIONS = [['inbox', 'Inbox'], ['today', 'Today'], ['upcoming', 'Upcoming'], ['someday', 'Someday']];
@@ -109,6 +110,21 @@ function weekOf({ today, items, events }) {
109
110
  note: (read ? 'Bars are meeting time from your calendar. ' : 'The calendar could not be read, so there are no bars. ') + 'Done and due counts come from your list. PMOS holds no estimate or working hours, so it does not say what will not fit.' };
110
111
  }
111
112
 
113
+ /** The weekly review: a count and a first item for each place the PM sorts things. Every figure is a count of the list. No step time is made: PMOS does not time a review. */
114
+ function fridayOf({ today, work, tray, ready, review }) {
115
+ const first = (a) => (a[0] ? 'work:' + (a[0].it ? a[0].it.id : a[0].id) : null);
116
+ const steps = [
117
+ { key: 'inbox', label: 'Sort the inbox', n: (work.inbox || []).length, first: first(work.inbox || []) },
118
+ { key: 'tray', label: 'Place your tray', n: tray.length, first: first(tray) },
119
+ { key: 'waiting', label: 'Check who owes you', n: (work.waiting || []).length, first: first(work.waiting || []) },
120
+ { key: 'drafts', label: 'Review agent drafts', n: ready.length, first: first(ready) },
121
+ { key: 'stale', label: 'Look at what sat untouched', n: review.length, first: first(review) },
122
+ ];
123
+ const fri = isoDay(today).getDay() === 5;
124
+ return { title: fri ? 'Friday review' : 'Weekly review', cap: steps.filter((x) => x.n).length + ' of ' + steps.length + ' have something', steps, start: (steps.find((x) => x.n) || {}).key || null,
125
+ note: 'One step for each place a thing waits for you. A step opens its first item. PMOS keeps no review schedule or timing, so none is shown.' };
126
+ }
127
+
112
128
  function rowOf(it, list, v, inReview, focusIds) {
113
129
  const today = v.today, { chip, overdue } = dueChip(it, today);
114
130
  const sub = [srcLabel(it) + (it.key && it.source !== 'local' ? ' ' + it.key : ''), it.priority, it.waiting_on ? 'waiting on ' + it.waiting_on : null, (it.steps || []).length ? (it.steps || []).length + ' ' + plural((it.steps || []).length, 'step', 'steps') + ((it.steps || []).some((x) => x.who === 'agent-does' || x.who === 'agent-drafts') ? ' · agent can do ' + (it.steps || []).filter((x) => x.who !== 'you').length : '') : null].filter(Boolean).join(' · ');
@@ -197,7 +213,25 @@ function build({ v, now, events }) {
197
213
  const waitingRows = (work.waiting || []).slice(0, MAX_PER).map((it) => rowOf(it, 'waiting', v, reviewIds.has(it.id), focusIds));
198
214
  const agentRows = ready.concat(running, failed.filter((x) => !ready.includes(x))).slice(0, MAX_PER).map((x) => rowOf(x.it, x.list, v, reviewIds.has(x.it.id), focusIds));
199
215
  const trayRows = tray.slice(0, MAX_PER).map((it) => rowOf(it, 'tray', v, reviewIds.has(it.id), focusIds));
200
- const rowsAll = [].concat(...sections.map((s) => s.rows), waitingRows, agentRows, trayRows);
216
+ const shelf = shelfOf();
217
+ const rowsAll = [].concat(...sections.map((s) => s.rows), waitingRows, agentRows, trayRows, ...shelf.tabs.map((t) => t.rows));
218
+ /* The tray as tabs, from the item records alone: To place, Ready (an agent draft is ready), Working (an agent runs), Kept (a Keep press was recorded), Used (done in the last 7 days), Compost (untouched for the review days). */
219
+ function shelfOf() {
220
+ const loc = (v.items || all.map((x) => x.it)).filter(isLocal);
221
+ const rowFor = (it, cta) => { const r = rowOf(it, 'tray', v, reviewIds.has(it.id), focusIds); r.cta = cta; return r; };
222
+ const week = daysAgo(today, 7);
223
+ const open = loc.filter((it) => !it.done);
224
+ const tabs = [
225
+ ['place', 'To place', tray.filter((it) => !isReady(it) && !isRunning(it) && !reviewIds.has(it.id)), { label: 'Today', act: 'today' }],
226
+ ['ready', 'Ready', tray.filter(isReady), { label: 'Review', act: 'open' }],
227
+ ['working', 'Working', tray.filter(isRunning), null],
228
+ ['kept', 'Kept', open.filter((it) => it.kept_at), { label: 'Use it', act: 'done' }],
229
+ ['used', 'Used', loc.filter((it) => it.done && String(it.done_at || '').slice(0, 10) >= week), null],
230
+ ['compost', 'Compost', tray.filter((it) => reviewIds.has(it.id)), { label: 'Let go', act: 'letgo' }],
231
+ ];
232
+ return { tabs: tabs.map(([key, label, items, cta]) => ({ key, label, n: items.length, more: Math.max(0, items.length - MAX_PER), rows: items.slice(0, MAX_PER).map((it) => rowFor(it, cta)) })),
233
+ note: 'Tabs come from your items: a draft ready, an agent running, a Keep you pressed, an item done this week, or one untouched for ' + (v.review_days || 7) + ' days. Answers and ideas an agent files on its own are not shown: PMOS holds no record of them.' };
234
+ }
201
235
  const firstToday = sections[1].rows[0];
202
236
  const model = {
203
237
  date: dateLine(now), today, pending: false,
@@ -210,6 +244,8 @@ function build({ v, now, events }) {
210
244
  waiting: { title: 'Waiting on others', cap: longest != null ? 'longest ' + longest + ' ' + plural(longest, 'day', 'days') : (work.waiting || []).length ? num(work.waiting.length) + ' waiting' : '', n: (work.waiting || []).length, more: Math.max(0, (work.waiting || []).length - MAX_PER), rows: waitingRows },
211
245
  review: { n: (v.review || []).length, days: v.review_days, ids: (v.review || []).map((i) => i.id) },
212
246
  dock: { needs: clear, label: 'to clear', next: firstToday ? firstToday.title : (sections[0].rows[0] ? sections[0].rows[0].title : null) },
247
+ shelf,
248
+ friday: fridayOf({ today, work, tray, ready, review: v.review || [] }),
213
249
  week: weekOf({ today, items: v.items || all.map((x) => x.it), events }),
214
250
  focus, jobs,
215
251
  rows: rowsAll,
@@ -141,7 +141,7 @@ function fold(lines) {
141
141
  items.set(ev.id, { ...items.get(ev.id), done: true, done_at: ev.at, done_how: DONE_HOW.includes(ev.how) ? ev.how : 'you', touched_at: ev.at, ...outcome });
142
142
  }
143
143
  else if (ev.event === 'reopened' && items.has(ev.id)) items.set(ev.id, { ...items.get(ev.id), done: false, done_at: null, done_how: null, touched_at: ev.at });
144
- else if (ev.event === 'kept' && items.has(ev.id)) items.set(ev.id, { ...items.get(ev.id), touched_at: ev.at });
144
+ else if (ev.event === 'kept' && items.has(ev.id)) items.set(ev.id, { ...items.get(ev.id), touched_at: ev.at, kept_at: ev.at });
145
145
  else if (ev.event === 'dropped' || ev.event === 'deleted') items.delete(ev.id);
146
146
  }
147
147
  return [...items.values()];
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.291.0",
3
+ "version": "0.293.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.291.0",
9
+ "version": "0.293.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.291.0",
3
+ "version": "0.293.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",
@@ -17,6 +17,7 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
17
17
  const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
18
18
  const results = [];
19
19
  const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
20
+ const more = async (pg) => { if (await pg.locator('#card [data-p="more"][aria-expanded="false"]').count()) await pg.click('#card [data-p="more"]'); };
20
21
  let srv = null; let browser = null;
21
22
  const finish = async (code) => {
22
23
  if (browser) await browser.close().catch(() => {});
@@ -105,7 +106,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
105
106
 
106
107
  /* W2 edit */
107
108
  await openKey(p, 'work:item-aaaaaaaaaaa1');
108
- await p.click('[data-p="xt"][data-k="edit"]');
109
+ await more(p); await p.click('[data-p="xt"][data-k="edit"]');
109
110
  const ed = await p.evaluate(() => ({ dis: document.querySelector('#xeT').disabled, note: document.querySelector('.xpan .note').textContent, exp: document.querySelector('[data-p="xt"][data-k="edit"]').getAttribute('aria-expanded') }));
110
111
  ok('W2 a title owned by Jira is read-only and says why', ed.dis && /comes from Jira/.test(ed.note) && ed.exp === 'true', JSON.stringify(ed));
111
112
  const n0 = pc(); await p.click('[data-p="xsave"]'); await sleep(300);
@@ -117,16 +118,16 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
117
118
  ok('W9 Undo of Save posts the old values back', A.last().path === '/api/pm-items/edit' && JSON.stringify(A.last().body.fields) === JSON.stringify({ due: null, priority: null, job: null }), JSON.stringify(A.last()));
118
119
  await dlgOff(p);
119
120
  await openKey(p, 'work:item-bbbbbbbbbbb2');
120
- await p.click('[data-p="xt"][data-k="edit"]'); await p.fill('#xeT', 'Prepare for the Design review (final)'); await p.fill('#xeW', 'Priya');
121
+ await more(p); await p.click('[data-p="xt"][data-k="edit"]'); await p.fill('#xeT', 'Prepare for the Design review (final)'); await p.fill('#xeW', 'Priya');
121
122
  await p.click('[data-p="xsave"]');
122
123
  ok('W2 a local title can change, and a name in Waiting on goes to the waiting route', await wait(() => A.posts.some((x) => x.path === '/api/pm-items/edit' && x.body.id === 'item-bbbbbbbbbbb2' && JSON.stringify(x.body.fields) === JSON.stringify({ title: 'Prepare for the Design review (final)' })) && A.last().path === '/api/pm-items/waiting' && A.last().body.on === 'Priya'), JSON.stringify(A.last()));
123
124
  await dlgOff(p);
124
125
 
125
126
  /* W3 steps */
126
127
  await openKey(p, 'work:item-bbbbbbbbbbb2');
127
- const sbtn = await txt('[data-p="xt"][data-k="steps"]');
128
+ await more(p); const sbtn = await txt('[data-p="xt"][data-k="steps"]');
128
129
  ok('W3 the tool row counts the item\'s steps', /Who does each step · 2/.test(sbtn), sbtn);
129
- await p.click('[data-p="xt"][data-k="steps"]');
130
+ await more(p); await p.click('[data-p="xt"][data-k="steps"]');
130
131
  const st = await p.evaluate(() => ({ items: [...document.querySelectorAll('.xsteps li .xst')].map((x) => x.textContent), pressed: [...document.querySelectorAll('.xsteps [aria-pressed="true"]')].map((x) => x.textContent), h: [...document.querySelectorAll('.xpan .cta, .xpan input')].map((b) => Math.round(b.getBoundingClientRect().height)) }));
131
132
  ok('W3 each step shows who does it, from the record', st.items.join('|') === 'List the open questions|Send the agenda to the team' && st.pressed.join() === 'You,Agent drafts' && st.h.every((x) => x >= 44), JSON.stringify(st));
132
133
  A.replies['/api/pm-items/steps/who'] = { ok: true, who: 'agent-drafts', forced: true };
@@ -142,8 +143,8 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
142
143
 
143
144
  /* W4 Not before */
144
145
  await openKey(p, 'work:item-ccccccccccc1');
145
- ok('W4 an item with a Not before day says it on the tool', /From 18 Oct/.test(await txt('[data-p="xt"][data-k="defer"]')));
146
- await p.click('[data-p="xt"][data-k="defer"]');
146
+ await more(p); ok('W4 an item with a Not before day says it on the tool', /From 18 Oct/.test(await txt('[data-p="xt"][data-k="defer"]')));
147
+ await more(p); await p.click('[data-p="xt"][data-k="defer"]');
147
148
  const dq = await p.evaluate(() => [...document.querySelectorAll('[data-p="xdq"]')].map((b) => [b.textContent, b.dataset.v].join('=')));
148
149
  ok('W4 Tomorrow, Monday and In a week are dates from the server\'s day (Fri 16 Oct)', dq.join() === 'Tomorrow=2026-10-17,Monday=2026-10-19,In a week=2026-10-23', dq.join());
149
150
  await p.click('[data-p="xdq"][data-v="2026-10-19"]');
@@ -151,7 +152,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
151
152
  await undoOf(p);
152
153
  ok('W9 Undo restores the earlier day', A.last().path === '/api/pm-items/defer' && A.last().body.until === '2026-10-18', JSON.stringify(A.last()));
153
154
  await dlgOff(p);
154
- await openKey(p, 'work:item-ccccccccccc1'); await p.click('[data-p="xt"][data-k="defer"]');
155
+ await openKey(p, 'work:item-ccccccccccc1'); await more(p); await p.click('[data-p="xt"][data-k="defer"]');
155
156
  ok('W4 a date field turns the button on and names the day', await p.evaluate(() => document.querySelector('[data-p="xdgo"]').disabled) && (await p.fill('#xdD', '2026-11-02'), await p.evaluate(() => !document.querySelector('[data-p="xdgo"]').disabled && /Not before 2 Nov/.test(document.querySelector('[data-p="xdgo"]').textContent))));
156
157
  await p.click('[data-p="xdclr"]');
157
158
  ok('W4 Clear the date posts until null', await wait(() => A.last().path === '/api/pm-items/defer' && A.last().body.until === null), JSON.stringify(A.last()));
@@ -159,14 +160,14 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
159
160
 
160
161
  /* W5 Someday */
161
162
  await openKey(p, 'work:item-aaaaaaaaaaa2');
162
- await p.click('[data-p="xt"][data-k="someday"]');
163
+ await more(p); await p.click('[data-p="xt"][data-k="someday"]');
163
164
  ok('W5 Someday posts the id to someday', await wait(() => A.last().path === '/api/pm-items/someday' && A.last().body.id === 'item-aaaaaaaaaaa2' && Object.keys(A.last().body).join() === 'id'), JSON.stringify(A.last()));
164
165
  await undoOf(p);
165
166
  ok('W9 Undo posts unpark', A.last().path === '/api/pm-items/unpark' && A.last().body.id === 'item-aaaaaaaaaaa2', JSON.stringify(A.last()));
166
167
  await dlgOff(p);
167
168
  await openKey(p, 'work:item-eeeeeeeeeee1');
168
- ok('W5 an item already in Someday says so and the press brings it back', /In Someday/.test(await txt('[data-p="xt"][data-k="someday"]')) && await p.evaluate(() => document.querySelector('[data-p="xt"][data-k="someday"]').getAttribute('aria-pressed') === 'true'));
169
- await p.click('[data-p="xt"][data-k="someday"]');
169
+ await more(p); ok('W5 an item already in Someday says so and the press brings it back', /In Someday/.test(await txt('[data-p="xt"][data-k="someday"]')) && await p.evaluate(() => document.querySelector('[data-p="xt"][data-k="someday"]').getAttribute('aria-pressed') === 'true'));
170
+ await more(p); await p.click('[data-p="xt"][data-k="someday"]');
170
171
  ok('W5 …by posting unpark', await wait(() => A.last().path === '/api/pm-items/unpark' && A.last().body.id === 'item-eeeeeeeeeee1'), JSON.stringify(A.last()));
171
172
  await dlgOff(p);
172
173
 
@@ -193,39 +194,39 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
193
194
  /* W7 a ready draft: nothing is posted before the confirm */
194
195
  const RD = await open({ model: mk((v) => { v.work.today[0].origin = 'jira'; v.work.today[0].place = null; }) }), q = RD.page;
195
196
  await openKey(q, 'work:wbs:alpha:4.2');
196
- const rd = await q.evaluate(() => ({ state: document.querySelector('.agblk').dataset.state, tag: document.querySelector('.agdraft .agtag').textContent, body: document.querySelector('.agdraft').textContent, btn: [...document.querySelectorAll('.agblk > .cact button')].map((b) => b.textContent.trim()) }));
197
- ok('W7 a ready draft is labelled the agent\'s, unchecked, and offers Post, Edit, Send back and Mark done', rd.state === 'ready' && /Agent draft · not checked/.test(rd.tag) && /sign off A and B/.test(rd.body) && rd.btn.join() === 'Post it to Jira,Edit the draft,Send it back with a note,Mark it done', JSON.stringify(rd));
197
+ const rd = await q.evaluate(() => ({ state: document.querySelector('.agblk').dataset.state, tag: document.querySelector('.agpane .agtag').textContent, body: document.querySelector('.agpane').textContent, btn: [...document.querySelectorAll('.agblk .xco b, .agblk > .cact button')].map((b) => b.textContent.trim()), copy: !!document.querySelector('[data-pp="copy"]'), open: !!document.querySelector('[data-pp="open"]') }));
198
+ ok('W7 a ready draft is labelled the agent\'s, unchecked, and shows it in the detail panel with Open and Copy, and offers Post, Edit, Keep, Mark done and Send back', rd.state === 'ready' && /Agent draft · not checked/.test(rd.tag) && /sign off A and B/.test(rd.body) && rd.copy && rd.open && rd.btn.join() === 'Post it to Jira,Edit the draft,Keep it as a draft,Mark it done,Post it to Jira,Send it back with a note', JSON.stringify(rd));
198
199
  const m0 = RD.posts.length; await q.click('[data-p="ag-post"]'); await sleep(300);
199
200
  const cf = await q.evaluate(() => ({ text: document.querySelector('.xcon').textContent, btn: [...document.querySelectorAll('.xcon button')].map((b) => b.textContent.trim()) }));
200
201
  ok('W7 Post it posts nothing: it asks, names Jira and shows exactly the text', RD.posts.length === m0 && /Post this to Jira as you\?/.test(cf.text) && /Two of the three quotes meet the brief\. I would sign off A and B\./.test(cf.text) && cf.btn.join() === 'Post it to Jira now,Not yet', JSON.stringify(cf));
201
202
  await q.click('[data-p="ag-no"]'); await sleep(200);
202
203
  ok('W7 Not yet takes the confirm away and still posts nothing', RD.posts.length === m0 && await q.evaluate(() => !document.querySelector('.xcon')));
203
- await q.click('[data-p="ag-edit"]'); await q.fill('#agBody', 'Sign off A only.');
204
+ await q.click('[data-p="dpick"][data-v="edit"]'); await q.fill('#agBody', 'Sign off A only.');
204
205
  await q.click('[data-p="ag-save"]');
205
206
  ok('W7 Save my version posts decide edit with the text', await until(() => RD.last() && RD.last().path === '/api/my-work/decide' && RD.last().body.action === 'edit' && RD.last().body.body === 'Sign off A only.' && RD.last().body.item === 'wbs:alpha:4.2'), JSON.stringify(RD.last()));
206
- await q.click('[data-p="ag-post"]'); await q.click('[data-p="ag-go"]');
207
+ await q.click('[data-p="dpick"][data-v="post"]'); await q.click('[data-p="ag-post"]'); await q.click('[data-p="ag-go"]');
207
208
  ok('W7 the confirm posts decide approve, with the PM\'s text because it was edited', await until(() => RD.last().path === '/api/my-work/decide' && RD.last().body.action === 'approve' && RD.last().body.body === 'Sign off A only.' && RD.last().body.item === 'wbs:alpha:4.2'), JSON.stringify(RD.last()));
208
- await q.click('[data-p="ag-edit"]'); await q.click('[data-p="ag-edit"]');
209
+ await q.click('[data-p="ag-edit"]');
209
210
  await q.click('[data-p="ag-post"]'); await q.click('[data-p="ag-go"]');
210
211
  ok('W7 approving the agent\'s own text sends no body', await until(() => RD.posts.filter((x) => x.body.action === 'approve').length === 2) && !('body' in RD.posts.filter((x) => x.body.action === 'approve')[1].body) || true);
211
212
  await q.click('[data-p="ag-back"]');
212
213
  ok('W7 Send it back needs a note', await q.evaluate(() => document.querySelector('[data-p="ag-sendback"]').disabled));
213
214
  await q.fill('#agNote', 'Cover the third quote too.'); await q.click('[data-p="ag-sendback"]');
214
215
  ok('W7 Send it back posts decide revise with the note', await until(() => RD.last().body.action === 'revise' && RD.last().body.note === 'Cover the third quote too.' && RD.last().body.item === 'wbs:alpha:4.2'), JSON.stringify(RD.last()));
215
- await q.click('[data-p="ag-done"]');
216
+ await q.click('[data-p="dpick"][data-v="done"]'); await q.click('[data-p="ag-done"]');
216
217
  ok('W7 Mark it done posts done for the item and nothing outward', await until(() => RD.last().path === '/api/pm-items/done' && RD.last().body.id === 'wbs:alpha:4.2'), JSON.stringify(RD.last()));
217
218
  ok('W7 every press of the agent block went to a listed route, and none to Jira or Slack', RD.posts.every((x) => ALLOWED.has(x.path)), RD.posts.map((x) => x.path).join());
218
219
  await RD.ctx.close();
219
220
  { const M2 = mk((v) => { v.work.today[1].agent = F.A('ready', { draft: { summary: 'First version', body: 'A first version of the agenda.' } }); });
220
221
  const R = await open({ model: M2 }); await openKey(R.page, 'work:item-bbbbbbbbbbb2');
221
- const b = await R.page.evaluate(() => [...document.querySelectorAll('.agblk > .cact button')].map((x) => x.textContent.trim()));
222
- ok('W7 an item the PM added has no Post: nothing leaves PMOS, it can be kept or marked done', b.join() === 'Edit the draft,Send it back with a note,Mark it done' && /Nothing went to anyone/.test(await R.page.evaluate(() => document.querySelector('.agblk .nodef').textContent)), b.join());
222
+ const b = await R.page.evaluate(() => [...document.querySelectorAll('.agblk .xco b')].map((x) => x.textContent.trim()));
223
+ ok('W7 an item the PM added has no Post: nothing leaves PMOS, it can be kept or marked done', b.join() === 'Edit the draft,Keep it as a draft,Mark it done' && /Nothing went to anyone/.test(await R.page.evaluate(() => document.querySelector('.agblk .nodef').textContent)), b.join());
223
224
  await R.ctx.close(); }
224
225
 
225
226
  /* W11 a refusal shows its reason and changes nothing */
226
227
  { const R = await open(); await openKey(R.page, 'work:item-bbbbbbbbbbb2');
227
228
  R.refuse({ status: 409, body: { ok: false, error: 'the draft moved on while you read it' } });
228
- await R.page.click('[data-p="xt"][data-k="someday"]'); await sleep(500);
229
+ await more(R.page); await R.page.click('[data-p="xt"][data-k="someday"]'); await sleep(500);
229
230
  const e = await R.page.evaluate(() => ({ open: document.querySelector('#dlg').classList.contains('on'), msg: document.querySelector('#cardErr').textContent, shown: !document.querySelector('#cardErr').hidden, dis: [...document.querySelectorAll('#card button')].filter((b) => b.disabled && b.id !== 'wBtn').length }));
230
231
  ok('W11 a refused press shows the server\'s words, keeps the dialog open and leaves the buttons on', e.open && e.shown && /the draft moved on/.test(e.msg) && e.dis === 0, JSON.stringify(e));
231
232
  await R.ctx.close(); }
@@ -304,7 +305,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
304
305
  await openKey(q2, 'work:item-bbbbbbbbbbb2'); await q2.click('#dTabs [data-t="chat"]'); await sleep(900);
305
306
  const g = {};
306
307
  for (const k of ['edit', 'steps', 'defer']) {
307
- await q2.click(`[data-p="xt"][data-k="${k}"]`); await sleep(150);
308
+ await more(q2); await q2.click(`[data-p="xt"][data-k="${k}"]`); await sleep(150);
308
309
  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)) }));
309
310
  }
310
311
  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));
@@ -327,7 +328,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
327
328
  ok('E1 on an empty scratch state the page says the list is empty and Focus has nothing to suggest', await until(() => pg.evaluate(() => document.querySelector('#brief').textContent === 'Your list is empty.' && /Nothing to suggest/.test(document.querySelector('#xFocus').textContent)), 20000));
328
329
  await pg.fill('#capIn', 'Reply to Rina about SSO !p1'); await pg.press('#capIn', 'Enter');
329
330
  await dlgOn(pg); await sleep(700);
330
- await pg.click('[data-p="xt"][data-k="edit"]'); await pg.fill('#xeT', 'Reply to Rina about SSO beta'); await pg.fill('#xeD', '2026-10-30'); await pg.click('[data-p="xpri"][data-v="P2"]'); await pg.click('[data-p="xsave"]');
331
+ await more(pg); await pg.click('[data-p="xt"][data-k="edit"]'); await pg.fill('#xeT', 'Reply to Rina about SSO beta'); await pg.fill('#xeD', '2026-10-30'); await pg.click('[data-p="xpri"][data-v="P2"]'); await pg.click('[data-p="xsave"]');
331
332
  await dlgOff(pg);
332
333
  let it = (await get('/api/pm-items')).items.find((i) => /SSO beta/.test(i.title));
333
334
  ok('E2 Edit saves the title, the day and the priority through the real route', it && it.title === 'Reply to Rina about SSO beta' && it.due === '2026-10-30' && it.priority === 'P2', JSON.stringify(it));
@@ -335,13 +336,13 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
335
336
  it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
336
337
  ok('E3 Undo writes the old values back (the title the parser made, no day, P1)', it.title === 'Reply to Rina about SSO !' && !it.due && it.priority === 'P1', JSON.stringify(it));
337
338
  await pg.locator('#trayBody .wrh').first().click(); await dlgOn(pg); await sleep(700);
338
- await pg.click('[data-p="xt"][data-k="steps"]');
339
+ await more(pg); await pg.click('[data-p="xt"][data-k="steps"]');
339
340
  await pg.fill('#xsIn', 'Send the SSO plan to Rina'); await pg.click('[data-p="xsadd"]');
340
341
  ok('E4 a step is added through the real route', await until(async () => ((await get('/api/pm-items')).items.find((i) => i.id === it.id) || {}).steps && (await get('/api/pm-items')).items.find((i) => i.id === it.id).steps.length === 1, 8000));
341
342
  await pg.click('[data-p="xwho"][data-v="agent-does"]');
342
343
  const sid = (await get('/api/pm-items')).items.find((i) => i.id === it.id).steps[0];
343
344
  ok('E5 an outward step asked to be Agent does comes back as Agent drafts, and the page says so', await until(async () => ((await get('/api/pm-items')).items.find((i) => i.id === it.id).steps[0] || {}).who === 'agent-drafts', 8000) && await pg.evaluate(() => /Agent drafts/.test(document.querySelector('#toast').textContent) || /sends something to a person/.test(document.querySelector('.xpan .note').textContent)) && sid.text === 'Send the SSO plan to Rina');
344
- await pg.click('[data-p="xt"][data-k="defer"]'); await pg.click('[data-p="xdq"][data-v]:nth-of-type(1)');
345
+ await more(pg); await pg.click('[data-p="xt"][data-k="defer"]'); await pg.click('[data-p="xdq"][data-v]:nth-of-type(1)');
345
346
  await dlgOff(pg);
346
347
  it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
347
348
  ok('E6 Not before sets the defer day on the real record (tomorrow, the server\'s day)', /^\d{4}-\d{2}-\d{2}$/.test(it.defer || '') && it.defer > (await get('/api/pm-items')).today, JSON.stringify(it));
@@ -350,7 +351,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
350
351
  ok('E7 Undo clears it', !it.defer, JSON.stringify(it));
351
352
  await pg.locator('.wrow, #trayBody .wrh').first().click({ trial: true }).catch(() => {});
352
353
  await pg.locator('#trayBody .wrh').first().click(); await dlgOn(pg); await sleep(700);
353
- await pg.click('[data-p="xt"][data-k="someday"]'); await dlgOff(pg);
354
+ await more(pg); await pg.click('[data-p="xt"][data-k="someday"]'); await dlgOff(pg);
354
355
  ok('E8 Someday parks the real record', (await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
355
356
  await undoOf(pg, true); await sleep(300);
356
357
  ok('E9 Undo brings it back (unpark)', !(await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
@@ -72,12 +72,18 @@ function drawPlate() {
72
72
  }
73
73
  $('#plateBody').innerHTML = h;
74
74
  }
75
+ let shelfTab = null;
75
76
  function drawTray() {
76
- const T = M.tray;
77
+ const T = M.tray, Sh = M.shelf;
77
78
  $('#trayCap').textContent = T.cap;
78
- $('#trayBody').innerHTML = T.rows.length ? T.rows.map((r) => rowHtml(r)).join('') + (T.more ? `<p class="note">${T.more} more not shown here.</p>` : '') : '<p class="empty3 plain">Nothing in your tray. Add a line above and it lands here first.</p>';
79
- $('#trayNote').textContent = T.note;
79
+ const tabs = Sh.tabs;
80
+ if (!shelfTab || !tabs.some((t) => t.key === shelfTab)) shelfTab = (tabs.find((t) => t.n) || tabs[0]).key;
81
+ const cur = tabs.find((t) => t.key === shelfTab);
82
+ $('#trayTabs').innerHTML = tabs.map((t) => `<button type="button" role="tab" class="stb" data-tab="${t.key}" aria-selected="${t.key === shelfTab}">${esc(t.label)} <b>${t.n}</b></button>`).join('');
83
+ $('#trayBody').innerHTML = cur.rows.length ? cur.rows.map((r) => rowHtml(r)).join('') + (cur.more ? `<p class="note">${cur.more} more not shown here.</p>` : '') : `<p class="empty3 plain">${cur.key === 'place' ? 'Nothing in your tray. Add a line above and it lands here first.' : 'Nothing here.'}</p>`;
84
+ $('#trayNote').textContent = T.note + ' ' + Sh.note;
80
85
  }
86
+ $('#trayTabs').addEventListener('click', (e) => { const b = e.target.closest('[data-tab]'); if (!b) return; shelfTab = b.dataset.tab; drawTray(); const n = $(`#trayTabs [data-tab="${shelfTab}"]`); if (n) n.focus(); });
81
87
  function drawAgents() {
82
88
  const A = M.agents, c = A.counts;
83
89
  $('#agCap').textContent = A.cap;
@@ -95,6 +101,17 @@ function drawReview() {
95
101
  $('#revCap').textContent = R.n + ' ' + (R.n === 1 ? 'item' : 'items');
96
102
  $('#revTxt').innerHTML = `<b>${R.n}</b> ${R.n === 1 ? 'item has' : 'items have'} sat untouched for ${R.days} days. Open one to keep it or let it go.`;
97
103
  }
104
+ function drawFriday() {
105
+ const F = M.friday; if (!F) return;
106
+ $('#hFr').textContent = F.title; $('#frCap').textContent = F.cap;
107
+ $('#frBody').innerHTML = `<ol class="frl">${F.steps.map((s, i) => `<li><button type="button" class="frs" data-fr="${s.key}"${s.n ? '' : ' disabled'}><i>${i + 1}</i><span>${esc(s.label)}</span><b>${s.n}</b></button></li>`).join('')}</ol>`
108
+ + `<div class="cact two"><button type="button" class="cta" data-fr="${F.start || ''}"${F.start ? '' : ' disabled'}><span>${F.start ? 'Start the review' : 'Nothing to review'}</span></button></div><p class="note" style="margin-top:12px">${esc(F.note)}</p>`;
109
+ }
110
+ $('#frBody').addEventListener('click', (e) => {
111
+ const b = e.target.closest('[data-fr]'); if (!b || !b.dataset.fr || !M || !M.friday) return;
112
+ const st = M.friday.steps.find((x) => x.key === b.dataset.fr); const r = st && st.first ? rowOf(st.first) : null;
113
+ if (r) openRow(r); else toast('Nothing to open here.');
114
+ });
98
115
  function drawWeek() {
99
116
  const W = M.week; if (!W) return;
100
117
  $('#weekCap').textContent = W.cap;
@@ -105,7 +122,7 @@ function drawWeek() {
105
122
  return `<div class="wkc${d.today ? ' now' : ''}${d.past ? ' past' : ''}" role="listitem" aria-label="${esc(d.dow + ' ' + d.n + ': ' + (W.calendar ? (d.meet_min ? hrs + ' of meetings, ' : 'no meetings, ') : '') + d.done + ' done, ' + d.due + ' due')}"><span class="wkl">${d.dow}</span><b>${d.n}</b><span class="wkb">${h ? `<i style="height:${h}%"></i>` : ''}</span><span class="wkt">${W.calendar ? (hrs || 'free') : '·'}</span><span class="wkn">${d.done} done${d.due ? ' · ' + d.due + ' due' : ''}</span></div>`;
106
123
  }).join('')}</div><p class="note" style="margin-top:12px">${esc(W.note)}</p>`;
107
124
  }
108
- function draw() { drawHero(); drawWeek(); drawFocus(); drawPlate(); drawTray(); drawAgents(); drawWaiting(); drawReview(); drawDock(); onScroll(); backFocus(); }
125
+ function draw() { drawHero(); drawWeek(); drawFriday(); drawFocus(); drawPlate(); drawTray(); drawAgents(); drawWaiting(); drawReview(); drawDock(); onScroll(); backFocus(); }
109
126
  const rowOf = (key) => (M && M.rows || []).find((r) => r.key === key) || null;
110
127
 
111
128
  /* ── the dialog: detail first, the presses of the Work page, the tool row, the agent, the read-only agent beside it ─────────────────── */
@@ -114,7 +131,7 @@ const WHO = [['you', 'You'], ['agent-drafts', 'Agent drafts'], ['agent-does', 'A
114
131
  const PRIS = ['P1', 'P2', 'P3', ''];
115
132
  let dlgKind = null; // 'item' | 'fjobs': what the open dialog shows
116
133
  let ui = {}; // what is typed or opened in the item dialog; kept across a redraw
117
- const freshUi = () => ({ xp: null, ed: null, dd: '', sn: '', ask: null, body: null, editing: false, confirm: false, back: false, note: '', wo: '', pick: null, round: null });
134
+ 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: '' });
118
135
  const dlgOpen = () => $('#dlg').classList.contains('on');
119
136
  const paras = (t) => String(t || '').split(/\n{2,}/).filter((x) => x.trim()).map((x) => `<p>${esc(x.trim()).replace(/\n/g, '<br>')}</p>`).join('');
120
137
 
@@ -129,12 +146,36 @@ function choicesHtml(r, a) {
129
146
  + `<div class="cact two"><button class="cta" data-p="${go[0]}"><span>${esc(go[1])}</span></button></div>`;
130
147
  }
131
148
 
149
+ /* the console's "Or decide" cards: Post (outward, suggested), Edit, Keep as a draft, Mark done. One go button does the picked one. */
150
+ const DECIDE = (a, step, w) => [
151
+ ...(!a.mine || step ? [['post', step ? 'Do the step' : 'Post it to ' + w, 'Suggested', [['lock', step ? 'Outward: exactly this step' : 'Outward: exactly this text'], ['out', step ? 'A session with Chrome does it' : 'Goes to ' + w + ' as you']]]] : []),
152
+ ['edit', 'Edit the draft', '', [[null, step ? 'The step then uses your version' : a.mine ? 'Your version replaces the draft here' : 'Post then sends your version']]],
153
+ ['keep', 'Keep it as a draft', a.mine ? 'Suggested' : '', [[null, 'Nothing leaves PMOS']]],
154
+ ['done', 'Mark it done', '', [[null, 'Closes the item. Nothing is posted']]],
155
+ ];
156
+ function decideHtml(r, a, step, w) {
157
+ const opts = DECIDE(a, step, w), pick = opts.some((o) => o[0] === ui.dpick) ? ui.dpick : opts[0][0], cur = opts.find((o) => o[0] === pick);
158
+ const go = { post: ['ag-post', cur[1]], edit: ['ag-save', 'Save my version'], keep: ['ag-keep', 'Keep it as a draft'], done: ['ag-done', 'Mark it done'] }[pick];
159
+ let h = `<p class="xlab">Or decide</p><div class="xch" role="radiogroup" aria-label="What to do with the draft">${opts.map((o) => `<button class="xco" role="radio" data-p="dpick" data-v="${o[0]}" aria-checked="${pick === o[0]}">${o[2] ? `<em>${o[2]}</em>` : ''}<b>${esc(o[1])}</b>${o[3].map((f) => `<span class="${f[0] ? 'xwarn' : ''}">${esc(f[1])}</span>`).join('')}</button>`).join('')}</div>`;
160
+ if (ui.editing) h += `<label class="whyl" for="agBody">Your text for the draft</label><textarea class="ta" id="agBody" rows="8">${esc(ui.body == null ? (a.draft && a.draft.body) || '' : ui.body)}</textarea>`;
161
+ if (ui.confirm) {
162
+ const txt = ui.editing && ui.body != null ? ui.body : (a.draft && a.draft.body) || (a.draft && a.draft.summary) || '';
163
+ h += `<div class="xcon" role="group" aria-label="Confirm"><p><b>${step ? 'Do this step?' : `Post this to ${esc(w)} as you?`}</b></p>`
164
+ + (step ? `<p>A new session with Chrome does exactly this step and nothing else:</p><p class="xq">${esc(step)}</p>` : `<p>Exactly this text goes:</p><p class="xq">${esc(txt).replace(/\n/g, '<br>')}</p>`)
165
+ + `<div class="cact two"><button class="cta" data-p="ag-go"><span>${step ? 'Do the step now' : `Post it to ${esc(w)} now`}</span></button><button class="cta alt" data-p="ag-no"><span>Not yet</span></button></div></div>`;
166
+ } else {
167
+ h += `<div class="cact two"><button class="cta" data-p="${go[0]}"><span>${esc(go[1])}</span></button>${ui.editing ? '<button class="cta alt" data-p="ag-edit"><span>Use the agent’s text</span></button>' : ''}<button class="cta alt" data-p="ag-back" aria-expanded="${ui.back}"><span>Send it back with a note</span></button></div>`;
168
+ if (ui.back) h += `<label class="whyl" for="agNote">Tell the agent what to change</label><textarea class="ta" id="agNote" rows="3" maxlength="500">${esc(ui.note)}</textarea><div class="cact two"><button class="cta" data-p="ag-sendback"${ui.note.trim() ? '' : ' disabled'}><span>Send it back</span></button></div><p class="nodef">The agent drafts it again. ${a.mine ? 'Nothing leaves PMOS.' : `Nothing goes to ${esc(w)} or to anyone.`}</p>`;
169
+ }
170
+ return h;
171
+ }
172
+
132
173
  /* the agent block: one state, the controls that state allows, and nothing is posted before the confirm */
133
174
  function agentHtml(r) {
134
175
  const a = r.dialog.agent;
135
176
  if (!a) return '';
136
177
  const w = a.where || 'anyone', dr = a.draft;
137
- const draftBox = dr && dr.body ? `<div class="agdraft"><p class="agtag">Agent draft · not checked</p><div class="mdr">${mdHtml(dr.body)}</div></div>${turnsHtml(a)}` : dr && dr.summary ? `<div class="agdraft"><p class="agtag">Agent draft · not checked</p><p>${esc(dr.summary)}</p></div>` : '';
178
+ const draftBox = (dr && (dr.body || dr.summary) ? '<p class="nodef">The draft is on the right.</p>' : '') + turnsHtml(a); // the draft itself sits in the detail panel
138
179
  let h = '';
139
180
  if (a.state === 'suggest') {
140
181
  h = `<p class="nodef">${a.mine ? 'The agent can draft a first version of this for you. You read it here. Nothing leaves PMOS.' : `The agent can draft this for you. You read it here first. Nothing goes to ${esc(w)} until you post it.`}</p>`
@@ -148,21 +189,7 @@ function agentHtml(r) {
148
189
  } else if (a.state === 'ready') {
149
190
  const step = dr && dr.step;
150
191
  h = `<p class="nodef">${step ? 'Draft ready. The step has not run.' : `Draft ready. Nothing went to ${esc(a.mine ? 'anyone' : w)}.`}</p>`;
151
- if (ui.editing) h += `<label class="whyl" for="agBody">Your text for the draft</label><textarea class="ta" id="agBody" rows="8">${esc(ui.body == null ? (dr && dr.body) || '' : ui.body)}</textarea><p class="nodef">${a.mine ? 'Your version replaces the draft here.' : step ? 'The step then uses your version.' : 'Post then sends your version.'}</p>`;
152
- else h += draftBox;
153
- if (ui.confirm) {
154
- const txt = ui.editing && ui.body != null ? ui.body : (dr && dr.body) || (dr && dr.summary) || '';
155
- h += `<div class="xcon" role="group" aria-label="Confirm"><p><b>${step ? 'Do this step?' : `Post this to ${esc(w)} as you?`}</b></p>`
156
- + (step ? `<p>A new session with Chrome does exactly this step and nothing else:</p><p class="xq">${esc(step)}</p>` : `<p>Exactly this text goes:</p><p class="xq">${esc(txt).replace(/\n/g, '<br>')}</p>`)
157
- + `<div class="cact two"><button class="cta" data-p="ag-go"><span>${step ? 'Do the step now' : `Post it to ${esc(w)} now`}</span></button><button class="cta alt" data-p="ag-no"><span>Not yet</span></button></div></div>`;
158
- } else {
159
- h += '<div class="cact two">';
160
- if (!a.mine || step) h += `<button class="cta" data-p="ag-post"><span>${step ? 'Do the step' : `Post it to ${esc(w)}`}</span></button>`;
161
- h += `<button class="cta alt" data-p="ag-edit" aria-expanded="${ui.editing}"><span>${ui.editing ? 'Use the agent’s text' : 'Edit the draft'}</span></button>`;
162
- if (ui.editing) h += `<button class="cta alt" data-p="ag-save"><span>Save my version</span></button>`;
163
- h += `<button class="cta alt" data-p="ag-back" aria-expanded="${ui.back}"><span>Send it back with a note</span></button><button class="cta alt" data-p="ag-done"><span>Mark it done</span></button></div>`;
164
- if (ui.back) h += `<label class="whyl" for="agNote">Tell the agent what to change</label><textarea class="ta" id="agNote" rows="3" maxlength="500">${esc(ui.note)}</textarea><div class="cact two"><button class="cta" data-p="ag-sendback"${ui.note.trim() ? '' : ' disabled'}><span>Send it back</span></button></div><p class="nodef">The agent drafts it again. ${a.mine ? 'Nothing leaves PMOS.' : `Nothing goes to ${esc(w)} or to anyone.`}</p>`;
165
- }
192
+ h += draftBox + decideHtml(r, a, step, w);
166
193
  } else if (a.state === 'failed') {
167
194
  h = `<p class="nodef" role="status">${a.asks && a.error ? esc(a.error.charAt(0).toUpperCase() + a.error.slice(1)) + ' Nothing was sent.' : `The agent stopped${a.error ? ': ' + esc(a.error) : '.'} Nothing was sent.`}</p>${draftBox}`
168
195
  + `<div class="cact two"><button class="cta" data-p="ag-retry"><span>Try again</span></button><button class="cta alt" data-p="ag-stop"><span>Stop</span></button></div>`;
@@ -201,28 +228,49 @@ function toolsHtml(r) {
201
228
  }
202
229
  function cardInner(r) {
203
230
  const d = r.dialog, a = d.write.actions;
204
- const move = a.includes('flag') ? [['flag', 'Do today']] : [];
231
+ const open = ui.more || !!ui.xp, move = a.includes('flag');
232
+ const more = toolsHtml(r)
233
+ + (a.includes('waiting') ? `<label class="whyl" for="wOn">Waiting on someone</label><div class="cact two"><input id="wOn" class="why one" maxlength="80" placeholder="A name" autocomplete="off" value="${esc(ui.wo)}"><button class="cta quiet" data-p="waiting" id="wBtn"${ui.wo.trim() ? '' : ' disabled'}><span>Wait for them</span></button></div>` : '');
205
234
  return agentHtml(r) + `<p class="ct">What you can do</p>`
206
235
  + `<div class="cact two"><button class="cta" data-p="done">${CHECK}<span>Done</span></button>${a.includes('keep') ? '<button class="cta quiet" data-p="keep"><span>Keep it</span></button>' : ''}</div>`
207
- + `<div class="mv2">Not yet <span class="seg2">${NOTYET.map(([k, t]) => `<button data-p="notyet" data-when="${k}">${t}</button>`).join('')}</span></div>`
208
- + (move.length ? `<div class="mv2">Move to <span class="seg2">${move.map(([k, t]) => `<button data-p="${k}">${t}</button>`).join('')}</span></div>` : '')
209
- + toolsHtml(r)
210
- + (a.includes('waiting') ? `<label class="whyl" for="wOn">Waiting on someone</label><div class="cact two"><input id="wOn" class="why one" maxlength="80" placeholder="A name" autocomplete="off" value="${esc(ui.wo)}"><button class="cta quiet" data-p="waiting" id="wBtn"${ui.wo.trim() ? '' : ' disabled'}><span>Wait for them</span></button></div>` : '')
211
- + `<div class="cact"><button class="cta quiet" data-p="remove"><span>Drop it</span></button></div>`
236
+ + `<div class="mv2">Not yet <span class="seg2">${NOTYET.map(([k, t]) => `<button data-p="notyet" data-when="${k}">${t}</button>`).join('')}${move ? '<button data-p="flag">Do today</button>' : ''}</span></div>`
237
+ + `<div class="cact two"><button class="cta quiet xmore" data-p="more" aria-expanded="${open}" aria-controls="xmoreBox"><span>${open ? 'Fewer options' : 'More'}</span></button><button class="cta quiet" data-p="remove"><span>Drop it</span></button></div>`
238
+ + (open ? `<div id="xmoreBox" class="xmorebox">${more}</div>` : '')
212
239
  + '<p class="nodef err" id="cardErr" role="alert" hidden></p>';
213
240
  }
214
241
  const cardHtml = (r) => `<div class="acard" id="card">${cardInner(r)}</div>`;
215
242
  function paneHtml(r) {
216
- const p = r.dialog.pane;
217
- let h = `<p class="dpath">${esc(p.file)}</p>${p.h ? `<h3 class="d1">${esc(p.h)}</h3>` : ''}${p.intro ? `<p>${esc(p.intro)}</p>` : ''}`; // the heading and lead line, as the mockup draws them
218
- if (p.rows && p.rows.length) h += `<div class="kv2">${p.rows.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div>`;
219
- if (p.paras && p.paras.length) h += `<h3 class="d2">${esc(p.parasTitle)}</h3>${p.paras.map((x) => `<p>${esc(x)}</p>`).join('')}`;
220
- return `<article class="paper doc">${h}<p class="xn">The item as your list holds it.</p></article>`;
243
+ const p = r.dialog.pane, ag = r.dialog.agent, dr = ag && ag.draft && (ag.draft.body || ag.draft.summary) ? ag.draft : null;
244
+ let h = '';
245
+ if (dr) {
246
+ const last = ag.turns && ag.turns.length ? ag.turns[ag.turns.length - 1] : null;
247
+ h += `<article class="paper doc agpane"><div class="agpt"><p class="agtag">Agent draft · not checked${last ? ' · ' + esc(KIND[last.kind] || '') : ''}</p><span class="agpa"><button class="xtb" data-pp="open" type="button">Open</button><button class="xtb" data-pp="copy" type="button">Copy</button></span></div><div class="mdr">${mdHtml(dr.body || dr.summary)}</div></article>`;
248
+ }
249
+ let g = `<p class="dpath">${esc(p.file)}</p>${p.h ? `<h3 class="d1">${esc(p.h)}</h3>` : ''}${p.intro ? `<p>${esc(p.intro)}</p>` : ''}`; // the heading and lead line, as the mockup draws them
250
+ if (p.rows && p.rows.length) g += `<div class="kv2">${p.rows.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div>`;
251
+ return h + `<article class="paper doc">${g}<p class="xn">The item as your list holds it.</p></article>`;
221
252
  }
253
+ const paneLabel = (r) => (r.dialog.agent && r.dialog.agent.draft && (r.dialog.agent.draft.body || r.dialog.agent.draft.summary) ? 'Draft and item record' : r.dialog.pane.label);
254
+ const paneSig = (r) => JSON.stringify([r.dialog.agent && r.dialog.agent.draft, r.dialog.pane]);
255
+ /* the detail panel follows the item: a draft that lands while the dialog is open shows at once */
256
+ function paintPane() {
257
+ if (!openR || dlgKind !== 'item') return;
258
+ const sg = paneSig(openR); if (sg === ui.pane) return;
259
+ ui.pane = sg; const m = $('#oMain'), top = m.scrollTop;
260
+ m.innerHTML = paneHtml(openR); $('#oLab').textContent = paneLabel(openR); m.scrollTop = top;
261
+ }
262
+ $('#oMain').addEventListener('click', async (e) => {
263
+ const b = e.target.closest('[data-pp]'); if (!b || dlgKind !== 'item' || !openR) return;
264
+ const ag = openR.dialog.agent, txt = (ag && ag.draft && (ag.draft.body || ag.draft.summary)) || '';
265
+ if (b.dataset.pp === 'copy') { try { await navigator.clipboard.writeText(txt); toast('Draft copied.'); } catch (_) { toast('Copy did not work here. Select the text and copy it.'); } }
266
+ else { const u = URL.createObjectURL(new Blob([txt], { type: 'text/plain;charset=utf-8' })); window.open(u, '_blank', 'noopener'); setTimeout(() => URL.revokeObjectURL(u), 60000); }
267
+ });
222
268
  function openRow(r) {
223
269
  if (!r) return;
224
270
  openR = r; dlgKind = 'item'; ui = freshUi(); const d = r.dialog;
225
- 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: d.pane.label });
271
+ 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) });
272
+ ui.pane = paneSig(r);
273
+ ui.pane = paneSig(r);
226
274
  loadThread(r.key);
227
275
  setTimeout(() => { const b = $('#dBody'); b.scrollTop = b.scrollHeight; }, 120);
228
276
  }
@@ -240,7 +288,7 @@ function refreshOpen() {
240
288
  if (!n) { closeDlg(); openR = null; return; }
241
289
  const changed = sigOf(n) !== sigOf(openR);
242
290
  openR = n;
243
- if (changed) paint();
291
+ if (changed) { paint(); paintPane(); }
244
292
  }
245
293
 
246
294
  /* a press: the page waits for the route's answer; a refusal shows its reason and changes nothing.
@@ -319,6 +367,7 @@ function dlgClick(b, r) {
319
367
  case 'ag-today': return todayP(r);
320
368
  case 'ag-nb': return deferP(r, nextMonday(M.today));
321
369
  case 'round': ui.round = ui.round === +b.dataset.i ? null : +b.dataset.i; return paint(`[data-p="round"][data-i="${b.dataset.i}"]`);
370
+ case 'more': ui.more = !ui.more; if (!ui.more) ui.xp = null; return paint('[data-p="more"]');
322
371
  case 'xt': {
323
372
  const t = b.dataset.k;
324
373
  if (t === 'someday') return somedayP(r);
@@ -344,9 +393,11 @@ function dlgClick(b, r) {
344
393
  }
345
394
  case 'ag-stop': return commit({ keep: true, send: () => post('/api/my-work/stop', { item: id }), say: 'Stopped. Nothing was kept.' });
346
395
  case 'ag-retry': return commit({ keep: true, send: () => post('/api/my-work/decide', { item: id, action: 'retry' }), say: 'The agent tries again.' });
347
- case 'ag-edit': ui.editing = !ui.editing; ui.confirm = false; if (ui.editing && ui.body == null) ui.body = (a.draft && a.draft.body) || ''; return paint(ui.editing ? '#agBody' : '[data-p="ag-edit"]');
396
+ case 'ag-edit': ui.editing = false; ui.body = null; ui.confirm = false; ui.dpick = 'post'; return paint('[data-p="dpick"][data-v="post"]');
348
397
  case 'ag-save': return commit({ keep: true, send: () => post('/api/my-work/decide', { item: id, action: 'edit', body: ui.body }), say: a.mine ? 'Saved. The draft stays here.' : `Saved. Post sends your text to ${a.where}.` });
349
398
  case 'ag-post': ui.confirm = true; return paint('[data-p="ag-go"]');
399
+ case 'dpick': ui.dpick = b.dataset.v; ui.confirm = false; if (ui.dpick === 'edit' && !ui.editing) { ui.editing = true; if (ui.body == null) ui.body = (a.draft && a.draft.body) || ''; } return paint(`[data-p="dpick"][data-v="${b.dataset.v}"]`);
400
+ case 'ag-keep': closeDlg(); openR = null; toast(a.mine ? 'Kept. The draft stays on this item.' : 'Kept as a draft. Nothing was posted.'); return null;
350
401
  case 'ag-no': ui.confirm = false; return paint('[data-p="ag-post"]');
351
402
  case 'ag-go': {
352
403
  const body = { item: id, action: 'approve' };
@@ -464,7 +515,7 @@ async function listClick(e) {
464
515
  const r = rowOf(cta.dataset.key); if (!r) return;
465
516
  const o = { list: true };
466
517
  refocus = null;
467
- if (cta.dataset.act === 'open') openRow(r); else if (cta.dataset.act === 'tomorrow') deferP(r, addIso(M.today, 1), o); else todayP(r, o);
518
+ if (cta.dataset.act === 'open') openRow(r); else if (cta.dataset.act === 'tomorrow') deferP(r, addIso(M.today, 1), o); else if (cta.dataset.act === 'done') doneP(r, o); else if (cta.dataset.act === 'letgo') commit({ ...o, send: () => post('/api/pm-items/remove', { id: r.id }), say: SAID.remove, undo: () => post('/api/pm-items/undo', { id: r.id }) }); else todayP(r, o);
468
519
  return;
469
520
  }
470
521
  const ck = e.target.closest('.wck');
@@ -1896,3 +1896,19 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
1896
1896
  .dsbody .dsat i{width:18px;height:18px;border-radius:50%;background:var(--well);display:grid;place-items:center;font:600 10px var(--mono);font-style:normal;color:var(--ink-2)}
1897
1897
  .rdbar .rdsp{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
1898
1898
  .rdbar .dsvw:last-child .dsmn,.rdbar .rdsp .dsmn{left:auto;right:0}
1899
+
1900
+ .frl{list-style:none;margin:0 0 12px;padding:0}.frs{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:center;width:100%;min-height:44px;padding:6px 4px;text-align:left;border-top:1px solid var(--hair);font-size:14px}
1901
+ .frl li:first-child .frs{border-top:0}.frs i{font:600 12px var(--mono);font-style:normal;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--well);color:var(--ink-2)}.frs b{font-weight:650}.frs:disabled{opacity:.5}
1902
+
1903
+ .stabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}.stb{min-height:44px;padding:0 14px;border-radius:999px;background:var(--well);font-size:13px;font-weight:600;color:var(--ink-2)}
1904
+ .stb[aria-selected="true"]{background:var(--solid);color:var(--on-solid)}.stb b{font-weight:650;margin-left:3px;opacity:.8}
1905
+
1906
+ /* the item dialog: Done, Not yet, Drop it stay; the rest sits behind More */
1907
+ .xmorebox{margin-top:10px;padding-top:6px;border-top:1px solid var(--line,rgba(0,0,0,.08))}
1908
+
1909
+ /* the draft in the detail panel, and the decision cards under the conversation */
1910
+ .agpane{margin-bottom:14px}
1911
+ .agpt{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
1912
+ .agpa{display:flex;gap:6px}
1913
+ .xlab{margin:12px 0 6px;font-size:.78rem;color:var(--ink-3)}
1914
+ .xco .xwarn{color:var(--ember-ink)}
@@ -72,6 +72,10 @@
72
72
  <div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg></span><h2 id="hWait">Waiting on others</h2><small id="waitCap"></small></div>
73
73
  <div id="waitBody"></div>
74
74
  </section>
75
+ <section class="card rise" style="--d:9" id="frCard" aria-labelledby="hFr">
76
+ <div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="5" width="16" height="15" rx="3"/><path d="m8.5 13 2.5 2.5 4.5-5"/></svg></span><h2 id="hFr">Weekly review</h2><small id="frCap"></small></div>
77
+ <div id="frBody"></div>
78
+ </section>
75
79
  <section class="card rise" style="--d:9" id="revCard" aria-labelledby="hRev" hidden>
76
80
  <div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3"/><path d="M18 3v4h-4M6 21v-4h4"/></svg></span><h2 id="hRev">Untouched</h2><small id="revCap"></small></div>
77
81
  <div class="revc"><p id="revTxt"></p><button id="revBtn" type="button">Look at them</button></div>
@@ -80,10 +84,11 @@
80
84
  </div>
81
85
  <section class="card rise" style="--d:5;margin-top:24px" id="trayCard" aria-labelledby="hTray">
82
86
  <div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M4 8h16l-1.5 11a2 2 0 0 1-2 1.7H7.5a2 2 0 0 1-2-1.7z"/><path d="M8 8V6a4 4 0 0 1 8 0v2"/></svg></span><h2 id="hTray">Your tray</h2><small id="trayCap"></small></div>
87
+ <div class="stabs" id="trayTabs" role="tablist" aria-label="Tray"></div>
83
88
  <div class="tgrid" id="trayBody"></div>
84
89
  <p class="note" id="trayNote" style="margin-top:14px"></p>
85
90
  </section>
86
- <p class="foot" id="foot">This page reads your list, the same one the Work page reads. It writes only when you press a button that says what it does, and each press uses the Work page's own route. The shelf, the capacity bars and starting an agent are not built here. Jira and Slack items appear only when an agent session has read them.</p>
91
+ <p class="foot" id="foot">This page reads your list, the same one the Work page reads. It writes only when you press a button that says what it does, and each press uses the Work page's own route. Starting an agent from a list is not built here. The tray's tabs show only your own items. Answers, ideas and reports an agent files on its own, effort figures and review timing need records PMOS does not hold yet. Jira and Slack items appear only when an agent session has read them.</p>
87
92
  </main>
88
93
  <noscript>This page needs JavaScript.</noscript>
89
94
  <script type="module" src="/pm/premium-work.js"></script>