create-pmos 0.432.0 → 0.434.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 +25 -25
- 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-insights-test.js +63 -58
- package/workspace/changelog.json +24 -0
- package/workspace/guide/home.md +1 -1
- package/workspace/guide/index.md +1 -0
- package/workspace/guide/metric-drafts.md +21 -1
- package/workspace/guide/programs.md +1 -1
- package/workspace/guide/your-impact.md +58 -0
- package/workspace/impact-screens-test.js +149 -0
- package/workspace/intel-report-ui-test.js +1 -1
- package/workspace/intelligence-gaps-ui-test.js +13 -9
- package/workspace/lib/engine/outbox.js +1 -1
- package/workspace/lib/engine/records/index.js +11 -3
- package/workspace/lib/goal-status.js +199 -0
- package/workspace/lib/goal-watch.js +71 -0
- package/workspace/lib/headless.js +24 -2
- package/workspace/lib/impact-cli.js +72 -0
- package/workspace/lib/impact-runs.js +114 -0
- package/workspace/lib/impact.js +195 -0
- package/workspace/lib/insights-premium.js +43 -4
- package/workspace/lib/metric-draft-runs.js +33 -10
- package/workspace/lib/metric-drafts.js +118 -15
- package/workspace/lib/metric-read-runs.js +132 -0
- package/workspace/lib/metric-reads.js +129 -0
- package/workspace/lib/metrics-cli.js +100 -5
- package/workspace/lib/pmos-verbs.js +4 -1
- package/workspace/lib/route-modules.js +3 -0
- package/workspace/lib/routes-goal-status.js +111 -0
- package/workspace/lib/routes-impact-views.js +58 -0
- package/workspace/lib/routes-impact.js +91 -0
- package/workspace/lib/routes-insights-premium.js +20 -0
- package/workspace/lib/routes-metric-drafts.js +55 -4
- package/workspace/lib/routes-records.js +2 -0
- package/workspace/lib/settings-store.js +3 -0
- package/workspace/milestone-pins-test.js +8 -3
- package/workspace/okr-goals-ui-test.js +175 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/product-lane-test.js +5 -5
- package/workspace/public/pm/bd-ini-panel.js +10 -2
- package/workspace/public/pm/bd-span.js +5 -4
- package/workspace/public/pm/cozy-adler.css +5 -0
- package/workspace/public/pm/cozy-adler.js +17 -9
- package/workspace/public/pm/cozy-insights.css +84 -0
- package/workspace/public/pm/cozy-settings.js +11 -1
- package/workspace/public/pm/home-app.js +61 -8
- package/workspace/public/pm/home-impact.css +16 -0
- package/workspace/public/pm/home-impact.js +72 -0
- package/workspace/public/pm/home-today.js +4 -2
- package/workspace/public/pm/impact.css +37 -0
- package/workspace/public/pm/impact.js +201 -0
- package/workspace/public/pm/okr-list.js +249 -0
- package/workspace/public/pm/premium-insights.js +222 -238
- package/workspace/public/pm/premium-vw-mtg.js +4 -1
- package/workspace/public/pm/stage-line.js +4 -3
- package/workspace/public/premium-intelligence.html +3 -2
- package/workspace/public/premium.html +1 -0
- package/workspace/server.js +56 -2
- package/workspace/skills/impact-detect.skill +46 -0
- package/workspace/skills/metric-read.skill +32 -0
- package/workspace/task-milestones-test.js +4 -3
- package/workspace/test-lists/goal-watch.json +9 -0
- package/workspace/test-lists/impact-screens.json +5 -0
- package/workspace/test-lists/impact-ui.json +9 -0
- package/workspace/test-lists/impact.json +9 -0
- package/workspace/test-lists/okr-goals-ui.json +5 -0
|
@@ -128,11 +128,16 @@ const ITEMS = [
|
|
|
128
128
|
return { id: e ? e.dataset.msId : null, label: l ? l.textContent.trim() : '', hover: l ? l.title : '', tm: r ? r.querySelectorAll('.tg-tm').length : -1 }; });
|
|
129
129
|
ok('E a milestone in the Deliver stage before the end names the row\'s end, at its own date; the end date is the hover; one ◇ only',
|
|
130
130
|
otp.id === 'o-roll' && otp.label === 'Email OTP rolled out May 26 ’27' && /Initiative ends Jun 9 ’27/.test(otp.hover) && otp.tm === 0, JSON.stringify(otp));
|
|
131
|
-
|
|
131
|
+
// the second timeline-label hotfix (Wawan 2026-10-28, "End always names a milestone"): a row's only milestone, months before its end, IS the end ◇
|
|
132
|
+
const pk = await p.evaluate(() => { const r = document.querySelector('#ibBody [data-row="board:passkey"]'); const e = r && r.querySelector('.tg-end'), l = r && r.querySelector('.tg-endl');
|
|
133
|
+
return { id: e ? e.dataset.msId : null, label: l ? l.textContent.trim() : '', hover: l ? l.title : '' }; });
|
|
134
|
+
ok('E a row\'s only milestone, far before the end, names the end at its own date; no "Deliver"; the end date is the hover',
|
|
135
|
+
pk.id === 'p-beta' && pk.label === 'Beta to staff Dec 18' && /Initiative ends Feb 26 ’27/.test(pk.hover), JSON.stringify(pk));
|
|
136
|
+
await p.click('[data-ms-pick="board:passkey"][data-ms-id="p-beta"].tg-end');
|
|
132
137
|
await p.waitForSelector('#bdPop.bd-pc:not([hidden])', { timeout: 4000 });
|
|
133
138
|
c = await card(p);
|
|
134
|
-
ok('E
|
|
135
|
-
c && c.h === '
|
|
139
|
+
ok('E its card says what the label says: the milestone, its date',
|
|
140
|
+
c && c.h === 'Beta to staff' && c.sub === 'Dec 18 · 1 of 1 milestone on the timeline', JSON.stringify(c));
|
|
136
141
|
await p.keyboard.press('Escape');
|
|
137
142
|
ok('C the ◇ press does not open the initiative', await p.evaluate(() => !document.querySelector('.iv-tr')));
|
|
138
143
|
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* okr-goals-ui-test.js — "Claude runs the OKRs" on the Intelligence page (feedback batch 16 item 6, build 6-B; frames GsM1–M5, GsViewer, GsMore,
|
|
4
|
+
* GsMetrics, GsMetricsTree, GsNotify). Serves the real page from the real server; GET /api/insights-premium answers the model lib/insights-premium.js
|
|
5
|
+
* builds from its fixture, with the fields lib/goal-status.js adds (reading, recipe, who, notify, was, history, defn, okr) set on some goals, and
|
|
6
|
+
* GET /api/metric-drafts answers drafts that sit under their goal. The write routes are stubbed here so each press can be read back.
|
|
7
|
+
* L the list: the ✦ line, the North Star, Key results, Health budgets, in that order; a row is a dot, the outcome, its reading and age, and the
|
|
8
|
+
* owner, with no sparkline and no initiative status; a goal with no reading has a hollow dot
|
|
9
|
+
* D a draft sits under the row it repairs with ✕ / ✎ / ✓; ✓✓ in the ✦ line keeps them all; ✓ posts the row; the ✦ line never says "no insight"
|
|
10
|
+
* R a broken limit turns the ✦ line red (the one time) and pulses that row's dot
|
|
11
|
+
* V the goal Viewer: the reading against its line, the chart, why, and the folds How I read it, What it counts, History
|
|
12
|
+
* N the Viewer's ⋯: Notify me, Only in Intelligence (✦ my pick, on), Quiet; a press posts /api/goals/notify
|
|
13
|
+
* M ⋯ › Metrics: one list, goals first then "watch"; one switch shows the tree
|
|
14
|
+
* P on a phone: no sideways scroll, the same list. PMOS_SHOTS=<dir> also saves screenshots. */
|
|
15
|
+
const path = require('path');
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const { spawn } = require('child_process');
|
|
18
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
19
|
+
const T = require('./test-run').configure({ name: 'okr-goals-ui' });
|
|
20
|
+
const IP = require('./lib/insights-premium.js');
|
|
21
|
+
const F = require('./fixtures/insights-premium-facts.js');
|
|
22
|
+
|
|
23
|
+
const BASE = T.BASE;
|
|
24
|
+
const SHOTS = process.env.PMOS_SHOTS || '';
|
|
25
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
26
|
+
const until = async (fn, ms = 10000, step = 100) => { 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
|
+
const results = [];
|
|
28
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 700) : ''}`); };
|
|
29
|
+
let srv = null; let browser = null;
|
|
30
|
+
const finish = async (code) => {
|
|
31
|
+
if (browser) await browser.close().catch(() => {});
|
|
32
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
33
|
+
T.killTmux();
|
|
34
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
35
|
+
console.log(`\n${results.length - bad}/${results.length} okr-goals-ui assertions passed`);
|
|
36
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
37
|
+
};
|
|
38
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
39
|
+
|
|
40
|
+
/* the model with lib/goal-status.js's fields on it (the agreed JSON, 6-A): a North Star, readings with their dot and age, an owner, a recipe */
|
|
41
|
+
const BUDGETS = [{ id: 'docs', covers: 'documentation upkeep', cap: 0.2 }];
|
|
42
|
+
function model(o = {}) {
|
|
43
|
+
const M = IP.build(F.facts({ pinned: 'all', budgets: BUDGETS }));
|
|
44
|
+
const g = (id) => M.goals.find((x) => x.id === id);
|
|
45
|
+
g('krm-up').role = 'north-star';
|
|
46
|
+
Object.assign(g('krm-up'), { reading: { dot: 'on', at: '2026-10-15', ageDays: 3, stale: false, txt: '99.6% · up 0.4 since 1 Sep', line: '' }, who: null });
|
|
47
|
+
Object.assign(g('krm-act'), { reading: { dot: 'behind', at: '2026-10-15', ageDays: 3, stale: false, txt: '+8 of +30 points', line: 'its line says +18', why: 'SSO for partners ships 23 Oct; activation catches up about 3 weeks after.' },
|
|
48
|
+
recipe: { connector: 'Amplitude', query: 'partners active ÷ partners signed', cadence: 'weekly', last: { at: '2026-10-15', ok: true } }, who: { name: 'Raka Putra', initials: 'RP', from: 'jira' }, notify: 'intel',
|
|
49
|
+
was: 'Partner onboarding revamp', history: [{ at: '2026-10-01', text: 'Rewritten as an outcome' }, { at: '2026-10-02', text: 'You kept it' }], defn: 'Partners with one API call in their first 14 days, of all partners signed that month.' });
|
|
50
|
+
Object.assign(g('krm-ttfc'), { who: { name: 'Dewi', initials: 'D', from: 'jira' } });
|
|
51
|
+
M.metrics = [{ id: 'krm-up', title: 'Partner uptime', role: 'north-star', dot: 'on', meta: 'North Star · Datadog · Mon' },
|
|
52
|
+
{ id: 'krm-act', title: 'Partner activation', role: 'input', parent: 'krm-up', dot: 'behind', meta: 'KR · Amplitude · Mon' },
|
|
53
|
+
{ id: 'krm-ttfc', title: 'Time to first call', role: 'kr', dot: 'behind', meta: 'KR · typed in' },
|
|
54
|
+
{ id: 'w-rating', title: 'App store rating', role: 'watch', meta: 'App Store Connect · Mon' }];
|
|
55
|
+
if (o.crit) { M.okr = { line: { head: 'Partner uptime fell under its floor at 14:02.', sub: 'It started with the gateway release. I drafted a rollback ticket for Sari.', tone: 'crit', keepAll: 0 }, alert: { rid: 'krm-up', title: 'Partner uptime', at: '2026-10-18T14:02:00Z', txt: '98.1%' } }; g('krm-up').reading.dot = 'broken'; }
|
|
56
|
+
return M;
|
|
57
|
+
}
|
|
58
|
+
const DRAFTS = (rows) => ({ ok: true, scope: 'product', id: 'w1', title: 'pmos', run: { state: 'ready', step: 4, reads: [] }, head: '', sub: '', src: '', rows });
|
|
59
|
+
const ROWS = [
|
|
60
|
+
{ id: 'd-out', kind: 'outcome', goal: 'krm-ttfc', text: 'New partners make their first call within 3 days', why: 'Time to first call was a project; this is what it is for', old: 'Time to first call', act: 'Keep', state: 'open' },
|
|
61
|
+
{ id: 'd-chase', kind: 'chase', goal: 'krm-act', text: 'Ask Raka if SSO for partners still ships 23 Oct', why: 'Thanks for the work on it. The goal catches up about 3 weeks after it ships', act: 'Send', state: 'open' },
|
|
62
|
+
{ id: 'd-kr', kind: 'metric', group: 'Key results', name: 'Partners on the new SDK', nowTxt: '41%', targetTxt: '80% by Dec 31', why: 'From the SDK PRD', source: 'Amplitude', state: 'open' },
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
(async () => {
|
|
66
|
+
const exe = process.env.PMOS_CHROME || findBrowser();
|
|
67
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
68
|
+
let chromium;
|
|
69
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
70
|
+
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, '..') }) });
|
|
71
|
+
await T.waitForServer(BASE);
|
|
72
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
73
|
+
if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
|
|
74
|
+
const shot = async (p, name, el) => { if (!SHOTS) return; await sleep(450); if (el) { const h = await p.$(el); if (h) await h.screenshot({ path: path.join(SHOTS, name + '.png') }); } else await p.screenshot({ path: path.join(SHOTS, name + '.png'), fullPage: true }); };
|
|
75
|
+
|
|
76
|
+
const open = async ({ w = 1440, h = 900, m = model(), rows = ROWS, theme = 'light' } = {}) => {
|
|
77
|
+
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
78
|
+
const page = await ctx.newPage();
|
|
79
|
+
const errors = [], posts = [];
|
|
80
|
+
page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
81
|
+
await page.route('**/api/insights-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, model: m }) }));
|
|
82
|
+
await page.route('**/api/board-metrics-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: { tiles: [] } }) }));
|
|
83
|
+
await page.route('**/api/briefing-premium/products', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, all: false, chosen: true, products: [{ ws: m.board.ws, name: m.board.name, primary: true, on: true }] }) }));
|
|
84
|
+
await page.route('**/api/metric-drafts?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(DRAFTS(rows)) }));
|
|
85
|
+
for (const k of ['keep', 'keep-all', 'drop', 'edit', 'undo', 'start']) await page.route('**/api/metric-drafts/' + k, (r) => { posts.push({ path: '/api/metric-drafts/' + k, body: JSON.parse(r.request().postData() || '{}') }); r.fulfill({ contentType: 'application/json', body: JSON.stringify(k === 'keep' ? { ok: true, rid: 'r1' } : { ok: true, kept: 3 }) }); });
|
|
86
|
+
await page.route('**/api/goals/notify', (r) => { posts.push({ path: '/api/goals/notify', body: JSON.parse(r.request().postData() || '{}') }); r.fulfill({ contentType: 'application/json', body: '{"ok":true}' }); });
|
|
87
|
+
await page.goto(BASE + '/premium-intelligence.html?theme=' + theme);
|
|
88
|
+
await until(() => page.evaluate(() => document.querySelectorAll('#goalTbl .okr-row').length > 0), 20000);
|
|
89
|
+
await until(() => page.evaluate(() => !!document.querySelector('#goalTbl .okr-dr')), 6000);
|
|
90
|
+
return { ctx, page, errors, posts };
|
|
91
|
+
};
|
|
92
|
+
const txt = (p, s) => p.evaluate((x) => { const e = document.querySelector(x); return e ? e.textContent.replace(/\s+/g, ' ').trim() : ''; }, s);
|
|
93
|
+
|
|
94
|
+
/* L · the list */
|
|
95
|
+
const R = await open(), p = R.page;
|
|
96
|
+
const order = await p.evaluate(() => [...document.querySelectorAll('#insHero, #nsRow .okr-h, #goalTbl .okr-h')].filter((e) => e.offsetParent !== null).map((e) => e.id === 'insHero' ? '✦' : e.textContent));
|
|
97
|
+
ok('L1 top to bottom: the ✦ line, North Star, Key results, Health budgets', order.join('|') === '✦|North Star|Key results|Health budgets', order.join('|'));
|
|
98
|
+
const rows = await p.evaluate(() => [...document.querySelectorAll('#goalTbl [data-goal]')].map((r) => ({ id: r.dataset.goal, dot: (r.querySelector('.okr-main .cz-dot') || {}).className || '', meta: r.querySelector('.okr-main .note').textContent, av: !!r.querySelector('.okr-main .okr-av'), svg: !!r.querySelector('.okr-main svg'), pill: !!r.querySelector('.okr-main .cz-pill') })));
|
|
99
|
+
const act = rows.find((r) => r.id === 'krm-act') || {}, churn = rows.find((r) => r.id === 'krm-churn') || {};
|
|
100
|
+
ok('L2 a row is the dot, the outcome, its reading and the owner: no chart and no initiative status', rows.length >= 4 && rows.every((r) => r.av && !r.svg && !r.pill), JSON.stringify(rows));
|
|
101
|
+
ok('L3 the reading the status function sent is the row\'s line, behind is amber', act.meta === '+8 of +30 points · its line says +18' && /risk/.test(act.dot), JSON.stringify(act));
|
|
102
|
+
ok('L4 a goal with no reading has a hollow dot and says so', /hollow/.test(churn.dot) && /No reading yet/.test(churn.meta), JSON.stringify(churn));
|
|
103
|
+
ok('L5 the owner avatar shows the initials; no owner is the dashed circle', await p.evaluate(() => document.querySelector('[data-goal="krm-act"] .okr-av').textContent === 'RP' && !!document.querySelector('[data-goal="krm-churn"] .okr-av.none')));
|
|
104
|
+
ok('L6 the North Star is a row in its own card, read and dated', /99\.6% · up 0\.4 since 1 Sep/.test(await txt(p, '#nsRow [data-goal="krm-up"]')));
|
|
105
|
+
await shot(p, 'okr-desktop-light');
|
|
106
|
+
|
|
107
|
+
/* D · drafts */
|
|
108
|
+
const under = await p.evaluate(() => ({ chase: !!document.querySelector('[data-goal="krm-act"] [data-draft="d-chase"]'), out: !!document.querySelector('[data-goal="krm-ttfc"] [data-draft="d-out"]'), kr: !!document.querySelector('#goalTbl [data-draft-row="d-kr"]'),
|
|
109
|
+
acts: [...document.querySelectorAll('[data-draft="d-chase"] .acts button')].map((b) => b.getAttribute('aria-label').split(':')[0]), old: (document.querySelector('[data-draft="d-out"] .okr-old') || {}).textContent || '' }));
|
|
110
|
+
ok('D1 each draft sits under the row it repairs; a drafted key result is a hollow row of its own', under.chase && under.out && under.kr, JSON.stringify(under));
|
|
111
|
+
ok('D2 a draft has ✕ / ✎ / ✓, and ✓ says its act (Send)', under.acts.join('|') === 'Not now|Edit|Send', under.acts.join('|'));
|
|
112
|
+
ok('D3 an outcome draft says what it was', under.old === 'Was “Time to first call”', under.old);
|
|
113
|
+
const line = await p.evaluate(() => ({ t: document.querySelector('#brief').textContent + ' ' + document.querySelector('#insWhy').textContent, all: !!document.querySelector('#insAct [data-okl="keep-all"]') }));
|
|
114
|
+
ok('D4 the ✦ line says what Claude drafted, with ✓✓ to keep them all, and never "no insight"', /I drafted 3 (changes|fixes)/.test(line.t) && line.all && !/no insight/i.test(line.t), JSON.stringify(line));
|
|
115
|
+
await p.click('[data-draft="d-chase"] [data-okd="keep"]');
|
|
116
|
+
ok('D5 ✓ posts that draft\'s row', await until(() => R.posts.some((x) => x.path === '/api/metric-drafts/keep' && x.body.row === 'd-chase')));
|
|
117
|
+
await p.click('#insAct [data-okl="keep-all"]');
|
|
118
|
+
ok('D6 ✓✓ posts keep-all for the product', await until(() => R.posts.some((x) => x.path === '/api/metric-drafts/keep-all' && x.body.scope === 'product')));
|
|
119
|
+
await p.click('[data-draft="d-out"] [data-okd="edit"]');
|
|
120
|
+
const ed = await until(() => p.evaluate(() => { const i = document.querySelector('[data-dred="d-out"] [data-drf="name"]'); return i ? i.value : null; }), 3000);
|
|
121
|
+
ok('D7 ✎ turns the draft into its words in place', ed === 'New partners make their first call within 3 days', ed);
|
|
122
|
+
await p.fill('[data-dred="d-out"] [data-drf="name"]', 'New partners call us within 3 days');
|
|
123
|
+
await p.click('[data-dred="d-out"] [data-okd="save"]');
|
|
124
|
+
ok('D8 ✓ on the edit posts what was typed (a fix row posts its text, lib/metric-drafts.js editOf)', await until(() => R.posts.some((x) => x.path === '/api/metric-drafts/edit' && x.body.row === 'd-out' && x.body.text === 'New partners call us within 3 days' && x.body.name === undefined)));
|
|
125
|
+
|
|
126
|
+
/* V · the goal Viewer */
|
|
127
|
+
await p.click('#goalTbl [data-goal="krm-act"] .okr-main');
|
|
128
|
+
const v = await until(() => p.evaluate(() => { const V = document.querySelector('#czViewer'); if (!V || V.hidden) return null; return { title: (V.querySelector('.cz-vw-title') || {}).textContent || '', head: (V.querySelector('.okr-vh') || {}).textContent || '', chart: !!V.querySelector('.ins-gbig svg'), why: (V.querySelector('.okr-why') || {}).textContent || '', folds: [...V.querySelectorAll('.czs-row b')].map((b) => b.textContent) }; }), 5000);
|
|
129
|
+
ok('V1 the Viewer opens on the goal with its reading against its line and the owner', v && /Partner activation/.test(v.title) && /\+8 of \+30 points/.test(v.head) && /its line says \+18/.test(v.head) && /RP/.test(v.head), JSON.stringify(v));
|
|
130
|
+
ok('V2 then the chart and why it moved', v && v.chart && /catches up about 3 weeks/.test(v.why), JSON.stringify(v));
|
|
131
|
+
ok('V3 then three folds: How I read it, What it counts, History', v && v.folds.slice(0, 3).join('|') === 'How I read it|What it counts|History', v && v.folds.join('|'));
|
|
132
|
+
await p.click('#czViewer [data-czs-fold="read"]'); await sleep(120);
|
|
133
|
+
ok('V4 How I read it says the source, what is read and how often', /Amplitude/.test(await txt(p, '#czViewer [data-czs-id="read"]')) && /partners active ÷ partners signed/.test(await txt(p, '#czViewer [data-czs-id="read"]')) && /Weekly/.test(await txt(p, '#czViewer [data-czs-id="read"]')));
|
|
134
|
+
await shot(p, 'okr-viewer-desktop');
|
|
135
|
+
|
|
136
|
+
/* N · notify */
|
|
137
|
+
await p.click('#czViewer [data-cz-vw="more"]'); await sleep(120);
|
|
138
|
+
const mi = await p.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()).slice(0, 3));
|
|
139
|
+
ok('N1 ⋯ offers Notify me, Only in Intelligence (my pick, on) and Quiet', /^Notify me/.test(mi[0] || '') && /^Only in Intelligence.*my pick · on/.test(mi[1] || '') && /^Quiet/.test(mi[2] || ''), mi.join(' | '));
|
|
140
|
+
await shot(p, 'okr-notify');
|
|
141
|
+
await p.click('.cz-vw-menu [role="menuitem"]:first-child');
|
|
142
|
+
ok('N2 Notify me posts the choice for that goal', await until(() => R.posts.some((x) => x.path === '/api/goals/notify' && x.body.id === 'krm-act' && x.body.notify === 'push')));
|
|
143
|
+
await p.evaluate(() => window.czViewer && window.czViewer.close()); await sleep(200);
|
|
144
|
+
|
|
145
|
+
/* M · ⋯ › Metrics */
|
|
146
|
+
await p.click('#moreB'); await sleep(80);
|
|
147
|
+
ok('M1 ⋯ holds Reports and dashboards, Metrics, Delivery trends, Sources and Export', (await p.evaluate(() => [...document.querySelectorAll('#moreMenu [data-more]')].map((b) => b.dataset.more).join())).startsWith('library,metrics,trends,sources,export'));
|
|
148
|
+
await p.click('#moreMenu [data-more="metrics"]');
|
|
149
|
+
const ml = await until(() => p.evaluate(() => { const V = document.querySelector('#czViewer'); if (!V || V.hidden || !V.querySelector('.okr-met')) return null; return { heads: [...V.querySelectorAll('.okr-sh')].map((e) => e.textContent), watch: [...V.querySelectorAll('.okr-mrow')].filter((r) => r.querySelector('.okr-tag')).map((r) => r.querySelector('b').textContent + ':' + (r.querySelector('.cz-dot').className.includes('hollow') ? 'no status' : 'status')) }; }), 4000);
|
|
150
|
+
ok('M2 Metrics is one list: goals first, then the watched ones with no status', ml && ml.heads.join('|') === 'On a goal|Watched, no goal' && ml.watch.join() === 'App store rating:no status', JSON.stringify(ml));
|
|
151
|
+
await shot(p, 'okr-metrics-list');
|
|
152
|
+
await p.click('#czViewer [data-mv2="tree"]'); await sleep(120);
|
|
153
|
+
const tr = await p.evaluate(() => ({ ns: (document.querySelector('#czViewer .okr-node.ns b') || {}).textContent || '', inputs: [...document.querySelectorAll('#czViewer .okr-tree .okr-tr1 .okr-node b')].map((b) => b.textContent) }));
|
|
154
|
+
ok('M3 one switch shows the same list as a tree: the North Star and its inputs', tr.ns === 'Partner uptime' && tr.inputs.includes('Partner activation'), JSON.stringify(tr));
|
|
155
|
+
await shot(p, 'okr-metrics-tree');
|
|
156
|
+
ok('M4 no script error on the page', !R.errors.length, R.errors.join(' | '));
|
|
157
|
+
await R.ctx.close();
|
|
158
|
+
|
|
159
|
+
/* R · a broken limit */
|
|
160
|
+
const C = await open({ m: model({ crit: true }), rows: [] });
|
|
161
|
+
const cr = await C.page.evaluate(() => ({ crit: document.querySelector('#insHero').classList.contains('crit'), t: document.querySelector('#brief').textContent, pulse: !!document.querySelector('#nsRow [data-goal="krm-up"] .cz-dot.m-crit') }));
|
|
162
|
+
ok('R1 a broken limit is the one time the ✦ line turns red, and its dot pulses', cr.crit && /fell under its floor/.test(cr.t) && cr.pulse, JSON.stringify(cr));
|
|
163
|
+
await shot(C.page, 'okr-crit', '#stage');
|
|
164
|
+
await C.ctx.close();
|
|
165
|
+
|
|
166
|
+
/* P · a phone */
|
|
167
|
+
for (const theme of ['light', 'dark']) {
|
|
168
|
+
const Q = await open({ w: 390, h: 844, theme });
|
|
169
|
+
const ph = await Q.page.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1, rows: document.querySelectorAll('#goalTbl .okr-row').length, shown: getComputedStyle(document.querySelector('#goalTbl')).display !== 'none' }));
|
|
170
|
+
ok('P1 on a phone (' + theme + ') the same list shows with no sideways scroll', !ph.over && ph.rows >= 4 && ph.shown, JSON.stringify(ph));
|
|
171
|
+
await shot(Q.page, 'okr-phone-' + theme);
|
|
172
|
+
await Q.ctx.close();
|
|
173
|
+
}
|
|
174
|
+
finish();
|
|
175
|
+
})();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.434.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.434.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -119,11 +119,11 @@ function model() {
|
|
|
119
119
|
const a = await laneOf(p, 'p:pmos-scarlet'), b = await laneOf(p, 'p:pmos-idpf');
|
|
120
120
|
ok('L folded, each product\'s head row is a lane: its name cell with the fold, its track with a thin line and its last end', a && b && /pmos-scarlet/.test(a.name) && a.span >= 1 && b.span >= 1 && a.endl.join() === 'Mar ’27', JSON.stringify({ a, b }));
|
|
121
121
|
ok('L the lane rolls up the ◇ tasks and each end ◇ of its initiatives; Dec 11 and Dec 18 merge into one counted ◇; no date under a ◇',
|
|
122
|
-
a && a.tm.length ===
|
|
123
|
-
ok('L the same ◇: late is orange, the Evaluate task IS the end ◇ (said once), a
|
|
124
|
-
a && /^tg-tm late\|Design review · Passkey sign-in · Oct 16 · late$/.test(a.tm[0]) && a.tm.some((x) => /KPI evaluated · Scarlet/.test(x)) && a.tm.some((x) =>
|
|
122
|
+
a && a.tm.length === 3 && a.tmc.length === 1 && /^tg-tmc dn|^tg-tmc/.test(a.tmc[0]) && a.tmc[0].endsWith('|2') && !a.tml.length, JSON.stringify(a));
|
|
123
|
+
ok('L the same ◇: late is orange, the Evaluate task IS the end ◇ (said once), a row\'s only milestone IS its end (no Deliver, hotfix 2)',
|
|
124
|
+
a && /^tg-tm late\|Design review · Passkey sign-in · Oct 16 · late$/.test(a.tm[0]) && a.tm.some((x) => /KPI evaluated · Scarlet/.test(x)) && !a.tm.some((x) => /Deliver · Passkey/.test(x)) && !a.tm.some((x) => /Committed/.test(x)), JSON.stringify(a && a.tm));
|
|
125
125
|
ok('H a single ◇\'s hover names the milestone and its initiative', a && a.tm.some((x) => x.endsWith('|Feature delivered · Scarlet — ST What’s The News · Jan 29')), JSON.stringify(a && a.tm));
|
|
126
|
-
ok('L the other product\'s lane: Mar 2 and Mar 6 merge;
|
|
126
|
+
ok('L the other product\'s lane: Mar 2 and Mar 6 (Recovery\'s end) merge; Email OTP has no milestone, so its end is Deliver Jun 30', b && b.tmc.length === 1 && b.tm.length === 1 && /Deliver · Email OTP · Jun 30/.test(b.tm[0]), JSON.stringify(b));
|
|
127
127
|
const lg = await p.evaluate(() => (document.querySelector('.tg-lgd') || {}).textContent || '');
|
|
128
128
|
ok('L the legend gets no new entry', !/lane|product/i.test(lg), lg);
|
|
129
129
|
await shot(p, 'lane-board-1440');
|
|
@@ -169,7 +169,7 @@ function model() {
|
|
|
169
169
|
await p.waitForTimeout(200);
|
|
170
170
|
const sh = await p.evaluate(() => { const m = document.querySelector('.tg-msp.sh'); return m ? { h: (m.querySelector('.h') || {}).textContent, lines: [...m.querySelectorAll('[data-ms-ini]')].map((x) => x.querySelector('span').firstChild.textContent + '|' + x.querySelector('.k').textContent) } : null; });
|
|
171
171
|
ok('Q a tap on the folded lane opens a sheet with the product\'s milestones in date order',
|
|
172
|
-
sh && sh.h === 'pmos-scarlet' && sh.lines.join() === 'Design review|Oct 16,Pilot with 2 newsrooms|Dec 11,Security sign-off|Dec 18,Feature delivered|Jan 29,
|
|
172
|
+
sh && sh.h === 'pmos-scarlet' && sh.lines.join() === 'Design review|Oct 16,Pilot with 2 newsrooms|Dec 11,Security sign-off|Dec 18,Feature delivered|Jan 29,KPI evaluated|Mar 31', JSON.stringify(sh));
|
|
173
173
|
await shot(p, 'lane-phone-390');
|
|
174
174
|
ok('the phone threw nothing', !errors.length, errors.join('\n'));
|
|
175
175
|
await ctx.close();
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* item 5c), the same words and order as Home's initiative page, with Delete last (5d). The rest sits on the thing it changes: the stage chip's
|
|
21
21
|
* picker moves the stage with the row menu's own presses (moreAct(r, k, btn), bd-acts.js); Change workflow, Won't do and Archive are Home's
|
|
22
22
|
* (ini-wf.js). Discuss in chat takes the question to Home. */
|
|
23
|
+
import * as IM from './impact.js'; // Your impact (batch 16 item 7): who made a delivered milestone happen
|
|
23
24
|
import * as VW from './cozy-viewer.js';
|
|
24
25
|
import { esc } from './premium-shell.js';
|
|
25
26
|
import { lr, copyText } from './cozy-xv.js';
|
|
@@ -170,7 +171,7 @@ function iniBody(r) {
|
|
|
170
171
|
const self = !!((O.M() || {}).board || {}).self, M = O.M() || {};
|
|
171
172
|
// what left the ⋯ for the thing it changes (batch 16 item 5c): the workflow chip, the dashed +, the stage chip, the dates chip, Jira's ↻
|
|
172
173
|
return viewHtml(viewOf(r), { add: !!(r.id && O.addTask), adding: adding === r.key, addHint: adding === r.key && addDates ? md(addDates.start) + ' to ' + md(addDates.due) : '', openTask: !!O.openTask, quick: !!(O.setTask && O.setDates), hold: !!O.hold, tail: VW.czSections(boardSections(r), { key: 'board' }),
|
|
173
|
-
wf: !!r.id && !self && !r.ended, person: !!r.id, stagePick: !!r.id, planDates: !!r.id, jira: !!M.jira });
|
|
174
|
+
wf: !!r.id && !self && !r.ended, person: !!r.id, stagePick: !!r.id, planDates: !!r.id, jira: !!M.jira }) + madeHtml(r);
|
|
174
175
|
}
|
|
175
176
|
/** Presses inside the shown item: the view's own (pm/ini-view.js), a ticket's drill-in, the PRD-change question. A [data-doc] goes to the page's handler. */
|
|
176
177
|
function wire(body, key) {
|
|
@@ -272,4 +273,11 @@ export function refresh() {
|
|
|
272
273
|
}
|
|
273
274
|
export function close() { if (cur) { cur = null; VW.close(); } }
|
|
274
275
|
export const shown = () => (cur ? cur.key : null);
|
|
275
|
-
|
|
276
|
+
/** Your impact, Phase 3 (batch 16 item 7, GmA2Board): under a milestone delivered in the last 30 days, the people who made it happen, from
|
|
277
|
+
* the row's own tickets, unranked, each with its ticket to open. Private: no thank-you press, no send, and the ◆ on the timeline stays plain. */
|
|
278
|
+
const madeHtml = (r) => IM.madeHtml(IM.madeOf(r, (O.M() && O.M().today) || new Date().toISOString().slice(0, 10)));
|
|
279
|
+
export function mount(o) {
|
|
280
|
+
O = o; ensurePopCss();
|
|
281
|
+
IM.readWeek().then(() => refresh()).catch(() => {});
|
|
282
|
+
window.addEventListener('pmos:impact', () => { setTimeout(() => IM.readWeek().then(() => refresh()).catch(() => {}), 0); }); // the switch: the section follows at once
|
|
283
|
+
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* the hairline and » only; its row sheet lists them. A gap never changes the row's dot or risk.
|
|
29
29
|
* Calmer timeline (feedback batch 13 item 4, A: XcalmA1Desk, A4Dark, A3Phone, A2Folded, A5Milestones): say it once, few marks, quiet rows.
|
|
30
30
|
* · One label per bar end: what lands, then when ("Tender award Nov 3"; the year only when it is not this year). The name is the end milestone's,
|
|
31
|
-
* else a milestone close enough to merge with the end ◇, else Deliver or Evaluate. The date turns amber at risk and orange late; the rest (days over, the forecast, a slip, a clash) is its hover.
|
|
31
|
+
* else a milestone close enough to merge with the end ◇, else the row's latest milestone; only a row with none says Deliver or Evaluate. The date turns amber at risk and orange late; the rest (days over, the forecast, a slip, a clash) is its hover.
|
|
32
32
|
* With no room at the right edge the label sits before the ◇, on a card chip. No date under a ◇ and no second date.
|
|
33
33
|
* · Marks: the bar (done dark, to do light), a 2 px hairline for any gap or hold (a hold's hairline opens the hold card), one ◇ (filled done,
|
|
34
34
|
* orange late), the dashed Jira forecast, Today. The dotted hold, ⏸, the amber tint, the blue ◆ and the hatched out-of-window band are gone.
|
|
@@ -332,14 +332,15 @@ const msStage = (r, m) => { if (!m.sec) return ''; const st = (r.wfStages || [])
|
|
|
332
332
|
* milestone task in that stage IS it, else one on the end's own day, else the latest task in any ◆ stage (Deliver: batch 14 item 1, so a
|
|
333
333
|
* "rolled out" task in Deliver names the row's end), else the latest one close enough to the end to merge with its ◇ (`reach` days, the
|
|
334
334
|
* zoom's ~40 px: the timeline-label hotfix, "[Tender] 12.0 Award contract" on Nov 2 sat under the end ◇ labelled "Deliver Nov 4"; one mark says
|
|
335
|
-
* the milestone's own name and date)
|
|
336
|
-
*
|
|
335
|
+
* the milestone's own name and date), else the row's latest milestone task however far from the end (Wawan 2026-10-28, "End always names a
|
|
336
|
+
* milestone": a plain "Deliver Nov 11" whose card listed only "Tech blueprint approved, Apr 29" read as two answers). It takes that
|
|
337
|
+
* task's name, date and done, and is not drawn twice. Only a row with no dated milestone says Deliver or Evaluate. M: its dated milestones. */
|
|
337
338
|
function endTask(r, M, reach = 0) {
|
|
338
339
|
const e = day(r.end); if (!e || !M.length) return null;
|
|
339
340
|
const S = M.slice().sort((a, b) => day(a.date) - day(b.date));
|
|
340
341
|
const last = lastMs(r), inLast = S.filter((m) => m.sec && m.sec.toLowerCase() === last);
|
|
341
342
|
const inMs = S.filter((m) => msStage(r, m));
|
|
342
|
-
const end = inLast.length ? inLast[inLast.length - 1] : S.find((m) => +day(m.date) === +e) || inMs[inMs.length - 1] || S.filter((m) => Math.abs(day(m.date) - e) <= reach * 864e5).pop();
|
|
343
|
+
const end = inLast.length ? inLast[inLast.length - 1] : S.find((m) => +day(m.date) === +e) || inMs[inMs.length - 1] || S.filter((m) => Math.abs(day(m.date) - e) <= reach * 864e5).pop() || S[S.length - 1];
|
|
343
344
|
return end ? { ...end, stage: msStage(r, end) } : null;
|
|
344
345
|
}
|
|
345
346
|
/** One ◇ per milestone task the Filter shows (batch 13 item 4, XcalmA5Milestones; pm/bd-pins.js shownMs: the pinned ones, by default the last),
|
|
@@ -80,3 +80,8 @@ html.ad-still .env-leaf { opacity: 0; }
|
|
|
80
80
|
.env-leaf { opacity: 0; }
|
|
81
81
|
}
|
|
82
82
|
svg.ad-svg.am { stroke: none; }
|
|
83
|
+
/* Your impact (batch 16 item 7, GmA1Home): the newest leaf on the sprout grows once, on a real event; still under reduced motion and Still */
|
|
84
|
+
.ad-svg .ad-gw { animation: adGw 1.4s ease-out 1 both; transform-box: fill-box; transform-origin: right bottom; }
|
|
85
|
+
@keyframes adGw { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
|
|
86
|
+
@media (prefers-reduced-motion: reduce) { .ad-svg .ad-gw { animation: none; } }
|
|
87
|
+
html.ad-still .ad-svg .ad-gw { animation: none; }
|
|
@@ -39,13 +39,20 @@ function defs(p) {
|
|
|
39
39
|
+ rg('h', 78, 166, 100, [[0, 'h0'], [0.55, 'h1'], [1, 'h2']]) + rg('l', 96, 4, 44, [[0, 'l0'], [1, 'l1']])
|
|
40
40
|
+ `<filter id="${p}b" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="3.5"/></filter></defs>`;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
/* Your impact (batch 16 item 7, GmA1Home, GmA2Board): the leaves on the sprout are the ONLY leaf in PMOS. grow is the word GET /api/impact/week
|
|
43
|
+
* gives (rest, bud, leaf, full): the stem grows taller and carries more leaves. No number is drawn or said. o.growNew plays one grow on the
|
|
44
|
+
* newest leaf (a real event, once). */
|
|
45
|
+
const GROW = { rest: { top: 22, side: [] }, bud: { top: 16, side: [[24, 'l']] }, leaf: { top: 8, side: [[14, 'l']] }, full: { top: -20, side: [[14, 'l'], [0, 'r'], [-14, 'l']] } };
|
|
46
|
+
export const GROWS = Object.freeze(Object.keys(GROW));
|
|
47
|
+
function sprout(m, p, grow, growNew) {
|
|
43
48
|
const rot = { calm: 0, joy: -8, think: 10, ask: -4, worry: 30, rest: 16 }[m];
|
|
44
|
-
|
|
49
|
+
const g = m === 'worry' ? GROW.rest : GROW[grow] || GROW.rest, T = g.top;
|
|
50
|
+
let l1 = `M100 ${T} C 88 ${T - 16}, 70 ${T - 14}, 66 ${T - 4} C 74 ${T + 4}, 90 ${T + 6}, 100 ${T}Z`, l2 = `M100 ${T} C 112 ${T - 18}, 132 ${T - 16}, 136 ${T - 6} C 128 ${T + 4}, 110 ${T + 6}, 100 ${T}Z`;
|
|
45
51
|
if (m === 'worry') { l1 = 'M100 22 C 90 12, 74 14, 70 24 C 80 30, 94 30, 100 22Z'; l2 = 'M100 22 C 106 30, 118 40, 130 38 C 130 28, 116 18, 100 22Z'; }
|
|
46
|
-
const leaf = (d) => `<path d="${d}" fill="url(#${p}l)" stroke="${L_LEAF}" stroke-width="2" stroke-linejoin="round"/>`;
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
const leaf = (d, c = '') => `<path d="${d}" fill="url(#${p}l)" stroke="${L_LEAF}" stroke-width="2" stroke-linejoin="round"${c ? ` class="${c}"` : ''}/>`;
|
|
53
|
+
const side = ([y, s], i, all) => leaf(s === 'l' ? `M100 ${y} C 90 ${y - 12}, 76 ${y - 10}, 74 ${y - 4} C 82 ${y + 2}, 92 ${y + 2}, 100 ${y}Z` : `M100 ${y} C 110 ${y - 12}, 124 ${y - 10}, 126 ${y - 4} C 118 ${y + 2}, 108 ${y + 2}, 100 ${y}Z`, growNew && i === all.length - 1 ? 'ad-gw' : '');
|
|
54
|
+
return `<g class="ad-sp"><g transform="rotate(${rot} 100 36)"><path d="M100 38 L100 ${T}" fill="none" stroke="${L_LEAF}" stroke-width="4" stroke-linecap="round"/>${g.side.map(side).join('')}${leaf(l1)}${leaf(l2)}`
|
|
55
|
+
+ `<path d="M100 ${T} C 92 ${T - 4}, 82 17, 74 18" fill="none" stroke="${L_LEAF}" stroke-width="1.2" opacity=".6"/><path d="M100 ${T} C 110 ${T - 5}, 120 15, 128 16" fill="none" stroke="${L_LEAF}" stroke-width="1.2" opacity=".6"/></g></g>`;
|
|
49
56
|
}
|
|
50
57
|
const mirror = (d) => { let x = true; return d.replace(/[MCZ]|-?\d+\.?\d*/g, (t) => { if (/[MCZ]/.test(t)) { x = true; return t; } const v = Number(t); const o = x ? String(200 - v) : String(v); x = !x; return ' ' + o; }); };
|
|
51
58
|
function ears(m, p) {
|
|
@@ -77,8 +84,8 @@ function face(m, p) {
|
|
|
77
84
|
else s += `<path d="M100 113 L100 118 M100 118 Q94 124 88 119 M100 118 Q106 124 112 119" fill="none" class="${S('ink')}" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>`;
|
|
78
85
|
return s;
|
|
79
86
|
}
|
|
80
|
-
function head(m, p, prop) {
|
|
81
|
-
let h = sprout(m, p) + ears(m, p);
|
|
87
|
+
function head(m, p, prop, grow, growNew) {
|
|
88
|
+
let h = sprout(m, p, grow, growNew) + ears(m, p);
|
|
82
89
|
h += `<path d="M28 98 C 28 54, 60 32, 100 32 C 140 32, 172 54, 172 98 C 172 138, 140 156, 100 156 C 60 156, 28 138, 28 98Z" fill="url(#${p}f)" stroke="${L_FUR}" stroke-width="3"/>`;
|
|
83
90
|
h += `<ellipse cx="74" cy="56" rx="30" ry="14" class="${F('white')}" opacity=".35" filter="url(#${p}b)"/><path d="M40 120 C 50 150, 150 150, 160 120 C 150 160, 50 160, 40 120Z" class="${F('shade')}" opacity=".12" filter="url(#${p}b)"/>`;
|
|
84
91
|
h += `<path d="M36 108 C 44 92, 70 92, 100 102 C 130 92, 156 92, 164 108 C 162 140, 136 154, 100 154 C 64 154, 38 140, 36 108Z" fill="url(#${p}c)"/>`;
|
|
@@ -171,7 +178,8 @@ const dot = (mood, px, o) => `<span class="ad-dot m-${mood}" style="--ad-px:${px
|
|
|
171
178
|
|
|
172
179
|
/**
|
|
173
180
|
* Adler. mood: one of MOODS (anything else is handled). size: 's' | 'm' | 'l' or a number of px (the face's side; the figure's height).
|
|
174
|
-
* o: { label: false (beside words that carry the meaning) | 'text', prop: 'headphones' | 'magnifier', cls, id (a fixed prefix)
|
|
181
|
+
* o: { label: false (beside words that carry the meaning) | 'text', prop: 'headphones' | 'magnifier', cls, id (a fixed prefix), grow: one of GROWS (Your
|
|
182
|
+
* impact's leaves on the sprout, the face only), growNew: true plays one grow on the newest leaf }. Off → the mood dot;
|
|
175
183
|
* Face only → an L figure is drawn as the M face. → HTML string
|
|
176
184
|
*/
|
|
177
185
|
export function adler(mood, size = 'm', o = {}) {
|
|
@@ -186,7 +194,7 @@ export function adler(mood, size = 'm', o = {}) {
|
|
|
186
194
|
// redraw that diffs the markup does not replace the node and replay its entrance (premium-viewer-flicker F1)
|
|
187
195
|
const p = o.id ? 'ad' + o.id : nextId(), cls = `ad-svg am m-${m}${o.cls ? ' ' + o.cls : ''}`;
|
|
188
196
|
const extra = o.prop === 'headphones' ? 'listening' : o.prop === 'magnifier' ? 'searching' : '';
|
|
189
|
-
if (!figure) return `<svg class="${cls} ad-face" width="${px}" height="${px}" viewBox="22 4 156 156" overflow="visible" ${labelAttr(o, mood, extra)}>${defs(p)}${head(m, p, o.prop)}</svg>`;
|
|
197
|
+
if (!figure) return `<svg class="${cls} ad-face" width="${px}" height="${px}" viewBox="22 4 156 156" overflow="visible" ${labelAttr(o, mood, extra)}>${defs(p)}${head(m, p, o.prop, o.grow, o.growNew)}</svg>`;
|
|
190
198
|
const w = Math.round(px * 200 / 252);
|
|
191
199
|
return `<svg class="${cls} ad-fig" width="${w}" height="${px}" viewBox="0 0 200 252" overflow="visible" ${labelAttr(o, mood, extra)}>${defs(p)}<ellipse cx="100" cy="246" rx="62" ry="7" class="${F('shadow')}" opacity=".16" filter="url(#${p}b)"/><g class="ad-br">${full(m, p, o.prop)}</g></svg>`;
|
|
192
200
|
}
|
|
@@ -684,3 +684,87 @@ body.ins-trv #goalTbl { border: 0; background: none; border-radius: 0; overflow:
|
|
|
684
684
|
.ins-menu#moreMenu [role="menuitem"] { flex-direction: row; align-items: center; gap: 10px; }
|
|
685
685
|
.ins-menu#moreMenu [role="menuitem"] > span:not(.k) { flex: 1; min-width: 0; }
|
|
686
686
|
.ins-strip .sp.ad svg { width: 40px; height: 40px; fill: initial; stroke: none; } /* Adler in Claude’s line (batch 16 item 2, AdH3) */
|
|
687
|
+
|
|
688
|
+
/* ── Claude runs the OKRs (batch 16 item 6, 6-B; frames GsM1–M5, GsViewer, GsMetrics, GsMetricsTree, GsProduct): one goal list on every width.
|
|
689
|
+
* A row is a dot, the outcome with its reading and age, and the owner; its drafts sit under it with ✕ / ✎ / ✓. ── */
|
|
690
|
+
#goalTbl.okr-list { display: block !important; background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; }
|
|
691
|
+
#goalCards:empty { display: none; }
|
|
692
|
+
.okr-sec { display: flex; align-items: baseline; gap: 10px; padding: 14px 4px 8px; }
|
|
693
|
+
.okr-h { margin: 0; font-size: var(--fs-1); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cz-ink3); flex: 1; }
|
|
694
|
+
.okr-sec .note { font-size: var(--fs-2); }
|
|
695
|
+
.okr-card { background: var(--cz-card); border: 1px solid var(--cz-hair); border-radius: 20px; overflow: hidden; }
|
|
696
|
+
.okr-card > * + *, .okr-row + .okr-row, .okr-obj + .okr-row { border-top: 1px solid var(--cz-hair); }
|
|
697
|
+
.okr-obj { margin: 0; padding: 10px 16px 0; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink3); }
|
|
698
|
+
.okr-row.sel { background: var(--cz-bluebg); }
|
|
699
|
+
.okr-main { display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 16px; cursor: pointer; min-height: 48px; box-sizing: border-box; border-radius: 16px; }
|
|
700
|
+
.okr-main:hover { background: var(--cz-well); }
|
|
701
|
+
.okr-main:focus-visible { outline: 2px solid var(--cz-blueink); outline-offset: -2px; }
|
|
702
|
+
.okr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
|
703
|
+
.okr-t b { font-size: var(--fs-4); font-weight: 700; line-height: 1.3; color: var(--cz-ink); }
|
|
704
|
+
.okr-t .note { font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
705
|
+
.okr-none { margin: 0; padding: 14px 16px; color: var(--cz-ink3); font-size: var(--fs-3); }
|
|
706
|
+
.okr-dot { width: 10px; height: 10px; margin-top: 6px; }
|
|
707
|
+
.cz-dot.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cz-ink3); }
|
|
708
|
+
.okr-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-1); font-weight: 800; background: var(--cz-well); color: var(--cz-ink); }
|
|
709
|
+
.okr-av.none { background: transparent; border: 2px dashed var(--cz-ink3); box-sizing: border-box; }
|
|
710
|
+
.okr-row.drafted .okr-t b { color: var(--cz-ink2); }
|
|
711
|
+
/* a draft under its row (GsM1, GsM3, GsM4, GsM5): its icon, Was …, what it does, why, and the icon presses */
|
|
712
|
+
.okr-dr { display: flex; align-items: flex-start; gap: 10px; margin: 0 12px 12px 38px; padding: 10px 10px 10px 12px; border-radius: 16px; border: 1px dashed rgba(47, 95, 179, .45); background: var(--cz-bluebg); }
|
|
713
|
+
.okr-dr .k { color: var(--cz-blueink); display: inline-flex; margin-top: 2px; }
|
|
714
|
+
.okr-dr .k svg, .okr-why .sp svg, .okr-mbar svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
|
715
|
+
.okr-dr .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-3); }
|
|
716
|
+
.okr-dr .tx b { font-weight: 700; color: var(--cz-ink); }
|
|
717
|
+
.okr-dr .tx .note { font-size: var(--fs-2); }
|
|
718
|
+
.okr-old { font-size: var(--fs-2); color: var(--cz-ink3); text-decoration: line-through; }
|
|
719
|
+
.okr-dr .acts { display: flex; gap: 4px; flex: none; align-items: center; }
|
|
720
|
+
.okr-dr.made { border-style: solid; border-color: var(--cz-hair); background: var(--cz-well); }
|
|
721
|
+
.okr-dr.made .tx b { color: var(--cz-ink2); }
|
|
722
|
+
.okr-ed .tx { gap: 6px; }
|
|
723
|
+
.okr-ed .ins-dri { width: 100%; box-sizing: border-box; }
|
|
724
|
+
.okr-row > .okr-dr:first-of-type { margin-top: 0; }
|
|
725
|
+
.okr-row.crit .okr-main b { color: var(--cz-ink); }
|
|
726
|
+
.ins-dr .okr-card { background: none; border: 0; }
|
|
727
|
+
.ins-dr .okr-dr { margin: 6px 0; }
|
|
728
|
+
/* the ✦ line: red only when a limit breaks (GsM4Break) */
|
|
729
|
+
.ins-strip.crit { box-shadow: inset 0 0 0 1.5px var(--cz-dot-red); }
|
|
730
|
+
.ins-strip.crit .sp { color: var(--cz-dot-red); }
|
|
731
|
+
.ins-strip.crit .sp svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
|
|
732
|
+
/* the North Star as the first card */
|
|
733
|
+
.ins-ns.okr-ns { display: block; background: none; border-radius: 0; padding: 0; font-size: inherit; font-weight: inherit; color: inherit; white-space: normal; }
|
|
734
|
+
/* the goal Viewer (GsViewer) */
|
|
735
|
+
.okr-vh { display: flex; align-items: center; gap: 10px; padding: 4px 2px 8px; flex-wrap: wrap; }
|
|
736
|
+
.okr-vh .okr-dot { margin-top: 0; }
|
|
737
|
+
.okr-vh b { font-size: var(--fs-4); font-weight: 800; }
|
|
738
|
+
.okr-vh .okr-sp { flex: 1; }
|
|
739
|
+
.okr-why { display: flex; gap: 12px; align-items: flex-start; background: var(--cz-well); border-radius: 16px; padding: 14px; margin: 8px 0; }
|
|
740
|
+
.okr-why .sp { color: var(--cz-blueink); display: inline-flex; }
|
|
741
|
+
.okr-why .sp svg { width: 20px; height: 20px; }
|
|
742
|
+
.okr-why p { margin: 0; font-size: var(--fs-3); line-height: 1.45; }
|
|
743
|
+
.okr-why .ins-mvl { margin-top: 8px; }
|
|
744
|
+
/* ⋯ › Metrics */
|
|
745
|
+
.okr-mbar { display: flex; gap: 2px; justify-content: flex-end; padding-bottom: 4px; }
|
|
746
|
+
.okr-mbar .cz-ib.on { background: var(--cz-well); }
|
|
747
|
+
.okr-mbar svg { width: 18px; height: 18px; }
|
|
748
|
+
.okr-sh { margin: 14px 4px 8px; font-size: var(--fs-1); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cz-ink3); }
|
|
749
|
+
.okr-mrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px 10px 14px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
750
|
+
.okr-mrow + .okr-mrow { border-top: 1px solid var(--cz-hair); }
|
|
751
|
+
.okr-mrow:hover { background: var(--cz-well); }
|
|
752
|
+
.okr-mrow .okr-dot { margin-top: 0; }
|
|
753
|
+
.okr-tag { font-size: var(--fs-1); font-weight: 700; color: var(--cz-ink3); border: 1px solid var(--cz-hair); border-radius: 10px; padding: 1px 7px; }
|
|
754
|
+
.okr-tree { display: flex; flex-direction: column; align-items: center; }
|
|
755
|
+
.okr-tr0 { display: flex; justify-content: center; width: 100%; }
|
|
756
|
+
.okr-trk { width: 2px; height: 18px; background: var(--cz-hair); }
|
|
757
|
+
.okr-tr1 { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; padding-top: 10px; border-top: 2px solid var(--cz-hair); border-radius: 8px 8px 0 0; }
|
|
758
|
+
.okr-tr1.one { border-top: 0; padding-top: 0; }
|
|
759
|
+
.okr-tr1.loose, .okr-sh + .okr-tr1 { border-top: 0; padding-top: 0; justify-content: flex-start; }
|
|
760
|
+
.okr-node { display: flex; align-items: flex-start; gap: 8px; width: 170px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--cz-hair); background: var(--cz-card); color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
761
|
+
.okr-node.ns { width: min(260px, 100%); }
|
|
762
|
+
.okr-node .okr-t b { font-size: var(--fs-3); }
|
|
763
|
+
.okr-node .okr-dot { margin-top: 5px; }
|
|
764
|
+
/* the product page's Goals line (GsProduct) */
|
|
765
|
+
.okr-pl { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
766
|
+
.okr-plt { flex: 1; min-width: 0; }
|
|
767
|
+
.okr-pld { display: inline-flex; gap: 4px; flex: none; }
|
|
768
|
+
.okr-pld .okr-dot { margin-top: 0; width: 8px; height: 8px; }
|
|
769
|
+
@media (prefers-reduced-motion: reduce) { .okr-dot.m-crit::after { animation: none; } }
|
|
770
|
+
textarea.ins-dri { height: auto; padding: 6px 8px; font-weight: 500; resize: vertical; }
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* pm/cozy-settings.js — Settings (initiative premium-uncovered-features, E3; canvas EvSettings). A dialog over the page, its sections on the left:
|
|
2
2
|
* General Theme (this device; the place menu's Theme row moved here, feedback batch 16 item 5), Viewer opens as a column or a popup
|
|
3
3
|
* (this device), Product (which products Home reads: the Products card), Your day (when the end-of-day card shows:
|
|
4
|
-
* time.workEnd, POST /api/settings),
|
|
4
|
+
* time.workEnd, POST /api/settings), Your impact (impact.on, POST /api/settings; canvas GmP1Switch, batch 16 item 7: the one switch
|
|
5
|
+
* for Adler's leaf, the impact log and the weekly check; the page hears `pmos:impact`), Agents write to Jira (fixed: only after Commit)
|
|
5
6
|
* Adler how much of Claude's face shows, Motion, Celebrations, Quiet after (adler.*, POST /api/settings; canvas AdM5, batch 16 item 2)
|
|
6
7
|
* Connectors each source's last read (GET /api/sources; was the Sources card, feedback batch 16 item 5, canvas FmA3Settings): the amber dot
|
|
7
8
|
* and ↻ Read again on a stale or failed one (POST /api/sources/refresh), ↻ in the header reads every source
|
|
@@ -57,9 +58,12 @@ function general() {
|
|
|
57
58
|
+ trow('Viewer opens as', 'A column beside the chat, or a popup over it', seg('Viewer opens as', 'viewer', vw, [['column', 'Column'], ['popup', 'Popup']]))
|
|
58
59
|
+ trow('Product', 'Which products Home, Board and Intelligence read', `<button type="button" class="ev-pick" data-ev-products aria-haspopup="menu">${esc(pname)} ${svg(ICON.down, 14)}</button>`)
|
|
59
60
|
+ trow('Your day', 'When the end-of-day card shows', `<label class="ev-vh" for="evDay">Your day ends at</label><select id="evDay" class="ev-inp" data-ev-day>${hours.map((h) => `<option value="${h}"${h === end ? ' selected' : ''}>${pad(h)}:00</option>`).join('')}</select>`)
|
|
61
|
+
+ trow('Your impact', 'Adler’s sprout and your impact log. Only you see it. Nothing leaves PMOS.', sw(impactOn(), 'data-ev-impact', 'Your impact'))
|
|
60
62
|
+ trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', '<span class="ev-pill ok">Fixed</span>')
|
|
61
63
|
+ upd;
|
|
62
64
|
}
|
|
65
|
+
/* Your impact (GmP1Switch): on by default; off hides every impact surface and stops Claude's daily read */
|
|
66
|
+
function impactOn() { const x = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((y) => y.key === 'impact.on') : null; return x ? x.value !== false : true; }
|
|
63
67
|
/* Settings > Adler (AdM5): four choices, each saved for this computer the moment it is pressed */
|
|
64
68
|
function adlerSec() {
|
|
65
69
|
const P = AD.prefs();
|
|
@@ -167,6 +171,12 @@ async function press(e) {
|
|
|
167
171
|
if (t.dataset.evGo) { T.sec = t.dataset.evGo; draw(); return; }
|
|
168
172
|
if (t.dataset.evSeg === 'theme') { const M = await import('./cozy-nav.js'); M.setTheme(t.dataset.v); draw(); return; }
|
|
169
173
|
if (t.dataset.evSeg && t.dataset.evSeg.startsWith('adler.')) { const r = await AD.savePref(pmPost, t.dataset.evSeg, t.dataset.v); T.msg = r && r.ok ? 'Saved.' : (r && r.error) || 'Not saved.'; draw(); return; }
|
|
174
|
+
if ('evImpact' in t.dataset) {
|
|
175
|
+
const on = !impactOn(), r = await pmPost('/api/settings', { key: 'impact.on', value: on });
|
|
176
|
+
if (r && r.ok) { const x = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((y) => y.key === 'impact.on') : null; if (x) x.value = on; window.dispatchEvent(new CustomEvent('pmos:impact', { detail: { on } })); }
|
|
177
|
+
T.msg = r && r.ok ? (on ? 'Your impact is on.' : 'Your impact is off. The leaf, the log and the weekly check are hidden.') : (r && r.error) || 'Not saved.';
|
|
178
|
+
draw(); return;
|
|
179
|
+
}
|
|
170
180
|
if (t.dataset.evSeg === 'viewer') { store.set(VIEWER_KEY, t.dataset.v); document.body.classList.toggle('ev-vw-popup', t.dataset.v === 'popup'); draw(); return; }
|
|
171
181
|
// the one product pick (batch 12 item 5): the same list as the chip on Home, Board and Insights, under this row
|
|
172
182
|
if ('evProducts' in t.dataset) {
|