create-pmos 0.715.0 → 0.716.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 +14 -14
- 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/changelog.json +13 -0
- package/workspace/guide/settings-and-switches.md +2 -1
- package/workspace/lib/ease-check.js +78 -0
- package/workspace/lib/routes-use-log.js +9 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-settings.js +23 -3
- package/workspace/test-lists/page-ease-check.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.716.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,19 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.716.0",
|
|
38
|
+
"at": "2026-11-22T20:55:20.302Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1586,
|
|
43
|
+
"t": "One-minute ease check per page from the local use log (job #1585)",
|
|
44
|
+
"s": "One-minute ease check per page from the local use log (job #1585)",
|
|
45
|
+
"k": "new"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
36
49
|
{
|
|
37
50
|
"v": "0.715.0",
|
|
38
51
|
"at": "2026-11-22T20:02:36.257Z",
|
|
@@ -465,19 +478,6 @@
|
|
|
465
478
|
"k": "fix"
|
|
466
479
|
}
|
|
467
480
|
]
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"v": "0.678.0",
|
|
471
|
-
"at": "2026-11-22T06:40:11.793Z",
|
|
472
|
-
"f": 4,
|
|
473
|
-
"prs": [
|
|
474
|
-
{
|
|
475
|
-
"n": 1473,
|
|
476
|
-
"t": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
477
|
-
"s": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
478
|
-
"k": "new"
|
|
479
|
-
}
|
|
480
|
-
]
|
|
481
481
|
}
|
|
482
482
|
]
|
|
483
483
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T20:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T20:55:16Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T20:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T20:55:16Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T20:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T20:55:16Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.716.0",
|
|
4
|
+
"at": "2026-11-22T20:55:20.302Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1586,
|
|
9
|
+
"t": "One-minute ease check per page from the local use log (job #1585)",
|
|
10
|
+
"s": "One-minute ease check per page from the local use log (job #1585)",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.715.0",
|
|
4
17
|
"at": "2026-11-22T20:02:36.257Z",
|
|
@@ -11,7 +11,7 @@ Press the round menu button at the bottom of any page, then the **Settings** ico
|
|
|
11
11
|
|
|
12
12
|
| Section | What it holds |
|
|
13
13
|
|---|---|
|
|
14
|
-
| General | The theme (Light, Dark or Auto), the products Home, the Board and Intelligence read, **New work starts as** (Product, Project or Full SDLC: the kind a new initiative starts as when its name gives no hint; see [what each kind shows](initiatives-and-next-steps.md)), when Your day ends, the Your impact switch, and that agents write to Jira only after you press Commit. When a new PMOS is ready, a card here says so. Under **Extras**, **Adler ›**, **Jev and Laya ›** and **
|
|
14
|
+
| General | The theme (Light, Dark or Auto), the products Home, the Board and Intelligence read, **New work starts as** (Product, Project or Full SDLC: the kind a new initiative starts as when its name gives no hint; see [what each kind shows](initiatives-and-next-steps.md)), when Your day ends, the Your impact switch, and that agents write to Jira only after you press Commit. When a new PMOS is ready, a card here says so. Under **Extras**, **Adler ›**, **Jev and Laya ›**, **Use log ›** and **Ease check ›** open their own settings (see below). |
|
|
15
15
|
| How PMOS decides | One suggestion from PMOS when it sees a pattern in what you kept, each kind of change PMOS makes by itself, the calls that are **Always yours**, and PMOS's **Lessons**. |
|
|
16
16
|
| Checks | When PMOS grills an initiative by itself and the monthly credit for its checks. |
|
|
17
17
|
| Prototype rules | What every prototype version is checked for before you see it. |
|
|
@@ -76,6 +76,7 @@ At the bottom of **General**, **Extras** has three rows. Press the arrow on a ro
|
|
|
76
76
|
- **Jev and Laya ›**: the TypeSafe key for Jev, the local model Laya, and the switches for each repository: whether Jev may read it, sort documents, check claims and label notes.
|
|
77
77
|
- **Use log ›**: what PMOS notes on this computer about how you use it: the pages you open and the buttons you press, kept 30 days. A button is noted by its code name, never by its text or anything you typed. The log stays in the PMOS folder on this computer and is never sent. The panel shows the last 30 days (days, page opens, presses, and the pages and buttons you use most). Press **Clear** to empty it.
|
|
78
78
|
- **Hidden buttons**: after 14 days, when a page has buttons you saw on many days and never pressed, PMOS offers on that page to hide them (✦, Yes or No; while it shows, those buttons are outlined). Yes hides them and a Toast offers Undo; No keeps them, and PMOS does not suggest them again. Every hidden button is listed here with **Show**, and **Show all** puts them all back. Buttons in the menu, a list, a table, a dialog or a form are never suggested.
|
|
79
|
+
- **Ease check ›**: how easy each page is for you, read from the use log on this computer. For each page, PMOS takes the button you press most there as the page's main task, and shows the usual number of presses and seconds from opening the page to that press. A page over 3 presses or 10 seconds is listed first as slow. It reads the last 14 days, and a page needs 3 visits that reach its main task before it shows. Nothing is sent.
|
|
79
80
|
|
|
80
81
|
## Checks: when PMOS grills, and what it may spend
|
|
81
82
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* ease-check.js — the one-minute ease check per page (bet A453, initiative page-ease-check). A PURE FOLD over the local use log
|
|
4
|
+
* (lib/use-log.js): for each page, its main task and how many presses and seconds it takes the person to reach it.
|
|
5
|
+
* lib/routes-use-log.js serves it (GET /api/use-log/ease); Settings › General › Use log › Ease check shows it.
|
|
6
|
+
*
|
|
7
|
+
* LOCAL ONLY. It reads <runtime>/use-log.jsonl on this computer, writes nothing and sends nothing.
|
|
8
|
+
*
|
|
9
|
+
* THE RULE.
|
|
10
|
+
* visit an `open` of a page and the `use` lines on that page after it, until the next `open` of that page or a gap over GAP_MS
|
|
11
|
+
* main task the page's most-pressed control in the last WINDOW_DAYS days (key-miss, a key that found nothing, never counts)
|
|
12
|
+
* per visit that reached the main task: presses up to and including its first press, and seconds from the open to it
|
|
13
|
+
* per page the median of each; MIN_TASKS or more such visits for a verdict; slow = presses over BAR.presses or seconds over BAR.seconds
|
|
14
|
+
*
|
|
15
|
+
* visits(lines) → [{ page, open, uses: [{ control, t }] }] PURE
|
|
16
|
+
* check(lines, now) → { window, bar, slow, pages: [{ page, opens, control, tasks, presses, seconds, slow }] } PURE, slow first
|
|
17
|
+
* count(lines, days, now) → the presses of the ease check itself (OPEN_ID) in the last `days` days PURE, the health number
|
|
18
|
+
* CLI: node lib/ease-check.js count [--days 7] → that count on its last line */
|
|
19
|
+
const UL = require('./use-log.js');
|
|
20
|
+
|
|
21
|
+
const WINDOW_DAYS = 14;
|
|
22
|
+
const GAP_MS = 5 * 60e3;
|
|
23
|
+
const MIN_TASKS = 3;
|
|
24
|
+
const BAR = { presses: 3, seconds: 10 };
|
|
25
|
+
const TOP = 12;
|
|
26
|
+
const OPEN_ID = 'evEaseCheck';
|
|
27
|
+
const DAY = 864e5;
|
|
28
|
+
|
|
29
|
+
function visits(lines) {
|
|
30
|
+
const L = (Array.isArray(lines) ? lines : []).filter((l) => l && typeof l.at === 'string' && Number.isFinite(Date.parse(l.at)))
|
|
31
|
+
.map((l) => ({ l, t: Date.parse(l.at) })).sort((a, b) => a.t - b.t);
|
|
32
|
+
const open = new Map(), out = [];
|
|
33
|
+
for (const { l, t } of L) {
|
|
34
|
+
if (l.kind === 'open') { const v = { page: l.page, open: t, last: t, uses: [] }; open.set(l.page, v); out.push(v); continue; }
|
|
35
|
+
if (l.kind !== 'use') continue;
|
|
36
|
+
const v = open.get(l.page);
|
|
37
|
+
if (!v) continue;
|
|
38
|
+
if (t - v.last > GAP_MS) { open.delete(l.page); continue; }
|
|
39
|
+
v.uses.push({ control: l.control, t }); v.last = t;
|
|
40
|
+
}
|
|
41
|
+
return out.map(({ page, open: o, uses }) => ({ page, open: o, uses }));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const median = (xs) => { const s = [...xs].sort((a, b) => a - b), m = s.length >> 1; return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2; };
|
|
45
|
+
|
|
46
|
+
function check(lines, now = Date.now()) {
|
|
47
|
+
const from = now - WINDOW_DAYS * DAY;
|
|
48
|
+
const L = (Array.isArray(lines) ? lines : []).filter((l) => { const t = Date.parse(l && l.at); return t >= from && t <= now + DAY; });
|
|
49
|
+
const byPage = new Map();
|
|
50
|
+
for (const v of visits(L)) { if (!byPage.has(v.page)) byPage.set(v.page, []); byPage.get(v.page).push(v); }
|
|
51
|
+
const pages = [];
|
|
52
|
+
for (const [page, V] of byPage) {
|
|
53
|
+
const n = new Map();
|
|
54
|
+
for (const v of V) for (const u of v.uses) if (u.control !== 'key-miss' && u.control !== OPEN_ID) n.set(u.control, (n.get(u.control) || 0) + 1);
|
|
55
|
+
const control = [...n].sort((a, b) => b[1] - a[1] || (a[0] < b[0] ? -1 : 1)).map(([c]) => c)[0] || null;
|
|
56
|
+
const P = [], S = [];
|
|
57
|
+
if (control) for (const v of V) { const i = v.uses.findIndex((u) => u.control === control); if (i >= 0) { P.push(i + 1); S.push((v.uses[i].t - v.open) / 1000); } }
|
|
58
|
+
const tasks = P.length, presses = tasks ? median(P) : null, seconds = tasks ? Math.round(median(S)) : null;
|
|
59
|
+
pages.push({ page, opens: V.length, control, tasks, presses, seconds, slow: tasks >= MIN_TASKS && (presses > BAR.presses || seconds > BAR.seconds) });
|
|
60
|
+
}
|
|
61
|
+
pages.sort((a, b) => (b.slow - a.slow) || (b.opens - a.opens) || (a.page < b.page ? -1 : 1));
|
|
62
|
+
const top = pages.slice(0, TOP);
|
|
63
|
+
return { window: WINDOW_DAYS, bar: { ...BAR }, slow: pages.filter((p) => p.slow).length, pages: top };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function count(lines, days = 7, now = Date.now()) {
|
|
67
|
+
const from = now - Math.max(1, Number(days) || 7) * DAY;
|
|
68
|
+
return (Array.isArray(lines) ? lines : []).filter((l) => l && l.kind === 'use' && l.control === OPEN_ID && Date.parse(l.at) >= from && Date.parse(l.at) <= now + DAY).length;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
module.exports = { WINDOW_DAYS, GAP_MS, MIN_TASKS, BAR, OPEN_ID, visits, check, count };
|
|
72
|
+
|
|
73
|
+
if (require.main === module) {
|
|
74
|
+
if (process.argv[2] !== 'count') { console.error('usage: node lib/ease-check.js count [--days 7] (how many times the ease check was opened)'); process.exit(2); }
|
|
75
|
+
const dir = require('./state-root.js').defaultRoot({ env: process.env });
|
|
76
|
+
const i = process.argv.indexOf('--days');
|
|
77
|
+
console.log(String(count(UL.readLines(dir), i > 0 ? process.argv[i + 1] : 7)));
|
|
78
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* GET /api/use-log → { ok, keep, days, opens, uses, pages, controls } Settings › General › Use log
|
|
6
6
|
* POST /api/use-log { events } → { ok, wrote } the page side (public/pm/use-log.js), in batches
|
|
7
7
|
* POST /api/use-log/clear {} → { ok } Clear, in Settings (also forgets what pages showed)
|
|
8
|
+
* GET /api/use-log/ease → { ok, window, bar, slow, pages } Settings › Use log › Ease check (bet A453, lib/ease-check.js)
|
|
8
9
|
* Hide the buttons nobody presses (idea A454; the store and the rule are lib/unused-controls.js):
|
|
9
10
|
* GET /api/use-log/hidden[?page=] → { ok, hidden: [{ page, control, at }] } the page at load; Settings › Use log
|
|
10
11
|
* POST /api/use-log/unused { page, present } → { ok, hidden, propose } what the page shows (ids), and the ✦
|
|
@@ -18,13 +19,20 @@
|
|
|
18
19
|
const guard = require('./pm-guard.js');
|
|
19
20
|
const UL = require('./use-log.js');
|
|
20
21
|
const UC = require('./unused-controls.js');
|
|
22
|
+
const EC = require('./ease-check.js');
|
|
21
23
|
const POSTS = ['', 'clear', 'unused', 'hide', 'show', 'decline'];
|
|
22
24
|
|
|
23
25
|
async function handle(req, res, url, ctx) {
|
|
24
26
|
const send = (status, body) => { ctx.json(res, body, status); return true; };
|
|
25
27
|
const what = url.pathname.replace(/^\/api\/use-log\/?/, '');
|
|
26
|
-
if (!POSTS.includes(what) && what !== 'hidden') return send(404, { ok: false, error: 'no such use-log route' });
|
|
28
|
+
if (!POSTS.includes(what) && what !== 'hidden' && what !== 'ease') return send(404, { ok: false, error: 'no such use-log route' });
|
|
27
29
|
const dir = ctx.runtimeDir || null;
|
|
30
|
+
if (what === 'ease') {
|
|
31
|
+
if (req.method !== 'GET') return send(405, { ok: false, error: 'GET only' });
|
|
32
|
+
const r = EC.check(UL.readLines(dir));
|
|
33
|
+
console.log(`[ease-check] read: ${r.pages.length} pages, ${r.slow} slow`);
|
|
34
|
+
return send(200, { ok: true, ...r });
|
|
35
|
+
}
|
|
28
36
|
if (what === '' && req.method === 'GET') return send(200, { ok: true, ...UL.summary(UL.readLines(dir)) });
|
|
29
37
|
if (what === 'hidden') {
|
|
30
38
|
if (req.method !== 'GET') return send(405, { ok: false, error: 'GET only' });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.716.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.716.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -74,7 +74,7 @@ async function pmSend(method, path, body) {
|
|
|
74
74
|
catch (e) { return { ok: false, error: 'could not reach the workspace server — ' + ((e && e.message) || String(e)) }; }
|
|
75
75
|
}
|
|
76
76
|
const SECTIONS = SD.SECTIONS;
|
|
77
|
-
const SUBS = { adler: 'Adler', jl: 'Jev and Laya', workflows: 'Workflows', uselog: 'Use log' }; // General › Extras and Workspaces › Workflows: each opens as a sub-panel of its section (U4, U1)
|
|
77
|
+
const SUBS = { adler: 'Adler', jl: 'Jev and Laya', workflows: 'Workflows', uselog: 'Use log', ease: 'Ease check' }; // General › Extras and Workspaces › Workflows: each opens as a sub-panel of its section (U4, U1)
|
|
78
78
|
const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
|
|
79
79
|
const T = { lsOpen: false, el: null, sec: 'general', sub: '', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null, fresh: null, reading: '', note: {}, info: false, fold: false, dir: null, q: '', cat: 'all', wait: null, dress: false, more: false, bday: false, dset: {}, wkOpen: new Set(), wkMore: new Set(), arc: false };
|
|
80
80
|
const cmpVer = (a, b) => { const x = String(a || '0').split('-')[0].split('.').map(Number), y = String(b || '0').split('-')[0].split('.').map(Number); for (let i = 0; i < 3; i++) if ((x[i] || 0) !== (y[i] || 0)) return (x[i] || 0) < (y[i] || 0) ? -1 : 1; return 0; };
|
|
@@ -101,6 +101,7 @@ function general() {
|
|
|
101
101
|
if (T.sub === 'adler') return T.dress ? dressSec() : subHead('adler') + adlerSec();
|
|
102
102
|
if (T.sub === 'jl') return subHead('jl') + JL.html();
|
|
103
103
|
if (T.sub === 'uselog') return subHead('uselog') + useLogSec();
|
|
104
|
+
if (T.sub === 'ease') return subHead('ease') + easeSec();
|
|
104
105
|
const theme = (() => { const t = store.get('pmos.c3.theme'); return t === 'light' || t === 'dark' ? t : 'auto'; })();
|
|
105
106
|
const P = T.prods, on = P ? P.filter((x) => x.on) : null;
|
|
106
107
|
// the product the pages read (workspace grill W4): the page's own ?ws= first, then the pick; "No product" only when none is registered
|
|
@@ -120,7 +121,8 @@ function general() {
|
|
|
120
121
|
+ '<h4 class="pm-h-sm">Extras</h4>'
|
|
121
122
|
+ trow('Adler', 'How much of PMOS’s face shows, motion, celebrations, quiet hours and Dress for the day', subBtn('adler'))
|
|
122
123
|
+ trow('Jev and Laya', 'The TypeSafe key, Laya on this computer and the repositories it reads', subBtn('jl'))
|
|
123
|
-
+ trow('Use log', 'The pages you open and the buttons you press, kept 30 days. It stays on this computer and is never sent.', subBtn('uselog'))
|
|
124
|
+
+ trow('Use log', 'The pages you open and the buttons you press, kept 30 days. It stays on this computer and is never sent.', subBtn('uselog'))
|
|
125
|
+
+ trow('Ease check', 'How many presses and seconds each page’s main task takes you, from the use log', `<button type="button" class="ev-ib pm-btn" id="evEaseCheck" data-ev-sub="ease" aria-label="Ease check" title="Ease check">${svg(CHEV, 18)}</button>`);
|
|
124
126
|
}
|
|
125
127
|
/* General › Extras › Use log (bet A466): what lib/use-log.js keeps for the last 30 days (GET /api/use-log), and Clear (POST /api/use-log/clear) */
|
|
126
128
|
const UL_PAGE = { today: 'Today', premium: 'Home', 'premium-board': 'Work', 'premium-goals': 'Goals', 'premium-intelligence': 'Intelligence', 'premium-library': 'Library', 'premium-events': 'Events', 'premium-routine': 'Routine', 'premium-viewer': 'Viewer' };
|
|
@@ -131,6 +133,24 @@ async function loadUseLog() {
|
|
|
131
133
|
T.uh = h && h.ok && Array.isArray(h.hidden) ? h.hidden : [];
|
|
132
134
|
draw();
|
|
133
135
|
}
|
|
136
|
+
/* General › Extras › Ease check (bet A453): lib/ease-check.js over the use log (GET /api/use-log/ease). Summary first, slow pages first;
|
|
137
|
+
* a page with too few visits says nothing. The row's button has the id evEaseCheck, so the use log counts the opens (the kill count). */
|
|
138
|
+
async function loadEase() {
|
|
139
|
+
const r = await pmGet('/api/use-log/ease');
|
|
140
|
+
T.ec = r && r.ok ? r : { error: (r && r.error) || 'PMOS could not read the use log.' };
|
|
141
|
+
draw();
|
|
142
|
+
}
|
|
143
|
+
function easeSec() {
|
|
144
|
+
const E = T.ec;
|
|
145
|
+
if (!E) return '<p class="ev-mut">Reading…</p>';
|
|
146
|
+
if (E.error) return `<p class="ev-mut">${esc(E.error)}</p>`;
|
|
147
|
+
const about = `<p class="ev-mut">For each page, PMOS takes the button you press most there as its main task, and counts the presses and seconds from opening the page to that press. A page over ${E.bar.presses} presses or ${E.bar.seconds} seconds is slow. It reads the last ${E.window} days of your use log, on this computer only, and sends nothing.</p>`;
|
|
148
|
+
const P = (E.pages || []).filter((x) => x.tasks >= 3);
|
|
149
|
+
if (!P.length) return about + '<p class="ev-mut">Not enough use yet. A page needs 3 visits that reach its main task.</p>';
|
|
150
|
+
const slow = P.filter((x) => x.slow), plural = (n, w) => `${n} ${n === 1 ? w : w + 'es'}`;
|
|
151
|
+
const head = slow.length ? `<p><b>${slow.length} ${slow.length === 1 ? 'page is' : 'pages are'} slow:</b> ${esc(slow.map((x) => ulPage(x.page)).join(', '))}.</p>` : '<p><b>No page is slow.</b></p>';
|
|
152
|
+
return about + head + `<ul class="ev-ul-list">${P.map((x) => `<li>${esc(ulPage(x.page))} <span class="ev-mut">${esc(x.control)} · ${plural(x.presses, 'press')} · ${x.seconds} s · ${x.tasks} times</span>${x.slow ? ' <span class="pm-badge alert">Slow</span>' : ''}</li>`).join('')}</ul>`;
|
|
153
|
+
}
|
|
134
154
|
/* Hidden buttons (idea A454): what PMOS hid after a Yes on its ✦ (lib/unused-controls.js). Each one comes back with Show, or all with Show all,
|
|
135
155
|
* so a hidden button is never lost. A button is named by its id, never its text. */
|
|
136
156
|
function hiddenSec() {
|
|
@@ -659,7 +679,7 @@ async function press(e) {
|
|
|
659
679
|
if ('evFold' in t.dataset) { T.fold = !T.fold; draw(); return; }
|
|
660
680
|
if (t.dataset.evMore) { T.wkMore.add(t.dataset.evMore); draw(); return; }
|
|
661
681
|
if (t.dataset.evGo) { T.sec = t.dataset.evGo; T.sub = ''; draw(); return; }
|
|
662
|
-
if (t.dataset.evSub !== undefined) { const k = t.dataset.evSub, was = T.sub; T.sub = k; if (k === 'uselog') { T.ul = null; loadUseLog(); } T.dress = false; T.more = false; T.bday = false; T.msg = ''; draw(); const f = T.el.querySelector(k ? '[data-ev-sub=""]' : `[data-ev-sub="${was}"]`); if (f) f.focus(); return; }
|
|
682
|
+
if (t.dataset.evSub !== undefined) { const k = t.dataset.evSub, was = T.sub; T.sub = k; if (k === 'uselog') { T.ul = null; loadUseLog(); } if (k === 'ease') { T.ec = null; loadEase(); } T.dress = false; T.more = false; T.bday = false; T.msg = ''; draw(); const f = T.el.querySelector(k ? '[data-ev-sub=""]' : `[data-ev-sub="${was}"]`); if (f) f.focus(); return; }
|
|
663
683
|
if (t.dataset.evSeg && t.dataset.evSeg.startsWith('claude.way:')) { await saveWay(t.dataset.evSeg.slice(11), t.dataset.v); return; }
|
|
664
684
|
if (t.dataset.evSeg === 'work.role') {
|
|
665
685
|
const r = await pmPost('/api/settings', { key: 'work.role', value: t.dataset.v });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "The one-minute ease check per page (bet A453, initiative page-ease-check, done test planning/done-tests/page-ease-check.md E1-E6): visits from the local use log, the main task, median presses and seconds, the slow bar, the count CLI, the route in process and the Settings sub-panel. No server, network or browser.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"ease-check.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"ease-check.test.js": 2
|
|
8
|
+
}
|
|
9
|
+
}
|