create-pmos 0.632.0 → 0.634.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 +27 -135
- 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-adddoc-test.js +3 -0
- package/workspace/briefing-premium-board-test.js +4 -2
- package/workspace/briefing-premium-doc-edit-test.js +3 -0
- package/workspace/briefing-premium-initiative-test.js +4 -0
- package/workspace/briefing-premium-insights-test.js +1 -1
- package/workspace/briefing-premium-sources-test.js +2 -2
- package/workspace/changelog.json +26 -0
- package/workspace/core-docs-workflow-test.js +3 -0
- package/workspace/ev-everywhere-test.js +7 -17
- package/workspace/guide/layout.md +12 -5
- package/workspace/ini-workflow-test.js +3 -0
- package/workspace/lib/meeting-focus.js +5 -3
- package/workspace/lib/repo-identity.js +99 -0
- package/workspace/lib/routes-meeting-focus.js +2 -2
- package/workspace/live-pill-round-test.js +7 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +3 -1
- package/workspace/premium-vw-backlog-test.js +2 -2
- package/workspace/premium-vw-doc-test.js +3 -0
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-vw-jira-test.js +4 -3
- package/workspace/public/pm/bd-ini-panel.js +4 -1
- package/workspace/public/pm/bd-prog-panel.js +3 -3
- package/workspace/public/pm/bd-views.js +8 -2
- package/workspace/public/pm/buddy-core.js +2 -2
- package/workspace/public/pm/cozy-board.css +15 -0
- package/workspace/public/pm/cozy-ev.css +25 -0
- package/workspace/public/pm/cozy-home.css +38 -2
- package/workspace/public/pm/cozy-nav.js +72 -6
- package/workspace/public/pm/cozy-phone-rec.css +68 -0
- package/workspace/public/pm/cozy-phone-rec.js +105 -0
- package/workspace/public/pm/cozy-phone-settings.css +18 -0
- package/workspace/public/pm/cozy-phone-settings.js +73 -0
- package/workspace/public/pm/cozy-phone-swipe.js +51 -0
- package/workspace/public/pm/cozy-pop-work.css +56 -0
- package/workspace/public/pm/cozy-pop-work.js +72 -4
- package/workspace/public/pm/cozy-rec-tab.js +10 -0
- package/workspace/public/pm/cozy-today-app.js +56 -5
- package/workspace/public/pm/cozy-today-page.css +75 -1
- package/workspace/public/pm/cozy-today-view.js +87 -0
- package/workspace/public/pm/cozy-viewer.js +27 -7
- package/workspace/public/pm/home-app.js +31 -2
- package/workspace/public/pm/home-chat.js +8 -0
- package/workspace/public/pm/home-ini.js +7 -3
- package/workspace/public/pm/phone-ask.js +57 -0
- package/workspace/server.js +8 -7
- package/workspace/split-merge-ui-test.js +3 -1
- package/workspace/stage-card-tasks-test.js +6 -0
- package/workspace/stage-card-test.js +3 -0
- package/workspace/task-delete-test.js +3 -0
- package/workspace/task-links-test.js +3 -0
- package/workspace/task-plans-test.js +3 -0
- package/workspace/task-views-test.js +3 -0
- package/workspace/test-lists/phone-design-v2.json +9 -0
- package/workspace/test-lists/repo-identity.json +9 -0
- package/workspace/tk-tasks-test.js +4 -0
|
@@ -281,7 +281,7 @@ function popExtra(id) {
|
|
|
281
281
|
allParts: () => {
|
|
282
282
|
C.VW.drill();
|
|
283
283
|
C.VW.open({ kind: X.ctx.kindOf(id), title: C.iniTitle(id), icon: 'goal', id: 'all:' + id, back: true,
|
|
284
|
-
render: (b) => { b.dataset.pwAll = '1'; const M = curM(); b.innerHTML = M ? pageHtml(id, M) : ''; wire(b, id); wirePage(b, id); } });
|
|
284
|
+
render: (b) => { b.dataset.pwAll = '1'; ALLB = b; const M = curM(); b.innerHTML = M ? pageHtml(id, M) : ''; wire(b, id); wirePage(b, id); } });
|
|
285
285
|
},
|
|
286
286
|
props: () => { const v = X.ctx.view(id); if (v) PP.open(v, H); },
|
|
287
287
|
};
|
|
@@ -495,7 +495,7 @@ export function iniPage(o = {}) {
|
|
|
495
495
|
let rename = X.ctx.renameIni ? X.ctx.renameIni(id, '') : null;
|
|
496
496
|
if (rename) rename = { ...rename, value: X.ctx.iniTitle(id) };
|
|
497
497
|
const dh = dashFor(id);
|
|
498
|
-
BODY = VW.open({ id: 'ov:' + id, kind: X.ctx.kindOf(id), title: X.ctx.iniTitle(id), icon: 'goal', wrap: true, more: () => (PW.on(BODY) ? PW.moreItems(null, popExtra(id)) : []).concat(pageMore(id)), rename, pop: o.pop || undefined,
|
|
498
|
+
BODY = VW.open({ id: 'ov:' + id, kind: X.ctx.kindOf(id), title: X.ctx.iniTitle(id), icon: 'goal', wrap: true, more: () => (PW.on(BODY) ? PW.moreItems(null, popExtra(id)) : []).concat(pageMore(id), PW.on(BODY) && !PW.inPop(BODY) ? moreOf(id, 'page').filter((x) => x.sep || /full record|Sprint/.test(x.label)) : []), rename, // a phone's page (Ph2_init) keeps the record and the sprint pop: o.pop || undefined,
|
|
499
499
|
discuss: () => X.ctx.newIn(id), discussHome: true, // the one view (OvViewers): Discuss starts a new session about it, where + New session was
|
|
500
500
|
// the kind of work (batch 29 item 11, KdV1-3): its glyph stands before Discuss; a tap opens the three kinds
|
|
501
501
|
presses: [WK.pressOf(kindNow(id))].concat(dh ? dh.presses() : []), onPress: (a, btn) => {
|
|
@@ -526,6 +526,7 @@ export function iniAddTask() {
|
|
|
526
526
|
const KIND = { docs: 'Documents', stage: 'Stage' };
|
|
527
527
|
const ICON = { docs: 'doc', stage: 'goal' };
|
|
528
528
|
let BODY = null;
|
|
529
|
+
let ALLB = null; // the body of Every part, while it is open
|
|
529
530
|
/* round 3 item 11b: a Today row that is a task opens its initiative at that task: the row lit, open in place (date, owner, status), in view */
|
|
530
531
|
let LIT = null; // { id, uid, seen }
|
|
531
532
|
/** The task the initiative's next draw lights. id: the initiative; uid: the task. */
|
|
@@ -600,7 +601,10 @@ function draw(b) {
|
|
|
600
601
|
}
|
|
601
602
|
function redrawView() {
|
|
602
603
|
if (!BODY || !BODY.isConnected || !X.ctx) return;
|
|
603
|
-
const cur = X.ctx.VW.current(); if (!cur
|
|
604
|
+
const cur = X.ctx.VW.current(); if (!cur) return;
|
|
605
|
+
// Every part (the old page as a drill-in, the way a phone reaches it): its presses redraw it in place
|
|
606
|
+
if (cur.id === 'all:' + X.ctx.S.ini) { if (ALLB && ALLB.isConnected) { const M = curM(), st = ALLB.scrollTop; ALLB.innerHTML = M ? pageHtml(X.ctx.S.ini, M) : ''; light(ALLB, X.ctx.S.ini); ALLB.scrollTop = st; } return; }
|
|
607
|
+
if (cur.id !== 'ov:' + X.ctx.S.ini) return;
|
|
604
608
|
const ae = document.activeElement, keep = ae && BODY.contains(ae) && ae.id ? ae.id : null, val = keep && ae.value != null ? ae.value : null;
|
|
605
609
|
const st = BODY.scrollTop; draw(BODY); BODY.scrollTop = st;
|
|
606
610
|
if (keep) { const n = BODY.querySelector('#' + keep); if (n) { if (val != null) n.value = val; n.focus(); } }
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* pm/phone-ask.js — Ask PMOS on a phone (phone design, board Ph2_asklist on Exploring 2; build brief nav-structure/phone/build-brief-v2.md).
|
|
2
|
+
*
|
|
3
|
+
* On a phone, Home's page (premium.html) is Ask PMOS: the chats, grouped by the work each is about, "Not in a work yet" last. The header is
|
|
4
|
+
* the title only (the ⋯ of the menu at its right); no search and no new-chat icon: a new chat starts from the composer at the foot. A chat
|
|
5
|
+
* that waits for you carries a blue dot. A row: the chat's name and when it was last used, then its last words ("PMOS: …").
|
|
6
|
+
*
|
|
7
|
+
* askGroups(rows, raw, { titleOf }) → [{ ini, title, n, rows: [{ id, name, word, last, wait }] }] PURE
|
|
8
|
+
* rows: pop-sessions.js sessionRows(...).all; raw: GET /api/sessions .sessions (for each chat's last words). Groups keep the order of
|
|
9
|
+
* their newest chat; "Not in a work yet" (ini null) is last.
|
|
10
|
+
* askHtml(groups, { ready }) → string PURE
|
|
11
|
+
* The rows are buttons data-ask-sid="<session id>"; the composer is a button data-ask-new. home-app.js opens them (the chat as on Home).
|
|
12
|
+
* Reads and writes nothing itself. Text from records goes through esc(). */
|
|
13
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
14
|
+
const svg = (d, w = 16, sw = 1.8) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${sw}" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
15
|
+
const IC = {
|
|
16
|
+
ini: 'M12 4a8 8 0 1 0 0 16a8 8 0 1 0 0-16M12 9a3 3 0 1 0 0 6a3 3 0 1 0 0-6',
|
|
17
|
+
loose: 'M4 5h16v11H9l-5 4z', plus: 'M12 5v14M5 12h14', mic: 'M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3', up: 'M12 19V5M6 11l6-6 6 6',
|
|
18
|
+
};
|
|
19
|
+
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; };
|
|
20
|
+
/** The chat's last words: "PMOS: …" from the session's last output, '' when there is none (zero is silence). */
|
|
21
|
+
export function lastLine(s) {
|
|
22
|
+
const w = s && (s.lastWords || (s.hx && s.hx.lastWords));
|
|
23
|
+
const t = Array.isArray(w) ? w.filter(Boolean).slice(-1)[0] : w;
|
|
24
|
+
return t ? 'PMOS: ' + clip(t, 120) : '';
|
|
25
|
+
}
|
|
26
|
+
export function askGroups(rows, raw = [], o = {}) {
|
|
27
|
+
const titleOf = o.titleOf || (() => '');
|
|
28
|
+
const byId = new Map((raw || []).filter(Boolean).map((s) => [s.id, s]));
|
|
29
|
+
const G = new Map();
|
|
30
|
+
for (const r of rows || []) {
|
|
31
|
+
const k = r.ini || '';
|
|
32
|
+
if (!G.has(k)) G.set(k, { ini: r.ini || null, title: r.ini ? titleOf(r.ini) || r.work || r.ini : 'Not in a work yet', rows: [] });
|
|
33
|
+
G.get(k).rows.push({ id: r.id, name: r.name, word: r.state === 'wait' || r.state === 'work' ? r.at ? timeOnly(r.at, o.now) : '' : r.word, last: lastLine(byId.get(r.id)), wait: r.state === 'wait', work: r.state === 'work' });
|
|
34
|
+
}
|
|
35
|
+
const out = [...G.values()].map((g) => ({ ...g, n: g.rows.length }));
|
|
36
|
+
return out.filter((g) => g.ini).concat(out.filter((g) => !g.ini));
|
|
37
|
+
}
|
|
38
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
39
|
+
const DOW = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
40
|
+
/** The time word of a chat that works or waits: when it was last touched ("10:20", "Tue", "12 Nov"). */
|
|
41
|
+
function timeOnly(iso, now = Date.now()) {
|
|
42
|
+
const d = new Date(iso); if (Number.isNaN(d.getTime())) return '';
|
|
43
|
+
const n = new Date(now);
|
|
44
|
+
if (d.toDateString() === n.toDateString()) return pad(d.getHours()) + ':' + pad(d.getMinutes());
|
|
45
|
+
if (now - d.getTime() < 6 * 864e5 && d.getTime() <= now) return DOW[d.getDay()];
|
|
46
|
+
return d.getDate() + ' ' + MON[d.getMonth()];
|
|
47
|
+
}
|
|
48
|
+
export function askHtml(groups, o = {}) {
|
|
49
|
+
const head = '<header class="pa-top"><h1>Ask PMOS</h1></header>';
|
|
50
|
+
const body = !o.ready ? '<p class="pa-none">Reading your chats.</p>'
|
|
51
|
+
: !groups.length ? '<p class="pa-none">No chats yet. Write to PMOS below to start one.</p>'
|
|
52
|
+
: groups.map((g) => `<section class="pa-g" aria-label="${esc(g.title)}"><h2><span class="pa-gi${g.ini ? '' : ' loose'}">${svg(g.ini ? IC.ini : IC.loose, 14)}</span><span class="pa-gt">${esc(g.title)}</span><em>${esc(g.n)}</em></h2>`
|
|
53
|
+
+ `<ul>${g.rows.map((r) => `<li><button type="button" class="pa-r${r.wait ? ' wait' : ''}" data-ask-sid="${esc(r.id)}" aria-label="${esc(r.name + (r.wait ? '. Waits for you' : r.work ? '. PMOS is working' : '') + (r.last ? '. ' + r.last : ''))}">`
|
|
54
|
+
+ `${r.wait ? '<i class="pa-d" aria-hidden="true"></i>' : ''}<span class="pa-x"><b>${esc(r.name)}</b>${r.last ? `<small>${esc(r.last)}</small>` : ''}</span>${r.word ? `<time>${esc(r.word)}</time>` : ''}</button></li>`).join('')}</ul></section>`).join('');
|
|
55
|
+
const foot = `<div class="pa-foot"><button type="button" class="pa-new" data-ask-new aria-label="Message PMOS: start a new chat"><span class="pa-pl">${svg(IC.plus, 18)}</span><span class="pa-ph">Message PMOS</span><span class="pa-mic">${svg(IC.mic, 18)}</span><span class="pa-go">${svg(IC.up, 18, 2)}</span></button></div>`;
|
|
56
|
+
return `<div class="pa">${head}${body}</div>${foot}`;
|
|
57
|
+
}
|
package/workspace/server.js
CHANGED
|
@@ -781,12 +781,15 @@ function wsByRoot(root) {
|
|
|
781
781
|
// first from any of a repo's trees (git-info.worktreesAt), so index 0 is the group key: it is what
|
|
782
782
|
// turns `pmos` and `pmos ⑂ initiative/foo` from two peer rows into a parent and its child.
|
|
783
783
|
// Both shell git, so both are memoised — wsList() runs on every workspace push.
|
|
784
|
+
// Off the event loop (workspace-event-loop-lag, lib/repo-identity.js): the first read of a folder is the synchronous one
|
|
785
|
+
// below; after that every caller gets the cached answer at once, and a stale one is replaced by ONE background async read.
|
|
786
|
+
// Reading it synchronously every 15 s for every workspace froze the server ~1.2 s each time (the launcher's "no workspace
|
|
787
|
+
// server answered" lines and the tunnel's 502s on the PM's Mac).
|
|
784
788
|
const REPO_KEY_TTL_MS = 15000;
|
|
785
|
-
const
|
|
786
|
-
function repoIdentity(root) {
|
|
787
|
-
|
|
789
|
+
const repoKeys = require('./lib/repo-identity.js').createRepoIdentityCache({ compute: computeRepoIdentity, ttlMs: REPO_KEY_TTL_MS });
|
|
790
|
+
function repoIdentity(root) { return repoKeys.get(root); }
|
|
791
|
+
function computeRepoIdentity(root) {
|
|
788
792
|
const now = Date.now();
|
|
789
|
-
if (hit && now - hit.at < REPO_KEY_TTL_MS) return hit;
|
|
790
793
|
let key = root, name = path.basename(root), branch = null, branchError = null, branchCode = null;
|
|
791
794
|
let remote = null, tree = null;
|
|
792
795
|
try {
|
|
@@ -818,9 +821,7 @@ function repoIdentity(root) {
|
|
|
818
821
|
// one drifts.
|
|
819
822
|
else { branchError = bi.error || 'branch could not be read'; branchCode = bi.code || 'git-error'; }
|
|
820
823
|
} catch { branchError = 'branch could not be read'; branchCode = 'git-error'; }
|
|
821
|
-
|
|
822
|
-
repoKeyCache.set(root, val);
|
|
823
|
-
return val;
|
|
824
|
+
return { at: now, key, name, branch, branchError, branchCode, remote, tree };
|
|
824
825
|
}
|
|
825
826
|
|
|
826
827
|
// ── Shared-tree co-tenancy (workspace-session-concurrency) ────────────────────────────────────
|
|
@@ -22,6 +22,8 @@ const { makeRepos, codeRepo, write, git } = require('./plan-test-repos');
|
|
|
22
22
|
|
|
23
23
|
const BASE = T.BASE;
|
|
24
24
|
const SHOTS = process.env.SHOTS || '';
|
|
25
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
26
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
25
27
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
26
28
|
const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
27
29
|
const results = [];
|
|
@@ -164,7 +166,7 @@ const shot = (p, name) => (SHOTS ? p.screenshot({ path: path.join(SHOTS, name) }
|
|
|
164
166
|
const { ctx, page: p, errors } = await open({ w: 390, h: 844 });
|
|
165
167
|
const key = await p.evaluate(() => { const d = document.querySelector('#ibBody .sm-dot'); const b = d && d.closest('[data-key]'); return b ? b.dataset.key : null; });
|
|
166
168
|
ok('P phone: the dot on the row', !!key);
|
|
167
|
-
if (key) await p.click(`#ibBody [data-key="${key}"]`);
|
|
169
|
+
if (key) { await p.click(`#ibBody [data-key="${key}"]`); await everyPart(p); }
|
|
168
170
|
ok('P phone: the card in the full-screen Viewer', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .sm-card'))));
|
|
169
171
|
await shot(p, 'phone-suggest.png');
|
|
170
172
|
await p.click('#czViewer [data-sm="no"]');
|
|
@@ -110,12 +110,18 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
|
|
|
110
110
|
await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
|
|
111
111
|
await page.evaluate(() => { const b = [...document.querySelectorAll('[data-row="board:usage-billing"] .bt-nm, [data-key="board:usage-billing"]')].find((x) => x.offsetParent); if (b) b.click(); });
|
|
112
112
|
}
|
|
113
|
+
// a phone shows the initiative as the popup's phone page (phone design, Ph2_init); the old page with its Tasks is ⋯ › Every part
|
|
114
|
+
if (touch && where === 'home') { await everyPart(page); await sleep(800); }
|
|
113
115
|
await until(() => page.evaluate((v) => !!document.querySelector(v === 'list' ? '#czViewer .iv-wbs' : '#czViewer :is(.ivt, .iva, .ivk)'), view), 20000);
|
|
114
116
|
// Build and Deliver open (the Board's initiative is in Discover; Home's is in Build)
|
|
115
117
|
await openStage(page, 'build'); await openStage(page, 'deliver');
|
|
116
118
|
await sleep(200);
|
|
117
119
|
return { ctx, page, errors, posts, S };
|
|
118
120
|
};
|
|
121
|
+
const everyPart = async (pg) => {
|
|
122
|
+
await until(() => pg.evaluate(() => !!document.querySelector('#czViewer .pw-ph')), 20000);
|
|
123
|
+
return pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); return !!r; });
|
|
124
|
+
};
|
|
119
125
|
const openStage = (pg, key) => pg.evaluate((k) => {
|
|
120
126
|
const rest = document.querySelector('#czViewer .iv-rest[aria-expanded="false"]');
|
|
121
127
|
const h = document.querySelector(`#czViewer .iv-ws[data-iv-sec="${k}"]`);
|
|
@@ -25,6 +25,8 @@ const BRF = require('./fixtures/briefing-premium-facts.js');
|
|
|
25
25
|
|
|
26
26
|
const BASE = T.BASE;
|
|
27
27
|
const SHOTS = process.env.PMOS_SHOTS || '';
|
|
28
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
29
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
28
30
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
29
31
|
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); } };
|
|
30
32
|
const results = [];
|
|
@@ -116,6 +118,7 @@ async function pure() {
|
|
|
116
118
|
if (sessions) await page.route(/\/api\/sessions(\?.*)?$/, (r) => json(r, { sessions }));
|
|
117
119
|
if (trail) await page.route('**/api/board-trail*', (r) => json(r, trail));
|
|
118
120
|
await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=' + theme);
|
|
121
|
+
if (w <= 760) await everyPart(page);
|
|
119
122
|
const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-hi-v="page"] .iv-mc')), 30000);
|
|
120
123
|
return { ctx, page, errors, posts, up };
|
|
121
124
|
};
|
|
@@ -48,6 +48,8 @@ const openCard = async (pg, uid, V = '#czViewer') => {
|
|
|
48
48
|
await pg.waitForSelector('.tkc.ivq [data-ive-card]', { timeout: 8000 });
|
|
49
49
|
return pg.click('.tkc.ivq [data-ive-card]');
|
|
50
50
|
};
|
|
51
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
52
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
51
53
|
(async () => {
|
|
52
54
|
const exe = findBrowser();
|
|
53
55
|
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
@@ -149,6 +151,7 @@ const openCard = async (pg, uid, V = '#czViewer') => {
|
|
|
149
151
|
{
|
|
150
152
|
const { ctx, page: p, errors } = await open({ w: 390, h: 844, phone: true });
|
|
151
153
|
const opened = await p.evaluate(() => { const r = document.querySelector('#ibBody [data-key="board:scarlet"], #ibBody [data-row="board:scarlet"] .tg-n'); if (r) r.click(); return !!r; });
|
|
154
|
+
await everyPart(p);
|
|
152
155
|
await p.waitForSelector('.iv-tr', { timeout: 8000 }).catch(() => {});
|
|
153
156
|
await unfold(p);
|
|
154
157
|
const box = await p.$('.iv-tr:has(.iv-tt:text-is("Ship the article summaries API")) .iv-cb');
|
|
@@ -65,6 +65,8 @@ function model() {
|
|
|
65
65
|
return m;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
69
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
68
70
|
(async () => {
|
|
69
71
|
const exe = findBrowser();
|
|
70
72
|
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
@@ -102,6 +104,7 @@ function model() {
|
|
|
102
104
|
await page.waitForSelector('#ibBody [data-key]', { timeout: 15000 });
|
|
103
105
|
await page.waitForTimeout(400);
|
|
104
106
|
await page.locator(`[data-key="board:${INI}"]`).first().click();
|
|
107
|
+
if ((o.w || 1520) <= 760) await everyPart(page);
|
|
105
108
|
await page.waitForSelector('#czViewer .iv-th', { timeout: 8000 });
|
|
106
109
|
await page.waitForTimeout(400);
|
|
107
110
|
return { ctx, page, errors, posts };
|
|
@@ -66,6 +66,8 @@ function model() {
|
|
|
66
66
|
return m;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
70
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
69
71
|
(async () => {
|
|
70
72
|
const exe = findBrowser();
|
|
71
73
|
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
@@ -164,6 +166,7 @@ function model() {
|
|
|
164
166
|
const { ctx, page, errors } = await open({ w: 390, h: 844 });
|
|
165
167
|
const n = page.locator('[data-key="board:partner-rate-limits"]').first();
|
|
166
168
|
await n.click();
|
|
169
|
+
await everyPart(page);
|
|
167
170
|
await page.waitForSelector('#czViewer [data-vs-chip]', { timeout: 8000 });
|
|
168
171
|
await page.locator('#czViewer [data-vs-chip]').click();
|
|
169
172
|
await page.waitForSelector('.vs-pop.sheet', { timeout: 4000 });
|
|
@@ -65,6 +65,8 @@ const BRF = require('./fixtures/briefing-premium-facts.js');
|
|
|
65
65
|
const IP = require('./lib/initiative-premium.js');
|
|
66
66
|
const IF = require('./fixtures/initiative-premium-facts.js');
|
|
67
67
|
|
|
68
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
69
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
68
70
|
(async () => {
|
|
69
71
|
const exe = findBrowser();
|
|
70
72
|
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
@@ -89,6 +91,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
|
|
|
89
91
|
await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
|
|
90
92
|
// the initiative's panel, from its row's name
|
|
91
93
|
await page.evaluate(() => { const b = [...document.querySelectorAll('[data-row="board:usage-billing"] .bt-nm, [data-key="board:usage-billing"]')].find((x) => x.offsetParent); if (b) b.click(); });
|
|
94
|
+
if (w <= 760) await everyPart(page);
|
|
92
95
|
await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv .iv-th')));
|
|
93
96
|
return { ctx, page, errors, posts };
|
|
94
97
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "The agreed phone design (phone-design-v2, done test C1-C5, C8): the pure parts of the phone menu, swipe, Today rows, Ask PMOS, the recording's So far and slides. No browser.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"phone-design-v2.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"phone-design-v2.test.js": 1
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "workspace-event-loop-lag: a workspace's repository identity is read with async git after the first read, so sessionList never blocks the server (lib/repo-identity.js). Real git in temporary repositories.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"repo-identity.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"repo-identity.test.js": 3
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -71,6 +71,8 @@ const BOARD = (() => { const M = BP.build(BF.facts()); const r = M.rows.find((x)
|
|
|
71
71
|
const BRIEF = BRP.build(BRF.facts());
|
|
72
72
|
const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {}, stage: {}, sets: [] };
|
|
73
73
|
|
|
74
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
75
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
74
76
|
(async () => {
|
|
75
77
|
const exe = findBrowser();
|
|
76
78
|
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
@@ -111,10 +113,12 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
|
|
|
111
113
|
await page.goto(BASE + '/premium-board.html?theme=' + theme);
|
|
112
114
|
await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
|
|
113
115
|
await page.evaluate((id) => { const b = [...document.querySelectorAll(`[data-row="board:${id}"] .bt-nm, [data-key="board:${id}"]`)].find((x) => x.offsetParent); if (b) b.click(); }, I);
|
|
116
|
+
if (w <= 760) await everyPart(page);
|
|
114
117
|
const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv .iv-th')), 20000);
|
|
115
118
|
return { ctx, page, errors, posts, up, set: (v) => { cur = v; } };
|
|
116
119
|
}
|
|
117
120
|
await page.goto(BASE + '/premium.html?ini=' + I + '&ws=w1&board=w1&theme=' + theme);
|
|
121
|
+
if (w <= 760) await everyPart(page);
|
|
118
122
|
const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-mc')), 30000);
|
|
119
123
|
return { ctx, page, errors, posts, up, set: (v) => { cur = v; } };
|
|
120
124
|
};
|