create-pmos 0.713.0 → 0.715.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 +45 -39
- package/payload/KIT-VERSION +1 -1
- package/payload/design-system/ui/interactions.md +8 -0
- 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 +44 -0
- package/workspace/design-system/ui/interactions.md +8 -0
- package/workspace/guide/breakdown.md +11 -0
- package/workspace/guide/layout.md +19 -0
- package/workspace/lib/backlog.js +3 -1
- package/workspace/lib/board-premium.js +1 -1
- package/workspace/lib/engine/boards.js +9 -2
- package/workspace/lib/moments.js +41 -3
- package/workspace/lib/routes-boards.js +19 -5
- package/workspace/lib/routes-moments.js +1 -1
- package/workspace/lib/task-store.js +1 -1
- package/workspace/lib/use-log.js +27 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-vw-doc-test.js +2 -0
- package/workspace/public/pm/action-keys.js +234 -0
- package/workspace/public/pm/bd-backlog-ds.js +9 -3
- package/workspace/public/pm/bd-backlog.js +20 -1
- package/workspace/public/pm/bd-pop-ds.js +6 -1
- package/workspace/public/pm/bd-work-ds.css +1 -1
- package/workspace/public/pm/cozy-ev.css +8 -0
- package/workspace/public/pm/cozy-nav.js +2 -0
- package/workspace/public/pm/cozy-pop-work.js +38 -0
- package/workspace/public/pm/ini-view-model.js +1 -1
- package/workspace/public/pm/inline-fields.js +64 -0
- package/workspace/public/pm/page-chat.js +16 -0
- package/workspace/public/pm/pop-work-model.js +1 -1
- package/workspace/public/pm/premium-insights.js +2 -2
- package/workspace/public/pm/quiet-place.js +15 -2
- package/workspace/public/pm/state-blocks.js +31 -0
- package/workspace/public/pm/use-log.js +9 -0
- package/workspace/test-lists/action-keys.json +9 -0
- package/workspace/test-lists/inline-sprint-priority.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.715.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,50 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.715.0",
|
|
38
|
+
"at": "2026-11-22T20:02:36.257Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1581,
|
|
43
|
+
"t": "The ? list is sized by tokens and uses Komorebi parts only (Checker K5, action-keys)",
|
|
44
|
+
"s": "The ?",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1582,
|
|
49
|
+
"t": "Key hints step back once a key is learned (A480)",
|
|
50
|
+
"s": "Key hints step back once a key is learned (A480)",
|
|
51
|
+
"k": "new"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"n": 1584,
|
|
55
|
+
"t": "Set a task's sprint and priority in place, with one Undo (job #1563)",
|
|
56
|
+
"s": "Set a task's sprint and priority in place, with one Undo (job #1563)",
|
|
57
|
+
"k": "new"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"v": "0.714.0",
|
|
63
|
+
"at": "2026-11-22T18:31:53.842Z",
|
|
64
|
+
"f": 4,
|
|
65
|
+
"prs": [
|
|
66
|
+
{
|
|
67
|
+
"n": 1578,
|
|
68
|
+
"t": "One key each for approve, open, next sprint, park and Undo, plus a ? list (job #1577)",
|
|
69
|
+
"s": "One key each for approve, open, next sprint, park and Undo, plus a ?",
|
|
70
|
+
"k": "new"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"n": 1579,
|
|
74
|
+
"t": "One next step on a page that has nothing in it yet (A474)",
|
|
75
|
+
"s": "One next step on a page that has nothing in it yet (A474)",
|
|
76
|
+
"k": "new"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
36
80
|
{
|
|
37
81
|
"v": "0.713.0",
|
|
38
82
|
"at": "2026-11-22T15:29:37.584Z",
|
|
@@ -434,44 +478,6 @@
|
|
|
434
478
|
"k": "new"
|
|
435
479
|
}
|
|
436
480
|
]
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
"v": "0.677.0",
|
|
440
|
-
"at": "2026-11-22T06:18:36.434Z",
|
|
441
|
-
"f": 4,
|
|
442
|
-
"prs": [
|
|
443
|
-
{
|
|
444
|
-
"n": 1464,
|
|
445
|
-
"t": "An ask marked Done in Today stays done, re-worded copies included",
|
|
446
|
-
"s": "An ask marked Done in Today stays done, re-worded copies included",
|
|
447
|
-
"k": "fix"
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
"n": 1458,
|
|
451
|
-
"t": "A task Jira closed carries the resolution day as its finish day",
|
|
452
|
-
"s": "A task Jira closed carries the resolution day as its finish day",
|
|
453
|
-
"k": "new"
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
"n": 1471,
|
|
457
|
-
"t": "Remove the unreachable Welcome page, dead screenshot scripts and unused dev dependencies",
|
|
458
|
-
"s": "Remove the unreachable Welcome page, dead screenshot scripts and unused dev dependencies",
|
|
459
|
-
"k": "x"
|
|
460
|
-
}
|
|
461
|
-
]
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"v": "0.675.0",
|
|
465
|
-
"at": "2026-11-22T05:53:46.914Z",
|
|
466
|
-
"f": 4,
|
|
467
|
-
"prs": [
|
|
468
|
-
{
|
|
469
|
-
"n": 1460,
|
|
470
|
-
"t": "Read one goal metric per product from the query its source names",
|
|
471
|
-
"s": "Read one goal metric per product from the query its source names",
|
|
472
|
-
"k": "new"
|
|
473
|
-
}
|
|
474
|
-
]
|
|
475
481
|
}
|
|
476
482
|
]
|
|
477
483
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -48,3 +48,11 @@ One part draws all three, so they look the same on every page: [State](component
|
|
|
48
48
|
| `t` | Move to tomorrow (on a row) or jump to today (on a calendar) |
|
|
49
49
|
| `j`, `k` | Next and previous item in Detail |
|
|
50
50
|
| `g` then a letter | Go to a page |
|
|
51
|
+
| `y` | Yes to what PMOS proposes, on the item under the pointer or focus |
|
|
52
|
+
| `o` | Open the item under the pointer or focus |
|
|
53
|
+
| `s` | Move the item to the next sprint |
|
|
54
|
+
| `p` | Park the item (put it on hold) |
|
|
55
|
+
| `z` | Undo (the item's Undo, else the Toast's) |
|
|
56
|
+
| `?` | The list of keys, with the ones that work on this page |
|
|
57
|
+
|
|
58
|
+
`y`, `o`, `s`, `p` and `z` press the item's own button, found by its words; a button that has a key shows it in its tooltip ("Open (O)") until the person has used that key 3 times, then the tooltip steps back (`aria-keyshortcuts` and the `?` list keep it). The workspace does this once for every page in `pm/action-keys.js`.
|
|
@@ -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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T20:02:32Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T20:02:32Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T20:02:32Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,48 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.715.0",
|
|
4
|
+
"at": "2026-11-22T20:02:36.257Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1581,
|
|
9
|
+
"t": "The ? list is sized by tokens and uses Komorebi parts only (Checker K5, action-keys)",
|
|
10
|
+
"s": "The ?",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1582,
|
|
15
|
+
"t": "Key hints step back once a key is learned (A480)",
|
|
16
|
+
"s": "Key hints step back once a key is learned (A480)",
|
|
17
|
+
"k": "new"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"n": 1584,
|
|
21
|
+
"t": "Set a task's sprint and priority in place, with one Undo (job #1563)",
|
|
22
|
+
"s": "Set a task's sprint and priority in place, with one Undo (job #1563)",
|
|
23
|
+
"k": "new"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"v": "0.714.0",
|
|
29
|
+
"at": "2026-11-22T18:31:53.842Z",
|
|
30
|
+
"f": 4,
|
|
31
|
+
"prs": [
|
|
32
|
+
{
|
|
33
|
+
"n": 1578,
|
|
34
|
+
"t": "One key each for approve, open, next sprint, park and Undo, plus a ? list (job #1577)",
|
|
35
|
+
"s": "One key each for approve, open, next sprint, park and Undo, plus a ?",
|
|
36
|
+
"k": "new"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"n": 1579,
|
|
40
|
+
"t": "One next step on a page that has nothing in it yet (A474)",
|
|
41
|
+
"s": "One next step on a page that has nothing in it yet (A474)",
|
|
42
|
+
"k": "new"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
2
46
|
{
|
|
3
47
|
"v": "0.713.0",
|
|
4
48
|
"at": "2026-11-22T15:29:37.584Z",
|
|
@@ -48,3 +48,11 @@ One part draws all three, so they look the same on every page: [State](component
|
|
|
48
48
|
| `t` | Move to tomorrow (on a row) or jump to today (on a calendar) |
|
|
49
49
|
| `j`, `k` | Next and previous item in Detail |
|
|
50
50
|
| `g` then a letter | Go to a page |
|
|
51
|
+
| `y` | Yes to what PMOS proposes, on the item under the pointer or focus |
|
|
52
|
+
| `o` | Open the item under the pointer or focus |
|
|
53
|
+
| `s` | Move the item to the next sprint |
|
|
54
|
+
| `p` | Park the item (put it on hold) |
|
|
55
|
+
| `z` | Undo (the item's Undo, else the Toast's) |
|
|
56
|
+
| `?` | The list of keys, with the ones that work on this page |
|
|
57
|
+
|
|
58
|
+
`y`, `o`, `s`, `p` and `z` press the item's own button, found by its words; a button that has a key shows it in its tooltip ("Open (O)") until the person has used that key 3 times, then the tooltip steps back (`aria-keyshortcuts` and the `?` list keep it). The workspace does this once for every page in `pm/action-keys.js`.
|
|
@@ -26,6 +26,17 @@ A parent shows a fold arrow and "n of m done". Its dates are the earliest start
|
|
|
26
26
|
|
|
27
27
|
In the terminal, `pmos task set <task> --parent <task>` sets the parent, and `--parent none` moves the task back to the top level. `pmos task list` shows each subtask under its parent.
|
|
28
28
|
|
|
29
|
+
## Sprint and priority
|
|
30
|
+
|
|
31
|
+
When you point at an open PMOS task in the List, the row shows its buttons. **Sprint** and **Priority** are next to **Who** and the date. Work › Backlog shows the same two buttons at the end of each row.
|
|
32
|
+
|
|
33
|
+
- **Sprint** lists the sprints that are active now or start next, with their dates, as Jira has them. The task's current sprint is ticked. When you select a sprint, the task gets that sprint's start and end dates. A milestone gets only the end date.
|
|
34
|
+
- **Priority** lists P1, P2, P3 and **No priority**. A priority that is set shows in the row, before the date.
|
|
35
|
+
|
|
36
|
+
Each change is saved at once and has one **Undo**. With the keyboard, press Enter on the button to open the list, and Esc to close it without a change.
|
|
37
|
+
|
|
38
|
+
A Jira ticket keeps the sprint and priority that Jira gives it. PMOS shows no Sprint or Priority button on a Jira ticket and does not change Jira.
|
|
39
|
+
|
|
29
40
|
## Move several tasks at once
|
|
30
41
|
|
|
31
42
|
To select tasks, Cmd-click or Ctrl-click each one, or Shift-click to select a range. This works in the Work breakdown's List and Gantt, in Work › Backlog and in This sprint. A bar shows the number of selected tasks. Use it to put the tasks under a parent, move them to a stage, give them to a person, move their dates by a number of days, or mark them done. One **Undo** puts all of them back. Press Esc to clear the selection.
|
|
@@ -270,6 +270,14 @@ The Board shows initiatives by stage, with programs, a timeline and a list. Inte
|
|
|
270
270
|
| ⌘K (Ctrl-K) or / | Open Search from any page. A second press focuses the box. |
|
|
271
271
|
| Esc | Close Search or the menu, then the Viewer. |
|
|
272
272
|
| ↑ ↓ and Enter | Move through Search results and open one. |
|
|
273
|
+
| Y | Say yes to what PMOS proposes on the item you point at. |
|
|
274
|
+
| O | Open the item you point at. |
|
|
275
|
+
| S | Move the item you point at to the next sprint. |
|
|
276
|
+
| P | Park the item you point at (put it on hold). |
|
|
277
|
+
| Z | Undo the last change. |
|
|
278
|
+
| ? | Show these keys, and which of them work on this page. Esc, ? again or × closes the list. |
|
|
279
|
+
|
|
280
|
+
Y, O, S, P and Z press the item's own button, so they work only where the item has that button. Point at the item, or tab to it, then press the key. Hover a button to see its key, for example **Open (O)**. After you use a key 3 times, its buttons stop showing it. Press **?** to see every key again. PMOS counts your key presses in the Use log on this computer.
|
|
273
281
|
|
|
274
282
|
A key that you type in a field, or in a terminal, goes to the field or the terminal.
|
|
275
283
|
|
|
@@ -392,6 +400,17 @@ A place opens on a fact PMOS can check in your records. It never opens because a
|
|
|
392
400
|
|
|
393
401
|
Your first initiative is the first moment. The card that sets it up comes right after setup, so this list starts after it.
|
|
394
402
|
|
|
403
|
+
### One next step under the line
|
|
404
|
+
|
|
405
|
+
Under its line, a quiet place shows one ✦ next step that fills it from what PMOS already has. PMOS picks the step in this order:
|
|
406
|
+
|
|
407
|
+
| Place | First choice | Then | Else |
|
|
408
|
+
|---|---|---|---|
|
|
409
|
+
| Board and Reports | "Make initiatives from the Jira epics PMOS read" (PMOS has saved a Jira reading) | "Draft initiatives from the strategy" (the Board's strategy has a written line) | "Paste a list of the work, and PMOS makes initiatives from it" |
|
|
410
|
+
| Intelligence | "Draft a goal from the strategy" | "Draft a goal from your initiatives" (you have one or more) | "Write what you want to reach, and PMOS makes a goal from it" |
|
|
411
|
+
|
|
412
|
+
The arrow writes the request in the chat over the page. It does not send it. Read it, change it if you want, and send it. PMOS shows you the drafts, and keeps nothing until you say yes. The use log counts presses of the arrow (Settings › General › Use log).
|
|
413
|
+
|
|
395
414
|
### One ✦ a day in Home's chat
|
|
396
415
|
|
|
397
416
|
When a place opens, Home's own chat shows one ✦ for it, with a link to its page in this guide (for example "How the Board works").
|
package/workspace/lib/backlog.js
CHANGED
|
@@ -307,7 +307,9 @@ function tasksOf(input) {
|
|
|
307
307
|
sprint: rd.sprint && rd.sprint.name ? { name: str(rd.sprint.name, 80), state: rd.sprint.state || '' } : null, url: rd.url || null });
|
|
308
308
|
} else {
|
|
309
309
|
push({ id, src: 'pmos', key: '', title: str(w.title, 300), ini: iniBy.has(w.ini) ? w.ini : null, kind: w.milestone ? 'Milestone' : 'Task', milestone: !!w.milestone, epic: null,
|
|
310
|
-
...whoOf(w.owner), state: w.status === "Won't do" || w.status === 'Archived' || w.status === 'Done' ? w.status : OPEN.has(w.status) ? w.status : 'To do', due: w.end || null, sprint: null, url: null, item: !!w.item
|
|
310
|
+
...whoOf(w.owner), state: w.status === "Won't do" || w.status === 'Archived' || w.status === 'Done' ? w.status : OPEN.has(w.status) ? w.status : 'To do', due: w.end || null, sprint: null, url: null, item: !!w.item,
|
|
311
|
+
// set in the row (inline-sprint-priority): the PM's priority when set, and the start, so the Sprint list ticks the sprint it is in
|
|
312
|
+
start: w.start || null, ...(w.priority ? { priority: w.priority } : {}) });
|
|
311
313
|
}
|
|
312
314
|
}
|
|
313
315
|
// the tickets of the board's sprints that no initiative holds: No home, unless the PM placed one (a ticket-move line)
|
|
@@ -354,7 +354,7 @@ function build(f) {
|
|
|
354
354
|
// the start too: the Tasks Timeline draws a bar from the start to the due day (batch 9 item 5b)
|
|
355
355
|
taskBy.get(w.ini).push({ uid: w.uid, title: clip(w.title || '', 160), status: w.status || 'To do', owner: w.owner || '', start: w.start || '', end: w.end || '', ...(w.from ? { from: { stage: w.from.stage, finish: w.from.finish } } : {}),
|
|
356
356
|
// one view (feedback batch 6 item 1): its place in the breakdown, and a breakdown item's own stage and order
|
|
357
|
-
...(typeof w.section === 'string' ? { section: w.section } : {}), ...(w.itemStage ? { itemStage: w.itemStage } : {}), ...(Number.isFinite(w.order) ? { order: w.order } : {}), ...(Number.isFinite(w.rank) ? { rank: w.rank } : {}), ...(w.store === 'item' ? { item: true } : {}), ...(w.milestone ? { milestone: true } : {}), ...(w.since ? { since: w.since } : {}),
|
|
357
|
+
...(typeof w.section === 'string' ? { section: w.section } : {}), ...(w.itemStage ? { itemStage: w.itemStage } : {}), ...(Number.isFinite(w.order) ? { order: w.order } : {}), ...(Number.isFinite(w.rank) ? { rank: w.rank } : {}), ...(w.store === 'item' ? { item: true } : {}), ...(w.milestone ? { milestone: true } : {}), ...(w.since ? { since: w.since } : {}), ...(w.priority ? { priority: w.priority } : {}),
|
|
358
358
|
// a subtask's parent (initiative work-subtasks), and the Jira ticket the task names as read: its key, link, epic, assignee and sub-tasks
|
|
359
359
|
...(w.parent ? { parent: w.parent } : {}), ...(w.tracker && w.tracker.key ? { jira: jiraOf(w.tracker) } : {}) });
|
|
360
360
|
}
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
* task-pin { task, pinned } the PM's pin on a milestone (feedback batch 13 item 4, XcalmA5Milestones):
|
|
47
47
|
* true draws it on the Board timeline, false hides it, null goes back to the rule (only the initiative's last milestone).
|
|
48
48
|
* `task` is a Board task, a breakdown item or a Jira key; the last line wins.
|
|
49
|
+
* task-priority { task, priority } the PM's priority, set in the row (inline-sprint-priority):
|
|
50
|
+
* 'P1', 'P2' or 'P3'; '' takes it out. `task` is a Board task or a breakdown item (Jira keeps its tickets' own); the last line wins.
|
|
49
51
|
* task-order { initiative, section, tasks: [id] } the PM's order of the open tasks inside one stage of an
|
|
50
52
|
* initiative's breakdown (feedback batch 18 item 16, a drag in the stage list): the ids top to bottom. A task not named sorts after
|
|
51
53
|
* them. An empty list takes the order out (the urgency again). It never changes a task's status, dates or place; the last line wins.
|
|
@@ -188,7 +190,9 @@ const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept
|
|
|
188
190
|
// split or merge initiatives (feedback batch 11 item 14): a Jira ticket moved to another initiative, the split and merge records with their Undo, Claude's suggestion dismissed
|
|
189
191
|
'ticket-move', 'ini-split', 'ini-merge', 'ini-sm-undo', 'ini-suggest', 'backlog-rank',
|
|
190
192
|
// Delete an initiative with its tasks, and its Undo (feedback batch 16 item 5d)
|
|
191
|
-
'ini-delete', 'ini-restore'
|
|
193
|
+
'ini-delete', 'ini-restore',
|
|
194
|
+
// a task's priority, set in the row (initiative inline-sprint-priority): P1, P2 or P3; '' takes it out
|
|
195
|
+
'task-priority']);
|
|
192
196
|
// A task's state is its only stage (Wawan, 2026-10-25): the same five every workflow ends in. An old 'In review' reads as In progress (taskState).
|
|
193
197
|
const TASK_STATES = Object.freeze(['To do', 'In progress', 'Done', "Won't do", 'Archived']);
|
|
194
198
|
const taskState = (s) => (s === 'In review' ? 'In progress' : TASK_STATES.includes(s) ? s : null);
|
|
@@ -222,6 +226,7 @@ function fold(events) {
|
|
|
222
226
|
const parents = new Map(); // task id (or Jira key) → the id of its parent task (subtasks, initiative work-subtasks); the last task-parent line wins
|
|
223
227
|
const orders = new Map(); // key(initiative, section) → the task ids in the PM's order inside that stage; the last task-order line wins
|
|
224
228
|
const pins = new Map(); // task id (or Jira key) → true | false: the PM's pin on a milestone; a null line takes it out (the rule again)
|
|
229
|
+
const priorities = new Map(); // task id → 'P1' | 'P2' | 'P3': the PM's priority (inline-sprint-priority); a '' line takes it out, the last line wins
|
|
225
230
|
const removed = new Map(); // task id → the task a task-remove took out, so a task-restore (Delete's Undo) puts it back
|
|
226
231
|
const ticketNotes = new Map(); // key(board, Jira key) → the PM's notes on that ticket (the last ticket-note line wins)
|
|
227
232
|
const ticketDates = new Map(); // key(board, Jira key) → { start, due } the PM keeps in PMOS for that ticket (the last ticket-dates line wins)
|
|
@@ -327,6 +332,8 @@ function fold(events) {
|
|
|
327
332
|
} else if (e.kind === 'task-order' && typeof e.initiative === 'string' && e.initiative && typeof e.section === 'string' && Array.isArray(e.tasks)) {
|
|
328
333
|
const ids = e.tasks.filter((x) => typeof x === 'string' && x);
|
|
329
334
|
if (ids.length) orders.set(key(e.initiative, e.section), ids); else orders.delete(key(e.initiative, e.section));
|
|
335
|
+
} else if (e.kind === 'task-priority' && typeof e.task === 'string' && e.task && typeof e.priority === 'string' && /^(P[1-3])?$/.test(e.priority)) {
|
|
336
|
+
if (e.priority) priorities.set(e.task, e.priority); else priorities.delete(e.task);
|
|
330
337
|
} else if (e.kind === 'task-pin' && typeof e.task === 'string' && e.task && (typeof e.pinned === 'boolean' || e.pinned === null)) {
|
|
331
338
|
if (e.pinned === null) pins.delete(e.task); else pins.set(e.task, e.pinned);
|
|
332
339
|
} else if (e.kind === 'ticket-dates' && b && typeof e.ref === 'string' && JIRA_KEY_RE.test(e.ref)) {
|
|
@@ -408,7 +415,7 @@ function fold(events) {
|
|
|
408
415
|
suggestNo.set(e.id, { kind: e.of === 'merge' ? 'merge' : 'split', fp: e.fp, at: e.at || null });
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
|
-
return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
|
|
418
|
+
return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, priorities, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
|
|
412
419
|
}
|
|
413
420
|
|
|
414
421
|
/** The stages an initiative runs on a board: its own workflow when one is recorded, else the board's. */
|
package/workspace/lib/moments.js
CHANGED
|
@@ -98,7 +98,35 @@ function facts(ctx, w, now = Date.now()) {
|
|
|
98
98
|
let goal = false, goalTitle = '';
|
|
99
99
|
try { const r = require('./okr-goals.js').read(w.root); if (r.ok && r.objectives.length) { goal = true; goalTitle = String(r.objectives[0].title || '').slice(0, 120); } } catch { /* unreadable: no goal */ }
|
|
100
100
|
const week = ids.size > 0 && Number.isFinite(oldest) && oldest <= now - WEEK && newest >= now - WEEK;
|
|
101
|
-
|
|
101
|
+
// what could fill a waiting place (initiative empty-page-next-action): a saved Jira reading, and a written strategy line
|
|
102
|
+
const tracker = stateDirsOf(ctx, w).some((s) => ls(path.join(s, 'tracker', 'jira')).some((n) => n.endsWith('.md')));
|
|
103
|
+
let strategy = false;
|
|
104
|
+
try {
|
|
105
|
+
const dir = require(require('./repo-script.js').repoScript('signals/layout-paths.js')).pathsFor(w.root).recordsDir;
|
|
106
|
+
const c = require('./strategy-card.js').read(dir);
|
|
107
|
+
strategy = ['for', 'problem', 'bet', 'win', 'wont'].some((k) => String((c && c[k]) || '').trim());
|
|
108
|
+
} catch { /* no records folder: no strategy */ }
|
|
109
|
+
return { initiatives: ids.size, dated, goal, goalTitle, week, tracker, strategy };
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** The one next step a waiting place offers, from what PMOS already holds (initiative empty-page-next-action, idea A474).
|
|
113
|
+
* PURE. → { id, say, ask } | null. `say` is the line on screen and names the source; `ask` is what a press puts in the chat, unsent:
|
|
114
|
+
* it asks PMOS to show the draft before it keeps anything (the person approves). Order: Board and Reports (both fill from initiatives)
|
|
115
|
+
* tracker → strategy → paste; Intelligence (fills from a goal) strategy → initiatives → paste. */
|
|
116
|
+
const KEEP = ' Show them to me before you keep any.';
|
|
117
|
+
const NEXT = {
|
|
118
|
+
tracker: { id: 'tracker', say: 'Make initiatives from the Jira epics PMOS read', ask: 'Make draft initiatives for this product from the Jira epics PMOS has read.' + KEEP },
|
|
119
|
+
strategy: { id: 'strategy', say: 'Draft initiatives from the strategy', ask: 'Draft three initiatives for this product from its strategy.' + KEEP },
|
|
120
|
+
paste: { id: 'paste', say: 'Paste a list of the work, and PMOS makes initiatives from it', ask: 'Make an initiative from each line of this list.' + KEEP + '\n\n' },
|
|
121
|
+
goalStrategy: { id: 'strategy', say: 'Draft a goal from the strategy', ask: 'Draft one goal for this quarter, with two or three key results, from this product\'s strategy. Show it to me before you keep it.' },
|
|
122
|
+
goalWork: { id: 'initiatives', say: 'Draft a goal from your initiatives', ask: 'Draft one goal for this quarter, with two or three key results, from this product\'s open initiatives. Show it to me before you keep it.' },
|
|
123
|
+
goalPaste: { id: 'paste', say: 'Write what you want to reach, and PMOS makes a goal from it', ask: 'Make one goal with key results from what we want to reach this quarter. Show it to me before you keep it.\n\n' },
|
|
124
|
+
};
|
|
125
|
+
function nextOf(place, F) {
|
|
126
|
+
if (!F) return null;
|
|
127
|
+
if (place === 'insights') return { ...(F.strategy ? NEXT.goalStrategy : F.initiatives > 0 ? NEXT.goalWork : NEXT.goalPaste) };
|
|
128
|
+
if (place === 'board' || place === 'reports') return { ...(F.tracker ? NEXT.tracker : F.strategy ? NEXT.strategy : NEXT.paste) };
|
|
129
|
+
return null;
|
|
102
130
|
}
|
|
103
131
|
|
|
104
132
|
/** Which places the facts open. */
|
|
@@ -113,6 +141,13 @@ function isNew(ctx, w) {
|
|
|
113
141
|
} catch { return false; }
|
|
114
142
|
}
|
|
115
143
|
|
|
144
|
+
const told = new Set();
|
|
145
|
+
/** One [moments] next line per place and step, so a responder sees which step a waiting place offered. */
|
|
146
|
+
function logNext(place, id) {
|
|
147
|
+
const k = place + ':' + id; if (told.has(k)) return; told.add(k);
|
|
148
|
+
try { console.info('[moments] next', place, id); } catch { /* no console */ }
|
|
149
|
+
}
|
|
150
|
+
|
|
116
151
|
const dayOf = (now) => { const d = new Date(now); return d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0'); };
|
|
117
152
|
|
|
118
153
|
/** Whether moment m is due for a workspace with facts F and setup record P. */
|
|
@@ -137,7 +172,7 @@ function wordsOf(m, F) {
|
|
|
137
172
|
* The whole view, and the writes it implies. Pure over its inputs: `rows` is one entry per workspace
|
|
138
173
|
* { w, isNew, facts, progress, reveal? }. → { moment, places, writes }
|
|
139
174
|
* moment the day's ✦ or null: { id, ws, product, text, sub, href, guide, guideLabel, go }
|
|
140
|
-
* places { [place]: { quiet, dot, line } }
|
|
175
|
+
* places { [place]: { quiet, dot, line, next? } } next: the one step a quiet place offers (nextOf)
|
|
141
176
|
* writes [{ ws, moments?, places? }] what to save (the first moment recorded, a place that opened)
|
|
142
177
|
*/
|
|
143
178
|
function view(rows, now = Date.now()) {
|
|
@@ -148,6 +183,9 @@ function view(rows, now = Date.now()) {
|
|
|
148
183
|
for (const p of PLACES) {
|
|
149
184
|
const open = rows.some((r) => !r.isNew || openOf(r.facts)[p]);
|
|
150
185
|
places[p] = { quiet: rows.length > 0 && !open, dot: false, line: QUIET[p] };
|
|
186
|
+
// a quiet place offers one next step, from the first new workspace's facts
|
|
187
|
+
const src = places[p].quiet && fresh.find((r) => r.facts);
|
|
188
|
+
if (src) { places[p].next = nextOf(p, src.facts); if (places[p].next) logNext(p, places[p].next.id); }
|
|
151
189
|
}
|
|
152
190
|
let answeredToday = false, current = null;
|
|
153
191
|
for (const r of fresh) {
|
|
@@ -238,4 +276,4 @@ function visit(ctx, place, now = Date.now()) {
|
|
|
238
276
|
return { ok: true };
|
|
239
277
|
}
|
|
240
278
|
|
|
241
|
-
module.exports = { MOMENTS, PLACES, QUIET, facts, openOf, isNew, view, rowsOf, current, answer, visit, dayOf };
|
|
279
|
+
module.exports = { MOMENTS, PLACES, QUIET, facts, nextOf, openOf, isNew, view, rowsOf, current, answer, visit, dayOf };
|
|
@@ -871,6 +871,9 @@ function itemsOf(w, fr, board, rows) {
|
|
|
871
871
|
// the PM's pin on a milestone (batch 13 item 4, XcalmA5Milestones): carried only when set, so an unset one follows the rule (the last one shows)
|
|
872
872
|
const PN = fr.folded.pins || new Map();
|
|
873
873
|
if (PN.size) for (const x of out) if (x.kind !== 'Epic' && PN.has(x.uid)) x.pinned = PN.get(x.uid);
|
|
874
|
+
// the PM's priority (inline-sprint-priority): carried only when set
|
|
875
|
+
const PR = fr.folded.priorities || new Map();
|
|
876
|
+
if (PR.size) for (const x of out) if (x.kind !== 'Epic' && x.src !== 'jira' && PR.has(x.uid)) x.priority = PR.get(x.uid);
|
|
874
877
|
return B.rollupItems(out);
|
|
875
878
|
}
|
|
876
879
|
|
|
@@ -1653,13 +1656,16 @@ const WRITES = {
|
|
|
1653
1656
|
const p = postFrame(ctx, res, body);
|
|
1654
1657
|
if (!p) return;
|
|
1655
1658
|
if (body.milestone != null && typeof body.milestone !== 'boolean') return fail(ctx, res, 400, 'milestone is true or false');
|
|
1659
|
+
// the priority and the sprint, set in the row (initiative inline-sprint-priority): sprint is the sprint's name, only to word the line's why
|
|
1660
|
+
if (body.priority != null && (typeof body.priority !== 'string' || !/^(P[1-3])?$/.test(body.priority))) return fail(ctx, res, 400, "priority is P1, P2, P3, or '' for none");
|
|
1661
|
+
if (body.sprint != null && body.sprint !== '' && !ONE_LINE(body.sprint, 80)) return fail(ctx, res, 400, 'sprint is the sprint\'s name, one line of at most 80 characters');
|
|
1656
1662
|
if (body.pinned !== undefined && body.pinned !== null && typeof body.pinned !== 'boolean') return fail(ctx, res, 400, 'pinned is true, false, or null for the rule (the last milestone only)');
|
|
1657
1663
|
const pinWas = (id) => { const PN = p.fr.folded.pins || new Map(); return PN.has(id) ? PN.get(id) : null; };
|
|
1658
1664
|
const pinLine = (id) => ({ kind: 'task-pin', board: p.board.id, task: id, pinned: body.pinned, why: body.pinned === true ? 'pinned to the timeline' : body.pinned === false ? 'taken off the timeline' : 'pin back to the rule' });
|
|
1659
1665
|
// a Jira ticket takes the milestone flag (feedback batch 11 item 3) and the PM's own start and due days, kept in PMOS only (item 23):
|
|
1660
1666
|
// Jira keeps its title, status and assignee, and nothing is written to Jira
|
|
1661
1667
|
if (typeof body.task === 'string' && B.JIRA_KEY_RE.test(body.task) && !B.taskOf(p.fr.folded, body.task)) {
|
|
1662
|
-
if (['owner', 'notes', 'initiative', 'section'].some((k) => body[k] != null)) return fail(ctx, res, 409, 'Jira owns this ticket: only its dates, its milestone flag and its pin change here');
|
|
1668
|
+
if (['owner', 'notes', 'initiative', 'section', 'priority'].some((k) => body[k] != null)) return fail(ctx, res, 409, 'Jira owns this ticket: only its dates, its milestone flag and its pin change here');
|
|
1663
1669
|
if (body.milestone == null && body.start == null && body.due == null && body.pinned === undefined && body.parent == null) return fail(ctx, res, 400, 'nothing to change: send start, due, milestone, pinned or parent');
|
|
1664
1670
|
if (body.parent != null) { const pe = parentError(p, body.task, body.parent, null); if (pe) return fail(ctx, res, 400, pe); }
|
|
1665
1671
|
for (const k of ['start', 'due']) if (body[k] != null && body[k] !== '' && !/^\d{4}-\d{2}-\d{2}$/.test(String(body[k]))) return fail(ctx, res, 400, `${k} is a day, YYYY-MM-DD, or '' for none`);
|
|
@@ -1732,6 +1738,9 @@ const WRITES = {
|
|
|
1732
1738
|
// the pin (batch 13 item 4): a board-ledger line like the milestone flag
|
|
1733
1739
|
const pin = body.pinned !== undefined;
|
|
1734
1740
|
if (pin) { if (!p.file) return fail(ctx, res, 409, NO_STATE); from.pinned = pinWas(t.id); }
|
|
1741
|
+
// the priority (inline-sprint-priority): a board-ledger line for every kind of task, like the milestone flag
|
|
1742
|
+
const prio = body.priority != null;
|
|
1743
|
+
if (prio) { if (!p.file) return fail(ctx, res, 409, NO_STATE); from.priority = (p.fr.folded.priorities || new Map()).get(t.id) || ''; }
|
|
1735
1744
|
// a subtask's parent (initiative work-subtasks): a board-ledger line for every kind of task, like the section
|
|
1736
1745
|
let par = null;
|
|
1737
1746
|
if (body.parent != null) {
|
|
@@ -1740,10 +1749,11 @@ const WRITES = {
|
|
|
1740
1749
|
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
1741
1750
|
par = body.parent; from.parent = (p.fr.folded.parents || new Map()).get(t.id) || '';
|
|
1742
1751
|
}
|
|
1743
|
-
if (!Object.keys(ev).length && sec == null && ms == null && !pin && par == null) return fail(ctx, res, 400, 'nothing to change: send owner, notes, start, due, initiative, section, milestone, pinned or parent');
|
|
1752
|
+
if (!Object.keys(ev).length && sec == null && ms == null && !pin && !prio && par == null) return fail(ctx, res, 400, 'nothing to change: send owner, notes, start, due, initiative, section, milestone, pinned, priority or parent');
|
|
1744
1753
|
if (sec != null) append(p.file, g.actor, { kind: 'task-section', board: p.board.id, task: t.id, section: sec, why: sec ? 'placed under ' + sec : 'placed under no stage' });
|
|
1745
1754
|
if (ms != null) append(p.file, g.actor, { kind: 'task-milestone', board: p.board.id, task: t.id, milestone: ms, why: ms ? 'made a milestone' : 'no longer a milestone' });
|
|
1746
1755
|
if (pin) append(p.file, g.actor, pinLine(t.id));
|
|
1756
|
+
if (prio) { append(p.file, g.actor, { kind: 'task-priority', board: p.board.id, task: t.id, priority: body.priority, why: body.priority ? 'priority ' + body.priority : 'no priority' }); console.info('[inline-field] priority'); }
|
|
1747
1757
|
if (par != null) append(p.file, g.actor, parentLine(p, t.id, par));
|
|
1748
1758
|
if (!Object.keys(ev).length) {
|
|
1749
1759
|
const items = itemsOf(p.w, { ...p.fr, folded: B.fold(readLedger(ctx, p.w)) }, p.board, (needRows(ctx, res, p.w) || []).filter((r) => r.id === t.initiative));
|
|
@@ -1751,9 +1761,13 @@ const WRITES = {
|
|
|
1751
1761
|
}
|
|
1752
1762
|
if (t.item) return itemWrite(ctx, res, p, t, TI.editEvents(t, ev), g, { from });
|
|
1753
1763
|
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1764
|
+
// a sprint pick gives the task the sprint's days (inline-sprint-priority): the why names the sprint
|
|
1765
|
+
const intoSprint = typeof body.sprint === 'string' && !!body.sprint.trim() && (ev.start != null || ev.due != null);
|
|
1766
|
+
append(p.file, g.actor, { kind: 'task-update', board: p.board.id, task: t.id, ...ev, why: intoSprint ? 'into sprint ' + String(body.sprint).trim() : 'edited ' + Object.keys(ev).join(', ') });
|
|
1767
|
+
if (intoSprint) console.info('[inline-field] sprint');
|
|
1768
|
+
const F2 = B.fold(readLedger(ctx, p.w)), t2 = B.taskOf(F2, t.id), it2 = B.rollupItems([B.taskItem(t2)])[0];
|
|
1769
|
+
if (F2.priorities && F2.priorities.has(t.id)) it2.priority = F2.priorities.get(t.id);
|
|
1770
|
+
ctx.json(res, { ok: true, from, item: it2 });
|
|
1757
1771
|
},
|
|
1758
1772
|
'/api/boards/tasks/bulk': (ctx, res, body, g) => {
|
|
1759
1773
|
// bulk move (initiative work-subtasks, board WorkBulkDS): several tasks under a parent, to a stage, to a person, by N days, or to Done.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* routes-moments.js — a feature appears when its moment comes, over HTTP (onboarding build B3; lib/moments.js holds the rules).
|
|
3
3
|
*
|
|
4
4
|
* GET /api/moments → { ok, moment: { id, ws, product, text, sub, href, guide, guideLabel, go, shown } | null,
|
|
5
|
-
* places: { board|insights|reports: { quiet, dot, line } } }
|
|
5
|
+
* places: { board|insights|reports: { quiet, dot, line, next? } } } next: { id, say, ask }, the one step a quiet place offers
|
|
6
6
|
* the day's ✦ for Home's chat, the menu dots, and the quiet line of a place not open yet
|
|
7
7
|
* POST /api/moments/shown { ws, id } → { ok } the ✦ was drawn: it is that day's moment
|
|
8
8
|
* POST /api/moments/keep { ws, id } → { ok } ✓: the page opens the place; its dot clears
|
|
@@ -28,7 +28,7 @@ const path = require('path');
|
|
|
28
28
|
const ledgers = require('./plan-ledgers.js');
|
|
29
29
|
|
|
30
30
|
const LEDGER = 'initiative-tasks.jsonl';
|
|
31
|
-
const TASK_KINDS = Object.freeze(['task', 'task-update', 'task-remove', 'task-restore', 'task-section', 'task-milestone', 'task-pin', 'task-order', 'task-parent']);
|
|
31
|
+
const TASK_KINDS = Object.freeze(['task', 'task-update', 'task-remove', 'task-restore', 'task-section', 'task-milestone', 'task-pin', 'task-order', 'task-parent', 'task-priority']);
|
|
32
32
|
const KINDS = new Set(TASK_KINDS);
|
|
33
33
|
const isTaskKind = (k) => KINDS.has(k);
|
|
34
34
|
const isTaskLine = (r) => !!r && typeof r === 'object' && !Array.isArray(r) && isTaskKind(r.kind);
|
package/workspace/lib/use-log.js
CHANGED
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
* record(dir, events, now) → { ok, wrote } | { ok: false, error } at most MAX_BATCH events per call
|
|
20
20
|
* summary(lines, now) → { keep, days, opens, uses, pages: [{ page, n }], controls: [{ page, control, n }] } PURE, last KEEP_DAYS days
|
|
21
21
|
* clear(dir) → { ok }
|
|
22
|
-
*
|
|
22
|
+
* keys(lines, days, now) → { used, missed, pct } PURE, the action keys (bet A477)
|
|
23
|
+
* CLI: node lib/use-log.js count → the distinct days with a line in the last KEEP_DAYS days, on its last line (the health number)
|
|
24
|
+
* node lib/use-log.js keys [--days 7] → [action-keys] used n, [action-keys] missed n, then the hit percent on its last line */
|
|
23
25
|
const fs = require('fs');
|
|
24
26
|
const path = require('path');
|
|
25
27
|
|
|
@@ -118,9 +120,31 @@ function clear(dir) {
|
|
|
118
120
|
|
|
119
121
|
module.exports = { FILE, KEEP_DAYS, MAX_BATCH, KINDS, DEVICES, PAGE_RE, CONTROL_RE, ledgerFile, pageOf, clean, readLines, record, summary, clear };
|
|
120
122
|
|
|
123
|
+
/** PURE: the action keys (bet A477, pm/action-keys.js) in the last `days` days: { used, missed, pct }. used = presses that acted
|
|
124
|
+
* (control key-<action>), missed = presses with nothing to act on (key-miss), pct = used / all, 100 when there were none. */
|
|
125
|
+
function keys(lines, days = 7, now = Date.now()) {
|
|
126
|
+
const from = now - Math.max(1, Number(days) || 7) * DAY;
|
|
127
|
+
let used = 0, missed = 0;
|
|
128
|
+
for (const l of lines || []) {
|
|
129
|
+
if (!l || l.kind !== 'use' || !/^key-/.test(l.control || '') || !(Date.parse(l.at) >= from)) continue;
|
|
130
|
+
if (l.control === 'key-miss') missed++; else used++;
|
|
131
|
+
}
|
|
132
|
+
return { used, missed, pct: used + missed ? Math.round((100 * used) / (used + missed)) : 100 };
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
module.exports.keys = keys;
|
|
136
|
+
|
|
121
137
|
if (require.main === module) {
|
|
122
138
|
const cmd = process.argv[2];
|
|
123
|
-
|
|
139
|
+
const usage = 'usage: node lib/use-log.js count (the distinct days with a line in the last ' + KEEP_DAYS + ' days)\n'
|
|
140
|
+
+ ' node lib/use-log.js keys [--days 7] (actions taken with a key, presses with nothing to act on, and the hit percent)';
|
|
141
|
+
if (cmd !== 'count' && cmd !== 'keys') { console.error(usage); process.exit(2); }
|
|
124
142
|
const dir = require('./state-root.js').defaultRoot({ env: process.env });
|
|
125
|
-
console.log(String(summary(readLines(dir)).days));
|
|
143
|
+
if (cmd === 'count') console.log(String(summary(readLines(dir)).days));
|
|
144
|
+
else {
|
|
145
|
+
const i = process.argv.indexOf('--days'), k = keys(readLines(dir), i > 0 ? process.argv[i + 1] : 7);
|
|
146
|
+
console.log('[action-keys] used ' + k.used);
|
|
147
|
+
console.log('[action-keys] missed ' + k.missed);
|
|
148
|
+
console.log(String(k.pct));
|
|
149
|
+
}
|
|
126
150
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.715.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.715.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -229,6 +229,8 @@ const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', {
|
|
|
229
229
|
for (const [w, h, theme] of [[1280, 900, 'light'], [1280, 900, 'dark'], [390, 844, 'light'], [390, 844, 'dark']]) {
|
|
230
230
|
const R = await open({ w, h, theme, props: [prop()] });
|
|
231
231
|
await until(() => R.page.evaluate((v) => !!document.querySelector(v + ' .vwag'), V));
|
|
232
|
+
// the Viewer adds its stylesheets as it opens (premium-viewer.js, cozy-viewer.js): measure once every sheet has loaded, not before
|
|
233
|
+
await until(() => R.page.evaluate(() => [...document.querySelectorAll('link[rel="stylesheet"]')].every((l) => !!l.sheet)));
|
|
232
234
|
const f = await R.page.evaluate(([v, small]) => {
|
|
233
235
|
const bad = [], root = document.querySelector(v);
|
|
234
236
|
for (const e of root.querySelectorAll('button,input,textarea')) { const r = e.getBoundingClientRect(); if (r.width && r.height && r.height < (small ? 44 : 30)) bad.push(e.textContent.trim().slice(0, 20) + ':' + Math.round(r.height)); }
|