create-pmos 0.324.0 → 0.325.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-calendar-2-test.js +8 -6
- package/workspace/briefing-premium-calendar-3-test.js +7 -4
- package/workspace/briefing-premium-calendar-test.js +4 -2
- package/workspace/guide/briefing-premium.md +14 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-vw-item-test.js +128 -0
- package/workspace/premium-vw-meet-test.js +210 -0
- package/workspace/premium-vw-notes-test.js +161 -0
- package/workspace/public/pm/premium-board.js +3 -1
- package/workspace/public/pm/premium-initiative.js +7 -2
- package/workspace/public/pm/premium-meeting.js +84 -31
- package/workspace/public/pm/premium-vw-item-model.js +58 -0
- package/workspace/public/pm/premium-vw-item.css +25 -0
- package/workspace/public/pm/premium-vw-item.js +66 -0
- package/workspace/public/pm/premium-vw-meet.css +87 -0
- package/workspace/public/pm/premium-vw-meet.js +322 -0
- package/workspace/public/pm/premium-vw-notes.css +43 -0
- package/workspace/public/pm/premium-vw-notes.js +188 -0
- package/workspace/public/pm/premium.js +2 -0
- package/workspace/test-lists/premium-vw-item.json +13 -0
- package/workspace/test-lists/premium-vw-meet.json +13 -0
- package/workspace/test-lists/premium-vw-notes.json +13 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* premium-vw-notes-test.js — the Notes list and a note opened beside it (initiative premium-viewer, R9; planning/prd/premium-viewer-prd.md).
|
|
4
|
+
* Serves the real Briefing from the real server. The Briefing model, the calendar, the notes, the boards, the search and the note are answered by stand-ins,
|
|
5
|
+
* so each press can be read off the request the page sent. The routes' own behaviour is in their own suites; the pure half is in premium-vw-notes.test.js.
|
|
6
|
+
* N1 open · N2 groups · N3 series · N4 search · N5 the note tab · N6 Change what it is about · N7 writes · N8 floors
|
|
7
|
+
* Every wait polls the page; no fixed sleep stands in for a state. */
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const { spawn } = require('child_process');
|
|
10
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
11
|
+
const T = require('./test-run').configure({ name: 'premium-vw-notes' });
|
|
12
|
+
const B = require('./lib/briefing-premium.js');
|
|
13
|
+
const F = require('./fixtures/briefing-premium-facts.js');
|
|
14
|
+
|
|
15
|
+
const BASE = T.BASE;
|
|
16
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
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
|
+
const results = [];
|
|
19
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
20
|
+
let srv = null; let browser = null;
|
|
21
|
+
const finish = async (code) => {
|
|
22
|
+
if (browser) await browser.close().catch(() => {});
|
|
23
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
24
|
+
T.killTmux();
|
|
25
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
26
|
+
console.log(`\n${results.length - bad}/${results.length} premium-vw-notes assertions passed`);
|
|
27
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
28
|
+
};
|
|
29
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
30
|
+
|
|
31
|
+
const NOW = new Date();
|
|
32
|
+
const ROWS = [
|
|
33
|
+
{ id: 'n1', title: 'Weekly sync', state: 'ended', updated_at: NOW.toISOString(), meeting: { kind: 'event', title: 'Weekly sync', start: '2026-10-19T10:00:00+07:00' }, board: { id: 'b1', ws: 'w1', title: 'Growth' }, initiative: { id: 'ux', ws: 'w1', title: 'Premium UX' }, series: { key: 'wk', by: 'calendar' }, meeting_ms: 32 * 60000, summary_lines: ['The copy test was agreed.'] },
|
|
34
|
+
{ id: 'n0', title: 'Weekly sync', state: 'ended', updated_at: NOW.toISOString(), meeting: { kind: 'event', title: 'Weekly sync', start: '2026-10-12T10:00:00+07:00' }, board: { id: 'b1', ws: 'w1', title: 'Growth' }, series: { key: 'wk', by: 'calendar' }, summary_lines: ['The runbook was asked for.'] },
|
|
35
|
+
{ id: 'n2', title: 'Exec sync', state: 'ended', updated_at: NOW.toISOString(), meeting: { kind: 'event', title: 'Exec sync', start: '2026-10-16T10:00:00+07:00' }, portfolio: true, meeting_ms: 28 * 60000 },
|
|
36
|
+
{ id: 'n3', title: 'Call with a partner', state: 'ended', updated_at: NOW.toISOString(), created_at: '2026-10-15T08:00:00Z', meeting: null, summary_lines: ['They want SSO before they move 40 seats.'] },
|
|
37
|
+
];
|
|
38
|
+
const NOTE = { id: 'n3', title: 'Call with a partner', state: 'ended', meeting: null, meeting_ms: 22 * 60000, final_notes: { overview: 'The partner wants SSO first.', decisions: [{ text: 'Price SSO in the team plan', why: 'Two partners asked.' }], actions: [{ text: 'Send the SSO plan', owner: 'Ana', due: '2026-10-24' }], questions: [] } };
|
|
39
|
+
|
|
40
|
+
(async () => {
|
|
41
|
+
const exe = findBrowser();
|
|
42
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
43
|
+
let chromium;
|
|
44
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
45
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
46
|
+
await T.waitForServer(BASE);
|
|
47
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
48
|
+
|
|
49
|
+
const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
|
|
50
|
+
const SESS = [];
|
|
51
|
+
const open = async ({ w = 1280, h = 900, theme = 'light', notes = ROWS } = {}) => {
|
|
52
|
+
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
53
|
+
const page = await ctx.newPage();
|
|
54
|
+
const S = { errors: [], reqs: [], linkPosts: [], oneGets: [], searches: [], note: { ...NOTE } };
|
|
55
|
+
page.on('pageerror', (e) => S.errors.push(String((e && e.message) || e)));
|
|
56
|
+
page.on('request', (r) => { if (r.url().startsWith(BASE)) S.reqs.push(r.method() + ' ' + new URL(r.url()).pathname); });
|
|
57
|
+
await page.route('**/api/briefing-premium*', (r) => json(r, { ok: true, state: 'ready', model: B.build(F.facts()), as_of: Date.now() }));
|
|
58
|
+
await page.route('**/api/calendar-views*', (r) => json(r, { ok: true, view: 'week', cells: [], events_source: 'calendar-memory', context: {}, link_boards: [], gantt: [] }));
|
|
59
|
+
await page.route('**/api/notes/search*', (r) => { const q = new URL(r.request().url()).searchParams.get('q'); S.searches.push(q); return json(r, { ok: true, ids: /runbook|said/.test(q) ? ['n0'] : [] }); });
|
|
60
|
+
await page.route('**/api/notes/one*', (r) => { const id = new URL(r.request().url()).searchParams.get('id'); S.oneGets.push(id);
|
|
61
|
+
const n = id === 'n3' ? S.note : { ...ROWS.find((x) => x.id === id), final_notes: { overview: 'Notes of ' + id, decisions: [], actions: [], questions: [] } };
|
|
62
|
+
return json(r, { ok: true, note: n, place: id === 'n3' ? null : { key: 'wk', title: 'Weekly sync', pos: id === 'n1' ? 2 : 1, count: 2, prev: id === 'n1' ? { id: 'n0', at: '2026-10-12T03:00:00Z' } : null, next: id === 'n0' ? { id: 'n1', at: '2026-10-19T03:00:00Z' } : null } }); });
|
|
63
|
+
await page.route('**/api/notes/link', (r) => { const b = JSON.parse(r.request().postData() || '{}'); S.linkPosts.push(b); if (b.initiative) S.note = { ...S.note, board: b.board, initiative: b.initiative }; return json(r, { ok: true }); });
|
|
64
|
+
await page.route(/\/api\/notes(\?.*)?$/, (r) => json(r, { ok: true, notes, series_open: { wk: { open: 2, carried: false } } }));
|
|
65
|
+
await page.route(/\/api\/boards(\?.*)?$/, (r) => json(r, { ok: true, boards: [{ id: 'b1', ws: 'w1', name: 'Growth' }] }));
|
|
66
|
+
await page.route('**/api/boards/backlog*', (r) => json(r, { ok: true, rows: [{ id: 'ux', title: 'Premium UX' }, { id: 'sso', title: 'SSO for teams' }] }));
|
|
67
|
+
await page.goto(BASE + '/premium.html?theme=' + theme);
|
|
68
|
+
S.up = await until(() => page.evaluate(() => !!document.querySelector('#vnOpen') && !!document.querySelector('#vnOpenFoot') && document.querySelectorAll('#rank .rr').length > 0), 20000);
|
|
69
|
+
if (S.up) { if (w <= 600 && await page.evaluate(() => document.querySelector('#todayCard').classList.contains('calhid'))) await page.click('#todayCard .foldb'); await page.click(w <= 600 ? '#vnOpenFoot' : '#vnOpen'); S.dlg = await until(() => page.evaluate(() => document.querySelector('#dlg').classList.contains('on') && document.querySelectorAll('#vnBody .vn-g').length > 0)); }
|
|
70
|
+
SESS.push(S);
|
|
71
|
+
return Object.assign(S, { ctx, page });
|
|
72
|
+
};
|
|
73
|
+
const A = await open();
|
|
74
|
+
ok('N1 the Calendar card has a Notes button that opens the dialog with the list', A.up && A.dlg && await A.page.evaluate(() => document.querySelector('#dTitle').textContent === 'Notes'));
|
|
75
|
+
if (!A.up || !A.dlg) return finish(1);
|
|
76
|
+
const p = A.page;
|
|
77
|
+
|
|
78
|
+
/* N2 groups */
|
|
79
|
+
const g = await p.evaluate(() => ({ groups: [...document.querySelectorAll('#vnBody .vn-g h4')].map((x) => x.firstChild.textContent), count: document.querySelector('#vnCount').textContent }));
|
|
80
|
+
ok('N2 the notes are grouped: Portfolio, the board, then Not linked, with a count', g.groups.join('|') === 'Portfolio|Growth|Not linked' && g.count === '4 notes', JSON.stringify(g));
|
|
81
|
+
const r3 = await p.evaluate(() => document.querySelector('[data-vn-note="n3"]').textContent);
|
|
82
|
+
ok('N2 a note with no meeting is tagged no meeting; the Portfolio note shows its length', /no meeting/.test(r3) && /28 min/.test(await p.evaluate(() => document.querySelector('[data-vn-note="n2"]').textContent)), r3);
|
|
83
|
+
|
|
84
|
+
/* N3 series */
|
|
85
|
+
const ser = await p.evaluate(() => document.querySelector('[data-vn-series="wk"]').textContent);
|
|
86
|
+
ok('N3 the two notes of the series are one entry with 2 meetings, series and 2 open', /2 meetings/.test(ser) && /series/.test(ser) && /2 open/.test(ser), ser);
|
|
87
|
+
await p.click('[data-vn-fold="wk"]');
|
|
88
|
+
ok('N3 folding the series open lists its notes with their first summary line', await until(() => p.evaluate(() => !!document.querySelector('.vn-sub [data-vn-note="n0"]') && /The runbook was asked for\./.test(document.querySelector('#vnBody').textContent) && document.querySelector('[data-vn-fold="wk"]').getAttribute('aria-expanded') === 'true')));
|
|
89
|
+
|
|
90
|
+
/* N4 search */
|
|
91
|
+
await p.fill('#vnQ', 'sso');
|
|
92
|
+
ok('N4 typing filters the list at once and the count says N of M', await until(() => p.evaluate(() => document.querySelectorAll('#vnBody [data-vn-note]').length === 1 && !!document.querySelector('[data-vn-note="n3"]') && document.querySelector('#vnCount').textContent === '1 of 4 notes')));
|
|
93
|
+
await p.fill('#vnQ', 'what was said');
|
|
94
|
+
ok('N4 a note found by the server search in what was said is listed', await until(() => p.evaluate(() => !!document.querySelector('[data-vn-note="n0"]'))) && A.searches.includes('what was said'), JSON.stringify(A.searches));
|
|
95
|
+
await p.fill('#vnQ', 'zzz');
|
|
96
|
+
ok('N4 no match says so', await until(() => p.evaluate(() => /No note matches “zzz”/.test(document.querySelector('#vnBody').textContent))));
|
|
97
|
+
ok('N4 the search field keeps focus while typing', await p.evaluate(() => document.activeElement && document.activeElement.id === 'vnQ'));
|
|
98
|
+
await p.fill('#vnQ', '');
|
|
99
|
+
|
|
100
|
+
/* N5 the note tab */
|
|
101
|
+
await until(() => p.evaluate(() => !!document.querySelector('[data-vn-note="n3"]')));
|
|
102
|
+
await p.click('[data-vn-note="n3"]');
|
|
103
|
+
const tab = await until(() => p.evaluate(() => { const t = document.querySelector('#vTabs'), pane = document.querySelector('#dOut .obody.vw[data-vw="meet-note"]'); return t && !t.hidden && pane && !pane.hidden && /Price SSO in the team plan/.test(pane.textContent) ? { tabs: [...t.querySelectorAll('.vtab')].map((x) => x.textContent.trim()), ph: [...pane.querySelectorAll('.vm-ph [data-ph]')].map((b) => b.dataset.ph + ':' + b.getAttribute('aria-pressed')).join(), text: pane.textContent } : null; }));
|
|
104
|
+
ok('N5 a note opens as a viewer tab beside the list, on After', tab && tab.tabs.length === 2 && /Notes/.test(tab.tabs[0]) && /Call with a partner/.test(tab.tabs[1]) && tab.ph === 'before:false,during:false,after:true', JSON.stringify(tab && { tabs: tab.tabs, ph: tab.ph }));
|
|
105
|
+
ok('N5 the tab has the summary, the Decision and Why table and the next step table from the note', tab && /The partner wants SSO first\./.test(tab.text) && /Two partners asked\./.test(tab.text) && /Send the SSO plan/.test(tab.text) && /Ana/.test(tab.text) && /No meeting/.test(tab.text));
|
|
106
|
+
await p.click('#dOut .obody.vw[data-vw="meet-note"] [data-ph="before"]');
|
|
107
|
+
ok('N5 Before says the note has no calendar event', await until(() => p.evaluate(() => { const b = document.querySelector('#dOut .obody.vw[data-vw="meet-note"] .vm-body[data-part="before"]'); return b && !b.hidden && /not linked to a calendar event/.test(b.textContent); })));
|
|
108
|
+
await p.click('#vTabs .vtab[data-vw="main"]');
|
|
109
|
+
await p.click('[data-vn-series="wk"]');
|
|
110
|
+
ok('N5 pressing a series opens its newest note, which says N of M', await until(() => p.evaluate(() => /Weekly sync · 2 of 2/.test((document.querySelector('#dOut .obody.vw[data-vw="meet-note"] .vm-ser') || {}).textContent || ''))) && A.oneGets.includes('n1'));
|
|
111
|
+
await p.click('#dOut .obody.vw[data-vw="meet-note"] [data-vm="prev"]');
|
|
112
|
+
ok('N5 paging reads the meeting before into the same tab', await until(() => A.oneGets.includes('n0')) && await p.evaluate(() => document.querySelectorAll('#vTabs .vtab').length === 2));
|
|
113
|
+
|
|
114
|
+
/* N6 Change what it is about */
|
|
115
|
+
await p.click('#vTabs .vtab[data-vw="main"]');
|
|
116
|
+
await p.click('[data-vn-note="n3"]');
|
|
117
|
+
await until(() => p.evaluate(() => /Call with a partner/.test((document.querySelector('#dOut .obody.vw[data-vw="meet-note"] h3') || {}).textContent || '')));
|
|
118
|
+
await p.click('#dOut .obody.vw[data-vw="meet-note"] [data-vm="nabout"]');
|
|
119
|
+
const opts = await until(() => p.evaluate(() => { const s = document.querySelector('#dOut .vm-nabout select'); return s ? [...s.options].map((o) => o.textContent) : null; }));
|
|
120
|
+
ok('N6 Choose what it is about lists Portfolio, the board and its initiatives', opts && opts.join('|') === 'Choose what it is about|Portfolio|Board: Growth|Initiative: Premium UX|Initiative: SSO for teams', JSON.stringify(opts));
|
|
121
|
+
await p.selectOption('#dOut .vm-nabout select', 'i:w1/sso');
|
|
122
|
+
await p.click('#dOut [data-vm="nsave"]');
|
|
123
|
+
await until(() => A.linkPosts.length === 1);
|
|
124
|
+
ok('N6 Save posts the console\'s link body for the note', JSON.stringify(A.linkPosts[0]) === JSON.stringify({ id: 'n3', board: { id: 'b1', ws: 'w1', title: 'Growth' }, initiative: { id: 'sso', ws: 'w1', title: 'SSO for teams' } }), JSON.stringify(A.linkPosts));
|
|
125
|
+
ok('N6 the note is read again and its head names the initiative, with Change', await until(() => p.evaluate(() => { const pn = document.querySelector('#dOut .obody.vw[data-vw="meet-note"]'); return /Growth › SSO for teams/.test(pn.textContent) && /Change/.test(pn.querySelector('[data-vm="nabout"]').textContent) && !pn.querySelector('.vm-nabout'); })));
|
|
126
|
+
|
|
127
|
+
/* N7 writes */
|
|
128
|
+
const posts = [...new Set(A.reqs.filter((r) => /^POST /.test(r)))].sort();
|
|
129
|
+
ok('N7 the only write is the note\'s link', posts.join() === 'POST /api/notes/link', posts.join());
|
|
130
|
+
const res = await fetch(BASE + '/api/notes/link', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id: 'n-nothing', portfolio: true }) });
|
|
131
|
+
ok('N7 /api/notes/link without the launch nonce is refused', res.status === 403, String(res.status));
|
|
132
|
+
await A.ctx.close();
|
|
133
|
+
|
|
134
|
+
/* an empty store says so */
|
|
135
|
+
const Z = await open({ notes: [] });
|
|
136
|
+
ok('N2 with no notes the list says notes you record show here', Z.up && await until(() => Z.page.evaluate(() => document.querySelector('#dlg').classList.contains('on') && /No notes yet/.test((document.querySelector('#vnBody') || {}).textContent || ''))));
|
|
137
|
+
await Z.ctx.close();
|
|
138
|
+
|
|
139
|
+
/* N8 floors (PMOS_SHOTS=<dir> also saves pictures) */
|
|
140
|
+
const shotDir = process.env.PMOS_SHOTS || '';
|
|
141
|
+
for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
142
|
+
if (w === 1280 && !shotDir) continue;
|
|
143
|
+
const P = await open({ w, h, theme: th });
|
|
144
|
+
if (!P.dlg) { ok(`N8 ${w} ${th} opens`, false); await P.ctx.close(); continue; }
|
|
145
|
+
await P.page.click('[data-vn-fold="wk"]');
|
|
146
|
+
const fl = () => P.page.evaluate(() => { const pane = [...document.querySelectorAll('#oMain, #dOut .obody.vw')].find((x) => !x.hidden) || document.querySelector('#oMain');
|
|
147
|
+
return { scroll: document.documentElement.scrollWidth <= innerWidth + 1 && pane.scrollWidth <= pane.clientWidth + 1,
|
|
148
|
+
btn: [...pane.querySelectorAll('.vn-o, .vn-x, .vn-q, .vm-ph button, .vm-lk')].filter((b) => b.getClientRects().length).map((b) => Math.round(Math.min(b.getBoundingClientRect().width, b.getBoundingClientRect().height))) }; });
|
|
149
|
+
const f0 = await fl();
|
|
150
|
+
if (w === 390) ok(`N8 at 390 px (${th}) the Calendar card header keeps one line and Notes sits under the day`, await P.page.evaluate(() => { const h = document.querySelector('#todayCard .ch'), r = (e) => e.getBoundingClientRect(); const bs = [...h.querySelectorAll('button')].filter((b) => b.getClientRects().length); return !document.querySelector('#vnOpen').getClientRects().length && bs.every((b) => Math.abs(r(b).top - r(bs[0]).top) < 4) && r(document.querySelector('#vnOpenFoot')).height >= 44; }));
|
|
151
|
+
if (shotDir) await P.page.screenshot({ path: path.join(shotDir, `list-${w}-${th}.png`) });
|
|
152
|
+
await P.page.click('[data-vn-note="n3"]');
|
|
153
|
+
await until(() => P.page.evaluate(() => /Price SSO/.test((document.querySelector('#dOut .obody.vw[data-vw="meet-note"]') || {}).textContent || '')));
|
|
154
|
+
const f1 = await fl();
|
|
155
|
+
if (shotDir) await P.page.screenshot({ path: path.join(shotDir, `note-${w}-${th}.png`) });
|
|
156
|
+
if (w === 390) ok(`N8 at 390 px (${th}) the list and the note have no sideways scroll and every press is at least 44 px`, f0.scroll && f1.scroll && f0.btn.length > 3 && [...f0.btn, ...f1.btn].every((n) => n >= 44), JSON.stringify([f0, f1]));
|
|
157
|
+
await P.ctx.close();
|
|
158
|
+
}
|
|
159
|
+
ok('N7 no page error in any run', SESS.every((x) => x.errors.length === 0), JSON.stringify(SESS.map((x) => x.errors).filter((e) => e.length)));
|
|
160
|
+
return finish();
|
|
161
|
+
})().catch((e) => { console.error(e); finish(1); });
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Coming up cards, Core documents, the dock and the standard dialog. The presses are Draft it on a core document, through POST /api/core-docs/draft,
|
|
4
4
|
* and the board's own presses of pm/premium-acts.js (initiative premium-board-actions): the New asks card, New initiative, and a row's menu (move,
|
|
5
5
|
* hold, cancel, archive and their Undo). Issue it on a document draft, read in a dialog, is POST /api/core-docs/issue (initiative premium-core-doc-issue). */
|
|
6
|
+
import { openWorkItem, recordPress } from './premium-vw-item.js';
|
|
6
7
|
import { pmPost } from './http.js';
|
|
7
8
|
import { $, $$, esc, openDlg, closeDlg, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, CHECK, AI, store, crumbHtml, wireCrumb, kv, H, openAddDoc, setPageGaps } from './premium-shell.js';
|
|
8
9
|
import { issueBody } from './premium-doc-edit.js';
|
|
@@ -182,12 +183,13 @@ function drawDock() { $('#dN').textContent = M.dock.needs; $('#dLab').textConten
|
|
|
182
183
|
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>`; }
|
|
183
184
|
function paneHtml(r) {
|
|
184
185
|
const p = r.dialog.pane;
|
|
185
|
-
return `<article class="paper doc">${p.file ? `<p class="dpath">${esc(p.file)}</p>` : ''}${p.rows.length ? `<div class="kv2">${p.rows.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div>` : ''}<p class="xn">${esc(p.note || 'The initiative as the board holds it.')}</p
|
|
186
|
+
return `<article class="paper doc">${p.file ? `<p class="dpath">${esc(p.file)}</p>` : ''}${p.rows.length ? `<div class="kv2">${p.rows.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div>` : ''}<p class="xn">${esc(p.note || 'The initiative as the board holds it.')}</p>${r.id && r.dialog.eye === 'Initiative' ? recordPress() : ''}</article>`;
|
|
186
187
|
}
|
|
187
188
|
function openRow(r) {
|
|
188
189
|
if (!r) return;
|
|
189
190
|
const d = r.dialog;
|
|
190
191
|
openDlg({ eye: d.eye + ' · real data', title: r.title, sub: r.sub + (r.statusLabel ? ' · ' + r.statusLabel : ''), say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: r.key, pane: paneHtml(r), label: d.pane.label });
|
|
192
|
+
const vb = $('#oMain [data-vwopen]'); if (vb) vb.onclick = () => openWorkItem({ kind: 'initiative', id: r.id, title: r.title, ws: M.board.ws, board: M.board.id }); // its record, checks, tasks and links as a viewer tab (premium-viewer S7)
|
|
191
193
|
loadThread(r.key);
|
|
192
194
|
if (r.key === 'board:sprint') openSprint({ ws: M.board.ws, board: M.board.id, name: r.title }); // the sprint as a board by status, beside its facts (premium-viewer S5)
|
|
193
195
|
setTimeout(() => { const b = $('#dBody'); b.scrollTop = b.scrollHeight; }, 120);
|
|
@@ -8,6 +8,7 @@ import { pmPost } from './http.js';
|
|
|
8
8
|
import { mountDocSheet } from './premium-doc-sheet.js';
|
|
9
9
|
import { $, $$, esc, openDlg, closeDlg, setMode, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, kv, H2, CHECK, CHEV, crumbHtml, wireCrumb, AI, openAddDoc, setPageGaps } from './premium-shell.js';
|
|
10
10
|
import { barHtml, onBar, closeMenu } from './premium-acts.js';
|
|
11
|
+
import { openWorkItem, recordPress } from './premium-vw-item.js';
|
|
11
12
|
import { openTicket } from './premium-vw-jira.js';
|
|
12
13
|
|
|
13
14
|
let M = null; // the model
|
|
@@ -133,7 +134,8 @@ function openTask(t) {
|
|
|
133
134
|
const rows = [['Type', t.kind || (taskKind(t) === 'req' ? 'PRD requirement' : 'Task')], ['Reference', t.ref], ['Source', t.src], ['Owner', t.owner], ['Starts', t.start ? when(t.start) : ''], ['Due', t.end ? when(t.end) : ''], ['Status', t.state || 'No result recorded']];
|
|
134
135
|
const say = t.title + (t.state ? ' is ' + t.state.toLowerCase() + '.' : ' has no result recorded. The repository records none for a PRD requirement.');
|
|
135
136
|
const act = t.pmos ? `<div class="tkact"><span class="label">Status</span><div class="seg tkst" role="group" aria-label="Status"><i class="pill"></i>${STATES.map((s) => `<button data-tks="${esc(s)}" aria-pressed="${t.state === s}">${s}</button>`).join('')}</div></div><p class="note" style="margin-top:12px">A PMOS task is kept on the board. Jira tickets are read-only here: Jira owns their status and dates.</p>` : `<p class="xn">${t.src === 'PRD requirement' ? 'Read from the initiative’s PRD. Nothing on this page changes it.' : 'Read from the board. Jira owns its status and dates.'}</p>`;
|
|
136
|
-
openDlg({ eye: 'Task · real data', title: t.title, sub: M.title, say, stream: turnA(ptx(say)), noteKey: null, pane: `<article class="paper doc">${kv(rows)}${act}</article>`, label: 'Task' });
|
|
137
|
+
openDlg({ eye: 'Task · real data', title: t.title, sub: M.title, say, stream: turnA(ptx(say)), noteKey: null, pane: `<article class="paper doc">${kv(rows)}${act}${recordPress('Open the initiative')}</article>`, label: 'Task' });
|
|
138
|
+
wireRecord();
|
|
137
139
|
$('#askF').hidden = true; if ($('#oMain .tkst')) pillOf($('#oMain .tkst'));
|
|
138
140
|
if (taskKind(t) === 'jira' && t.ref) openTicket({ ws: M.board.ws, board: M.board.id, initiative: M.id, ref: t.ref }); // the ticket beside its facts (premium-viewer S5)
|
|
139
141
|
$$('#oMain [data-tks]').forEach((b) => { b.onclick = async () => {
|
|
@@ -143,6 +145,8 @@ function openTask(t) {
|
|
|
143
145
|
toast('Status changed to ' + b.dataset.tks.toLowerCase() + '.'); closeDlg(); await load();
|
|
144
146
|
}; });
|
|
145
147
|
}
|
|
148
|
+
/** The pane's press that opens this initiative's record, checks, tasks and links as a viewer tab beside the dialog (premium-viewer S7). */
|
|
149
|
+
function wireRecord() { const b = $('#oMain [data-vwopen]'); if (b) b.onclick = () => openWorkItem({ kind: 'initiative', id: M.id, title: M.crumbTitle || M.title, ws: M.board.ws, board: M.board.id }); }
|
|
146
150
|
function openAddTask() {
|
|
147
151
|
const prefs = ['Research plan', 'Release plan', 'UAT', 'Rollback plan', 'Support briefing', 'Legal review'];
|
|
148
152
|
const form = `<div class="addf"><p class="note" style="margin:0">Use a task for work that is not a Jira ticket, such as a research plan, a release plan or UAT. It is kept on the board and it is not a Jira ticket.</p>
|
|
@@ -224,7 +228,8 @@ async function draft(b) {
|
|
|
224
228
|
/* ── the initiative's own dialog: the read-only agent about this initiative, with an optional first question ─────────────────────── */
|
|
225
229
|
function openAsk(q) {
|
|
226
230
|
const r = M.rows[0]; if (!r) return;
|
|
227
|
-
openDlg({ eye: 'Initiative · real data', title: r.title, sub: r.sub, say: r.dialog.say, stream: turnA(logHtml({ logTitle: 'Read from the repository', log: ['Read the initiative from the board and its sheet', 'Read its workflow steps from the workflow engine', 'Changed nothing'] })) + turnA(ptx(r.dialog.say)), noteKey: r.key, pane: `<article class="paper doc">${kv(r.dialog.facts)}<p class="xn">The initiative as the board holds it. Ask the agent anything about it; it reads this repository and changes nothing.</p
|
|
231
|
+
openDlg({ eye: 'Initiative · real data', title: r.title, sub: r.sub, say: r.dialog.say, stream: turnA(logHtml({ logTitle: 'Read from the repository', log: ['Read the initiative from the board and its sheet', 'Read its workflow steps from the workflow engine', 'Changed nothing'] })) + turnA(ptx(r.dialog.say)), noteKey: r.key, pane: `<article class="paper doc">${kv(r.dialog.facts)}<p class="xn">The initiative as the board holds it. Ask the agent anything about it; it reads this repository and changes nothing.</p>${recordPress()}</article>`, label: 'Initiative' });
|
|
232
|
+
wireRecord();
|
|
228
233
|
loadThread(r.key);
|
|
229
234
|
if (q) { const i = $('#askIn'); i.value = q; $('#askF').dispatchEvent(new Event('submit', { cancelable: true, bubbles: true })); }
|
|
230
235
|
setMode('chat');
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* The Today / This week switch, the week list and the meeting dialog. Reads GET /api/calendar-views?view=week, GET /api/meeting-replay, GET /api/meeting-material and
|
|
3
3
|
* GET /api/meeting-material/suggest. The writes are "Link it" (POST /api/calendar-links), Add and Remove material (POST /api/meeting-material) and Make task
|
|
4
4
|
* (POST /api/plan-items). Every word is a field of a record: the pure half (weekView, meetingView, the body builders) takes the routes' answers and returns what the page
|
|
5
|
-
* draws or sends, so a test reads it without a DOM. Recording and Focus are slice 3.
|
|
5
|
+
* draws or sends, so a test reads it without a DOM. Recording and Focus are slice 3.
|
|
6
|
+
* The dialog's detail is laid out as the console's note sheet (initiative premium-viewer, S3): a head with Before, During and After, what the meeting is about and its
|
|
7
|
+
* series line; the parts that come from the meeting's note (GET /api/notes/one) are drawn by premium-vw-meet.js. */
|
|
8
|
+
import { noteSheet, phaseOf, phaseHtml, seriesHtml, stageHtml, wireStage, PHASES, notesTablesHtml, openNoteTab, vmStyle } from './premium-vw-meet.js';
|
|
6
9
|
|
|
7
10
|
const pad = (n) => String(n).padStart(2, '0');
|
|
8
11
|
const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).trimEnd() + '…' : t; };
|
|
@@ -110,12 +113,14 @@ export function meetingView(row, replay, material, extra) {
|
|
|
110
113
|
const keys = rep && Array.isArray(rep.keys) ? rep.keys : [];
|
|
111
114
|
const pick = (k) => keys.filter((x) => x.k === k).map((x) => ({ id: x.id == null ? '' : String(x.id), text: clip(x.text, 240), owner: x.owner || '', due: x.due || '', open: x.state === 'open' || x.state === 'owner' }));
|
|
112
115
|
const ini = rep && rep.note && rep.note.initiative && rep.note.initiative.id ? rep.note.initiative : null, nws = rep && rep.note ? (ini && ini.ws) || rep.note.ws || '' : '';
|
|
113
|
-
const
|
|
116
|
+
const S = extra && extra.sheet;
|
|
117
|
+
const notes = S ? { title: S.title, id: S.id, initiative: S.initiative, decisions: S.decisions, actions: S.actions, questions: S.questions, whyCol: S.whyCol }
|
|
118
|
+
: rep ? { title: clip((rep.note && rep.note.title) || '', 120), id: (rep.note && rep.note.id) || '', initiative: ini ? { id: ini.id, name: clip(ini.title || ini.name || ini.id, 70), ws: nws } : null, decisions: pick('decision'), actions: pick('action'), questions: pick('question'), whyCol: false } : null;
|
|
114
119
|
const heard = rep && Number(rep.length_ms) > 0 ? Math.round(rep.length_ms / 60000) : 0;
|
|
115
120
|
return {
|
|
116
121
|
people,
|
|
117
|
-
notes, notesState: replay ? replay.state : 'none',
|
|
118
|
-
notesLine: !replay ? 'Reading the notes.' : replay.state === 'error' ? 'The notes could not be read: ' + clip(replay.error, 120) : replay.state === 'none' ? 'No notes for this meeting.' : '',
|
|
122
|
+
notes, notesState: S ? 'ok' : replay ? replay.state : 'none', sheet: S || null,
|
|
123
|
+
notesLine: S ? '' : !replay ? 'Reading the notes.' : replay.state === 'error' ? 'The notes could not be read: ' + clip(replay.error, 120) : replay.state === 'none' ? 'No notes for this meeting.' : '',
|
|
119
124
|
replay: rep && (rep.audio || heard) ? { minutes: heard, keyPoints: keys.length, lines: Array.isArray(rep.lines) ? rep.lines.length : 0 } : null,
|
|
120
125
|
material: material && material.state === 'ok' ? (material.items || []).map((i, n) => ({ n, title: clip(i.title || i.ref || i.url, 120), kind: i.kind || '', topic: clip(i.topic, 80), scope: i.scope === 'series' ? 'every meeting of this series' : 'this meeting', removable: i.from === 'you' && (i.scope === 'series' || i.scope === 'meeting'), line: removeLine(i) })) : null,
|
|
121
126
|
...prepOf(row, people, material, extra, aboutOf(row.level)),
|
|
@@ -471,35 +476,39 @@ export function mountMeeting(d) {
|
|
|
471
476
|
const IC = { spark: '<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"/>', clock: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>', scale: '<path d="M12 4v16M6 20h12M5 8h14M5 8l-2 6a3 3 0 0 0 4 0zM19 8l-2 6a3 3 0 0 0 4 0z"/>', doc: '<path d="M7 3h7l4 4v14H7zM14 3v4h4"/>', user: '<circle cx="12" cy="8" r="4"/><path d="M4 21c1-4 4-6 8-6s7 2 8 6"/>', link: '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>', mic: '<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/>', plus: '<path d="M12 5v14M5 12h14"/>', x: '<path d="M6 6l12 12M18 6 6 18"/>', check: '<path d="M5 12.5l4.5 4.5L19 7.5"/>' };
|
|
472
477
|
const ic = (n) => `<svg class="i" viewBox="0 0 24 24">${IC[n]}</svg>`;
|
|
473
478
|
const secH = (t, tag, extra) => `<h4 class="sh">${esc(t)}${tag ? ` <small>${esc(tag)}</small>` : ''}${extra || ''}</h4>`;
|
|
474
|
-
const items = (L, task) => `<ul class="mtg-l">${L.map((x, i) => `<li>${esc(x.text)}${x.owner || x.due ? `<em>${esc([x.owner, x.due].filter(Boolean).join(' · '))}</em>` : ''}${task ? `<button class="mtg-b mtg-task" data-task="${i}"${task.done.has(i) ? ' disabled' : ''}>${task.done.has(i) ? 'Task made' : 'Make task'}</button>` : ''}</li>`).join('')}</ul>`;
|
|
475
479
|
const pickLi = (it, key, on) => `<li class="mtg-pick"><span>${esc(clip(it.title, 120))}<em>${esc([it.kind, it.meta].filter(Boolean).join(' · '))}</em></span>${on ? '<span class="mtg-on">Picked</span>' : `<button class="mtg-b" data-pick="${esc(key)}">Pick</button>`}</li>`;
|
|
476
480
|
|
|
477
481
|
function detailHtml(v, boards, inis, saved, ui) {
|
|
478
|
-
const r = v.row, lv = r.level, note = noteOfRow(NR, r);
|
|
482
|
+
const r = v.row, lv = r.level, note = noteOfRow(NR, r), S = v.sheet;
|
|
479
483
|
const aboutNow = lv ? aboutOf(lv) : saved || '';
|
|
480
484
|
const opts = [['', aboutNow ? 'Change what it is about' : 'Choose what it is about'], ['portfolio', 'Portfolio']].concat(boards.map((b) => ['board|' + b.ws + '|' + b.id, 'Board: ' + b.name]), inis.map((i) => ['initiative|' + i.id, 'Initiative: ' + i.name]), [['none', 'Remove the link']]);
|
|
481
485
|
const link = `<div class="mtg-link"><select id="mtgSel" aria-label="What this meeting is about">${opts.map(([val, t]) => `<option value="${esc(val)}">${esc(t)}</option>`).join('')}</select><button class="addb pri" id="mtgLink" disabled>Link it</button></div>
|
|
482
486
|
<p class="note" id="mtgMsg" role="status">The link applies to every occurrence of “${esc(r.title)}”. The calendar itself is never written.</p>`;
|
|
483
487
|
const n = v.notes;
|
|
484
|
-
const task = n && n.actions.length ? { done: ui.tasked } : null;
|
|
485
|
-
const notes = v.notesLine ? `<p class="mut">${esc(v.notesLine)}</p>` : [n.title ? `<p><b>${esc(n.title)}</b></p>` : '',
|
|
486
|
-
n.decisions.length ? `<h4 class="mtg-h">Decisions ${n.decisions.length}</h4>${items(n.decisions)}` : '', n.actions.length ? `<h4 class="mtg-h">Next steps ${n.actions.length}</h4>${items(n.actions, task)}` : '',
|
|
487
|
-
n.questions.length ? `<h4 class="mtg-h">Open questions ${n.questions.length}</h4>${items(n.questions)}` : '', (n.decisions.length + n.actions.length + n.questions.length) ? '' : '<p class="mut">The note holds no decisions, next steps or questions yet.</p>'].join('');
|
|
488
488
|
const person = (nm) => `<span class="pp"><i class="av2">${esc(String(nm).trim().charAt(0).toUpperCase())}</i>${esc(clip(nm, 40))}</span>`;
|
|
489
|
-
const prow = (x) => `<div class="prow"><span class="pi${x.ok ? '' : ' w'}">${ic(x.ic)}</span><div><b>${esc(x.l)}</b><div class="pv">${x.about && aboutNow ? '<span>It is about <b>' + esc(aboutNow) + '</b
|
|
489
|
+
const prow = (x) => `<div class="prow"><span class="pi${x.ok ? '' : ' w'}">${ic(x.ic)}</span><div><b>${esc(x.l)}</b><div class="pv">${x.about && aboutNow ? '<span>It is about <b>' + esc(aboutNow) + '</b>.</span>' : x.people ? x.people.map(person).join('') : x.chips && x.chips.length ? x.chips.map((c) => `<span class="chp sm">${ic('doc')}${esc(c)}</span>`).join('') : '<span>' + esc(x.text) + '</span>'}</div></div>${x.ok ? '<span class="chp ok sm"><i></i>Ready</span>' : '<span class="chp warn sm"><i></i>Not yet</span>'}</div>`;
|
|
490
490
|
const ready = v.prepReady;
|
|
491
491
|
const prep = secH('Prepared for you', ready === v.prep.length ? 'all ready' : ready + ' of ' + v.prep.length + ' ready') + `<div class="prows">${v.prep.map(prow).join('')}</div>`;
|
|
492
492
|
const mats = v.materialLine ? `<p class="mut">${esc(v.materialLine)}</p>` : `<div class="mats">${v.material.map((m) => `<div class="mat"><span class="kd">${esc(m.kind || 'link')}</span><div><b>${esc(m.title)}</b><small>${esc([m.topic, 'for ' + m.scope].filter(Boolean).join(' · '))}</small></div><span class="mb">${m.removable ? `<button class="ib2 mtg-rm" data-rm="${m.n}" aria-label="Remove ${esc(m.title)}" title="${esc(m.line)}">${ic('x')}</button>` : ''}</span></div>`).join('')}</div>`;
|
|
493
493
|
const mat = secH('Material', v.material && v.material.length ? v.material.length + ' linked' : '', `<button class="addb" id="mmAdd" title="Your calendar invite is not changed.">${ic('plus')}Add material</button>`) + mats;
|
|
494
494
|
const prev = secH('Previous meetings', v.prev.length ? v.prev.length + ' before this' : '') + (v.prev.length ? `<div class="prevs">${v.prev.map((p) => `<div class="pvx"><div class="pvh"><time>${esc(p.date)}</time><span>${p.decided} decided</span><span>${p.steps} new next ${p.steps === 1 ? 'step' : 'steps'}</span></div></div>`).join('')}</div>` : '<p class="mut">No earlier notes of this meeting are kept.</p>');
|
|
495
495
|
const tops = secH('Topics', v.planned.length ? 'planned' : '') + (v.planned.length ? `<div class="tops">${v.planned.map((t, i) => `<div class="tp plan"><i>${i + 1}</i><span>${esc(clip(t.text, 120))}</span><small>planned</small></div>`).join('')}</div>` : '<p class="mut">The meeting has no topics yet.</p>');
|
|
496
|
-
|
|
497
|
-
const
|
|
496
|
+
/* After: from the note's own record when the meeting has one (premium-vw-meet.js), else the decisions, steps and questions the replay answer holds */
|
|
497
|
+
const task = { has: (i) => ui.tasked.has(i) };
|
|
498
|
+
const sx = { esc, tasked: task, replayBtn: !!v.replay, where: 'meeting', id: S ? S.id : null };
|
|
499
|
+
const after = S ? stageHtml('after', S, sx)
|
|
500
|
+
: secH('Notes', v.notesLine ? '' : 'from the meeting note') + (v.notesLine ? `<p class="mut">${esc(v.notesLine)}</p>` : (n.title ? `<p><b>${esc(n.title)}</b></p>` : '') + notesTablesHtml(n, esc, task) + ((n.decisions.length + n.actions.length + n.questions.length) ? '' : '<p class="mut">The note holds no decisions, next steps or questions yet.</p>'))
|
|
501
|
+
+ (v.replay ? secH('Replay', 'kept on this machine') + `<p>A recording is kept: ${v.replay.minutes ? v.replay.minutes + ' min, ' : ''}${v.replay.keyPoints} key ${v.replay.keyPoints === 1 ? 'point' : 'points'}.</p><div class="mtg-foot"><button class="addb pri" data-m3="replay">Replay</button><span class="note">Plays the note’s audio kept on this machine, with the transcript and the key points.</span></div>` : '');
|
|
498
502
|
const chips = statusChips(r, note).map((c) => `<span class="chp${c.kind ? ' ' + c.kind : ''}"><i></i>${esc(c.text)}</span>`).join('');
|
|
499
|
-
const done = !!(note && note.state === 'ended') || (r.past && !!v.replay);
|
|
500
503
|
const status = ui.status ? `<p class="note mtg-status" id="mtgStatus" role="status">${esc(ui.status.text)}${ui.status.undo ? ' <button class="mtg-b" id="mtgUndo">Undo</button>' : ''}</p>` : '<p class="note mtg-status" id="mtgStatus" role="status" hidden></p>';
|
|
501
|
-
const
|
|
502
|
-
|
|
504
|
+
const when = esc(r.day) + ' · ' + esc(r.time) + (r.end && hasTime(r.end) ? ' to ' + esc(hhmm(r.end)) : '') + (r.len ? ' · ' + esc(r.len) : '');
|
|
505
|
+
const hdr = `<div class="mh2"><div><h3 class="d1">${esc(r.title)}</h3>${v.people.length ? `<p class="mt">With ${esc(v.people.join(', '))}</p>` : ''}</div><div class="chs">${chips}</div></div>`;
|
|
506
|
+
const lines = `<div class="vm-ln">${ic('clock')}<span>${when}</span></div><div class="vm-ln">${ic('link')}${aboutNow ? `<span>It is about <b>${esc(aboutNow)}</b>.${lv && lv.why ? ' ' + esc(lv.why) + '.' : ''}</span>` : `<span class="mut">${r.past ? 'The calendar answer holds no link for an earlier meeting.' : 'Not linked yet.'}</span>`}<button type="button" class="vm-lk" data-vm="about" aria-expanded="${!!ui.about}">${aboutNow ? 'Change' : 'Link it'}</button></div><div class="vm-about"${ui.about ? '' : ' hidden'}>${link}</div>`;
|
|
507
|
+
const ph = ui.phase || 'before', part = (k, html) => `<div class="vm-body" data-part="${k}"${ph === k ? '' : ' hidden'}>${html}</div>`;
|
|
508
|
+
return `<article class="paper doc mtg vm">${status}${hdr}${lines}${seriesHtml(S, esc)}${actsHtml(r, ui)}${phaseHtml(ph, esc)}`
|
|
509
|
+
+ part('before', stageHtml('before', S, sx) + [prep, mat, prev, tops].join(''))
|
|
510
|
+
+ part('during', stageHtml('during', S, sx))
|
|
511
|
+
+ part('after', after) + '</article>';
|
|
503
512
|
}
|
|
504
513
|
function sheetHtml(row) {
|
|
505
514
|
return `<article class="paper doc mtg mtg-sheet"><button class="mtg-b" id="mmBack">Back to the meeting</button>
|
|
@@ -508,9 +517,25 @@ export function mountMeeting(d) {
|
|
|
508
517
|
${sec('Or paste a link', '<input class="mtg-in" id="mmLinkIn" type="url" placeholder="Any https address" aria-label="Paste a link" autocomplete="off"><div id="mmPaste"></div>')}<div id="mmOpts"></div></article>`;
|
|
509
518
|
}
|
|
510
519
|
|
|
520
|
+
/** Make task: the step goes into the first stage of the note's initiative (POST /api/plan-items). Answers { ok, text, undo? }. */
|
|
521
|
+
async function planTask(n, step) {
|
|
522
|
+
if (!n || !n.initiative) return { ok: false, text: taskEvent(n, step, null).reason };
|
|
523
|
+
const lay = await d.pmGet('/api/plan-items?ladder=0&ws=' + encodeURIComponent(n.initiative.ws) + '&id=' + encodeURIComponent(n.initiative.id));
|
|
524
|
+
const plan = taskEvent(n, step, lay && lay.ok && (lay.stages || [])[0]);
|
|
525
|
+
if (!plan.ok) return { ok: false, text: 'The task was not made: ' + plan.reason };
|
|
526
|
+
const res = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [plan.event] });
|
|
527
|
+
if (!res || res.ok !== true) return { ok: false, text: 'The task was not made' + (res && res.error ? ': ' + res.error : '.') };
|
|
528
|
+
const item = res.written && res.written[0] && res.written[0].item;
|
|
529
|
+
return { ok: true, text: `Added to ${n.initiative.name}, under ${(lay.stages[0].label || lay.stages[0].id)}.`, undo: item ? async () => {
|
|
530
|
+
const u = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [{ ev: 'withdrawn', item, initiative: n.initiative.id }] });
|
|
531
|
+
return u && u.ok === true ? { ok: true } : { ok: false, text: 'The task was not withdrawn' + (u && u.error ? ': ' + u.error : '.') };
|
|
532
|
+
} : null };
|
|
533
|
+
}
|
|
534
|
+
|
|
511
535
|
async function openRow(row, via) {
|
|
536
|
+
delete $('#oMain').dataset.ready;
|
|
512
537
|
let replay = null, material = null, extra = { prev: [], topics: [] }, boards = W ? W.boards : [], inis = W ? W.initiatives : [], saved = '';
|
|
513
|
-
const ui = { view: 'detail', status: null, tasked: new Set() }, SH = { sug: null, found: [], pick: null, scope: 'meeting', q: '', link: '', token: 0, topics: [], topic: null };
|
|
538
|
+
const ui = { view: 'detail', status: null, tasked: new Set(), phase: 'before', picked: false }, SH = { sug: null, found: [], pick: null, scope: 'meeting', q: '', link: '', token: 0, topics: [], topic: null };
|
|
514
539
|
let stT = null, findT = null, undoFn = null;
|
|
515
540
|
const view = () => meetingView(row, replay, material, extra);
|
|
516
541
|
const say = (text, undo) => { clearTimeout(stT); undoFn = undo || null; ui.status = { text, undo: undo || null }; if (ui.view === 'detail') { paint(); stT = setTimeout(() => { ui.status = null; if (ui.view === 'detail') paint(); }, 9000); } else d.toast(text); };
|
|
@@ -518,6 +543,7 @@ export function mountMeeting(d) {
|
|
|
518
543
|
const pane = $('#dOut'), top = pane ? pane.scrollTop : 0, same = ui.last === ui.view; ui.last = ui.view;
|
|
519
544
|
$('#oMain').innerHTML = ({ add: () => sheetHtml(row), focus: focusHtml, replay: replayHtml }[ui.view] || (() => detailHtml(view(), boards, inis, saved, ui)))();
|
|
520
545
|
if (ui.view === 'add') paintSheet();
|
|
546
|
+
else if (ui.view === 'detail') { const S = view().sheet, sx = { esc, tasked: { has: (i) => ui.tasked.has(i) }, replayBtn: !!view().replay, where: 'meeting', id: S ? S.id : null, reread: async () => { await readSheet(); paint(); } }; for (const [k] of PHASES) wireStage(k, $(`#oMain .vm-body[data-part="${k}"]`), S, sx); }
|
|
521
547
|
if (pane && same) pane.scrollTop = top;
|
|
522
548
|
};
|
|
523
549
|
const alive = (v) => ui.view === v && $('#dlg').classList.contains('on') && $('#dTitle').textContent === row.title;
|
|
@@ -676,7 +702,20 @@ export function mountMeeting(d) {
|
|
|
676
702
|
const mt = await d.pmGet(matPath());
|
|
677
703
|
material = mt && mt.ok === true ? { state: 'ok', items: mt.items || [] } : { state: 'error', error: (mt && mt.error) || 'no answer' };
|
|
678
704
|
}
|
|
705
|
+
/* The meeting's note, as the console's note sheet reads it (GET /api/notes/one): Before, During and After draw its parts. */
|
|
706
|
+
async function readSheet() {
|
|
707
|
+
const nt = noteOfRow(NR, row);
|
|
708
|
+
const one = nt ? await d.pmGet('/api/notes/one?id=' + encodeURIComponent(nt.id)) : null;
|
|
709
|
+
extra = { ...extra, sheet: noteSheet(one) };
|
|
710
|
+
}
|
|
711
|
+
/* The stage the head opens on, until the PM picks one: During while the note records, After once there are notes, else Before. */
|
|
712
|
+
function pickPhase() {
|
|
713
|
+
if (ui.picked) return;
|
|
714
|
+
const v = view(), n = v.notes, nt = noteOfRow(NR, row);
|
|
715
|
+
ui.phase = phaseOf({ noteState: nt && nt.state, hasNotes: !!(v.sheet && v.sheet.overview) || !!v.replay || !!(n && n.decisions.length + n.actions.length + n.questions.length) });
|
|
716
|
+
}
|
|
679
717
|
const matPath = () => '/api/meeting-material?event=' + encodeURIComponent(row.id) + '&title=' + encodeURIComponent(row.title) + (row.series ? '&series=' + encodeURIComponent(row.series) : '') + '&date=' + row.day;
|
|
718
|
+
vmStyle();
|
|
680
719
|
d.openDlg({ eye: 'Calendar · real data', title: row.title, sub: [row.day, row.time, row.len, row.who && row.who.length ? row.who.join(', ') : ''].filter(Boolean).join(' · '), noteKey: via === 'today' ? 'ev:meeting:' + Date.parse(row.at) : null,
|
|
681
720
|
stream: d.turnA(d.ptx('This meeting is in the calendar PMOS holds. Its notes, material and recording appear here only if PMOS holds them.')), pane: detailHtml(meetingView(row, null, null), boards, inis, '', ui), label: 'Meeting' });
|
|
682
721
|
if (via !== 'today') $('#askF').hidden = true;
|
|
@@ -686,11 +725,13 @@ export function mountMeeting(d) {
|
|
|
686
725
|
material = mt && mt.ok === true ? { state: 'ok', items: mt.items || [] } : { state: 'error', error: (mt && mt.error) || 'no answer' };
|
|
687
726
|
await readNotes();
|
|
688
727
|
if ($('#dTitle').textContent !== row.title) return;
|
|
689
|
-
|
|
728
|
+
await readSheet();
|
|
729
|
+
if ($('#dTitle').textContent !== row.title) return;
|
|
730
|
+
pickPhase(); paint(); if (HOLD) tickClock(); mark();
|
|
690
731
|
{
|
|
691
732
|
const sk = (noteOfRow(NR, row) || {}).series, [sr, tp] = await Promise.all([sk && sk.key ? d.pmGet('/api/notes/series?key=' + encodeURIComponent(sk.key)) : null, d.pmGet(matPath() + '&topics=1')]);
|
|
692
733
|
if ($('#dTitle').textContent !== row.title) return;
|
|
693
|
-
extra = { prev: prevOf(sr, row), topics: tp && tp.ok && Array.isArray(tp.topics) ? tp.topics.filter((t) => t && t.text).slice(0, 8) : [] };
|
|
734
|
+
extra = { ...extra, prev: prevOf(sr, row), topics: tp && tp.ok && Array.isArray(tp.topics) ? tp.topics.filter((t) => t && t.text).slice(0, 8) : [] };
|
|
694
735
|
if (ui.view === 'detail') paint();
|
|
695
736
|
}
|
|
696
737
|
|
|
@@ -704,19 +745,20 @@ export function mountMeeting(d) {
|
|
|
704
745
|
}
|
|
705
746
|
async function makeTask(i) {
|
|
706
747
|
const n = view().notes, step = n && n.actions[i]; if (!step) return;
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
const plan = taskEvent(n, step, lay && lay.ok && (lay.stages || [])[0]);
|
|
710
|
-
if (!plan.ok) return say('The task was not made: ' + plan.reason);
|
|
711
|
-
const res = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [plan.event] });
|
|
712
|
-
if (!res || res.ok !== true) return say('The task was not made' + (res && res.error ? ': ' + res.error : '.'));
|
|
748
|
+
const res = await planTask(n, step);
|
|
749
|
+
if (!res.ok) return say(res.text);
|
|
713
750
|
ui.tasked.add(i);
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
if (u && u.ok === true) { ui.tasked.delete(i); say('The task is withdrawn.'); } else say('The task was not withdrawn' + (u && u.error ? ': ' + u.error : '.'));
|
|
751
|
+
say(res.text, res.undo ? async () => {
|
|
752
|
+
const u = await res.undo();
|
|
753
|
+
if (u.ok) { ui.tasked.delete(i); say('The task is withdrawn.'); } else say(u.text);
|
|
718
754
|
} : null);
|
|
719
755
|
}
|
|
756
|
+
async function member(key) {
|
|
757
|
+
const S = view().sheet; if (!S) return;
|
|
758
|
+
const r = await d.pmPost('/api/notes/series-member', { id: S.id, key });
|
|
759
|
+
if (!r || r.ok !== true) return say('Not saved' + (r && r.error ? ': ' + r.error : '.'));
|
|
760
|
+
await readSheet(); say(key === 'off' ? 'Taken out of the series.' : 'Back in its series.');
|
|
761
|
+
}
|
|
720
762
|
async function openSheet() {
|
|
721
763
|
ui.view = 'add'; SH.sug = null; SH.found = []; SH.pick = null; SH.q = ''; SH.link = ''; SH.topics = []; SH.topic = null; paint();
|
|
722
764
|
$('#mmBack').focus();
|
|
@@ -736,10 +778,21 @@ export function mountMeeting(d) {
|
|
|
736
778
|
findT = setTimeout(async () => { const r = await d.pmGet('/api/meeting-material/suggest?' + suggestQuery(row, { q: SH.q, ws: d.ws() })); if (my !== SH.token || ui.view !== 'add') return; SH.foundBusy = false; SH.found = r && r.ok && Array.isArray(r.found) ? r.found : []; paintSheet(); }, 220);
|
|
737
779
|
}
|
|
738
780
|
};
|
|
781
|
+
$('#oMain').dataset.ready = 'meeting'; // the dialog's answers are read and its presses are live (the Before / During / After switch holds from here)
|
|
739
782
|
$('#oMain').onchange = (e) => { if (e.target.id === 'mtgSel') $('#mtgLink').disabled = !e.target.value; };
|
|
740
783
|
$('#oMain').onclick = async (e) => {
|
|
741
784
|
const t = e.target.closest('button'); if (!t) return;
|
|
742
785
|
if (t.dataset.m3) return m3Press(t.dataset.m3, t);
|
|
786
|
+
if (t.dataset.ph) {
|
|
787
|
+
ui.phase = t.dataset.ph; ui.picked = true;
|
|
788
|
+
$$('#oMain .vm-ph [data-ph]').forEach((b) => b.setAttribute('aria-pressed', String(b === t)));
|
|
789
|
+
$$('#oMain .vm-body[data-part]').forEach((x) => { x.hidden = x.dataset.part !== ui.phase; });
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
if ((t.dataset.vm === 'prev' || t.dataset.vm === 'next') && t.dataset.id) return openNoteTab({ pmGet: d.pmGet, pmPost: d.pmPost, esc, toast: d.toast, task: planTask }, t.dataset.id);
|
|
793
|
+
if (t.dataset.vm === 'about') { ui.about = !ui.about; t.setAttribute('aria-expanded', String(ui.about)); const x = $('#oMain .vm-about'); if (x) x.hidden = !ui.about; if (ui.about) $('#mtgSel').focus(); return; }
|
|
794
|
+
if (t.dataset.vm === 'serout') return member('off');
|
|
795
|
+
if (t.dataset.vm === 'serback') return member(null);
|
|
743
796
|
if (t.id === 'mmAdd') return openSheet();
|
|
744
797
|
if (t.id === 'mmBack' || t.id === 'mmCancel') return closeSheet(true);
|
|
745
798
|
if (t.dataset.pick) { SH.pick = pickOf(t.dataset.pick); paintSheet(); return; }
|
|
@@ -764,7 +817,7 @@ export function mountMeeting(d) {
|
|
|
764
817
|
t.disabled = true;
|
|
765
818
|
const res = await d.pmPost('/api/calendar-links', body);
|
|
766
819
|
if (!res || res.ok !== true) { t.disabled = false; $('#mtgMsg').textContent = (res && res.error) || 'The link could not be saved.'; return; }
|
|
767
|
-
saved = body.kind === 'none' ? '' : $('#mtgSel').selectedOptions[0].textContent;
|
|
820
|
+
saved = body.kind === 'none' ? '' : $('#mtgSel').selectedOptions[0].textContent; ui.about = false;
|
|
768
821
|
d.toast(body.kind === 'none' ? 'The link is removed for every occurrence of this meeting.' : 'Linked. It applies to every occurrence of this meeting.');
|
|
769
822
|
await readWeek(); paint(); if (other()) draw();
|
|
770
823
|
};
|
|
@@ -784,5 +837,5 @@ export function mountMeeting(d) {
|
|
|
784
837
|
$('#tl').addEventListener('click', (e) => { const b = e.target.closest('.ev[data-w]'); if (!b) return; e.stopImmediatePropagation(); const r = rowOf(b.dataset.w); if (r) openRow(r, 'week'); }, true);
|
|
785
838
|
readNotes().then(() => mark());
|
|
786
839
|
{ const want = new URLSearchParams(location.search).get('meeting'); if (want) { history.replaceState(null, '', location.pathname + location.search.replace(/[?&]meeting=[^&]*/, '').replace(/^&/, '?')); setTimeout(() => openNote(want), 600); } }
|
|
787
|
-
return { mode: () => (other() ? 'day' : 'today'), draw, openToday, busy: () => busy, mark, openNote, openRow: (row) => openRow(row, 'week') }; // openRow: the full calendar (premium-vw-cal.js)
|
|
840
|
+
return { mode: () => (other() ? 'day' : 'today'), draw, openToday, busy: () => busy, mark, openNote, task: planTask, openRow: (row) => openRow(row, 'week') }; // openRow: the full calendar (premium-vw-cal.js)
|
|
788
841
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* pm/premium-vw-item-model.js — the pure half of the work item view (initiative premium-viewer, S7; planning/prd/premium-viewer-prd.md R9).
|
|
2
|
+
* No DOM, no request: it turns the answer of GET /api/initiative-premium (lib/initiative-premium.js build()) into the HTML of an initiative tab
|
|
3
|
+
* or a task tab, so a node test loads it with import(). Every line is a field of that model; a part the model does not hold is left out,
|
|
4
|
+
* and an answer that is still reading or failed is said as such. Every value is escaped here. */
|
|
5
|
+
|
|
6
|
+
export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
|
7
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
8
|
+
export const when = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
9
|
+
const kv = (rows) => { const r = rows.filter((x) => x && x[1]); return r.length ? `<div class="kv2">${r.map(([k, v]) => `<span>${esc(k)}</span><span>${esc(v)}</span>`).join('')}</div>` : ''; };
|
|
10
|
+
const sec = (title, body) => (body ? `<section class="vwi-s"><p class="label">${esc(title)}</p>${body}</section>` : '');
|
|
11
|
+
const CHECK_TONE = { done: 'ok', blocked: 'bad', pending: 'warn' };
|
|
12
|
+
export const SHOW_TASKS = 8;
|
|
13
|
+
|
|
14
|
+
/** The view ids: the same item opened twice refills one tab. */
|
|
15
|
+
export const iniId = (id) => 'item:ini:' + id;
|
|
16
|
+
export const taskId = (ini, key) => 'item:task:' + ini + ':' + key;
|
|
17
|
+
|
|
18
|
+
/** A task row of the model by its key ('task:<uid>' or 'req:<id>'), or null. */
|
|
19
|
+
export const findTask = (m, key) => (m && m.tasks && Array.isArray(m.tasks.rows) ? m.tasks.rows.find((t) => t.key === key) || null : null);
|
|
20
|
+
|
|
21
|
+
/** The state of an answer: 'ready' with a model, 'reading' while the routes derive, or 'error' with the route's words. */
|
|
22
|
+
export function stateOf(res) {
|
|
23
|
+
if (res && res.ok && res.state === 'ready' && res.model) return { state: 'ready', model: res.model };
|
|
24
|
+
if (res && res.state === 'reading') return { state: 'reading' };
|
|
25
|
+
return { state: 'error', error: (res && res.error) || 'The route did not answer.' };
|
|
26
|
+
}
|
|
27
|
+
export const readingHtml = (what) => `<article class="paper doc vwi"><p class="vwi-wait" role="status">Reading ${esc(what)} from the board. The board derives it from its records, so this can take a moment.</p></article>`;
|
|
28
|
+
export const errorHtml = (what, error) => `<article class="paper doc vwi"><p class="vwi-wait" role="alert">${esc(what)} could not be read: ${esc(error)}</p></article>`;
|
|
29
|
+
|
|
30
|
+
/** The initiative tab. `pageHref` is the initiative page's address for the same board. */
|
|
31
|
+
export function iniHtml(m, pageHref) {
|
|
32
|
+
const h = m.head || {}, rec = (m.files || []).find((f) => /record/i.test(f.label || ''));
|
|
33
|
+
const facts = (m.rows && m.rows[0] && m.rows[0].dialog && m.rows[0].dialog.facts) || [];
|
|
34
|
+
const top = `${rec ? `<p class="dpath">${esc(rec.path)}</p>` : ''}<div class="vwi-head">${h.statusLabel ? `<span class="chp ${esc(h.tone || 'mut')}"><i></i>${esc(h.statusLabel)}</span>` : ''}<b>${esc(m.title)}</b></div>${m.desc ? `<p class="vwi-desc">${esc(m.desc)}</p>` : ''}`;
|
|
35
|
+
const o = m.overview || {};
|
|
36
|
+
const next = o.h ? `<p class="vwi-next"><b>${esc(o.h)}</b>${o.who ? ` · ${esc(o.who)}` : ''}</p>${o.p ? `<p class="vwi-p">${esc(o.p)}</p>` : ''}` : o.why ? `<p class="vwi-p">${esc(o.why)}</p>` : '';
|
|
37
|
+
const watch = [].concat(m.health || [], m.warnings || []);
|
|
38
|
+
const checks = (m.checks || []).length ? `<ul class="vwi-l">${m.checks.map((c) => `<li><span class="chp ${CHECK_TONE[c.state] || 'mut'}"><i></i>${esc(c.stateLabel)}</span><span class="vwi-t"><b>${esc(c.label)}</b>${c.owed ? `<small>${esc(c.owed)}</small>` : ''}</span></li>`).join('')}</ul>` : '';
|
|
39
|
+
const T = m.tasks || { rows: [] }, rows = T.rows || [];
|
|
40
|
+
const tasks = rows.length ? `<ul class="vwi-l">${rows.slice(0, SHOW_TASKS).map((t) => `<li><button type="button" class="vwi-r" data-vwtask="${esc(t.key)}"><span class="vwi-t"><b>${esc(t.title)}</b><small>${esc([t.ref, t.src, t.state].filter(Boolean).join(' · '))}</small></span></button></li>`).join('')}</ul>${rows.length > SHOW_TASKS ? `<p class="vwi-p">${rows.length - SHOW_TASKS} more on the <a href="${esc(pageHref)}">initiative page</a>.</p>` : ''}` : T.note ? `<p class="vwi-p">${esc(T.note)}</p>` : '';
|
|
41
|
+
const docs = ((m.docs && m.docs.rows) || []).filter((d) => d.path && !(m.files || []).some((f) => f.path === d.path));
|
|
42
|
+
const links = (m.files || []).map((f) => [f.label, f.path]).concat(docs.map((d) => [d.title + (d.state ? ' · ' + d.state : ''), d.path]));
|
|
43
|
+
const linkHtml = links.length ? `<ul class="vwi-l">${links.map(([a, b]) => `<li><span class="vwi-t"><b>${esc(a)}</b><small class="vwi-path">${esc(b)}</small></span></li>`).join('')}</ul>` : '';
|
|
44
|
+
const miss = m.header && m.header.missing && m.header.missing.length ? `<p class="vwi-p">Not read: ${esc(m.header.missing.join(', '))}.</p>` : '';
|
|
45
|
+
return `<article class="paper doc vwi">${top}${kv(facts)}${sec('Next', next)}${sec('Watch', watch.length ? `<ul class="vwi-w">${watch.map((w) => `<li>${esc(w)}</li>`).join('')}</ul>` : '')}${sec('Checks', checks)}${sec('Tasks', tasks)}${sec('Links', linkHtml)}${miss}<p class="vwi-foot"><a class="vwi-go" href="${esc(pageHref)}">Open the initiative page</a></p></article>`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** The task tab. A task the model no longer holds says so. */
|
|
49
|
+
export function taskHtml(m, key) {
|
|
50
|
+
const t = findTask(m, key);
|
|
51
|
+
if (!t) return `<article class="paper doc vwi"><p class="vwi-wait" role="status">This task is no longer on ${esc(m.title)}. It may have moved to another initiative or been removed.</p>${iniLink(m)}</article>`;
|
|
52
|
+
const req = t.src === 'PRD requirement';
|
|
53
|
+
const rows = [['Type', t.kind || (req ? 'PRD requirement' : 'Task')], ['Reference', t.ref], ['Source', t.src], ['Owner', t.owner], ['Starts', when(t.start)], ['Due', when(t.end)], ['Status', t.state || (req ? 'No result recorded' : '')], ['Blocked', t.blocked ? 'Yes' : '']];
|
|
54
|
+
const note = req ? 'Read from the initiative’s PRD' + (m.tasks && m.tasks.basis && m.tasks.basis.source ? ' (' + m.tasks.basis.source + ')' : '') + '. The repository records no result for one requirement.'
|
|
55
|
+
: t.pmos ? 'A PMOS task, kept on the board. Change its status from its own dialog on the initiative page.' : 'Read from the board. Jira owns its status and dates.';
|
|
56
|
+
return `<article class="paper doc vwi"><div class="vwi-head"><b>${esc(t.title)}</b></div>${kv(rows)}<p class="vwi-p">${esc(note)}</p>${iniLink(m)}</article>`;
|
|
57
|
+
}
|
|
58
|
+
const iniLink = (m) => `<section class="vwi-s"><p class="label">Initiative</p><ul class="vwi-l"><li><button type="button" class="vwi-r" data-vwini="${esc(m.id)}"><span class="vwi-t"><b>${esc(m.title)}</b><small>${esc([m.head && m.head.statusLabel, m.lane, m.board && m.board.name].filter(Boolean).join(' · '))}</small></span></button></li></ul></section>`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:root{--fs-1:11px;--fs-2:12px;--fs-3:14px;--fs-4:16px;--fs-5:20px;--fs-6:28px}
|
|
2
|
+
/* pm/premium-vw-item.css — the work item view of the premium viewer (initiative premium-viewer, S7). Loaded by vwStyle('item'). Console type sizes only. */
|
|
3
|
+
.vwi .vwi-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 8px}
|
|
4
|
+
.vwi .vwi-head b{font-size:var(--fs-4);font-weight:600;color:var(--ink);overflow-wrap:anywhere}
|
|
5
|
+
.vwi .vwi-desc,.vwi .vwi-p{font-size:var(--fs-3);color:var(--ink-2);margin:6px 0;line-height:1.5}
|
|
6
|
+
.vwi .vwi-next{font-size:var(--fs-3);color:var(--ink);margin:4px 0}
|
|
7
|
+
.vwi .vwi-wait{font-size:var(--fs-3);color:var(--ink-2);margin:0}
|
|
8
|
+
.vwi .vwi-s{margin:18px 0 0}
|
|
9
|
+
.vwi .vwi-s>.label{margin:0 0 8px}
|
|
10
|
+
.vwi .vwi-l{list-style:none;margin:0;padding:0;border:1px solid var(--hair);border-radius:8px;background:var(--card-solid);box-shadow:var(--card-shadow)}
|
|
11
|
+
.vwi .vwi-l>li{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border-top:1px solid var(--hair)}
|
|
12
|
+
.vwi .vwi-l>li:first-child{border-top:0}
|
|
13
|
+
.vwi .vwi-l>li:has(>.vwi-r){padding:0}
|
|
14
|
+
.vwi .vwi-r{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px 12px;text-align:left;background:none;border:0;color:inherit;font:inherit;cursor:pointer;border-radius:6px}
|
|
15
|
+
@media (hover:hover){.vwi .vwi-r:hover{background:var(--well)}}
|
|
16
|
+
.vwi .vwi-r:focus-visible{outline:2px solid var(--ember);outline-offset:-2px}
|
|
17
|
+
.vwi .vwi-t{display:flex;flex-direction:column;gap:2px;min-width:0}
|
|
18
|
+
.vwi .vwi-t b{font-size:var(--fs-3);font-weight:500;color:var(--ink);overflow-wrap:anywhere}
|
|
19
|
+
.vwi .vwi-t small{font-size:var(--fs-2);color:var(--ink-3);overflow-wrap:anywhere}
|
|
20
|
+
.vwi .vwi-path{font-family:var(--mono)}
|
|
21
|
+
.vwi .vwi-w{margin:0;padding-left:18px;font-size:var(--fs-3);color:var(--ink-2)}
|
|
22
|
+
.vwi .vwi-foot{margin:18px 0 0;font-size:var(--fs-3)}
|
|
23
|
+
.vwi .vwi-go,.vwi .vwi-p a{color:var(--ink);font-weight:500;text-decoration:underline;text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px}
|
|
24
|
+
.vwi-open{margin:14px 0 0}
|
|
25
|
+
.vwi-open .dmcta{min-height:44px}
|