create-pmos 0.610.0 → 0.612.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 +135 -27
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/board-columns-test.js +2 -1
- package/workspace/board-deliveries-test.js +2 -1
- package/workspace/board-programs-test.js +7 -3
- package/workspace/board-publish-ui-test.js +2 -1
- package/workspace/board-shared-ui-test.js +2 -1
- package/workspace/board-workflows-test.js +2 -1
- package/workspace/briefing-premium-board-test.js +3 -2
- package/workspace/briefing-premium-calendar-2-test.js +3 -2
- package/workspace/briefing-premium-calendar-3-test.js +1 -1
- package/workspace/briefing-premium-calendar-test.js +1 -1
- package/workspace/briefing-premium-doc-edit-test.js +2 -1
- package/workspace/briefing-premium-insights-test.js +4 -3
- package/workspace/briefing-premium-test.js +3 -2
- package/workspace/calm-timeline-test.js +2 -1
- package/workspace/changelog.json +134 -0
- package/workspace/core-docs-workflow-test.js +2 -1
- package/workspace/ev-everywhere-test.js +3 -2
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +4 -0
- package/workspace/guide/layout.md +97 -3
- package/workspace/guide/programs.md +16 -2
- package/workspace/guide/routine.md +65 -0
- package/workspace/guide/scheduled-tasks-and-cli.md +1 -1
- package/workspace/guide/settings-and-switches.md +2 -2
- package/workspace/impact-screens-test.js +3 -1
- package/workspace/ini-workflow-test.js +2 -1
- package/workspace/lib/board-premium.js +12 -4
- package/workspace/lib/classic-board.js +15 -0
- package/workspace/lib/cos-chat.js +1 -0
- package/workspace/lib/doc-library.js +43 -12
- package/workspace/lib/doc-path.js +30 -0
- package/workspace/lib/engine/boards.js +4 -2
- package/workspace/lib/events-place.js +368 -0
- package/workspace/lib/events-stated.js +129 -0
- package/workspace/lib/initiative-chat.js +1 -0
- package/workspace/lib/insights-premium.js +13 -1
- package/workspace/lib/library-find.js +162 -0
- package/workspace/lib/library-items.js +250 -0
- package/workspace/lib/notes.js +9 -1
- package/workspace/lib/plan-items.js +17 -3
- package/workspace/lib/route-modules.js +4 -0
- package/workspace/lib/routes-artefacts.js +5 -2
- package/workspace/lib/routes-boards.js +6 -2
- package/workspace/lib/routes-doc-sheet.js +1 -0
- package/workspace/lib/routes-events-place.js +203 -0
- package/workspace/lib/routes-library.js +155 -0
- package/workspace/lib/routes-pop-work.js +39 -0
- package/workspace/lib/routes-report-setups.js +32 -1
- package/workspace/lib/routes-today-log.js +48 -0
- package/workspace/lib/routine-reports.js +84 -0
- package/workspace/lib/status-when.js +36 -0
- package/workspace/lib/task-items.js +5 -3
- package/workspace/lib/today-log.js +131 -0
- package/workspace/live-pill-round-test.js +10 -7
- package/workspace/metric-drafts-ui-test.js +3 -1
- package/workspace/milestone-pins-test.js +2 -1
- package/workspace/milestone-suggest-test.js +3 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/panels-test.js +2 -1
- package/workspace/premium-board-actions-test.js +3 -1
- package/workspace/premium-rec-tab-test.js +2 -1
- package/workspace/premium-vw-backlog-test.js +3 -1
- package/workspace/premium-vw-item-test.js +3 -1
- package/workspace/premium-vw-jira-test.js +3 -1
- package/workspace/premium-vw-meet-test.js +2 -1
- package/workspace/premium-vw-notes-test.js +3 -2
- package/workspace/product-lane-test.js +2 -1
- package/workspace/program-charter-test.js +3 -1
- package/workspace/program-leave-test.js +2 -1
- package/workspace/program-order-test.js +2 -1
- package/workspace/program-panel-test.js +3 -1
- package/workspace/public/pm/artefact-kind.js +87 -0
- package/workspace/public/pm/bd-ini-panel.js +77 -12
- package/workspace/public/pm/bd-prog-panel.js +55 -8
- package/workspace/public/pm/bd-span.js +5 -0
- package/workspace/public/pm/bd-work.css +192 -0
- package/workspace/public/pm/bd-work.js +483 -0
- package/workspace/public/pm/cozy-bar.css +11 -0
- package/workspace/public/pm/cozy-bar.js +99 -0
- package/workspace/public/pm/cozy-day-pick.css +27 -0
- package/workspace/public/pm/cozy-day-pick.js +97 -0
- package/workspace/public/pm/cozy-ev.css +2 -5
- package/workspace/public/pm/cozy-events-view.js +274 -0
- package/workspace/public/pm/cozy-events.css +179 -0
- package/workspace/public/pm/cozy-events.js +278 -0
- package/workspace/public/pm/cozy-evmodel.js +1 -1
- package/workspace/public/pm/cozy-goals.css +172 -0
- package/workspace/public/pm/cozy-library.css +125 -0
- package/workspace/public/pm/cozy-live-pill.js +1 -0
- package/workspace/public/pm/cozy-nav.js +6 -7
- package/workspace/public/pm/cozy-pick.css +3 -0
- package/workspace/public/pm/cozy-pop-work.css +224 -0
- package/workspace/public/pm/cozy-pop-work.js +668 -0
- package/workspace/public/pm/cozy-popup.css +11 -2
- package/workspace/public/pm/cozy-popup.js +67 -9
- package/workspace/public/pm/cozy-routine-job.js +203 -0
- package/workspace/public/pm/cozy-routine-model.js +219 -0
- package/workspace/public/pm/cozy-routine-pop.js +318 -0
- package/workspace/public/pm/cozy-routine.css +155 -0
- package/workspace/public/pm/cozy-routine.js +335 -0
- package/workspace/public/pm/cozy-schedwork.js +6 -5
- package/workspace/public/pm/cozy-settings.js +1 -5
- package/workspace/public/pm/cozy-status-when.js +48 -0
- package/workspace/public/pm/cozy-today-app.js +236 -0
- package/workspace/public/pm/cozy-today-model.js +176 -0
- package/workspace/public/pm/cozy-today-page.css +100 -0
- package/workspace/public/pm/cozy-today-view.js +76 -0
- package/workspace/public/pm/cozy-viewer.js +19 -8
- package/workspace/public/pm/cozy-vw-mtg.css +39 -0
- package/workspace/public/pm/goals-model.js +205 -0
- package/workspace/public/pm/goals-open.js +124 -0
- package/workspace/public/pm/home-app.js +18 -3
- package/workspace/public/pm/home-chat.js +4 -2
- package/workspace/public/pm/home-ini.js +43 -10
- package/workspace/public/pm/ini-edit.js +3 -1
- package/workspace/public/pm/ini-view-model.js +1 -1
- package/workspace/public/pm/library-model.js +197 -0
- package/workspace/public/pm/library-open.js +37 -0
- package/workspace/public/pm/page-chat.js +12 -2
- package/workspace/public/pm/pop-work-model.js +493 -0
- package/workspace/public/pm/premium-board.js +204 -17
- package/workspace/public/pm/premium-goals.js +213 -0
- package/workspace/public/pm/premium-library.js +436 -0
- package/workspace/public/pm/premium-shell.js +1 -1
- package/workspace/public/pm/premium-vw-mtg.js +79 -1
- package/workspace/public/pm/scope-chip.js +204 -0
- package/workspace/public/premium-board.html +1 -0
- package/workspace/public/premium-events.html +44 -0
- package/workspace/public/premium-goals.html +37 -0
- package/workspace/public/premium-library.html +39 -0
- package/workspace/public/premium-routine.html +33 -0
- package/workspace/public/today.html +50 -0
- package/workspace/ready-dash-ui-test.js +3 -1
- package/workspace/rename-test.js +2 -1
- package/workspace/run-tests.js +4 -1
- package/workspace/server.js +4 -2
- package/workspace/sort-order-test.js +2 -1
- package/workspace/split-merge-ui-test.js +3 -1
- package/workspace/stage-card-tasks-test.js +3 -1
- package/workspace/stage-card-test.js +2 -1
- package/workspace/task-delete-test.js +2 -1
- package/workspace/task-links-test.js +2 -1
- package/workspace/task-milestones-test.js +4 -2
- package/workspace/task-plans-test.js +3 -1
- package/workspace/task-press-test.js +3 -1
- package/workspace/task-views-test.js +3 -1
- package/workspace/test-lists/doc-path.json +9 -0
- package/workspace/test-lists/events-place.json +11 -0
- package/workspace/test-lists/goals-place.json +9 -0
- package/workspace/test-lists/library-place.json +9 -0
- package/workspace/test-lists/pop-work.json +9 -0
- package/workspace/test-lists/routine-place.json +9 -0
- package/workspace/test-lists/status-when.json +9 -0
- package/workspace/test-lists/today-log.json +9 -0
- package/workspace/test-lists/work-view.json +9 -0
- package/workspace/timeline-holds-test.js +3 -1
- package/workspace/tk-tasks-test.js +2 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/* pm/scope-chip.js — one chip for products, programs and projects (events round 2, point 4; Library and Routine use it too).
|
|
2
|
+
*
|
|
3
|
+
* The chip looks like Work's product chip ("All products", "pmos-cas +1"). Its menu has three parts: Products, Programs, Projects.
|
|
4
|
+
* More than one can be picked in each part. Products is the saved product pick (pm/cozy-pick.js: readPick, savePick, the setting every
|
|
5
|
+
* page reads), so a product picked here is picked on Work and Home too. Programs and Projects are the page's own: the page keeps them.
|
|
6
|
+
*
|
|
7
|
+
* TOKENS. A row the page filters carries `scope`, a list of tokens: 'p:<ws>' (its product's workspace), 'g:<program id>' (each program
|
|
8
|
+
* that holds its work) and 'j:<ws>|<initiative id>' (its project, the initiative). A row with no token shows only when nothing narrows.
|
|
9
|
+
*
|
|
10
|
+
* scopeChipHtml(P, sel, o) → the chip. P: readPick()'s answer (or null); sel: { programs: [token], projects: [token] }; o: { id, groups }
|
|
11
|
+
* openScope(chip, o) → the menu under the chip (a sheet on a phone). o: { P, groups, sel, onApply(next), unit?, unitOne? }
|
|
12
|
+
* (unit: the page's count word, "dates" by default: "3 dates", "1 date"; "routines", "items"); next: { products: [ws],
|
|
13
|
+
* programs: [token], projects: [token] }. It applies when the menu closes (Escape, a press outside, the chip
|
|
14
|
+
* again). A product pick that changed is saved with savePick first; the page then follows pp:changed or next.
|
|
15
|
+
* matches(scope, P, sel) → true when the row shows: every product is picked or the row's product is; and no program or project is
|
|
16
|
+
* picked, or the row is under one of them
|
|
17
|
+
* narrowed(P, sel) · scopeWords(P, sel, groups) → is anything narrowed · "pmos-cas, Lightbox GA tracking" for a "Showing … only" line
|
|
18
|
+
* whenNames() → resolves when the display names are in (redraw then) · setNames(workspaces) · productRows(P) → one row per product
|
|
19
|
+
* groups: { programs: [{ id: 'g:…', name, n? }], projects: [{ id: 'j:…', name, product?, n? }] }; a part with no options is left out.
|
|
20
|
+
* Copy says PMOS. Every press is in the menu; nothing writes but savePick. */
|
|
21
|
+
import { savePick, codeOf, tonesOf } from './cozy-pick.js'; // its import adds cozy-pick.css, which this menu uses
|
|
22
|
+
import { pmGet } from './http.js';
|
|
23
|
+
|
|
24
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
25
|
+
const svg = (d, n, w = 2.4) => `<svg width="${n}" height="${n}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${w}" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${d}"/></svg>`;
|
|
26
|
+
const CHEV_D = 'M6 9l6 6 6-6', CHEV_U = 'M6 15l6-6 6 6', TICK = 'M5 12.5l4.5 4.5L19 7.5', PART = 'M7 12h10';
|
|
27
|
+
const isPhone = () => typeof matchMedia === 'function' && matchMedia('(max-width: 760px)').matches;
|
|
28
|
+
const list = (v) => (Array.isArray(v) ? v : v instanceof Set ? [...v] : []);
|
|
29
|
+
|
|
30
|
+
/* ── the products by their display names (the names Work's Product column uses: "IDPF", not "pmos-idpf") ──
|
|
31
|
+
* A work copy ("acme ⑂ initiative/x") or a linked git worktree of a repository ("mainwt") is not a product of its own: it shows as the
|
|
32
|
+
* product it is a copy of, and the two are one row in the menu. The names come from GET /api/workspaces, read once when this module loads;
|
|
33
|
+
* whenNames() resolves when they are in, so a page draws its chip again then. Before that, the pick's own names show. */
|
|
34
|
+
let NAMES = new Map(); // ws → { name, key }: key = the ws of the product it belongs to
|
|
35
|
+
const baseName = (n) => String(n || '').split(' ⑂ ')[0].trim();
|
|
36
|
+
export function setNames(workspaces) {
|
|
37
|
+
const raw = Array.isArray(workspaces) ? workspaces : [];
|
|
38
|
+
const mainOf = (x) => {
|
|
39
|
+
const n = baseName(x.name || x.id);
|
|
40
|
+
const up = (n !== (x.name || x.id) && raw.find((y) => y.name === n)) || (x.linked && x.repo_key && raw.find((y) => y !== x && !y.linked && y.repo_key === x.repo_key));
|
|
41
|
+
return up && up !== x ? up : null;
|
|
42
|
+
};
|
|
43
|
+
const own = (x) => x.label || (x.linked && x.repo_name) || x.name || x.id;
|
|
44
|
+
NAMES = new Map(raw.map((x) => { const m = mainOf(x); return [x.id, { name: own(m || x), key: (m || x).id }]; }));
|
|
45
|
+
}
|
|
46
|
+
let namesP = null;
|
|
47
|
+
export function whenNames() {
|
|
48
|
+
if (!namesP) namesP = pmGet('/api/workspaces').then((w) => setNames(w && w.workspaces)).catch(() => {});
|
|
49
|
+
return namesP;
|
|
50
|
+
}
|
|
51
|
+
try { if (typeof document !== 'undefined') whenNames(); } catch { /* no page */ }
|
|
52
|
+
const nameOfWs = (p) => (NAMES.get(p.ws) || {}).name || p.name;
|
|
53
|
+
const keyOfWs = (p) => (NAMES.get(p.ws) || {}).key || p.ws;
|
|
54
|
+
/** A project's product by its display name: from its token 'j:<ws>|…', else the name the page gave. */
|
|
55
|
+
export const projectProduct = (f) => { const m = /^j:([^|]+)\|/.exec(String(f.id || '')), n = m && NAMES.get(m[1]); return (n && n.name) || f.product || ''; };
|
|
56
|
+
/** The products of the pick, one per display name: [{ key, name, ws: [ws…], p (the first entry, for its tile) }]. */
|
|
57
|
+
export function productRows(P) {
|
|
58
|
+
const rows = [];
|
|
59
|
+
for (const p of (P && P.products) || []) {
|
|
60
|
+
const k = keyOfWs(p), n = nameOfWs(p);
|
|
61
|
+
let r = rows.find((x) => x.key === k || x.name.toLowerCase() === n.toLowerCase());
|
|
62
|
+
if (!r) rows.push(r = { key: k, name: n, ws: [], p: { ...p, name: n } });
|
|
63
|
+
r.ws.push(p.ws);
|
|
64
|
+
}
|
|
65
|
+
return rows;
|
|
66
|
+
}
|
|
67
|
+
const onNames = (P) => productRows(P).filter((r) => r.ws.some((ws) => onWs(P).includes(ws))).map((r) => r.name);
|
|
68
|
+
|
|
69
|
+
/* ── the pure part ── */
|
|
70
|
+
const onWs = (P) => (P && Array.isArray(P.products) ? P.products.filter((p) => p.on).map((p) => p.ws) : []);
|
|
71
|
+
const allOn = (P) => !P || !Array.isArray(P.products) || !P.products.length || P.products.every((p) => p.on);
|
|
72
|
+
export const narrowed = (P, sel = {}) => !allOn(P) || list(sel.programs).length > 0 || list(sel.projects).length > 0;
|
|
73
|
+
export function matches(scope, P, sel = {}) {
|
|
74
|
+
const S = new Set(list(scope));
|
|
75
|
+
if (!allOn(P) && !onWs(P).some((ws) => S.has('p:' + ws))) return false;
|
|
76
|
+
const extra = [...list(sel.programs), ...list(sel.projects)];
|
|
77
|
+
return !extra.length || extra.some((t) => S.has(t));
|
|
78
|
+
}
|
|
79
|
+
const nameOf = (groups, t) => { for (const k of ['programs', 'projects']) { const f = ((groups && groups[k]) || []).find((x) => x.id === t); if (f) return f.name; } return ''; };
|
|
80
|
+
export function scopeWords(P, sel = {}, groups = {}) {
|
|
81
|
+
const parts = [];
|
|
82
|
+
if (!allOn(P)) parts.push(...onNames(P));
|
|
83
|
+
for (const t of [...list(sel.programs), ...list(sel.projects)]) { const n = nameOf(groups, t); if (n) parts.push(n); }
|
|
84
|
+
return parts.join(', ');
|
|
85
|
+
}
|
|
86
|
+
export function scopeChipHtml(P, sel = {}, o = {}) {
|
|
87
|
+
const id = o.id || 'scpChip', open = !!cur && cur.id === id;
|
|
88
|
+
const extra = [...list(sel.programs), ...list(sel.projects)].map((t) => nameOf(o.groups, t)).filter(Boolean);
|
|
89
|
+
const on = onNames(P);
|
|
90
|
+
const prod = allOn(P) ? (extra.length ? '' : 'All products') : on[0] ? on[0] + (on.length > 1 ? ` +${on.length - 1}` : '') : 'No product';
|
|
91
|
+
const ext = extra.length ? extra[0] + (extra.length > 1 ? ` +${extra.length - 1}` : '') : '';
|
|
92
|
+
const label = [prod, ext].filter(Boolean).join(' · ');
|
|
93
|
+
const words = 'Products, programs and projects: ' + (narrowed(P, sel) ? scopeWords(P, sel, o.groups) : 'all');
|
|
94
|
+
return `<button type="button" class="ppk-chip scp-chip${open ? ' open' : ''}" id="${esc(id)}" aria-haspopup="menu" aria-expanded="${open}" aria-label="${esc(words)}" title="${esc(words)}"><span class="ppk-all ppk-nmc">${esc(label)}</span>${svg(open ? CHEV_U : CHEV_D, 14)}</button>`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* ── the menu: one at a time ── */
|
|
98
|
+
let cur = null; // { id, chip, o, ws: Set, programs: Set, projects: Set, el, scrim }
|
|
99
|
+
const box = (st) => `<i class="ppk-tk${st === 'true' ? ' on' : st === 'mixed' ? ' part' : ''}" aria-hidden="true">${st === 'true' ? svg(TICK, 13, 3.4) : st === 'mixed' ? svg(PART, 12, 3.4) : ''}</i>`;
|
|
100
|
+
function itemsHtml(c) {
|
|
101
|
+
const P = c.o.P, g = c.o.groups || {};
|
|
102
|
+
const out = [];
|
|
103
|
+
const PR = productRows(P);
|
|
104
|
+
if (PR.length) {
|
|
105
|
+
const T = tonesOf(PR.map((r) => r.p));
|
|
106
|
+
const st = (r) => { const k = r.ws.filter((ws) => c.ws.has(ws)).length; return k === r.ws.length ? 'true' : k ? 'mixed' : 'false'; };
|
|
107
|
+
const all = PR.every((r) => st(r) === 'true');
|
|
108
|
+
out.push('<p class="scp-h" role="presentation">Products</p>');
|
|
109
|
+
if (PR.length > 1) out.push(`<button type="button" class="ppk-mi" role="menuitemcheckbox" aria-checked="${all ? 'true' : 'mixed'}" data-scp-p="*"><span class="ppk-nm"><b>All products</b></span>${box(all ? 'true' : 'mixed')}</button>`);
|
|
110
|
+
for (const r of PR) out.push(`<button type="button" class="ppk-mi" role="menuitemcheckbox" aria-checked="${st(r)}" data-scp-p="${esc(r.key)}"><span class="ppk-tl t${T[r.p.ws] || 0}" aria-hidden="true">${esc(codeOf(r.p))}</span><span class="ppk-nm"><b>${esc(r.name)}</b></span>${box(st(r))}</button>`);
|
|
111
|
+
}
|
|
112
|
+
for (const [k, label] of [['programs', 'Programs'], ['projects', 'Projects']]) {
|
|
113
|
+
const L = g[k] || [];
|
|
114
|
+
if (!L.length) continue;
|
|
115
|
+
if (out.length) out.push('<div class="ppk-sep" role="separator"></div>');
|
|
116
|
+
out.push(`<p class="scp-h" role="presentation">${label}</p>`);
|
|
117
|
+
for (const f of L) {
|
|
118
|
+
const on = c[k].has(f.id), line = [projectProduct(f), f.n ? f.n + ' ' + (f.n === 1 ? c.unitOne : c.unit) : ''].filter(Boolean).join(' · ');
|
|
119
|
+
out.push(`<button type="button" class="ppk-mi" role="menuitemcheckbox" aria-checked="${on}" data-scp-${k === 'programs' ? 'g' : 'j'}="${esc(f.id)}"><span class="ppk-nm"><b>${esc(f.name)}</b>${line ? `<em>${esc(line)}</em>` : ''}</span>${box(String(on))}</button>`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (c.programs.size || c.projects.size) out.push(`<div class="ppk-sep" role="separator"></div><button type="button" class="ppk-mi" role="menuitem" data-scp-clear><span class="ppk-nm"><b>Every program and project</b></span></button>`);
|
|
123
|
+
return out.join('');
|
|
124
|
+
}
|
|
125
|
+
function place(c) {
|
|
126
|
+
const sheet = isPhone();
|
|
127
|
+
c.el.classList.toggle('sheet', sheet); c.scrim.hidden = !sheet;
|
|
128
|
+
// run-time geometry only as custom properties (conformance R28-1); cozy-pick.css places .scp-menu from them
|
|
129
|
+
if (sheet) { c.el.style.removeProperty('--fr-menu-x'); c.el.style.removeProperty('--fr-menu-y'); return; }
|
|
130
|
+
const ch = chipOf(c), r = ch.getBoundingClientRect(), w = Math.min(348, innerWidth - 24);
|
|
131
|
+
c.el.style.setProperty('--fr-menu-x', Math.max(12, Math.min(r.left, innerWidth - w - 12)) + 'px'); c.el.style.setProperty('--fr-menu-y', Math.round(r.bottom + 8) + 'px');
|
|
132
|
+
}
|
|
133
|
+
const chipOf = (c) => (c.chip.isConnected ? c.chip : document.getElementById(c.id)) || c.chip;
|
|
134
|
+
export async function closeScope(apply = true) {
|
|
135
|
+
const c = cur; if (!c) return;
|
|
136
|
+
cur = null;
|
|
137
|
+
c.el.remove(); c.scrim.remove();
|
|
138
|
+
removeEventListener('keydown', onKey, true); document.removeEventListener('click', onOut, true); removeEventListener('resize', onSize);
|
|
139
|
+
const ch = chipOf(c);
|
|
140
|
+
ch.setAttribute('aria-expanded', 'false'); ch.classList.remove('open');
|
|
141
|
+
const sv = ch.querySelector('svg:last-child path'); if (sv) sv.setAttribute('d', CHEV_D);
|
|
142
|
+
if (ch.isConnected) ch.focus();
|
|
143
|
+
if (!apply) return;
|
|
144
|
+
const P = c.o.P, sel = c.o.sel || {};
|
|
145
|
+
const was = onWs(P), now = P && P.products ? P.products.filter((p) => c.ws.has(p.ws)).map((p) => p.ws) : [];
|
|
146
|
+
const next = { products: now, programs: [...c.programs], projects: [...c.projects] };
|
|
147
|
+
const same = (a, b) => a.length === b.length && a.every((x, i) => x === b[i]);
|
|
148
|
+
if (!same(was, now)) await savePick(now);
|
|
149
|
+
if (!same(was, now) || !same(list(sel.programs), next.programs) || !same(list(sel.projects), next.projects)) c.o.onApply(next);
|
|
150
|
+
}
|
|
151
|
+
function onKey(e) {
|
|
152
|
+
if (!cur) return;
|
|
153
|
+
if (e.key === 'Escape') { e.preventDefault(); e.stopImmediatePropagation(); closeScope(); return; }
|
|
154
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
155
|
+
e.preventDefault();
|
|
156
|
+
const L = [...cur.el.querySelectorAll('button')], i = L.indexOf(document.activeElement);
|
|
157
|
+
L[(i + (e.key === 'ArrowDown' ? 1 : L.length - 1)) % L.length].focus();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function onOut(e) { if (cur && !cur.el.contains(e.target) && !chipOf(cur).contains(e.target)) closeScope(); }
|
|
161
|
+
function onSize() { if (cur) place(cur); }
|
|
162
|
+
export function openScope(chip, o) {
|
|
163
|
+
if (cur && cur.id === chip.id) { closeScope(); return; }
|
|
164
|
+
closeScope();
|
|
165
|
+
const el = document.createElement('div'), scrim = document.createElement('div');
|
|
166
|
+
el.className = 'ppk-menu scp-menu'; el.setAttribute('role', 'menu'); el.setAttribute('aria-label', 'Products, programs and projects');
|
|
167
|
+
el.setAttribute('data-esc-layer', '');
|
|
168
|
+
scrim.className = 'ppk-scrim'; scrim.hidden = true;
|
|
169
|
+
document.body.append(scrim, el);
|
|
170
|
+
const sel = o.sel || {};
|
|
171
|
+
const c = cur = { id: chip.id, chip, o, unit: o.unit || 'dates', unitOne: o.unitOne || (o.unit ? String(o.unit).replace(/s$/, '') : 'date'), ws: new Set(onWs(o.P)), programs: new Set(list(sel.programs)), projects: new Set(list(sel.projects)), el, scrim };
|
|
172
|
+
el.innerHTML = itemsHtml(c); place(c);
|
|
173
|
+
chip.setAttribute('aria-expanded', 'true'); chip.classList.add('open');
|
|
174
|
+
const sv = chip.querySelector('svg:last-child path'); if (sv) sv.setAttribute('d', CHEV_U);
|
|
175
|
+
el.onclick = (e) => {
|
|
176
|
+
e.stopPropagation();
|
|
177
|
+
const b = e.target.closest('button'); if (!b) return;
|
|
178
|
+
let focus = null;
|
|
179
|
+
if (b.matches('[data-scp-clear]')) { c.programs.clear(); c.projects.clear(); }
|
|
180
|
+
else if (b.dataset.scpP != null) {
|
|
181
|
+
// All products ticks every one; a product ticks or unticks; the last one stays ticked (as Work's chip)
|
|
182
|
+
// a product row holds every workspace of that product (a work copy, a worktree): they tick together
|
|
183
|
+
const key = b.dataset.scpP, PR = productRows(o.P), r = PR.find((x) => x.key === key);
|
|
184
|
+
if (key === '*') o.P.products.forEach((p) => c.ws.add(p.ws));
|
|
185
|
+
else if (r && !r.ws.every((ws) => c.ws.has(ws))) r.ws.forEach((ws) => c.ws.add(ws));
|
|
186
|
+
else if (r && [...c.ws].some((ws) => !r.ws.includes(ws))) r.ws.forEach((ws) => c.ws.delete(ws));
|
|
187
|
+
focus = `[data-scp-p="${CSS.escape(key)}"]`;
|
|
188
|
+
} else {
|
|
189
|
+
const k = b.dataset.scpG != null ? 'programs' : b.dataset.scpJ != null ? 'projects' : null;
|
|
190
|
+
if (!k) return;
|
|
191
|
+
const t = k === 'programs' ? b.dataset.scpG : b.dataset.scpJ;
|
|
192
|
+
if (c[k].has(t)) c[k].delete(t); else c[k].add(t);
|
|
193
|
+
focus = `[data-scp-${k === 'programs' ? 'g' : 'j'}="${CSS.escape(t)}"]`;
|
|
194
|
+
}
|
|
195
|
+
el.innerHTML = itemsHtml(c);
|
|
196
|
+
const f = focus && el.querySelector(focus); if (f) f.focus();
|
|
197
|
+
};
|
|
198
|
+
scrim.onclick = () => closeScope();
|
|
199
|
+
addEventListener('keydown', onKey, true);
|
|
200
|
+
setTimeout(() => document.addEventListener('click', onOut, true), 0);
|
|
201
|
+
addEventListener('resize', onSize);
|
|
202
|
+
const f = el.querySelector('button'); if (f) f.focus();
|
|
203
|
+
}
|
|
204
|
+
export const scopeOpen = () => !!cur;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<link rel="stylesheet" href="/pm/load-shapes.css" />
|
|
17
17
|
<link rel="stylesheet" href="/pm/bd-pin-card.css" />
|
|
18
18
|
<link rel="stylesheet" href="/pm/cozy-panel.css" />
|
|
19
|
+
<link rel="stylesheet" href="/pm/bd-work.css" />
|
|
19
20
|
</head>
|
|
20
21
|
<body class="cz bd-page">
|
|
21
22
|
<!-- The Board has no dialog, dock, toast or hero of the old shell: pm/premium-shell.js binds to a detached copy when #dlg is absent. Its panels
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="pmos-nonce" content="" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
|
+
<title>PMOS · Events</title>
|
|
8
|
+
<!-- Events (slice 6 of the six-place navigation, initiative events-place; board 2, StEvPlan): everything with a date in one page with no views.
|
|
9
|
+
Left: Late, Today, Coming up and the later delivery milestones as one line. Right, in one grey box: the small month and Show. It reads
|
|
10
|
+
GET /api/events-place; the page code is pm/cozy-events.js and its markup pm/cozy-events-view.js. -->
|
|
11
|
+
<link rel="preload" href="/vendor/plus-jakarta-sans-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
12
|
+
<link rel="stylesheet" href="/pm/cozy.css" />
|
|
13
|
+
<link rel="stylesheet" href="/pm/cozy-events.css" />
|
|
14
|
+
</head>
|
|
15
|
+
<body class="cz evp-page">
|
|
16
|
+
<main class="cz-panel stage evp" id="stage">
|
|
17
|
+
<div class="evp-hd">
|
|
18
|
+
<h1>Events</h1>
|
|
19
|
+
<div class="evp-scope" id="evpScope"></div>
|
|
20
|
+
<p class="evp-dayf" id="evpDay" hidden>Only <b></b><button type="button" class="evp-ib" data-evp-clear aria-label="Show every day" title="Show every day"><svg aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M6 6l12 12M18 6L6 18"/></svg></button></p>
|
|
21
|
+
<button type="button" class="evp-ib evp-add" data-evp-add aria-label="Add your own date" title="Add your own date"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg></button>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="evp-grid">
|
|
24
|
+
<div class="evp-left">
|
|
25
|
+
<form class="evp-new" id="evpAdd" hidden aria-label="Your own date">
|
|
26
|
+
<input name="what" type="text" placeholder="What, for example: Call Rina about the contract" aria-label="What" autocomplete="off" />
|
|
27
|
+
<input name="when" type="date" aria-label="When" />
|
|
28
|
+
<button type="submit" class="evp-ib evp-yes" aria-label="Add it" title="Add it"><svg aria-hidden="true" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></button>
|
|
29
|
+
</form>
|
|
30
|
+
<p class="evp-note" id="evpNote" role="status" hidden></p>
|
|
31
|
+
<div id="evpHid"></div>
|
|
32
|
+
<div id="evpList" aria-live="polite"><p class="evp-quiet" role="status">Reading the dates.</p></div>
|
|
33
|
+
</div>
|
|
34
|
+
<aside class="evp-side" aria-label="The month">
|
|
35
|
+
<div id="evpMonth"></div>
|
|
36
|
+
<div id="evpShow"></div>
|
|
37
|
+
<p class="evp-hint">Press a type to hide it or show it. Press a day to see only that day. Press the month to open the full calendar.</p>
|
|
38
|
+
</aside>
|
|
39
|
+
</div>
|
|
40
|
+
</main>
|
|
41
|
+
<div class="evp-toast" id="toast" role="status" aria-live="polite"></div>
|
|
42
|
+
<script type="module" src="/pm/cozy-events.js"></script>
|
|
43
|
+
</body>
|
|
44
|
+
</html>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="pmos-nonce" content="" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
|
+
<title>PMOS · Goals</title>
|
|
8
|
+
<!-- Goals (initiative goals-place, slice 9 of the six-place navigation; boards 8, 13, 31, 32, 33 on Exploring 2, handover
|
|
9
|
+
/mnt/project-files/goals-handover/). "Am I on track? What do I do?" as one hierarchy: the North Star, then one table Objective › Key result
|
|
10
|
+
(Actual / target, Left) › Levers › Initiative, a Budget row per health budget with work in it, and the work no key result names (Unlinked).
|
|
11
|
+
A press on a key result, an initiative or ⋯ › Set up opens it in the one popup (pm/cozy-popup.js) with the chat about it. It reads
|
|
12
|
+
GET /api/insights-premium and GET /api/metric-drafts for each ticked product; the only write is the North Star draft's ✓ or ✕, with Undo.
|
|
13
|
+
Charts, dashboards and the goal readings stay on /premium-intelligence.html (⋯ › Charts and dashboards). -->
|
|
14
|
+
<link rel="preload" href="/vendor/plus-jakarta-sans-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
15
|
+
<link rel="stylesheet" href="/pm/cozy.css" />
|
|
16
|
+
<link rel="stylesheet" href="/pm/cozy-pick.css" />
|
|
17
|
+
<link rel="stylesheet" href="/pm/cozy-goals.css" />
|
|
18
|
+
</head>
|
|
19
|
+
<body class="cz gl-page">
|
|
20
|
+
<main class="stage cz-panel gl" id="stage">
|
|
21
|
+
<h1 class="vh">Goals</h1>
|
|
22
|
+
<div class="gl-bar">
|
|
23
|
+
<span class="gl-ttl" aria-hidden="true">Goals</span>
|
|
24
|
+
<span id="glPick"></span>
|
|
25
|
+
<span class="gl-per" id="glPer" hidden></span>
|
|
26
|
+
<span class="gl-sp"></span>
|
|
27
|
+
<button type="button" class="cz-ib" id="glFind" aria-label="Find a goal" title="Find a goal"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M11 4.5a6.5 6.5 0 1 0 0 13a6.5 6.5 0 1 0 0-13M16 16l4 4"/></svg></button>
|
|
28
|
+
<span class="gl-mw"><button type="button" class="cz-ib" id="glFilt" aria-haspopup="menu" aria-expanded="false" aria-controls="glFiltMenu" aria-label="Filter: all, slipping, not read or read" title="Filter"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 6h16M7 12h10M10 18h4"/></svg><i class="gl-fdot" id="glFdot" hidden></i></button><div class="gl-menu" id="glFiltMenu" role="menu" aria-label="Filter" hidden></div></span>
|
|
29
|
+
<span class="gl-mw"><button type="button" class="cz-ib" id="glMore" aria-haspopup="menu" aria-expanded="false" aria-controls="glMoreMenu" aria-label="More: set up, charts and dashboards, export" title="More"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="5.5" cy="12" r="1.3" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.3" fill="currentColor" stroke="none"/><circle cx="18.5" cy="12" r="1.3" fill="currentColor" stroke="none"/></svg></button><div class="gl-menu" id="glMoreMenu" role="menu" aria-label="More" hidden></div></span>
|
|
30
|
+
</div>
|
|
31
|
+
<div id="glBody" aria-live="polite"><div class="gl-sk" aria-hidden="true"><i></i><i></i><i></i><i></i></div></div>
|
|
32
|
+
<p class="gl-n" id="glNote" hidden>Reports are routine jobs, so they live in <a href="/premium-routine.html">Routine</a>: who each one tells, when it runs, what PMOS did.</p>
|
|
33
|
+
</main>
|
|
34
|
+
<noscript>This page needs JavaScript.</noscript>
|
|
35
|
+
<script type="module" src="/pm/premium-goals.js"></script>
|
|
36
|
+
</body>
|
|
37
|
+
</html>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="pmos-nonce" content="" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
|
+
<title>PMOS · Library</title>
|
|
8
|
+
<!-- Library (initiative library-place; slice 7 of the six-place navigation, Library round 2). A catalogue of everything that was made, from
|
|
9
|
+
every product: Name, Kind, Product, About, By, State, Updated. One filter row (Kind, product/program/project, State), the search field (a
|
|
10
|
+
title match at once, the items about it by meaning under it), the tune button (Group by New, Work, Kind or Product) and the + (PMOS adds a
|
|
11
|
+
file, a link or a document). A press opens the item in the one popup (pm/cozy-popup.js) with the chat about it; on a screen 1600 px or wider
|
|
12
|
+
the first press shows the record at the right. It reads GET /api/library-items (lib/routes-library.js). -->
|
|
13
|
+
<link rel="preload" href="/vendor/plus-jakarta-sans-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
14
|
+
<link rel="stylesheet" href="/pm/cozy.css" />
|
|
15
|
+
<link rel="stylesheet" href="/pm/cozy-pick.css" />
|
|
16
|
+
<link rel="stylesheet" href="/pm/cozy-library.css" />
|
|
17
|
+
</head>
|
|
18
|
+
<body class="cz lb-page">
|
|
19
|
+
<main class="stage cz-panel lb" id="stage">
|
|
20
|
+
<h1 class="vh">Library</h1>
|
|
21
|
+
<div class="lb-bar">
|
|
22
|
+
<span class="lb-fl" id="lbFilters" role="group" aria-label="Filters"></span>
|
|
23
|
+
<label class="lb-find"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M11 4.5a6.5 6.5 0 1 0 0 13a6.5 6.5 0 1 0 0-13M16 16l4 4"/></svg><span class="vh">Find in Library</span><input id="lbQ" type="search" autocomplete="off" spellcheck="false" placeholder="Find in Library" /></label>
|
|
24
|
+
<span class="lb-cw lb-cwr"><button type="button" class="cz-ib lb-tune" id="lbTune" aria-haspopup="menu" aria-expanded="false" aria-label="Group by" title="Group by"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h10M18 7h2M4 17h4M12 17h8M16 5v4M10 15v4"/></svg></button></span>
|
|
25
|
+
<button type="button" class="cz-ib lb-add" id="lbAdd" aria-label="Add a file, a link or a new document" title="Add a file, a link or a new document"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></button>
|
|
26
|
+
</div>
|
|
27
|
+
<p class="lb-hid" id="lbHid" aria-live="polite"></p>
|
|
28
|
+
<div class="lb-wrap">
|
|
29
|
+
<div class="lb-main">
|
|
30
|
+
<div id="lbBody" aria-live="polite"><div class="lb-t lb-sk" aria-hidden="true"><div class="lb-r lb-h"><span></span><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div><div class="lb-r"><span></span><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div><div class="lb-r"><span></span><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div></div></div>
|
|
31
|
+
<p class="lb-n" id="lbNote"></p>
|
|
32
|
+
</div>
|
|
33
|
+
<aside class="lb-pv" id="lbPv" hidden aria-label="The record"></aside>
|
|
34
|
+
</div>
|
|
35
|
+
</main>
|
|
36
|
+
<noscript>This page needs JavaScript.</noscript>
|
|
37
|
+
<script type="module" src="/pm/premium-library.js"></script>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="pmos-nonce" content="" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
|
+
<title>PMOS · Routine</title>
|
|
8
|
+
<!-- Routine (initiative routine-place, slice 8 of the six-place navigation; board 11 on Exploring 2): one table of everything that repeats.
|
|
9
|
+
Reports with who they tell, what PMOS reads, PMOS's own jobs and your own scheduled tasks, each with When, Next and a switch that pauses it.
|
|
10
|
+
"PMOS did" is one line on top. A row opens the one popup (pm/cozy-popup.js): a report with its newest issue and its setup, or the setup of
|
|
11
|
+
the routine (pm/cozy-routine-pop.js). The rail (pm/cozy-nav.js) is the navigation. The page code is pm/cozy-routine.js. -->
|
|
12
|
+
<link rel="preload" href="/vendor/plus-jakarta-sans-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
13
|
+
<link rel="stylesheet" href="/pm/cozy.css" />
|
|
14
|
+
<link rel="stylesheet" href="/pm/cozy-pick.css" />
|
|
15
|
+
<link rel="stylesheet" href="/pm/cozy-routine.css" />
|
|
16
|
+
</head>
|
|
17
|
+
<body class="cz">
|
|
18
|
+
<div class="rt-toast" id="toast" role="status" aria-live="polite"></div>
|
|
19
|
+
<main class="cz-panel stage rt-page" id="stage">
|
|
20
|
+
<h1 class="vh">Routine</h1>
|
|
21
|
+
<div class="rt-bar">
|
|
22
|
+
<div class="rt-pick" id="rtPick"></div>
|
|
23
|
+
<div class="rt-seg" id="rtKinds" role="group" aria-label="Show"></div>
|
|
24
|
+
<button type="button" class="rt-add" id="rtAdd" aria-label="Tell PMOS a new routine" title="Tell PMOS a new routine"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></button>
|
|
25
|
+
</div>
|
|
26
|
+
<div id="rtDid"></div>
|
|
27
|
+
<div id="rtTable"><p class="rt-quiet">Reading what repeats.</p></div>
|
|
28
|
+
<p class="rt-msg" id="rtMsg" role="status"></p>
|
|
29
|
+
</main>
|
|
30
|
+
<noscript>This page needs JavaScript.</noscript>
|
|
31
|
+
<script type="module" src="/pm/cozy-routine.js"></script>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="pmos-nonce" content="" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
|
+
<title>PMOS · Today</title>
|
|
8
|
+
<!-- Today (slice 5 of the six-place navigation, initiative today-log-page; board 1 on Exploring 2): the place the app lands on. On a desk it is
|
|
9
|
+
one page, Today's log on the left and today's agenda on the right (pm/cozy-today-view.js, drawn by home-app.js into #tdPage); a row opens its work
|
|
10
|
+
in the one popup with the chat. It is Home's own page with data-today, so every press Home has (the popup, the chat, a meeting, a task)
|
|
11
|
+
works the same here. A phone keeps Home as it is. The markup below is premium.html's. -->
|
|
12
|
+
<!-- Home in the Agreed design (initiative premium-agreed-design, Home; mockup Main.dc.html place="work"). One desk: the list on the left, the chat
|
|
13
|
+
in the middle and the Viewer on the right. An initiative is a layout of this page (?ini=<id>): its card sits at the top of the list. On a phone
|
|
14
|
+
the list is the page, and a row opens its conversation with a back bar (premium-uncovered-features, HmPhone). It replaces the Briefing, My work, Chat and the initiative
|
|
15
|
+
page; their addresses open it. The default page; the old console stays at /console.html and nothing here links to it. -->
|
|
16
|
+
<link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials" />
|
|
17
|
+
<meta name="theme-color" content="#090b0c" />
|
|
18
|
+
<meta name="mobile-web-app-capable" content="yes" />
|
|
19
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
20
|
+
<meta name="apple-mobile-web-app-title" content="PMOS" />
|
|
21
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
|
22
|
+
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
|
|
23
|
+
<link rel="preload" href="/vendor/plus-jakarta-sans-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
24
|
+
<link rel="stylesheet" href="/pm/cozy.css" />
|
|
25
|
+
<link rel="stylesheet" href="/pm/cozy-pick.css" />
|
|
26
|
+
<link rel="stylesheet" href="/pm/cozy-home.css" />
|
|
27
|
+
<link rel="stylesheet" href="/pm/cozy-today.css" />
|
|
28
|
+
<link rel="stylesheet" href="/pm/home-impact.css" />
|
|
29
|
+
<link rel="stylesheet" href="/pm/cozy-panel.css" />
|
|
30
|
+
<link rel="stylesheet" href="/pm/cozy-onboard.css" />
|
|
31
|
+
<link rel="stylesheet" href="/pm/load-shapes.css" />
|
|
32
|
+
<link rel="stylesheet" href="/pm/cozy-today-page.css" />
|
|
33
|
+
</head>
|
|
34
|
+
<body class="cz cz-home" data-today>
|
|
35
|
+
<header class="hm-top" id="hmTop">
|
|
36
|
+
<button type="button" class="hm-ib hm-back" id="hmBack" aria-label="Back to Today" title="Back to Today"><svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M19 12H5M11 6l-6 6 6 6"/></svg></button>
|
|
37
|
+
<div class="hm-top-t"><b id="hmTopTitle">Home</b><span id="hmTopSub"></span></div>
|
|
38
|
+
<button type="button" class="hm-needs" id="hmNeeds" aria-controls="hmList" aria-expanded="false"><i aria-hidden="true"></i><span id="hmNeedsN">Reading</span></button>
|
|
39
|
+
</header>
|
|
40
|
+
<main class="hm-desk" id="hmDesk">
|
|
41
|
+
<aside class="hm-list" id="hmList" aria-label="Sessions"></aside>
|
|
42
|
+
<section class="hm-chat" id="hmChat" aria-label="Conversation"></section>
|
|
43
|
+
<div class="hm-vw" data-cz-viewer-host data-cz-vw-overlay></div>
|
|
44
|
+
<section class="td-page" id="tdPage" aria-label="Today" hidden></section>
|
|
45
|
+
</main>
|
|
46
|
+
<div class="hm-menu" id="hmMenu" role="menu" aria-label="More" hidden></div>
|
|
47
|
+
<div class="hm-toast" id="toast" role="status" aria-live="polite"></div>
|
|
48
|
+
<script type="module" src="/pm/home-app.js"></script>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* P the product page on Home (390 and 1440) is the same one page; the metrics review is a row in its Reports tab.
|
|
15
15
|
* PMOS_SHOTS=<dir> also saves the screenshots. */
|
|
16
16
|
const path = require('path');
|
|
17
|
+
const { besidePage } = require('./lib/beside-page'); // these checks read the full page beside the page; in the popup work shows its three parts (nav slice 3)
|
|
18
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
17
19
|
const fs = require('fs');
|
|
18
20
|
const { spawn } = require('child_process');
|
|
19
21
|
const { findBrowser } = require('./lib/find-browser');
|
|
@@ -50,7 +52,7 @@ const SPONSORS = '# Inline login slips to early December unless passkeys move to
|
|
|
50
52
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
51
53
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
52
54
|
await T.waitForServer(BASE);
|
|
53
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
55
|
+
browser = besidePage(classicBoard(await chromium.launch({ executablePath: exe })));
|
|
54
56
|
if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
|
|
55
57
|
const shot = async (p, name) => { if (SHOTS) { await sleep(450); await p.screenshot({ path: path.join(SHOTS, name + '.png') }); } };
|
|
56
58
|
|
package/workspace/rename-test.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* E a refusal keeps the field open with the reason
|
|
13
13
|
* S on a phone the field fills the header */
|
|
14
14
|
const path = require('path');
|
|
15
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
15
16
|
const { spawn } = require('child_process');
|
|
16
17
|
const { findBrowser } = require('./lib/find-browser');
|
|
17
18
|
const T = require('./test-run').configure({ name: 'rename' });
|
|
@@ -41,7 +42,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
41
42
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
42
43
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
43
44
|
await T.waitForServer(BASE);
|
|
44
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
45
|
+
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
45
46
|
|
|
46
47
|
const model = () => { const m = BP.build(F.programFacts('idpf')); const r = m.rows.find((x) => x.id === 'descope-parity'); if (r) r.epics = ['IDPF-12']; return m; };
|
|
47
48
|
const open = async ({ w = 1440, h = 900, qs = '?ws=idpf&focus=descope-parity', refuse = false } = {}) => {
|
package/workspace/run-tests.js
CHANGED
|
@@ -408,7 +408,10 @@ function traceChanges(changes, ctx) {
|
|
|
408
408
|
// the page map (`const PAGES = { '/path': 'page.html', … }`, one line): a change to it reaches only the suites that name an entry
|
|
409
409
|
// it adds, drops or points elsewhere, by its path or its page file (live round W3: adding /pm/present reached all 511 suites)
|
|
410
410
|
const pm = pagesChanged(raw);
|
|
411
|
-
|
|
411
|
+
// the bare root '/' is in every path, so it counts only as a string of its own ('/' or "/"): a suite that fetches the root
|
|
412
|
+
// (six-place navigation slice 5: '/' moved from premium.html to today.html reached all 526 suites)
|
|
413
|
+
const names = (src, x) => (x === '/' ? /(['"`])\/\1/.test(src) : src.includes(x));
|
|
414
|
+
if (pm) { for (const x of pm) for (const sfile of list) if (names(get(sfile) || '', x)) picked.add(sfile); continue; }
|
|
412
415
|
const own = fnAt(n);
|
|
413
416
|
if (own && own.name !== 'handleRequest' && optionOnly(own, lines)) continue;
|
|
414
417
|
if (own && own.name !== 'handleRequest') { const w = useOf(own.name); if (w) return `${own.name} (server.js:${n}) is used by ${w}`; continue; }
|
package/workspace/server.js
CHANGED
|
@@ -1542,6 +1542,7 @@ function searchFamily(w, query, limit, only) {
|
|
|
1542
1542
|
// the file KIND, never the reachable path set. A refusal carries its reason (readTextDocWhy).
|
|
1543
1543
|
const MAX_READ_BYTES = 2 * 1024 * 1024;
|
|
1544
1544
|
function readTextDocWhy(root, rel) {
|
|
1545
|
+
rel = require('./lib/doc-path.js').resolve(root, rel || ''); // one resolver for a record's path, with or without the kit's "pmos/" (round 3 point 17)
|
|
1545
1546
|
const full = path.resolve(root, rel || '');
|
|
1546
1547
|
if (!insideRoot(root, full)) return { ok: false, reason: 'not inside this workspace' }; // per-workspace guard (traversal + cross-ws)
|
|
1547
1548
|
const name = path.basename(full);
|
|
@@ -7312,7 +7313,8 @@ async function handleRequest(req, res) {
|
|
|
7312
7313
|
const built = BUILD_RE.exec(url.pathname);
|
|
7313
7314
|
const p = built ? built[2] : url.pathname;
|
|
7314
7315
|
|
|
7315
|
-
//
|
|
7316
|
+
// Today (public/today.html, slice 5 of the six-place navigation) is the page the app lands on: '/' and '/index.html' serve it. It is Home
|
|
7317
|
+
// with data-today: a desk draws Today's log and agenda, a phone keeps Home. Home (public/premium.html) stays at its address. The console (/console.html, /c3.html) and the
|
|
7316
7318
|
// classic shell (/classic.html) were removed (workspace-legacy-cleanup); their old links open Home with the same query. The
|
|
7317
7319
|
// old first-run page (/welcome) opens the Agreed first run (/premium-welcome.html) with the same query.
|
|
7318
7320
|
// premium-agreed-design H3: Home replaced the Briefing, My work and Chat. My work and Chat open Home with their own query, so an
|
|
@@ -7351,7 +7353,7 @@ async function handleRequest(req, res) {
|
|
|
7351
7353
|
res.writeHead(302, { Location: '/premium.html?onboard=1', 'Cache-Control': 'no-store' });
|
|
7352
7354
|
return res.end();
|
|
7353
7355
|
}
|
|
7354
|
-
const PAGES = { '/': 'premium.html', '/
|
|
7356
|
+
const PAGES = { '/premium-routine': 'premium-routine.html', '/premium-routine.html': 'premium-routine.html', '/': 'today.html', '/index.html': 'today.html', '/today': 'today.html', '/today.html': 'today.html', '/premium': 'premium.html', '/premium.html': 'premium.html', '/premium-board': 'premium-board.html', '/premium-board.html': 'premium-board.html', '/premium-intelligence': 'premium-intelligence.html', '/premium-intelligence.html': 'premium-intelligence.html', '/premium-events': 'premium-events.html', '/premium-events.html': 'premium-events.html', '/premium-library': 'premium-library.html', '/premium-library.html': 'premium-library.html', '/premium-goals': 'premium-goals.html', '/premium-goals.html': 'premium-goals.html', '/premium-insights': 'premium-intelligence.html', '/premium-insights.html': 'premium-intelligence.html', '/premium-welcome': 'premium-welcome.html', '/premium-welcome.html': 'premium-welcome.html', '/premium-viewer': 'premium-viewer.html', '/premium-viewer.html': 'premium-viewer.html', '/premium-rec': 'premium-rec.html', '/premium-rec.html': 'premium-rec.html', '/premium-workflows': 'premium-workflows.html', '/premium-workflows.html': 'premium-workflows.html', '/pm/present': 'premium-present.html' };
|
|
7355
7357
|
const page = capture ? 'capture.html' : Object.prototype.hasOwnProperty.call(PAGES, p) ? PAGES[p] : null;
|
|
7356
7358
|
if (page) {
|
|
7357
7359
|
// pm-os-absorb Run 2 (R25, X11): the per-launch nonce goes into the base meta line, nowhere else. no-store, so a
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* H Home: the same order as the Board; the sort button in its header; a product's initiatives are one list the grip arranges
|
|
9
9
|
* P phone: the button fits the header, no sideways scroll, no grip shows, and a held product header drags */
|
|
10
10
|
const path = require('path');
|
|
11
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
11
12
|
const { spawn } = require('child_process');
|
|
12
13
|
const { findBrowser } = require('./lib/find-browser');
|
|
13
14
|
const T = require('./test-run').configure({ name: 'sort-order' });
|
|
@@ -56,7 +57,7 @@ const route = async (page) => {
|
|
|
56
57
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
57
58
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
58
59
|
await T.waitForServer(BASE);
|
|
59
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
60
|
+
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
60
61
|
|
|
61
62
|
const board = async (o = {}) => {
|
|
62
63
|
const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 }, hasTouch: !!o.touch, isMobile: !!o.touch });
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* P phone: the card in the full-screen Viewer
|
|
12
12
|
* SHOTS=<dir> saves the screenshots. */
|
|
13
13
|
const fs = require('fs');
|
|
14
|
+
const { besidePage } = require('./lib/beside-page'); // these checks read the full page beside the page; in the popup work shows its three parts (nav slice 3)
|
|
15
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
14
16
|
const path = require('path');
|
|
15
17
|
const { spawn } = require('child_process');
|
|
16
18
|
const { findBrowser } = require('./lib/find-browser');
|
|
@@ -67,7 +69,7 @@ const shot = (p, name) => (SHOTS ? p.screenshot({ path: path.join(SHOTS, name) }
|
|
|
67
69
|
}
|
|
68
70
|
await until(async () => { const r = await (await fetch(`${BASE}/api/board-premium?ws=${ws}&board=${ws}`)).json(); return r.state === 'ready' && (r.model.initiatives.list.rows.find((x) => x.id === 'fx-full') || {}).suggest; }, 90000, 500);
|
|
69
71
|
|
|
70
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
72
|
+
browser = besidePage(classicBoard(await chromium.launch({ executablePath: exe })));
|
|
71
73
|
const open = async (o = {}) => {
|
|
72
74
|
const ctx = await openMission(await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 } }));
|
|
73
75
|
const page = await ctx.newPage();
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* S11 a long press on a phone's title lifts the row · S12 a milestone on the Timeline is its ◇ only; Kanban says "◇ Nov 14"
|
|
14
14
|
* S13 light and dark, phone and desktop: no page error. PMOS_SHOTS=<dir> writes the screens. */
|
|
15
15
|
const path = require('path');
|
|
16
|
+
const { besidePage } = require('./lib/beside-page'); // these checks read the full page beside the page; in the popup work shows its three parts (nav slice 3)
|
|
17
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
16
18
|
const { spawn } = require('child_process');
|
|
17
19
|
const { findBrowser } = require('./lib/find-browser');
|
|
18
20
|
const T = require('./test-run').configure({ name: 'stage-card-tasks' });
|
|
@@ -58,7 +60,7 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
|
|
|
58
60
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
59
61
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
60
62
|
await T.waitForServer(BASE);
|
|
61
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
63
|
+
browser = besidePage(classicBoard(await chromium.launch({ executablePath: exe })));
|
|
62
64
|
|
|
63
65
|
// where: 'home' (premium.html's Viewer) or 'board' (the Board's panel)
|
|
64
66
|
const open = async ({ where = 'home', w = 390, h = 844, theme = 'light', view = 'list' } = {}) => {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* switch, Move now (open steps ask for a note) and Back; every step done before a milestone: Move now moves it to ◆ Deliver.
|
|
10
10
|
* PMOS_SHOTS=<dir> also saves a screenshot of each state there. */
|
|
11
11
|
const path = require('path');
|
|
12
|
+
const { besidePage } = require('./lib/beside-page'); // these checks read the full page beside the page; in the popup work shows its three parts (nav slice 3)
|
|
12
13
|
const fs = require('fs');
|
|
13
14
|
const { spawn } = require('child_process');
|
|
14
15
|
const { pathToFileURL } = require('url');
|
|
@@ -94,7 +95,7 @@ async function pure() {
|
|
|
94
95
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
95
96
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
96
97
|
await T.waitForServer(BASE);
|
|
97
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
98
|
+
browser = besidePage(await chromium.launch({ executablePath: exe }));
|
|
98
99
|
const BOARD = BP.build(BF.facts()), BRIEF = BRP.build(BRF.facts());
|
|
99
100
|
if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
|
|
100
101
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* ⋯ opens and ends in Delete, and a press deletes at once with the Undo toast and closes the Viewer
|
|
12
12
|
* SHOTS_16=<dir>: the picker with the trash, the toast, and the phone, into <dir>. */
|
|
13
13
|
const path = require('path');
|
|
14
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
14
15
|
const { spawn } = require('child_process');
|
|
15
16
|
const { findBrowser } = require('./lib/find-browser');
|
|
16
17
|
const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
|
|
@@ -54,7 +55,7 @@ const openCard = async (pg, uid, V = '#czViewer') => {
|
|
|
54
55
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
55
56
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
56
57
|
await T.waitForServer(BASE);
|
|
57
|
-
browser = besidePage(await chromium.launch({ executablePath: exe }));
|
|
58
|
+
browser = classicBoard(besidePage(await chromium.launch({ executablePath: exe })));
|
|
58
59
|
|
|
59
60
|
/** The Board on the timeline, with the initiative panel open on Scarlet's Tasks. o: { w, h, phone, dark } */
|
|
60
61
|
const open = async (o = {}) => {
|