create-pmos 0.288.0 → 0.290.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 +1 -1
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-board-test.js +2 -2
- package/workspace/briefing-premium-metrics-test.js +2 -8
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/lib/board-premium.js +37 -7
- package/workspace/lib/routes-board-premium.js +1 -3
- package/workspace/lib/routes-boards.js +7 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-report-read-test.js +4 -4
- package/workspace/public/pm/premium-board.js +13 -7
- package/workspace/public/pm/premium-report-read.js +21 -11
- package/workspace/public/pm/premium.css +15 -0
- package/workspace/public/premium-board.html +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.290.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": {
|
package/payload/KIT-VERSION
CHANGED
|
@@ -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:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T03:40:41Z"}
|
|
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:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T03:40:41Z"}
|
|
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:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T03:40:41Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -117,7 +117,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
117
117
|
{
|
|
118
118
|
const R = await open({ model: mk({ sprints: { source: 'jira', readAt: '2026-10-16', sprints: [{ name: 'Sprint 42', state: 'active', start: '2026-10-12', end: '2026-10-23', counts: { todo: 11, doing: 9, done: 14 }, goal: 'Self-serve onboarding reaches beta' }] }, nextRelease: { id: 'r1', type: 'minor', at: '2026-10-23T00:00:00Z' } }) });
|
|
119
119
|
const d = await R.page.evaluate(() => ({ sp: document.querySelector('#sprBody').textContent.replace(/\s+/g, ' '), cnt: [...document.querySelectorAll('#sprBody .cnt b')].map((b) => b.textContent).join(), rel: document.querySelector('#relBody').textContent.replace(/\s+/g, ' '), cap: document.querySelector('#relCap').textContent }));
|
|
120
|
-
ok('B9 B8 a sprint read and a release are drawn from their records',
|
|
120
|
+
ok('B9 B8 a sprint read and a release are drawn from their records', d.cnt === '14,9,11' && /Goal: Self-serve onboarding reaches beta/.test(d.sp) && /Sprint review in 6 days/.test(d.sp) && /r1Next23 Oct · 6 days away/.test(d.rel), JSON.stringify(d));
|
|
121
121
|
await R.ctx.close();
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -171,7 +171,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
171
171
|
const base = F.facts(), docs3 = Object.assign({}, base.docs, { docs: base.docs.docs.concat([F.doc('intake', 'Intake log'), F.doc('roadmap', 'Roadmap note')]) });
|
|
172
172
|
const D = await open({ model: BP.build(Object.assign({}, base, { docs: docs3 })) });
|
|
173
173
|
const q = D.page;
|
|
174
|
-
ok('B15 the third card is "
|
|
174
|
+
ok('B15 the third card is "Next release", as the mockup names it', await q.evaluate(() => document.querySelector('#hRel').textContent === 'Next release'));
|
|
175
175
|
ok('B15 the header is the crumb: the board\'s name, no switcher for one board, and the sparkle', await q.evaluate(() => document.querySelector('#crBoard').disabled && document.querySelector('#crBoard').textContent === 'pmos' && document.querySelector('#crSw').hidden && document.querySelector('#crAsk').getAttribute('aria-label') === 'Ask about this board' && !document.querySelector('#bsw')));
|
|
176
176
|
await q.click('#crAsk'); await until(() => q.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(500);
|
|
177
177
|
const bd = await q.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, grid: [...document.querySelectorAll('#oMain .kv2 span')].map((x) => x.textContent).join('|'), ask: document.querySelector('#askF').hidden }));
|
|
@@ -67,12 +67,6 @@ const ready = (model) => ({ status: 200, body: { ok: true, state: 'ready', model
|
|
|
67
67
|
if (!shown) return finish(1);
|
|
68
68
|
const place = await p.evaluate(() => ({ above: document.querySelector('#cMet').getBoundingClientRect().bottom <= document.querySelector('#cIni').getBoundingClientRect().top, cap: document.querySelector('#metCap').textContent, h: document.querySelector('#hMet').textContent }));
|
|
69
69
|
ok('C1 the card sits above the Initiatives card and says which repository it counts', place.above && place.cap === 'counted from idpf' && place.h === 'Metrics', JSON.stringify(place));
|
|
70
|
-
{
|
|
71
|
-
const R = await open({ answers: () => ({ status: 200, body: { ok: true, state: 'none', why: 'no card' } }) });
|
|
72
|
-
await sleep(800);
|
|
73
|
-
ok('C1 the home workspace\'s board draws no card', await R.page.evaluate(() => document.querySelector('#cMet').hidden), '');
|
|
74
|
-
await R.ctx.close();
|
|
75
|
-
}
|
|
76
70
|
|
|
77
71
|
/* C2 */
|
|
78
72
|
const tiles = await p.evaluate(() => [...document.querySelectorAll('#metBody .mt1')].map((t) => ({ l: t.querySelector('span').textContent, v: t.querySelector('.mval').textContent, c: t.querySelector('.mwk').textContent, chart: !!t.querySelector('svg'), cls: t.className, chg: (t.querySelector('.mchg') || {}).textContent || '' })));
|
|
@@ -141,14 +135,14 @@ const ready = (model) => ({ status: 200, body: { ok: true, state: 'ready', model
|
|
|
141
135
|
/* C7 the real route */
|
|
142
136
|
{
|
|
143
137
|
const home = await fetch(BASE + '/api/board-metrics-premium').then((r) => r.json());
|
|
144
|
-
ok('C7 the real route gives the home workspace
|
|
138
|
+
ok('C7 the real route gives the home workspace the card too', home.ok === true && home.state === 'ready', JSON.stringify(home));
|
|
145
139
|
const post = await fetch(BASE + '/api/board-metrics-premium', { method: 'POST', headers: await T.pressHeaders(BASE), body: '{}' }).then((r) => r.status);
|
|
146
140
|
ok('C7 the route is read-only', post === 405, String(post));
|
|
147
141
|
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }), pg = await ctx.newPage(), errs = [];
|
|
148
142
|
pg.on('pageerror', (e) => errs.push(String(e)));
|
|
149
143
|
await pg.goto(BASE + '/premium-board.html');
|
|
150
144
|
await until(() => pg.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0), 40000); await sleep(1500);
|
|
151
|
-
ok('C7 the real PMOS board draws
|
|
145
|
+
ok('C7 the real PMOS board draws the Metrics card and no script error', await pg.evaluate(() => !document.querySelector('#cMet').hidden) && errs.length === 0, errs.join(' | '));
|
|
152
146
|
await ctx.close();
|
|
153
147
|
}
|
|
154
148
|
|
|
@@ -225,7 +225,7 @@ Board is the third place on the rail, at `/premium-board.html`. It reads what th
|
|
|
225
225
|
- **New initiative** (beside the Initiatives heading, team boards only) asks for a title, a lane and an anchor (a KR or a health budget). It writes an ask and accepts it, as the console does. An unanchored initiative is refused on the page.
|
|
226
226
|
- **⋯ on a row** (and the bar under an initiative page's heading) moves it to the next or another stage, puts it on hold with a reason and a check-back day, cancels it with a reason, or archives it. Each press writes one line through the console's route, says what it recorded, and offers Undo for a few seconds. An on-hold row offers Resume; a cancelled one offers Reopen; an archived one offers Restore. Cancelled and archived initiatives leave the list and sit under a fold below it. On the PMOS board the workflow engine places each initiative, so the moves are not offered and New asks and New initiative are hidden.
|
|
227
227
|
|
|
228
|
-
Not drawn, because PMOS holds no record for them: the
|
|
228
|
+
Not drawn, because PMOS holds no record for them: the mockup's demo measures (Activation, Partner uptime, API p95), targets, and the mockup's demo boards.
|
|
229
229
|
|
|
230
230
|
|
|
231
231
|
## Initiative page
|
|
@@ -258,7 +258,7 @@ Insights is the fourth place on the rail, at `/premium-insights.html`. It reads
|
|
|
258
258
|
- **Ask PMOS to set up a report.** Type what the report is for and press **Ask**. A background run proposes a report and does nothing else. The request is listed as Working, then Ready to review. A ready request opens with its proposal: **Set it up**, **Change it** (say what to change; the run revises it), or **Cancel**.
|
|
259
259
|
- **Found in your work.** Up to three reports PMOS found in your calendar, mail or documents, each with why and what it saw. **Set it up** records the report and drafts its first cycle as a file. **Not a report** hides it and records it after 5 seconds, unless you press **Undo**. If the finding changed while the window was open, the window says what happened. It was already set up, it was marked not a report, or a new scan replaced it. The list is read again. Close the window and open the report from the list. If PMOS does not hear back, the window says nothing was recorded. Press the button to try again.
|
|
260
260
|
- **Set up.** Your recurring reports, with their schedule and next draft. A report opens with **Draft it now** (for a report drawn from your work) and **Pause** or **Resume**.
|
|
261
|
-
- **Documents.** The report files of the workspace, with cadence, slot and whether each is a draft or issued. Pressing one opens it on the page
|
|
261
|
+
- **Documents.** The report files of the workspace, with cadence, slot and whether each is a draft or issued. Pressing one opens it on the page at the normal dialog size, with a status line (Draft or Issued, the saved design version, the file). The **slide deck / Document** menu picks the view: a deck is a title slide, then one slide for each section, with the arrow keys and a strip of slides; a document is a page. The **Read** menu holds **Present**, which shows the slide on the whole screen (the arrow keys move and Escape stops), and **Print or save as PDF**, which prints one slide to a page. **Download** gives PowerPoint, Word, Excel, CSV or the Markdown file; the files carry the words, not the look. **Open in the console** is where a document is edited or issued. Nothing is sent from this page.
|
|
262
262
|
- **Shape a report's look.** On a draft, **Add a sample** takes a PDF, PowerPoint, Word, PNG or JPG file to follow. Say how it should look in the conversation; PMOS draws the next design version (D1, D2, …) and says what it changed. Press a version to go back to it. **This is it** saves the version shown as the report's design, and PMOS draws the cycle to match. An issued cycle is frozen with its look.
|
|
263
263
|
|
|
264
264
|
Not built: a second measure next to a chart, bar highlights, speaker notes and notes on a slide, changing a set-up report's audience, format or schedule, tile sizes and free layout, the finder's settings, run-based charts such as corrections per 100 runs (they belong to the Board's Metrics card), and any measure no record holds. The console's own dashboards are separate and unchanged. KR metric records belong to a workspace, so every board of a workspace shows the same charts.
|
|
@@ -113,16 +113,46 @@ function build(f) {
|
|
|
113
113
|
|
|
114
114
|
const sp = f.sprints || {};
|
|
115
115
|
const sprints = Array.isArray(sp.sprints) ? sp.sprints : [];
|
|
116
|
-
|
|
116
|
+
// The current sprint: the active one, else the next to start, else the latest closed by its end date (the list sorts closed sprints by name, oldest first).
|
|
117
|
+
const latestClosed = sprints.filter((s) => s.state === 'closed').sort((a, b) => String(b.end || '').localeCompare(String(a.end || '')) || String(b.name).localeCompare(String(a.name), undefined, { numeric: true }))[0];
|
|
118
|
+
const active = sp.source === 'jira' ? (sprints.find((s) => s.state === 'active') || sprints.find((s) => s.state !== 'closed') || latestClosed || null) : null;
|
|
119
|
+
const goalText = active && active.goal ? (typeof active.goal === 'object' ? active.goal.text || '' : String(active.goal)) : '';
|
|
120
|
+
const wd = (a, b) => { const x = isoDay(a), y = isoDay(b); if (!x || !y) return null; let n = 0; for (const d = new Date(x); d <= y; d.setDate(d.getDate() + 1)) if (d.getDay() % 6) n++; return n; }; // weekdays, both ends counted
|
|
117
121
|
const sprint = active
|
|
118
|
-
?
|
|
122
|
+
? (() => {
|
|
123
|
+
const k = active.counts || {}, c = { done: k.done || 0, doing: k.doing || 0, todo: k.todo || 0 }, tot = c.done + c.doing + c.todo, st = active.start && String(active.start).slice(0, 10), en = active.end && String(active.end).slice(0, 10);
|
|
124
|
+
const open = active.state !== 'closed', len = st && en ? wd(st, en) : null, at = len && todayIso >= st ? Math.min(len, wd(st, todayIso)) : null, left = open && en ? days(todayIso, en) : null;
|
|
125
|
+
return { cap: open && len && at != null ? 'day ' + at + ' of ' + len : active.state || '', name: active.name, state: active.state, start: st ? shortDate(st) : '', end: en ? shortDate(en) : '', counts: c,
|
|
126
|
+
pct: tot ? { done: +(c.done / tot * 100).toFixed(1), doing: +(c.doing / tot * 100).toFixed(1) } : { done: 0, doing: 0 },
|
|
127
|
+
goal: goalText ? clip(goalText, 300) : '', tickets: (active.issues || []).slice(0, 40).map((i) => ({ key: i.key, title: clip(i.summary || i.key, 120), status: i.status || ({ done: 'Done', doing: 'Doing', todo: 'To do' })[i.category] || '' })), review: left == null ? '' : left < 0 ? 'Sprint ended ' + plural(-left, 'a day', -left + ' days') + ' ago.' : left === 0 ? 'Sprint review is today.' : 'Sprint review in ' + left + ' ' + plural(left, 'day', 'days') + '.' };
|
|
128
|
+
})()
|
|
119
129
|
: { cap: 'none', why: 'No sprint is on record for this board. A sprint appears when an agent session has read Jira for it.' };
|
|
120
130
|
|
|
131
|
+
// The sprint's dialog (initiative premium-board-actions): its tickets with status and, only where a closed sprint's note holds one, the last sprint review.
|
|
132
|
+
const lastC = sprints.filter((x) => x !== active && x.state === 'closed' && (x.closed || x.hit)).sort((x, y) => String(y.end || '').localeCompare(String(x.end || '')) || String(y.name).localeCompare(String(x.name), undefined, { numeric: true }))[0];
|
|
133
|
+
const goalOf = (x) => (x && x.goal ? (typeof x.goal === 'object' ? x.goal.text || '' : String(x.goal)) : '');
|
|
134
|
+
const HIT = { met: ' (met)', partly: ' (partly met)', missed: ' (missed)' };
|
|
135
|
+
const review = lastC ? [['Last sprint review', lastC.name], ['Goal', goalOf(lastC) ? clip(goalOf(lastC), 200) + (HIT[lastC.hit] || '') : ''], ['Done', lastC.closed && lastC.closed.total ? lastC.closed.done + ' of ' + lastC.closed.total + ' tickets' : ''],
|
|
136
|
+
['Carried over', lastC.closed && lastC.closed.carried ? lastC.closed.carried + ' ' + plural(lastC.closed.carried, 'ticket', 'tickets') + (lastC.closed.carriedTo ? ' moved to ' + lastC.closed.carriedTo : ' carried over') : ''], ['What got in the way', lastC.got || '']].filter((x) => x[1]) : [];
|
|
137
|
+
const sprintRow = sprint.name ? (() => {
|
|
138
|
+
const say = sprint.name + (sprint.cap ? ' · ' + sprint.cap : '') + '. ' + sprint.counts.done + ' done, ' + sprint.counts.doing + ' doing, ' + sprint.counts.todo + ' to do.';
|
|
139
|
+
const rs = [['Dates', [sprint.start, sprint.end].filter(Boolean).join(' to ')], ['State', sprint.state || ''], ['Goal', sprint.goal], ['Done', String(sprint.counts.done)], ['Doing', String(sprint.counts.doing)], ['To do', String(sprint.counts.todo)]].filter((x) => x[1])
|
|
140
|
+
.concat(sprint.tickets.map((t) => [t.key, t.title + (t.status ? ' · ' + t.status : '')]), review);
|
|
141
|
+
return { key: 'board:sprint', id: null, title: sprint.name, sub: 'Sprint', dialog: { eye: 'Sprint', logTitle: 'Read from Jira', log: ['Read the sprint and its tickets from the cached Jira reading', 'Counted them by status', 'Changed nothing'], say, head: 'Where it stands', facts: rs, hold: 'This dialog changes nothing. Sprints mirror Jira.', pane: { label: 'Sprint', file: '', note: 'The sprint as the cached Jira reading holds it. A review shows only where a closed sprint has a note.', rows: rs } } };
|
|
142
|
+
})() : null;
|
|
121
143
|
const nr = f.nextRelease;
|
|
122
|
-
const
|
|
144
|
+
const relOf = (r, tag) => {
|
|
145
|
+
const rd = days(todayIso, String(r.at).slice(0, 10));
|
|
146
|
+
return { name: r.name || r.id, tag, at: shortDate(String(r.at).slice(0, 10)), days: rd, away: rd != null ? (rd === 0 ? 'today' : rd + ' ' + plural(rd, 'day', 'days') + ' away') : '', type: r.type || '',
|
|
147
|
+
ini: (r.ini || []).map((id) => rows.find((x) => x.id === id)).filter(Boolean).map((x) => ({ id: x.id, key: x.key, title: x.title, status: x.statusLabel || '', tone: x.late ? 'bad' : x.bad ? 'warn' : '' })) };
|
|
148
|
+
};
|
|
123
149
|
const release = nr && nr.at
|
|
124
|
-
? {
|
|
125
|
-
: { cap: 'none', why: 'No release is planned for this board.' };
|
|
150
|
+
? { ...relOf(nr, 'Next'), cap: relOf(nr, 'Next').away, rel: [relOf(nr, 'Next')].concat(nr.later && nr.later.at ? [relOf(nr.later, 'Planned')] : []) }
|
|
151
|
+
: { cap: 'none', why: 'No release is planned for this board. A release appears here when one carries an initiative of this board.', rel: [] };
|
|
152
|
+
const relRow = release.rel.length ? (() => {
|
|
153
|
+
const rs = release.rel.flatMap((r) => [[r.name + ' · ' + r.tag, [r.at, r.away].filter(Boolean).join(' · ') + (r.type ? ' · ' + r.type : '')]].concat(r.ini.map((i) => ['Rides on it', i.title + (i.status ? ' · ' + i.status : '')])));
|
|
154
|
+
return { key: 'board:release', id: null, title: release.name, sub: 'Release', dialog: { eye: 'Release', logTitle: 'Read from the releases', log: ['Read the releases that carry an initiative of this board', 'Took the earliest date from today on', 'Changed nothing'], say: release.name + ' is next: ' + release.at + ', ' + release.away + '.', head: 'Where it stands', facts: rs, hold: 'This dialog changes nothing.', pane: { label: 'Release', file: '', note: 'The releases as the release records hold them.', rows: rs } } };
|
|
155
|
+
})() : null;
|
|
126
156
|
|
|
127
157
|
const dd = f.docs || null;
|
|
128
158
|
const custom = (f.custom || []).map((d) => Object.assign(Custom.rowOf(d), { added: shortDate(d.at) }));
|
|
@@ -152,8 +182,8 @@ function build(f) {
|
|
|
152
182
|
},
|
|
153
183
|
sprint, release, docs,
|
|
154
184
|
asks: f.asks == null ? { missing: true, rows: [] } : { rows: f.asks.filter((a) => a && a.state !== 'accepted' && a.state !== 'declined').slice(0, 50).map(askOf) },
|
|
155
|
-
dock: { needs: risk + late, label: 'need a look', next: (rows.find((r) => r.late) || rows.find((r) => r.bad) || {}).title || null },
|
|
156
|
-
rows: rows.concat(stageRows.filter((r) => !rows.some((x) => x.key === r.key)), gone.cancelled, gone.archived).concat([{ key: 'board:this-board', id: null, title: board.name || 'This board', sub: 'Board', dialog: { eye: 'Board', logTitle: 'Read from the board', log: ['Read the board and its initiatives', 'Counted them by status', 'Changed nothing'], say: (board.name || 'This board') + ' has ' + open + ' open ' + plural(open, 'initiative', 'initiatives') + ': ' + on + ' on track, ' + risk + ' at risk, ' + late + ' late' + (hold ? ', ' + hold + ' on hold' : '') + '.', head: 'Where it stands', facts: [['Open initiatives', String(open)], ['On track', String(on)], ['At risk', String(risk)], ['Late', String(late)], ['On hold', hold ? String(hold) : '']].filter((x) => x[1] !== ''), hold: 'Nothing here changes a board.', pane: { label: 'Board record', file: '', note: 'The board as its records hold it.', rows: [['Open initiatives', String(open)], ['On track', String(on)], ['At risk', String(risk)], ['Late', String(late)], ['On hold', hold ? String(hold) : '']].filter((x) => x[1] !== '') } } }]),
|
|
185
|
+
dock: { needs: risk + late, label: 'need a look', release: nr && nr.at ? { at: shortDate(String(nr.at).slice(0, 10)), name: nr.name || nr.id } : null, next: (rows.find((r) => r.late) || rows.find((r) => r.bad) || {}).title || null },
|
|
186
|
+
rows: rows.concat(stageRows.filter((r) => !rows.some((x) => x.key === r.key)), gone.cancelled, gone.archived, [sprintRow, relRow].filter(Boolean)).concat([{ key: 'board:this-board', id: null, title: board.name || 'This board', sub: 'Board', dialog: { eye: 'Board', logTitle: 'Read from the board', log: ['Read the board and its initiatives', 'Counted them by status', 'Changed nothing'], say: (board.name || 'This board') + ' has ' + open + ' open ' + plural(open, 'initiative', 'initiatives') + ': ' + on + ' on track, ' + risk + ' at risk, ' + late + ' late' + (hold ? ', ' + hold + ' on hold' : '') + '.', head: 'Where it stands', facts: [['Open initiatives', String(open)], ['On track', String(on)], ['At risk', String(risk)], ['Late', String(late)], ['On hold', hold ? String(hold) : '']].filter((x) => x[1] !== ''), hold: 'Nothing here changes a board.', pane: { label: 'Board record', file: '', note: 'The board as its records hold it.', rows: [['Open initiatives', String(open)], ['On track', String(on)], ['At risk', String(risk)], ['Late', String(late)], ['On hold', hold ? String(hold) : '']].filter((x) => x[1] !== '') } } }]),
|
|
157
187
|
};
|
|
158
188
|
last = model;
|
|
159
189
|
return model;
|
|
@@ -29,14 +29,12 @@ async function via(mod, pathAndQuery, req, ctx) {
|
|
|
29
29
|
const qs = (o) => '?' + Object.entries(o).filter(([, v]) => v != null && v !== '').map(([k, v]) => k + '=' + encodeURIComponent(v)).join('&');
|
|
30
30
|
|
|
31
31
|
/** GET /api/board-metrics-premium?ws=<id> — the Metrics card of a tenant's Board (initiative briefing-premium-metrics). Read-only, and apart from the Board's own
|
|
32
|
-
* route so the Board never waits for it.
|
|
32
|
+
* route so the Board never waits for it. Every board has the card, the PMOS board's counted from the PMOS repository. */
|
|
33
33
|
async function metrics(req, res, url, ctx) {
|
|
34
34
|
if (req.method !== 'GET') { ctx.json(res, { ok: false, error: 'GET only' }, 405); return true; }
|
|
35
35
|
try {
|
|
36
36
|
const w = ctx.getWs && ctx.getWs(url.searchParams.get('ws') || null);
|
|
37
37
|
if (!w || !w.root) { ctx.json(res, { ok: false, state: 'error', error: 'that workspace is not registered' }, 404); return true; }
|
|
38
|
-
const home = ctx.homeRoot || ctx.selfRoot || null;
|
|
39
|
-
if (home && path.resolve(w.root) === path.resolve(home)) { ctx.json(res, { ok: true, state: 'none', why: 'The board of this repository has no Metrics card.' }); return true; }
|
|
40
38
|
const engine = ENGINE_PATHS.find((p) => fs.existsSync(p)) || null;
|
|
41
39
|
const model = await Metrics.read({ root: w.root, engine, now: Date.now() });
|
|
42
40
|
// the read-only agent finds a tile's row in the Board's model
|
|
@@ -336,14 +336,17 @@ function readReleases(ctx) {
|
|
|
336
336
|
/** The next release that carries an initiative of the board: the earliest release (or deploy) date from today on. */
|
|
337
337
|
function nextReleaseOf(releases, ids) {
|
|
338
338
|
const day = today();
|
|
339
|
-
|
|
339
|
+
const hits = [];
|
|
340
340
|
for (const r of releases) {
|
|
341
|
-
|
|
341
|
+
const on = (r.initiative_ids || []).filter((x) => ids.has(x));
|
|
342
|
+
if (!on.length) continue;
|
|
342
343
|
const at = r.release_at || r.deploy_at;
|
|
343
344
|
if (!at || at.slice(0, 10) < day) continue;
|
|
344
|
-
|
|
345
|
+
hits.push({ id: r.id, type: r.type, at, name: r.fix_version || r.id, ini: on });
|
|
345
346
|
}
|
|
346
|
-
|
|
347
|
+
hits.sort((x, y) => String(x.at).localeCompare(String(y.at)));
|
|
348
|
+
// the next one, with the one after it (the mockup's Planned row)
|
|
349
|
+
return hits[0] ? { ...hits[0], later: hits[1] || null } : null;
|
|
347
350
|
}
|
|
348
351
|
const openAsks = (folded, boardId) => [...folded.asks.values()].filter((a) => a.board === boardId && a.state === 'open').length;
|
|
349
352
|
const pageAsk = (a) => ({ ...a, by: actorLib.pageName(a.by) });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.290.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.290.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -119,14 +119,14 @@ fs.writeFileSync(path.join(base, 'q3-deck.png'), PNG);
|
|
|
119
119
|
await shot('reader-deck-1280');
|
|
120
120
|
|
|
121
121
|
/* G: the page */
|
|
122
|
-
await tap('#oMain [data-rr="view|doc"]');
|
|
122
|
+
await tap('#oMain [data-rr="fm"]'); await tap('#oMain [data-rr="view|doc"]');
|
|
123
123
|
const heads = await p.evaluate(() => [...document.querySelectorAll('.rdpg h3')].map((h) => h.textContent));
|
|
124
124
|
ok('G1 Document shows the headings as written', heads.join() === 'Headline,Initiatives,Needs your call,Sources' && await p.evaluate(() => document.querySelector('.rdpg h2').textContent) === 'Partner review, 12 Oct', heads.join());
|
|
125
|
-
await tap('#oMain [data-rr="view|deck"]');
|
|
125
|
+
await tap('#oMain [data-rr="fm"]'); await tap('#oMain [data-rr="view|deck"]');
|
|
126
126
|
|
|
127
127
|
/* N: Present */
|
|
128
128
|
await tap('#oMain [data-rr="go|0"]');
|
|
129
|
-
await tap('#oMain [data-rr="present"]');
|
|
129
|
+
await tap('#oMain [data-rr="rm"]'); await tap('#oMain [data-rr="present"]');
|
|
130
130
|
await until(() => p.$('#rdPres'));
|
|
131
131
|
ok('N1 Present shows the current slide over the whole page', await p.evaluate(() => { const r = document.querySelector('#rdPres').getBoundingClientRect(); return r.width >= innerWidth - 1 && r.height >= innerHeight - 1 && !!document.querySelector('#rdPres .rds.title'); }));
|
|
132
132
|
await p.keyboard.press('ArrowRight');
|
|
@@ -147,7 +147,7 @@ fs.writeFileSync(path.join(base, 'q3-deck.png'), PNG);
|
|
|
147
147
|
|
|
148
148
|
/* X: print */
|
|
149
149
|
await p.evaluate(() => { window.__pr = null; window.open = () => ({ document: { open() {}, write(h) { window.__pr = h; }, close() {} }, focus() {}, print() { window.__printed = true; } }); });
|
|
150
|
-
await tap('#oMain [data-rr="print"]'); await sleep(450);
|
|
150
|
+
await tap('#oMain [data-rr="rm"]'); await tap('#oMain [data-rr="print"]'); await sleep(450);
|
|
151
151
|
const pr = await p.evaluate(() => ({ h: window.__pr || '', printed: !!window.__printed }));
|
|
152
152
|
ok('X1 Print opens the print page with one slide to a page', pr.printed && /pmos-print-deck/.test(pr.h) && (pr.h.match(/class="pmos-slide"/g) || []).length === 5 && pr.h.includes('premium-report-print.css'), pr.h.slice(0, 300));
|
|
153
153
|
|
|
@@ -97,15 +97,22 @@ const rowOf = (key) => (M && M.rows || []).find((r) => r.key === key) || null;
|
|
|
97
97
|
|
|
98
98
|
/* ── sprint, release, documents ─────────────────────────────────────────────────────────────────────────── */
|
|
99
99
|
function drawSide() {
|
|
100
|
-
const S = M.sprint;
|
|
100
|
+
const S = M.sprint, R = M.release;
|
|
101
|
+
$('#hSpr').textContent = S.name || 'Sprint';
|
|
101
102
|
$('#sprCap').textContent = S.cap || '';
|
|
102
103
|
$('#sprBody').innerHTML = S.name
|
|
103
|
-
? `<
|
|
104
|
+
? `<button type="button" class="spr sprb" data-open="board:sprint" aria-haspopup="dialog" aria-label="${esc(S.name)}, ${esc(S.cap || '')}. Open the sprint"><span class="sbar" aria-hidden="true"><i class="d" style="width:${S.pct.done}%"></i><i class="g" style="width:${S.pct.doing}%"></i></span>`
|
|
105
|
+
+ `<span class="cnt"><span><b>${S.counts.done}</b> done</span><span><b>${S.counts.doing}</b> doing</span><span><b>${S.counts.todo}</b> to do</span></span>`
|
|
106
|
+
+ `${S.goal ? `<span class="goal2">Goal: ${esc(S.goal)}</span>` : ''}${S.review ? `<span class="sum3">${esc(S.review)}</span>` : ''}</button>`
|
|
104
107
|
: `<p class="mut">${esc(S.why)}</p>`;
|
|
105
|
-
|
|
106
|
-
$('#relCap').textContent = R.
|
|
107
|
-
$('#relBody').innerHTML = R.
|
|
108
|
+
$('#hRel').textContent = 'Next release';
|
|
109
|
+
$('#relCap').textContent = R.rel && R.rel.length ? '' : 'none';
|
|
110
|
+
$('#relBody').innerHTML = R.rel && R.rel.length
|
|
111
|
+
? `<div class="rels">${R.rel.map((r) => `<button type="button" class="rel" data-open="board:release" aria-haspopup="dialog"><span class="rh"><b>${esc(r.name)}</b><em class="rtag">${esc(r.tag)}</em><time>${esc(r.at)}${r.away ? ' · ' + esc(r.away) : ''}</time></span>${r.ini.map((i) => `<span class="ri"><i class="hd ${i.tone}"></i>${esc(i.title)}${i.status ? ' · ' + esc(i.status) : ''}</span>`).join('')}</button>`).join('')}</div>`
|
|
112
|
+
: `<p class="empty3 plain">${esc(R.why)}</p>`;
|
|
108
113
|
}
|
|
114
|
+
$('#cSpr').addEventListener('click', (e) => { const b = e.target.closest('[data-open]'); if (b) openRow(rowOf(b.dataset.open)); });
|
|
115
|
+
$('#cRel').addEventListener('click', (e) => { const b = e.target.closest('[data-open]'); if (b) openRow(rowOf(b.dataset.open)); });
|
|
109
116
|
function docRow(d) {
|
|
110
117
|
const act = !d.act ? '' : d.act.kind === 'draft' ? `<button class="dmcta alt" data-draft="${esc(d.key)}"${d.running ? ' disabled' : ''}>${d.running ? '<span class="spin"></span>' : ICO('<path d="M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z"/>')}${esc(d.act.label)}</button>` : `<button class="dmcta alt" data-tab="${esc(d.act.tab)}">${esc(d.act.label)}</button>`;
|
|
111
118
|
return `<div class="dmr ${esc(d.st || '')}" role="listitem">${d.path ? `<button class="dmo" data-doc="${esc(d.key)}" aria-haspopup="dialog">` : '<span class="dmo">'}<span class="dmi c-Board">${ICO(DOCI)}</span><span class="dmn"><b>${esc(d.title)}</b><small>${esc(d.what)}</small><span class="dmm"><span class="s ${esc(d.st || 'live')}">${ICO(STATE_ICO[d.state] || STATE_ICO['Not started'])}${esc(d.state)}</span>${d.added ? `<span>${ICO('<rect x="3" y="5" width="18" height="16" rx="3"/><path d="M3 10h18M8 3v4M16 3v4"/>')}added ${esc(d.added)}</span>` : ''}${d.cadence ? `<span>${ICO('<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>')}${esc(d.cadence)}</span>` : ''}${d.by ? `<span>${ICO('<circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/>')}${esc(d.by)}</span>` : ''}</span></span>${d.path ? '</button>' : '</span>'}<span class="dmq">${act}</span></div>`;
|
|
@@ -166,7 +173,7 @@ $('#asksHost').addEventListener('click', (e) => { if (M) onAsks(e, ctxOf(), M.as
|
|
|
166
173
|
$('#newIni').onclick = () => { closeMenu(); openIniForm(ctxOf(), null); };
|
|
167
174
|
|
|
168
175
|
/* ── dock ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
169
|
-
function drawDock() { $('#dN').textContent = M.dock.needs; $('#dLab').textContent = M.dock.label; $('#dNext').innerHTML = M.dock.next ? `<i></i>First <b>${esc(M.dock.next)}</b>` : 'Nothing is late or at risk'; }
|
|
176
|
+
function drawDock() { $('#dN').textContent = M.dock.needs; $('#dLab').textContent = M.dock.label; $('#dNext').innerHTML = (M.dock.next ? `<i></i>First <b>${esc(M.dock.next)}</b>` : 'Nothing is late or at risk') + (M.dock.release ? ` <span class="sep"></span> Next release <b>${esc(M.dock.release.at)}</b> ${esc(M.dock.release.name)}` : ''); }
|
|
170
177
|
|
|
171
178
|
/* ── the dialog: the initiative's record, no press, the read-only agent beside it ──────────────────────────── */
|
|
172
179
|
function cardHtml(r) { return `<div class="acard" id="card"><p class="ct">What this page can do</p><p class="nodef" id="holdWhy">${esc(r.dialog.hold)}</p></div>`; }
|
|
@@ -290,7 +297,6 @@ async function startMetrics(ws) {
|
|
|
290
297
|
clearTimeout(metTimer);
|
|
291
298
|
let r = null;
|
|
292
299
|
try { const res = await fetch('/api/board-metrics-premium?ws=' + encodeURIComponent(ws || ''), { credentials: 'same-origin' }); r = await res.json(); } catch { r = null; }
|
|
293
|
-
if (r && r.ok && r.state === 'none') { MM = null; metDraw(); return; } // the home workspace's board has no card
|
|
294
300
|
if (!r || !r.ok || r.state !== 'ready') {
|
|
295
301
|
MM = null; metDraw(); $('#cMet').hidden = false; $('#metCap').textContent = 'not read'; $('#metHint').textContent = 'The metrics could not be read, so none is shown.' + (r && r.error ? ' The reason: ' + r.error : ''); $('#metBody').innerHTML = ''; $('#metNote').textContent = '';
|
|
296
302
|
return;
|
|
@@ -18,6 +18,7 @@ const ICO = (p) => `<svg class="i" viewBox="0 0 24 24">${p}</svg>`;
|
|
|
18
18
|
const PREV = ICO('<path d="m15 6-6 6 6 6"/>'), NEXT = ICO('<path d="m9 6 6 6-6 6"/>'), CHV = ICO('<path d="M6 9l6 6 6-6"/>'), XI = ICO('<path d="M6 6l12 12M18 6 6 18"/>');
|
|
19
19
|
const DLI = ICO('<path d="M12 4v11M7 10l5 5 5-5M5 20h14"/>'), PRI = ICO('<path d="M7 9V4h10v5M7 17H5v-6h14v6h-2M8 14h8v6H8z"/>'), PLAY = ICO('<path d="M8 5v14l11-7z"/>');
|
|
20
20
|
const CHK = ICO('<path d="M5 12.5l4.5 4.5L19 7.5"/>'), PLUS = ICO('<path d="M12 5v14M5 12h14"/>'), SEND = ICO('<path d="M5 12h14M13 6l6 6-6 6"/>');
|
|
21
|
+
const EYE = ICO('<path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>');
|
|
21
22
|
const W = 1280;
|
|
22
23
|
const POLL_MS = 800, POLL_MAX = 240000;
|
|
23
24
|
const DL = [['pptx', 'PowerPoint (.pptx)', 'A title slide, then one slide for each section.'], ['docx', 'Word (.docx)', 'Headings, paragraphs and lists.'],
|
|
@@ -134,16 +135,25 @@ function designHtml() {
|
|
|
134
135
|
return `<div class="rdz"><span class="label">Design</span><span class="rdv" role="group" aria-label="Design versions"><button data-rr="ver|cycle" aria-pressed="${shown === 'cycle'}">This cycle</button>${vs.map((v) => `<button data-rr="ver|${v.n}" aria-pressed="${shown === v.n}"${R.busy ? ' disabled' : ''} title="${esc(v.turn || '')}">D${v.n}</button>`).join('')}</span>`
|
|
135
136
|
+ `<span class="rds2">${smp}${d.running || R.busy ? ' <b>PMOS is working on it.</b>' : ''}</span><button class="dlink" data-rr="pick">${PLUS}Add a sample</button><input type="file" id="rdFile" hidden accept=".pdf,.pptx,.docx,.png,.jpg,.jpeg">${keep}</div>`;
|
|
136
137
|
}
|
|
138
|
+
function mnuHtml(k, label, icon, items) {
|
|
139
|
+
return `<span class="dsvw"><button type="button" class="dsvb" data-rr="${k}" aria-haspopup="menu" aria-expanded="${R.mn === k}">${icon}${label}${CHV}</button>${R.mn === k ? `<div class="dsmn" role="menu">${items}</div>` : ''}</span>`;
|
|
140
|
+
}
|
|
141
|
+
function statusHtml() {
|
|
142
|
+
const d = R.design, v = d && d.saved ? d.saved.version : null, file = String(R.row.path).split('/').pop();
|
|
143
|
+
return `<div class="dsm2"><span class="chp ${R.issued ? 'ok' : 'warn'}"><i></i>${R.issued ? 'Issued' : 'Draft'}</span>${v ? `<span class="chp mono">D${v}</span>` : ''}<span class="chp mono" title="${esc(R.row.path)}">${esc(file)}</span></div>`;
|
|
144
|
+
}
|
|
137
145
|
function barHtml() {
|
|
138
146
|
const dm = R.dm ? `<div class="dsmn rpm" role="menu" aria-label="Download"><p class="label">Download a file</p>${DL.map(([k, l, s]) => `<a role="menuitem" data-rr="dl|${k}" href="/api/report-export?${esc(q({ ws: R.ws, path: R.row.path, fmt: k }))}" download>${DLI}<span>${esc(l)}<small>${esc(s)}</small></span></a>`).join('')}<button role="menuitem" data-rr="md">${DLI}<span>Markdown (.md)<small>The file, as written.</small></span></button><p class="note rpmn">The files carry the words, not the look. Print or save as PDF keeps the look.</p></div>` : '';
|
|
139
|
-
|
|
140
|
-
|
|
147
|
+
const item = (k, l, ico, on) => `<button type="button" role="menuitem" data-rr="${k}"${on === undefined ? '' : ` aria-current="${on}"`}>${ico}${l}${on ? CHK : ''}</button>`;
|
|
148
|
+
return `<div class="dsvr rdbar">${mnuHtml('rm', 'Read', EYE, item('present', 'Present', PLAY) + item('print', 'Print or save as PDF', PRI))}`
|
|
149
|
+
+ `<span class="rdsp">${mnuHtml('fm', R.view === 'deck' ? 'Slide deck' : 'Document', ICO('<path d="M12 3 3 8l9 5 9-5-9-5zM3 13l9 5 9-5"/>'), item('view|deck', 'Slide deck', '', R.view === 'deck') + item('view|doc', 'Document', '', R.view === 'doc'))}`
|
|
150
|
+
+ `<span class="dsvw"><button type="button" class="dsvb" data-rr="dm" aria-haspopup="menu" aria-expanded="${!!R.dm}">${DLI}Download${CHV}</button>${dm}</span></span></div>`;
|
|
141
151
|
}
|
|
142
152
|
function draw() {
|
|
143
153
|
if (!R) return;
|
|
144
154
|
const m = $('#oMain');
|
|
145
155
|
const keep = document.activeElement && document.activeElement.closest && document.activeElement.closest('#oMain') ? document.activeElement.getAttribute('data-rr') : null;
|
|
146
|
-
m.innerHTML = `<div class="rdr" id="rdR">${barHtml()}<p class="note rdsrc" id="rdSrc">${esc(sourceLine())}</p>${designHtml()}${R.view === 'deck' ? deckHtml() : pageHtml()}<p class="note rdcon"><a class="lk" href="/console.html?tab=rep">Open in the console</a> to edit or issue this document.</p></div>`;
|
|
156
|
+
m.innerHTML = `<div class="rdr" id="rdR">${statusHtml()}${barHtml()}<p class="note rdsrc" id="rdSrc">${esc(sourceLine())}</p>${designHtml()}${R.view === 'deck' ? deckHtml() : pageHtml()}<p class="note rdcon"><a class="lk" href="/console.html?tab=rep">Open in the console</a> to edit or issue this document.</p></div>`;
|
|
147
157
|
fit(m);
|
|
148
158
|
if (keep) { const b = m.querySelector(`[data-rr="${keep}"]`); if (b) b.focus(); }
|
|
149
159
|
}
|
|
@@ -209,14 +219,15 @@ async function showVersion(n) {
|
|
|
209
219
|
/* ── the presses ── */
|
|
210
220
|
async function act(a) {
|
|
211
221
|
const [k, v] = a;
|
|
212
|
-
if (k === 'view') { R.view = v; draw(); return; }
|
|
222
|
+
if (k === 'view') { R.view = v; R.mn = ''; draw(); return; }
|
|
223
|
+
if (k === 'rm' || k === 'fm') { R.mn = R.mn === k ? '' : k; R.dm = false; draw(); return; }
|
|
213
224
|
if (k === 'prev' || k === 'next') { R.i += k === 'next' ? 1 : -1; draw(); return; }
|
|
214
225
|
if (k === 'go') { R.i = +v; draw(); return; }
|
|
215
|
-
if (k === 'dm') { R.dm = !R.dm; draw(); return; }
|
|
226
|
+
if (k === 'dm') { R.dm = !R.dm; R.mn = ''; draw(); return; }
|
|
216
227
|
if (k === 'dl') { R.dm = false; setTimeout(draw, 0); return; }
|
|
217
228
|
if (k === 'md') { R.dm = false; saveMd(); draw(); return; }
|
|
218
|
-
if (k === 'print') { printIt(); return; }
|
|
219
|
-
if (k === 'present') { present(true); return; }
|
|
229
|
+
if (k === 'print') { R.mn = ''; draw(); printIt(); return; }
|
|
230
|
+
if (k === 'present') { R.mn = ''; draw(); present(true); return; }
|
|
220
231
|
if (k === 'pick') { const f = $('#rdFile'); if (f) f.click(); return; }
|
|
221
232
|
if (k === 'ver') {
|
|
222
233
|
if (v === 'cycle') { R.show = 'cycle'; R.i = 0; draw(); return; }
|
|
@@ -312,17 +323,16 @@ async function readCycle() {
|
|
|
312
323
|
|
|
313
324
|
export async function openReport(row, hand) {
|
|
314
325
|
if (!row || !row.path) return;
|
|
315
|
-
R = { row, ws: hand.ws, id: row.cadence, name: hand.name || row.cadence, issued: row.state === 'issued', text: '', err: '', W: null, view: 'deck', i: 0, cycle: null, cyc: null, show: 'cycle', ver: new Map(), design: null, dErr: '', dm: false, busy: false };
|
|
326
|
+
R = { row, ws: hand.ws, id: row.cadence, name: hand.name || row.cadence, issued: row.state === 'issued', text: '', err: '', W: null, view: 'deck', i: 0, cycle: null, cyc: null, show: 'cycle', ver: new Map(), design: null, dErr: '', dm: false, mn: '', busy: false };
|
|
316
327
|
const when = row.date || row.slot;
|
|
317
328
|
const say = R.issued
|
|
318
329
|
? 'This is the ' + when + ' cycle of "' + R.name + '". It is issued, so it is frozen. Read it as a deck or a page, present it, download it or print it. Nothing is sent from here.'
|
|
319
330
|
: 'This is the ' + when + ' cycle of "' + R.name + '". Read it as a deck or a page, present it, download it or print it. To change how it looks, add a sample or tell me what to change, then press This is it on the version you want. Nothing is sent from here.';
|
|
320
|
-
openDlg({ eye: 'Report · ' + (R.issued ? 'issued' : 'draft'), title: R.name, sub: when
|
|
331
|
+
openDlg({ eye: 'Report · ' + (R.issued ? 'issued' : 'draft'), title: R.name, sub: when, stream: turnA(ptx(say)), noteKey: null, pane: '<p class="note">Reading the document.</p>', label: 'Report' });
|
|
321
332
|
$('#dlg').classList.add('rdrd');
|
|
322
333
|
$('#askF').hidden = true; const an = $('#askNote'); if (an) an.hidden = true;
|
|
323
334
|
if (!R.issued) $('#dBody').insertAdjacentHTML('beforeend', `<form class="askbar" id="rdF"><input id="rdIn" placeholder="Say how it should look" maxlength="4000" autocomplete="off" aria-label="Say how the report should look"><button type="submit" aria-label="Send" title="Send">${SEND}</button></form><p class="fine2">A change starts a design run that writes only a new version of the look. The document's words do not change.</p>`);
|
|
324
335
|
const f = $('#rdF'); if (f) f.onsubmit = onSay;
|
|
325
|
-
if (innerWidth >= 1000) setFull(true);
|
|
326
336
|
const me = R;
|
|
327
337
|
try { R.text = await textOf('/api/doc?' + q({ ws: R.ws, path: row.path })); R.W = wordsOf(R.text, R.name); } catch (x) { R.err = String((x && x.message) || x); }
|
|
328
338
|
if (R !== me) return;
|
|
@@ -337,7 +347,7 @@ document.addEventListener('click', (e) => {
|
|
|
337
347
|
if (!inReader(e)) return;
|
|
338
348
|
const t = e.target.closest('[data-rr]');
|
|
339
349
|
if (t && !t.disabled) { act(t.dataset.rr.split('|')); return; }
|
|
340
|
-
if (R.dm && !e.target.closest('.dsvw')) { R.dm = false; draw(); }
|
|
350
|
+
if ((R.dm || R.mn) && !e.target.closest('.dsvw')) { R.dm = false; R.mn = ''; draw(); }
|
|
341
351
|
});
|
|
342
352
|
document.addEventListener('change', (e) => { if (inReader(e) && e.target.id === 'rdFile' && e.target.files && e.target.files[0]) addSample(e.target.files[0]); });
|
|
343
353
|
document.addEventListener('keydown', (e) => {
|
|
@@ -697,6 +697,19 @@ a.round{color:inherit;text-decoration:none}
|
|
|
697
697
|
.ini2.ibi{width:calc(100% + 24px);margin:0 -12px;padding:12px;border-radius:var(--r-in);text-align:left;transition:background .25s}
|
|
698
698
|
.ini2.ibi:hover{background:var(--well)}
|
|
699
699
|
#cSpr .spr{background:var(--well)}
|
|
700
|
+
/* Sprint and Next release cards as the mockup draws them */
|
|
701
|
+
.spr.sprb{display:grid;width:100%;text-align:left;background:none;padding:0;border-radius:var(--r-in);gap:12px;cursor:pointer}
|
|
702
|
+
.sbar{display:flex;gap:4px;height:6px}
|
|
703
|
+
.sbar i{display:block;border-radius:8px}
|
|
704
|
+
.sbar::after{content:"";flex:1;border-radius:8px;background:var(--b3)}
|
|
705
|
+
.sbar .d{background:var(--ok)}.sbar .g{background:var(--solid)}
|
|
706
|
+
.rels{display:grid;gap:14px}
|
|
707
|
+
.rel{display:grid;gap:6px;width:100%;text-align:left;cursor:pointer}
|
|
708
|
+
.rel .rh{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
|
|
709
|
+
.rel .rh b{font-size:15px}
|
|
710
|
+
.rel .rh time{margin-left:auto;font:500 12px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
|
|
711
|
+
.rtag{font-style:normal;font-size:12px;font-weight:650;padding:2px 10px;border-radius:12px;background:var(--well)}
|
|
712
|
+
.rel .ri{font-size:13.5px;color:var(--ink-2)}
|
|
700
713
|
.goal2,.sum3{margin:0;font-size:var(--t-body);line-height:1.5}
|
|
701
714
|
.sum3{color:var(--ink-2)}
|
|
702
715
|
@media (max-width:999px){
|
|
@@ -1878,3 +1891,5 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
|
|
|
1878
1891
|
@media (max-width:700px){#dsOlItems{display:flex;flex-wrap:wrap;gap:6px}.dso button{display:inline-flex;width:auto}.dso .l2,.dso .l3{padding-left:10px}.dso{max-height:none}}
|
|
1879
1892
|
.dsbody .dsat{display:flex;align-items:center;gap:6px;margin:-2px 0 8px;font-size:12px;color:var(--ink-3)}
|
|
1880
1893
|
.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)}
|
|
1894
|
+
.rdbar .rdsp{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
|
|
1895
|
+
.rdbar .dsvw:last-child .dsmn,.rdbar .rdsp .dsmn{left:auto;right:0}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<div id="sprBody"></div>
|
|
65
65
|
</section>
|
|
66
66
|
<section class="card rise" style="--d:7" id="cRel" aria-labelledby="hRel">
|
|
67
|
-
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="16" rx="3"/><path d="M3 10h18M8 3v4M16 3v4"/></svg></span><h2 id="hRel">
|
|
67
|
+
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="16" rx="3"/><path d="M3 10h18M8 3v4M16 3v4"/></svg></span><h2 id="hRel">Next release</h2><small id="relCap"></small></div>
|
|
68
68
|
<div id="relBody"></div>
|
|
69
69
|
</section>
|
|
70
70
|
</div>
|