create-pmos 0.677.0 → 0.679.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +27 -27
- package/payload/KIT-VERSION +1 -1
- package/payload/design-system/ui/components/Timeline/README.md +1 -1
- package/payload/design-system/ui/components/bundle.css +7 -3
- 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 +26 -0
- package/workspace/design-system/ui/components/Timeline/README.md +1 -1
- package/workspace/design-system/ui/components/bundle.css +7 -3
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/settings-and-switches.md +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-stands.js +59 -25
- package/workspace/public/pm/cozy-today-page.css +1 -0
- package/workspace/public/pm/home-app.js +29 -12
- package/workspace/public/pm/komorebi.css +7 -3
- package/workspace/public/pm/premium-board.js +19 -7
- package/workspace/public/pm/readonly.js +1 -1
- package/workspace/server.js +4 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.679.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,32 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.679.0",
|
|
38
|
+
"at": "2026-11-22T06:54:44.843Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1475,
|
|
43
|
+
"t": "Next milestones labels never overlap, and the strip scrolls apart from the table",
|
|
44
|
+
"s": "/mnt/project-files/milestones-strip/after-1440.png, all 9 milestones from 20 Nov 2026 to 15 Nov 2027 on one width, 0 overlaps (measured from the labels' bounding boxes), no horizontal scroll.",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"v": "0.678.0",
|
|
51
|
+
"at": "2026-11-22T06:40:11.793Z",
|
|
52
|
+
"f": 4,
|
|
53
|
+
"prs": [
|
|
54
|
+
{
|
|
55
|
+
"n": 1473,
|
|
56
|
+
"t": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
57
|
+
"s": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
58
|
+
"k": "new"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
36
62
|
{
|
|
37
63
|
"v": "0.677.0",
|
|
38
64
|
"at": "2026-11-22T06:18:36.434Z",
|
|
@@ -350,32 +376,6 @@
|
|
|
350
376
|
"k": "new"
|
|
351
377
|
}
|
|
352
378
|
]
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"v": "0.645.0",
|
|
356
|
-
"at": "2026-11-20T02:59:30.947Z",
|
|
357
|
-
"f": 4,
|
|
358
|
-
"prs": [
|
|
359
|
-
{
|
|
360
|
-
"n": 1427,
|
|
361
|
-
"t": "The Viewer card's parts on the PMOS design system, and the Funnel chart kind",
|
|
362
|
-
"s": "The Viewer card's parts on the PMOS design system, and the Funnel chart kind",
|
|
363
|
-
"k": "new"
|
|
364
|
-
}
|
|
365
|
-
]
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"v": "0.644.0",
|
|
369
|
-
"at": "2026-11-20T02:28:58.438Z",
|
|
370
|
-
"f": 4,
|
|
371
|
-
"prs": [
|
|
372
|
-
{
|
|
373
|
-
"n": 1426,
|
|
374
|
-
"t": "Today, Home and the chat on the PMOS design system, plus two shell fixes",
|
|
375
|
-
"s": "Today, Home and the chat on the PMOS design system, plus two shell fixes",
|
|
376
|
-
"k": "new"
|
|
377
|
-
}
|
|
378
|
-
]
|
|
379
379
|
}
|
|
380
380
|
]
|
|
381
381
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -20,4 +20,4 @@ The Work boards draw time in two more places, from the same marks:
|
|
|
20
20
|
|
|
21
21
|
- **Table timeline** (`pm-gt` inside a Table cell): done bars in leaf (`.b.dn`), now in blue (`.b.nw`), planned in well with a hairline (`.b`), and the today line (`pm-now`, alert). It scrolls sideways with a trackpad, a drag, or Earlier / Go to today / Later; no scrollbar is drawn.
|
|
22
22
|
- **Milestone** (`pm-dia`): a diamond. Late is alert (`.late`), done is leaf (`.dn`). Milestones less than 8 days apart merge into one numbered mark (`.n`, the number centred in it) that lists them on hover.
|
|
23
|
-
- **Date line** (`pm-dline`): the next milestones on one line, each a diamond with its date (mono), its name and what it belongs to.
|
|
23
|
+
- **Date line** (`pm-dline`): the next milestones on one line, each a diamond with its date (mono), its name and what it belongs to. Each label has one fixed height: the date with its late badge beside it, then the name and the owner on one line each (cut with an ellipsis; the full words are in its title). A label never touches another: it drops to the first row where it touches none, with a dashed lead, and one near the right end reads to the left of its mark (`flip`). Milestones outside the line's window fold into `+N` marks (`pm-more`) at the ends, each with its nearest month above it. The line keeps its own window, apart from the table's: it opens on today and fits the next ten milestones on the full width, and a scroll on it moves only the line.
|
|
@@ -84,14 +84,18 @@ body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--font-s
|
|
|
84
84
|
.pm-dline{position:relative;padding:0 40px 0 8px}
|
|
85
85
|
.pm-dline .axis{position:relative;height:20px;font-size:13px;color:var(--muted)}
|
|
86
86
|
.pm-dline .axis .tk{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap}
|
|
87
|
-
.pm-dline .line{position:relative;height:calc(24px + var(--rows,1) *
|
|
87
|
+
.pm-dline .line{position:relative;height:calc(24px + var(--rows,1) * 76px);background:linear-gradient(var(--line),var(--line)) 0 12px/100% 1px no-repeat}
|
|
88
88
|
.pm-dline .line>.pm-now{bottom:auto;height:34px;top:-8px}
|
|
89
89
|
.pm-dline .ms{position:absolute;top:0;width:0}
|
|
90
90
|
.pm-dline .ms>.pm-dia{top:12px}
|
|
91
|
-
.pm-dline .ms .lb{position:absolute;top:calc(28px + var(--row) *
|
|
91
|
+
.pm-dline .ms .lb{position:absolute;top:calc(28px + var(--row) * 76px);left:-6px;display:flex;flex-direction:column;align-items:flex-start;gap:0;width:max-content;max-width:200px;height:68px;font-size:13px;line-height:20px;overflow:hidden}
|
|
92
|
+
.pm-dline .ms.flip .lb{left:auto;right:-6px;align-items:flex-end;text-align:right}
|
|
93
|
+
.pm-dline .ms .lb .hd{display:flex;align-items:center;gap:6px;height:22px}
|
|
94
|
+
.pm-dline .ms .lb .pm-badge{height:20px;padding:0 6px;font-size:12px}
|
|
95
|
+
.pm-dline .ms .lb b,.pm-dline .ms .lb .pm-meta{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
92
96
|
.pm-dline .ms .lb b{font-size:15px;line-height:24px;font-weight:600}
|
|
93
97
|
.pm-dline .ms .lb .code{font-family:var(--font-mono);color:var(--muted)}
|
|
94
|
-
.pm-dline .ms.low::before{content:"";position:absolute;left:0;top:20px;height:calc(var(--row) *
|
|
98
|
+
.pm-dline .ms.low::before{content:"";position:absolute;left:0;top:20px;height:calc(var(--row) * 76px + 6px);border-left:1px dashed var(--line)}
|
|
95
99
|
.pm-dline .ms.late .lb .code{color:var(--alert)}
|
|
96
100
|
.pm-more{position:absolute;top:20px;display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:none;padding:0;font:inherit;font-size:13px;color:var(--muted);cursor:pointer}
|
|
97
101
|
.pm-more.r{right:0}.pm-more.l{left:-8px}
|
|
@@ -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-22T06:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T06:54:41Z"}
|
|
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-22T06:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T06:54:41Z"}
|
|
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-22T06:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T06:54:41Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.679.0",
|
|
4
|
+
"at": "2026-11-22T06:54:44.843Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1475,
|
|
9
|
+
"t": "Next milestones labels never overlap, and the strip scrolls apart from the table",
|
|
10
|
+
"s": "/mnt/project-files/milestones-strip/after-1440.png, all 9 milestones from 20 Nov 2026 to 15 Nov 2027 on one width, 0 overlaps (measured from the labels' bounding boxes), no horizontal scroll.",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"v": "0.678.0",
|
|
17
|
+
"at": "2026-11-22T06:40:11.793Z",
|
|
18
|
+
"f": 4,
|
|
19
|
+
"prs": [
|
|
20
|
+
{
|
|
21
|
+
"n": 1473,
|
|
22
|
+
"t": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
23
|
+
"s": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
24
|
+
"k": "new"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
2
28
|
{
|
|
3
29
|
"v": "0.677.0",
|
|
4
30
|
"at": "2026-11-22T06:18:36.434Z",
|
|
@@ -20,4 +20,4 @@ The Work boards draw time in two more places, from the same marks:
|
|
|
20
20
|
|
|
21
21
|
- **Table timeline** (`pm-gt` inside a Table cell): done bars in leaf (`.b.dn`), now in blue (`.b.nw`), planned in well with a hairline (`.b`), and the today line (`pm-now`, alert). It scrolls sideways with a trackpad, a drag, or Earlier / Go to today / Later; no scrollbar is drawn.
|
|
22
22
|
- **Milestone** (`pm-dia`): a diamond. Late is alert (`.late`), done is leaf (`.dn`). Milestones less than 8 days apart merge into one numbered mark (`.n`, the number centred in it) that lists them on hover.
|
|
23
|
-
- **Date line** (`pm-dline`): the next milestones on one line, each a diamond with its date (mono), its name and what it belongs to.
|
|
23
|
+
- **Date line** (`pm-dline`): the next milestones on one line, each a diamond with its date (mono), its name and what it belongs to. Each label has one fixed height: the date with its late badge beside it, then the name and the owner on one line each (cut with an ellipsis; the full words are in its title). A label never touches another: it drops to the first row where it touches none, with a dashed lead, and one near the right end reads to the left of its mark (`flip`). Milestones outside the line's window fold into `+N` marks (`pm-more`) at the ends, each with its nearest month above it. The line keeps its own window, apart from the table's: it opens on today and fits the next ten milestones on the full width, and a scroll on it moves only the line.
|
|
@@ -84,14 +84,18 @@ body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--font-s
|
|
|
84
84
|
.pm-dline{position:relative;padding:0 40px 0 8px}
|
|
85
85
|
.pm-dline .axis{position:relative;height:20px;font-size:13px;color:var(--muted)}
|
|
86
86
|
.pm-dline .axis .tk{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap}
|
|
87
|
-
.pm-dline .line{position:relative;height:calc(24px + var(--rows,1) *
|
|
87
|
+
.pm-dline .line{position:relative;height:calc(24px + var(--rows,1) * 76px);background:linear-gradient(var(--line),var(--line)) 0 12px/100% 1px no-repeat}
|
|
88
88
|
.pm-dline .line>.pm-now{bottom:auto;height:34px;top:-8px}
|
|
89
89
|
.pm-dline .ms{position:absolute;top:0;width:0}
|
|
90
90
|
.pm-dline .ms>.pm-dia{top:12px}
|
|
91
|
-
.pm-dline .ms .lb{position:absolute;top:calc(28px + var(--row) *
|
|
91
|
+
.pm-dline .ms .lb{position:absolute;top:calc(28px + var(--row) * 76px);left:-6px;display:flex;flex-direction:column;align-items:flex-start;gap:0;width:max-content;max-width:200px;height:68px;font-size:13px;line-height:20px;overflow:hidden}
|
|
92
|
+
.pm-dline .ms.flip .lb{left:auto;right:-6px;align-items:flex-end;text-align:right}
|
|
93
|
+
.pm-dline .ms .lb .hd{display:flex;align-items:center;gap:6px;height:22px}
|
|
94
|
+
.pm-dline .ms .lb .pm-badge{height:20px;padding:0 6px;font-size:12px}
|
|
95
|
+
.pm-dline .ms .lb b,.pm-dline .ms .lb .pm-meta{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
92
96
|
.pm-dline .ms .lb b{font-size:15px;line-height:24px;font-weight:600}
|
|
93
97
|
.pm-dline .ms .lb .code{font-family:var(--font-mono);color:var(--muted)}
|
|
94
|
-
.pm-dline .ms.low::before{content:"";position:absolute;left:0;top:20px;height:calc(var(--row) *
|
|
98
|
+
.pm-dline .ms.low::before{content:"";position:absolute;left:0;top:20px;height:calc(var(--row) * 76px + 6px);border-left:1px dashed var(--line)}
|
|
95
99
|
.pm-dline .ms.late .lb .code{color:var(--alert)}
|
|
96
100
|
.pm-more{position:absolute;top:20px;display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:none;padding:0;font:inherit;font-size:13px;color:var(--muted);cursor:pointer}
|
|
97
101
|
.pm-more.r{right:0}.pm-more.l{left:-8px}
|
|
@@ -92,7 +92,7 @@ On a computer, Work is built from the parts of the PMOS design system. The top l
|
|
|
92
92
|
|
|
93
93
|
- **Where it stands.** One paragraph that says what is happening and why it matters: an initiative past its milestone, with the cause from the record (a Jira ticket that is blocked, a step that waits on you), an initiative that sat in a stage with no dates and for how long, and the next decision point. Press a name to open the initiative. Under it, PMOS shows one suggestion from its open proposals, with **Why**, **PMOS will** (the exact steps), **What changes** and **Based on** (the sources). The pencil opens the initiative so you can change the proposal first, ✓ does it (with Undo), and ✕ drops it. When nothing needs saying, the block does not show.
|
|
94
94
|
- **Initiatives.** A table with the columns you choose (the tune icon also sorts and filters). Press a column heading to sort by it. The timeline shows done in green, now in blue and planned in grey, with a red line for today. A milestone is a diamond on its initiative's row; a late one is red. Milestones less than 8 days apart are one numbered diamond: point at it to see them. Pick the scale with **Week**, **Month**, **Quarter**, **Year** or **Full**. Move the timeline with the arrows, with a sideways swipe on a trackpad, or by dragging it; the middle arrow goes back to today. A late date has a red badge, for example "8 days late". Closed initiatives fold into one line at the end.
|
|
95
|
-
- **Next milestones.** The next
|
|
95
|
+
- **Next milestones.** The next ten milestones of all initiatives on one line, each with its date, its name and its initiative. The line has its own time range, apart from the table: it starts at today (or at a milestone that became late in the last 30 days) and ends at the last of the ten, so they all show across the full width without scrolling. Labels never cover each other: a label that is too close moves down a row, and a label near the right end reads to the left of its diamond. Scroll sideways on the line (or drag it) to move only the line. A milestone outside the line is in a **+N** mark at the end: press it to move the line there. After the line moves, the button at the top right puts it back at today. Press a diamond to open the milestone.
|
|
96
96
|
|
|
97
97
|
**Backlog** is the open work outside the sprint, in one rank across initiatives.
|
|
98
98
|
|
|
@@ -278,7 +278,7 @@ A chat on a phone uses the full width of the screen:
|
|
|
278
278
|
|
|
279
279
|
Setup is a conversation in Home. It replaces the chat on the right while it runs, and the list of your work stays on the left. There is no separate setup page.
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
Today starts setup when PMOS has no project yet; on a desk it opens in the popup's chat. `pmos` also starts it on a first run. To start it again, open `/premium.html?onboard=1`. The old addresses `/welcome` and `/premium-welcome.html` open the same conversation; the three-step Welcome page they once served is gone.
|
|
282
282
|
|
|
283
283
|
Setup saves its progress on this computer, outside any project folder. A reload continues from the same step.
|
|
284
284
|
|
|
@@ -241,7 +241,7 @@ Do not set these on your own computer. The suites set them to make a run short o
|
|
|
241
241
|
| Variable | What it does | Default | Same in Settings |
|
|
242
242
|
|---|---|---|---|
|
|
243
243
|
| `PMOS_TEST` | `1` allows the test seam of the audit sink. | off | — |
|
|
244
|
-
| `PMOS_DESK_HOME` | `keep` keeps Home at `/premium.html`
|
|
244
|
+
| `PMOS_DESK_HOME` | `keep` keeps Home at `/premium.html` (the suites set it). Without it, every `/premium.html` address opens Today with the same query; on a desk the chat, session or setup it names opens in the popup. | Today | — |
|
|
245
245
|
| `PMOS_OFFLOOP` | `0` runs the board fold in the server thread, not in a worker. | worker | — |
|
|
246
246
|
| `PMOS_TICK_MS` | The server's tick. | 1 minute | — |
|
|
247
247
|
| `PMOS_LIVENESS_MS` | How often the session list is sent again. | 2 seconds | — |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.679.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.679.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* reject". The Suggestion is one of PMOS's open proposals on the initiatives on screen (lib/proposals.js, r.props), the one on the most
|
|
11
11
|
* urgent initiative first; none open, none drawn.
|
|
12
12
|
* · Next milestones: a date line (pm-dline) under the Initiatives table with the next 5 milestones of all initiatives, each a diamond, its
|
|
13
|
-
* date, its name and its initiative.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* date, its name and its initiative. A label never touches another: a close one drops to the first free row with a dashed lead, and one
|
|
14
|
+
* near the right end reads to the left of its mark. The strip keeps its own window (dlineWindow), apart from the table's: it opens on
|
|
15
|
+
* today and fits the next 10 milestones on the full width; a scroll on it moves only the strip; the ones outside are +N marks at the ends.
|
|
16
16
|
* Everything here is pure: the page (pm/premium-board.js) passes the rows and the window and wires the presses by their data- attributes. */
|
|
17
17
|
|
|
18
18
|
export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
@@ -21,7 +21,7 @@ const DAY = 864e5;
|
|
|
21
21
|
const SV = (d, n = 16) => `<svg class="pm-ic" width="${n}" height="${n}" viewBox="0 0 24 24" aria-hidden="true"><path d="${d}"/></svg>`;
|
|
22
22
|
export const I = {
|
|
23
23
|
star: 'M12 3l1.8 5.4L19 10.2l-5.2 1.8L12 17.4l-1.8-5.4L5 10.2l5.2-1.8z', pen: 'M4 20h4L19 9l-4-4L4 16z', ok: 'M5 12.5l4.5 4.5L19 7.5',
|
|
24
|
-
x: 'M6 6l12 12M18 6L6 18', plus: 'M12 5v14M5 12h14',
|
|
24
|
+
x: 'M6 6l12 12M18 6L6 18', plus: 'M12 5v14M5 12h14', fit: 'M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5',
|
|
25
25
|
};
|
|
26
26
|
export const day = (v) => { if (v instanceof Date) return new Date(v.getFullYear(), v.getMonth(), v.getDate()); const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(v || '')); return m ? new Date(+m[1], +m[2] - 1, +m[3]) : null; };
|
|
27
27
|
/** "12 Nov", and the year when it is not this year. */
|
|
@@ -126,39 +126,73 @@ export function nextMilestones(rows, now = new Date()) {
|
|
|
126
126
|
/** Where the labels go: a label that would touch the one before it on its row drops to the next row (with a dashed lead). PURE.
|
|
127
127
|
* xs: the marks' positions in % of the line; w: a label's width in %. → [row index] */
|
|
128
128
|
export function stack(xs, w = 18) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
return place(xs, w).map((p) => p.row);
|
|
130
|
+
}
|
|
131
|
+
/** Where each label goes. A label reads to the right of its mark; one that would pass the line's right end reads to the left of it (flip).
|
|
132
|
+
* A label that would touch any label already on a row drops to the first row where it touches none. Two marks on the same date never
|
|
133
|
+
* share a row. PURE. xs: the marks' positions in % of the line, earliest first; w: a label's width in %; gap: the space kept between
|
|
134
|
+
* two labels in %. → [{ row, flip }] */
|
|
135
|
+
export function place(xs, w = 18, gap = 0) {
|
|
136
|
+
const rows = [];
|
|
137
|
+
return xs.map((x) => {
|
|
138
|
+
const flip = x + w > 100 && x - w >= 0, a = flip ? x - w : x, b = flip ? x : x + w;
|
|
139
|
+
let k = 0;
|
|
140
|
+
while (rows[k] && rows[k].some(([c, d]) => a < d + gap && c < b + gap)) k++;
|
|
141
|
+
(rows[k] = rows[k] || []).push([a, b]);
|
|
142
|
+
return { row: k, flip };
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The strip's own window, apart from the table's (Wawan 2026-11-22: "the scroll should be independent from the gantt chart ... as much as
|
|
147
|
+
* possible contained on the full page and no scroll"). It opens on today, or on the earliest milestone that went late in the last 30 days,
|
|
148
|
+
* and ends on the `max`-th milestone ahead, so every one of them shows on the full width with nothing to scroll. off: how far the PM
|
|
149
|
+
* scrolled the strip, in ms. PURE. items: nextMilestones(). → { from, to, fit: the window before the scroll }
|
|
150
|
+
*/
|
|
151
|
+
export function dlineWindow(items, now = new Date(), o = {}) {
|
|
152
|
+
const t = day(now), max = o.max || 10, recent = +t - 30 * DAY;
|
|
153
|
+
const near = (items || []).filter((x) => +x.d >= recent).slice(0, max);
|
|
154
|
+
let from = near.length ? Math.min(+t, +near[0].d) : +t;
|
|
155
|
+
let to = near.length ? Math.max(+near[near.length - 1].d, +t) : +t;
|
|
156
|
+
if (to - from < 28 * DAY) to = from + 28 * DAY; // at least four weeks, so close dates still spread
|
|
157
|
+
const pad = (to - from) * 0.02; from -= pad; to += pad;
|
|
158
|
+
const off = +o.off || 0;
|
|
159
|
+
return { from: new Date(from + off), to: new Date(to + off), fit: { from: new Date(from), to: new Date(to) } };
|
|
132
160
|
}
|
|
133
161
|
/**
|
|
134
|
-
* The date line. items: nextMilestones(); W: the
|
|
135
|
-
*
|
|
136
|
-
* the
|
|
162
|
+
* The date line. items: nextMilestones(); W: the strip's window { from, to } (dlineWindow); o: { now, title, sub, add: true draws +
|
|
163
|
+
* (New milestone), lw: the line's width in px, max: how many marks to draw (10), moved: the strip was scrolled (draws Fit) }. Shows the
|
|
164
|
+
* first `max` inside the window; the ones before it and past it fold into +N marks at the ends, each with the month of its nearest one.
|
|
165
|
+
* Each +N carries data-at, the start the window moves to when it is pressed.
|
|
137
166
|
*/
|
|
138
167
|
export function dlineHtml(items, W, o = {}) {
|
|
139
|
-
const now = o.now || new Date(), t = day(now), span = +W.to - +W.from || 1;
|
|
168
|
+
const now = o.now || new Date(), t = day(now), span = +W.to - +W.from || 1, max = o.max || 10;
|
|
140
169
|
const X = (d) => ((+d - +W.from) / span) * 100, P = (x) => Math.max(0, Math.min(100, x)).toFixed(2) + '%';
|
|
141
|
-
const before = items.filter((x) => x.d < W.from
|
|
142
|
-
const shown = inside.slice(0,
|
|
143
|
-
// the month ticks along the line
|
|
170
|
+
const before = items.filter((x) => x.d < W.from), inside = items.filter((x) => x.d >= W.from && x.d <= W.to), after = items.filter((x) => x.d > W.to);
|
|
171
|
+
const shown = inside.slice(0, max), rest = inside.slice(max).concat(after);
|
|
172
|
+
// the month ticks along the line
|
|
144
173
|
const ticks = [];
|
|
145
174
|
for (let d = new Date(W.from.getFullYear(), W.from.getMonth(), 1); d <= W.to; d = new Date(d.getFullYear(), d.getMonth() + 1, 1)) if (d >= W.from) ticks.push(d);
|
|
146
175
|
const step = ticks.length > 8 ? Math.ceil(ticks.length / 8) : 1;
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
const
|
|
176
|
+
// a month name too close to today's date gives way to it (two words on one spot read as neither)
|
|
177
|
+
const inNow = t >= W.from && t <= W.to, lwT = o.lw || 1200;
|
|
178
|
+
const tk = ticks.filter((d, i) => i % step === 0 && !(inNow && Math.abs(X(d) - X(t)) * lwT / 100 < 70)).map((d) => `<span class="tk" style="left:${P(X(d))}">${esc(MON[d.getMonth()] + (d.getMonth() === 0 ? ' ' + d.getFullYear() : ''))}</span>`).join('');
|
|
179
|
+
const nowM = inNow ? `<i class="pm-now" style="left:${P(X(t))}"><span>${esc(dm(t, now))}</span></i>` : '';
|
|
180
|
+
// a label is 200 px wide at most (pm-dline .lb), with 16 px kept between two labels
|
|
181
|
+
const lw = o.lw || 1200, at = place(shown.map((x) => X(x.d)), (200 / lw) * 100, (16 / lw) * 100);
|
|
150
182
|
const marks = shown.map((x, i) => {
|
|
151
|
-
const k =
|
|
152
|
-
|
|
183
|
+
const { row: k, flip } = at[i], name = x.m.name || 'Milestone', when = dm(x.d, now);
|
|
184
|
+
const say = name + ', ' + when + ', ' + x.r.title + (x.late ? ', late' : '');
|
|
185
|
+
return `<div class="ms${x.late ? ' late' : ''}${k ? ' low' : ''}${flip ? ' flip' : ''}" style="left:${P(X(x.d))};--row:${k}">`
|
|
153
186
|
// a read-only copy draws the diamond as a mark, not a button: its card can pin a milestone
|
|
154
|
-
+ (o.ro ? `<span class="pm-dia${x.late ? ' late' : ''}" role="img" aria-label="${esc(
|
|
155
|
-
: `<button type="button" class="pm-dia${x.late ? ' late' : ''}" data-ms-pick="${esc(x.r.key)}" data-ms-id="${esc(x.m.id || '')}" aria-label="${esc(
|
|
156
|
-
+ `<span class="lb"
|
|
187
|
+
+ (o.ro ? `<span class="pm-dia${x.late ? ' late' : ''}" role="img" aria-label="${esc(say)}"></span>`
|
|
188
|
+
: `<button type="button" class="pm-dia${x.late ? ' late' : ''}" data-ms-pick="${esc(x.r.key)}" data-ms-id="${esc(x.m.id || '')}" aria-label="${esc(say)}" title="${esc(name + ' · ' + x.r.title)}"></button>`)
|
|
189
|
+
+ `<span class="lb" title="${esc(name + ' · ' + x.r.title)}"><span class="hd"><span class="code">${esc(when)}</span>${x.late ? `<span class="pm-badge alert">${days(Math.round((t - x.d) / DAY))} late</span>` : ''}</span><b>${esc(name)}</b><span class="pm-meta">${esc(x.r.title)}</span></span></div>`;
|
|
157
190
|
}).join('');
|
|
158
|
-
const lo = before.length ? `<button type="button" class="pm-more l" data-wkdl="back" aria-label="${esc(before.length + ' earlier: scroll back')}" title="${esc(before.map((x) => x.m.name).join('
|
|
159
|
-
const hi = rest.length ? `<button type="button" class="pm-more r" data-wkdl="on" aria-label="${esc(rest.length + ' later: scroll on')}" title="${esc(rest.map((x) => x.m.name + ' · ' + dm(x.d, now)).join('\n'))}"><span>${esc(MON[rest[0].d.getMonth()])}</span><b>+${rest.length}</b></button>` : '';
|
|
160
|
-
const rowsN = Math.max(1, ...
|
|
191
|
+
const lo = before.length ? `<button type="button" class="pm-more l" data-wkdl="back" data-at="${+before[before.length - 1].d - span * 0.8}" aria-label="${esc(before.length + ' earlier: scroll back')}" title="${esc(before.map((x) => x.m.name + ' · ' + dm(x.d, now)).join('\n'))}"><span>${esc(MON[before[before.length - 1].d.getMonth()])}</span><b>+${before.length}</b></button>` : '';
|
|
192
|
+
const hi = rest.length ? `<button type="button" class="pm-more r" data-wkdl="on" data-at="${+rest[0].d - span * 0.05}" aria-label="${esc(rest.length + ' later: scroll on')}" title="${esc(rest.map((x) => x.m.name + ' · ' + dm(x.d, now)).join('\n'))}"><span>${esc(MON[rest[0].d.getMonth()])}</span><b>+${rest.length}</b></button>` : '';
|
|
193
|
+
const rowsN = Math.max(1, ...at.map((p) => p.row + 1));
|
|
161
194
|
return `<section class="pm-block wk-next" aria-label="${esc(o.title || 'Next milestones')}"><div class="head"><h2 class="pm-h">${esc(o.title || 'Next milestones')}</h2>${o.sub ? `<span class="pm-meta">${esc(o.sub)}</span>` : ''}<span class="sp"></span>`
|
|
195
|
+
+ (o.moved ? `<button type="button" class="pm-btn" data-wkdl="fit" aria-label="Show from today" title="Show from today">${SV(I.fit)}</button>` : '')
|
|
162
196
|
+ (o.add ? `<button type="button" class="pm-btn" data-wkdl="add" aria-label="New milestone" title="New milestone">${SV(I.plus)}</button>` : '') + `</div>`
|
|
163
197
|
+ (items.length ? `<div class="pm-dline" style="--rows:${rowsN}"><div class="axis">${tk}</div><div class="line">${nowM}${marks}</div>${lo}${hi}</div>`
|
|
164
198
|
: `<p class="pm-meta">No milestone ahead yet.</p>`) + '</section>';
|
|
@@ -81,6 +81,7 @@ button.td-ev:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
|
81
81
|
body.cz-today.hm-plist { background: var(--cz-card); }
|
|
82
82
|
body.cz-today.hm-plist #hmDesk > .hm-list, body.cz-today .hm-plist .hm-top, body.cz-today.hm-plist .hm-top { display: none !important; }
|
|
83
83
|
body.cz-today:not(.hm-plist) .td-page { display: none !important; }
|
|
84
|
+
body.cz-today.pa-on .td-page { display: none !important; } /* ?chats=1, Ask PMOS (home-page-retire): the chats by work are the page */
|
|
84
85
|
body.cz-today.hm-plist #hmDesk { padding: 0 16px 48px; }
|
|
85
86
|
.td-page.tdp { display: block; font-family: var(--cz-sans); color: var(--cz-ink); padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
|
|
86
87
|
.tdp h1, .tdp h2, .tdp p, .tdp ul { margin: 0; padding: 0; }
|
|
@@ -96,6 +96,10 @@ const isPhone = () => innerWidth <= PHONE;
|
|
|
96
96
|
/* Today (slice 5 of the six-place navigation): today.html is this page with data-today. On a desk it draws Today's log and agenda in place of
|
|
97
97
|
* the list and the chat column (pm/cozy-today-app.js); a phone keeps Home. TDY is set once the page's presses are defined (below). */
|
|
98
98
|
const TD_PAGE = document.body.hasAttribute('data-today');
|
|
99
|
+
/* Home's desk layout is retired (home-page-retire slice 1, Wawan 2026-11-22): every old Home address opens Today (server.js), and Today on a
|
|
100
|
+
* desk has no chat column. A conversation the address names opens in the one popup (cozy-popup.js) instead: the work on the left, Ask PMOS
|
|
101
|
+
* on the right. A phone keeps Home's own layout until the phone Today design exists (slice 2). */
|
|
102
|
+
const deskToday = () => TD_PAGE && !isPhone();
|
|
99
103
|
let TDY = null;
|
|
100
104
|
if (navigator.maxTouchPoints > 0) wireSettle(window); // a touch screen only: on a desktop the page does not scroll and the nudge is not needed
|
|
101
105
|
const SVG = (d, w = 16, sw = 1.8) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${sw}" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
@@ -923,7 +927,7 @@ function drawList() {
|
|
|
923
927
|
* (cozy-home.css). A row opens its chat as Home does; the composer at the foot starts a chat with PMOS. today.html draws Today instead. */
|
|
924
928
|
const ASK_PAGE = new URLSearchParams(location.search).has('chats'); // the menu's Ask PMOS (cozy-nav.js); a bare /premium.html keeps Home's list
|
|
925
929
|
function drawAsk() {
|
|
926
|
-
const on = isPhone() &&
|
|
930
|
+
const on = isPhone() && ASK_PAGE; // today.html on a phone too: every old Home address opens Today (home-page-retire)
|
|
927
931
|
document.body.classList.toggle('pa-on', on);
|
|
928
932
|
let el = document.getElementById('paList');
|
|
929
933
|
if (!on) { if (el) el.hidden = true; return; }
|
|
@@ -1083,19 +1087,25 @@ function turnEnded() {
|
|
|
1083
1087
|
/* claude-onboarding-build: set up a project as a conversation in this chat's place (cozy-onboard.js). It opens on ?onboard=1, shows the
|
|
1084
1088
|
* finished project's next steps on ?onboarded=1, and opens by itself on a first run: setup not finished and no registered folder holds an
|
|
1085
1089
|
* initiative. A named workspace does not stop it: the installer opens its own empty ~/PMOS folder by name (bug 2026-11-02, Windows). */
|
|
1086
|
-
|
|
1090
|
+
/** Run fn once Home's chat can show: at once on a phone, in the one popup on Today's desk (home-page-retire slice 1). fn draws over Home's
|
|
1091
|
+
* chat (setup, the reveal), so it waits until this module has given the popup that chat (POP.useChat, below) and the popup holds it. */
|
|
1092
|
+
function inChat(fn) {
|
|
1093
|
+
if (!deskToday()) { fn(); return; }
|
|
1094
|
+
setTimeout(() => POP.openCos(homeTarget()).then(() => { const t0 = Date.now(); (function wait() { if ($('#hmChat').closest('.cz-pop') || Date.now() - t0 > 4000) setTimeout(fn, 300); else setTimeout(wait, 50); })(); }), 0);
|
|
1095
|
+
}
|
|
1096
|
+
const startOnboard = (done) => { document.body.classList.add('ob-on'); inChat(() => mountOnboard($('#hmChat'), { ws: WS, done })); };
|
|
1087
1097
|
/* onboarding B2 (cozy-reveal.js): right after setup, Home's chat shows what setup did and read, the product portrait and the drafted first
|
|
1088
1098
|
* initiative, and the list shows the draft, the weekly and the PM's own tickets at its top. It opens on ?onboarded=1, and again on a later
|
|
1089
1099
|
* visit while the draft waits for ✓ or ✕. With nothing to reveal it falls back to the old next steps. */
|
|
1090
1100
|
let RV = null;
|
|
1091
1101
|
function startReveal(M) {
|
|
1092
1102
|
S.reveal = M; drawList();
|
|
1093
|
-
RV = mountReveal($('#hmChat'), {
|
|
1103
|
+
inChat(() => { RV = mountReveal($('#hmChat'), {
|
|
1094
1104
|
ws: WS, model: M,
|
|
1095
1105
|
send: (t) => { RV = null; chat.send(t); },
|
|
1096
1106
|
openIni: (id, prompt) => { RV && RV.close(); RV = null; load().then(() => goIni(id)).then(() => { if (prompt) chat.send(prompt); }); },
|
|
1097
1107
|
changed: (m) => { S.reveal = m; drawList(); },
|
|
1098
|
-
});
|
|
1108
|
+
}); });
|
|
1099
1109
|
}
|
|
1100
1110
|
$('#hmList').addEventListener('click', (e) => { if (e.target.closest('[data-rv-left="draft"]')) { if (RV) RV.show(); else if (S.reveal) startReveal(S.reveal); } });
|
|
1101
1111
|
if (P.get('onboard') === '1') startOnboard(false);
|
|
@@ -1103,7 +1113,8 @@ else if (P.get('onboarded') === '1' || WS) {
|
|
|
1103
1113
|
pmGet('/api/first-reveal?ws=' + encodeURIComponent(WS)).then((r) => {
|
|
1104
1114
|
// setup's own ✦ "Draft the first initiative" (onboarding B1) sends &first=draft on ✓ and &first=none on ✕: with none, no draft is shown
|
|
1105
1115
|
if (r && r.ok && !r.none && P.get('onboarded') === '1' && P.get('first') === 'none' && r.state === 'open') startReveal({ ...r, state: 'later', left: { ...r.left, draft: null } });
|
|
1106
|
-
|
|
1116
|
+
// a later visit reopens it while the draft waits; on Today's desk that would be a popup on every visit, so there only ?onboarded=1 opens it
|
|
1117
|
+
else if (r && r.ok && !r.none && (P.get('onboarded') === '1' || (r.state === 'open' && !deskToday()))) startReveal(r);
|
|
1107
1118
|
else if (P.get('onboarded') === '1') startOnboard(true);
|
|
1108
1119
|
else pmGet('/api/onboard/state').then((x) => { if (x && x.ok && !x.has_projects) startOnboard(false); }).catch(() => {});
|
|
1109
1120
|
}).catch(() => { if (P.get('onboarded') === '1') startOnboard(true); });
|
|
@@ -2470,6 +2481,8 @@ function discussed(about, vid, label) {
|
|
|
2470
2481
|
* Viewer · ?say=<words> or ?q a first message in the box, not sent · ?meeting=<note id> the meeting card · ?vk=<kind>&vid=<id> with ?about: the
|
|
2471
2482
|
* item Discuss in chat came from, opened in the Viewer beside its chat. */
|
|
2472
2483
|
const KEY = /^(decision|blocked|waited|src|ev|work|board|init|doc|ins|chat|pop):[A-Za-z0-9][A-Za-z0-9._:-]{0,100}$/;
|
|
2484
|
+
/** A conversation the address names: Home's chat column on a phone, the one popup on Today's desk (home-page-retire slice 1). */
|
|
2485
|
+
const addressChat = (t) => (deskToday() ? POP.openCos(t) : openTarget(t));
|
|
2473
2486
|
load().then(() => {
|
|
2474
2487
|
const open = P.get('open') || P.get('item'), sid = P.get('session'), mt = P.get('meeting');
|
|
2475
2488
|
const ask = P.get('ask') || '';
|
|
@@ -2484,16 +2497,20 @@ load().then(() => {
|
|
|
2484
2497
|
const r = allRows().find((x) => x.key === open || (/^pt:/.test(open) && x.id === open));
|
|
2485
2498
|
// on Today the item opens in the one popup (design audit of slice 5); on Home, beside the list as before
|
|
2486
2499
|
if (r && TD_PAGE && !isPhone()) VW.popNext({ keep: true, id: r.id, kind: 'item', title: r.name || r.title || '' });
|
|
2487
|
-
if (r) select(r.id); else if (KEY.test(open))
|
|
2500
|
+
if (r) select(r.id); else if (KEY.test(open)) addressChat({ ...homeTarget(), key: open, title: open });
|
|
2488
2501
|
}
|
|
2489
|
-
else if (sid) { const s = S.D.sessions.find((x) => x.id === sid); if (s) { S.sel = 's:' + s.id;
|
|
2490
|
-
else if (/^program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(ask))
|
|
2502
|
+
else if (sid) { const s = S.D.sessions.find((x) => x.id === sid); if (s) { S.sel = 's:' + s.id; addressChat(sessionTarget(s)); if (!deskToday()) followViewer(s); drawList(); } else { if (!deskToday()) openTarget(homeTarget()); toast('That session is not on this machine.'); } }
|
|
2503
|
+
else if (/^program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(ask)) addressChat(programTarget(ask.slice(8))); // Ask in Home from the program panel
|
|
2491
2504
|
else if (about && /^init:/.test(about) && iniRowOf(P.get('vid') || about.slice(5))) { const id = iniRowOf(P.get('vid')) ? P.get('vid') : about.slice(5); goIni(id).then(() => { if (P.get('vk') && S.ini === id && !isPhone()) iniOverview(); }); }
|
|
2492
2505
|
// the Board's program panel Discuss in chat names board:program:<id>: the program's own conversation, the one its tasks open (bug 2026-10-24)
|
|
2493
|
-
else if (about && /^board:program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(about))
|
|
2506
|
+
else if (about && /^board:program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(about)) addressChat(programTarget(about.slice(14)));
|
|
2494
2507
|
else if (handed) chatAbout(handed); // a report's chat icon on another page
|
|
2495
|
-
else if (about && /^ins:(insights|verdict)$/.test(about))
|
|
2496
|
-
else if (about) {
|
|
2508
|
+
else if (about && /^ins:(insights|verdict)$/.test(about)) addressChat(insTarget(about));
|
|
2509
|
+
else if (about) { addressChat({ ...homeTarget(), key: about, title: (P.get('label') || '').slice(0, 80) || about }); discussed(about, P.get('vid'), P.get('label')); }
|
|
2510
|
+
// ?chats=1 (the phone menu's Ask PMOS) on a desk: the chat icon's popup, the session that waits for you or the newest
|
|
2511
|
+
else if (ASK_PAGE && deskToday()) POP.openChat();
|
|
2512
|
+
// ?say= alone on a desk: the chief-of-staff chat in the popup, with the words in its box (below)
|
|
2513
|
+
else if (say && deskToday() && !blockOpen) addressChat(homeTarget());
|
|
2497
2514
|
else if (P.get('view') === 'metrics') openMetrics(P.get('ws') || ''); // ?view=metrics: an old link lands on Intelligence › Delivery trends
|
|
2498
2515
|
else if (S.ini) goIni(S.ini);
|
|
2499
2516
|
else if (!isPhone() && !blockOpen && !say && !VW.isOpen() && !TD_PAGE) { const first = H.needsOf(S.D)[0]; if (first) select(first.id); } // Today opens nothing by itself // a card the PM opened while Home was reading stays
|
|
@@ -2501,7 +2518,7 @@ load().then(() => {
|
|
|
2501
2518
|
const b = { kind: blockOpen[1], id: blockOpen[2] };
|
|
2502
2519
|
(b.kind === 'report' ? import('./premium-report-tab.js').then((M) => M.openReportTab(b)) : import('./premium-chart-tab.js').then((M) => M.openChartTab(b))).catch(() => toast('That view could not open.'));
|
|
2503
2520
|
}
|
|
2504
|
-
if (say) setTimeout(() => { const ta = $('#hmIn'); if (ta) { ta.value = say; ta.dispatchEvent(new Event('input', { bubbles: true })); ta.focus(); ta.setSelectionRange(say.length, say.length); } }, 0);
|
|
2521
|
+
if (say) setTimeout(() => { const ta = $('#hmIn'); if (ta) { ta.value = say; ta.dispatchEvent(new Event('input', { bubbles: true })); ta.focus(); ta.setSelectionRange(say.length, say.length); } }, deskToday() ? 600 : 0); // a desk: once the popup holds the chat
|
|
2505
2522
|
if (mt) openMeeting({ note: mt });
|
|
2506
2523
|
// ?settings=<section> (UI grill U1: the old /premium-workflows.html lands here with ?settings=workflows, keeping ?wf= and ?stage=):
|
|
2507
2524
|
// Settings opens on that section; ?new=1 with it starts the New workflow conversation in this chat instead
|
|
@@ -92,14 +92,18 @@
|
|
|
92
92
|
.pm-ds .pm-dline{position:relative;padding:0 40px 0 8px}
|
|
93
93
|
.pm-ds .pm-dline .axis{position:relative;height:20px;font-size:13px;color:var(--muted)}
|
|
94
94
|
.pm-ds .pm-dline .axis .tk{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap}
|
|
95
|
-
.pm-ds .pm-dline .line{position:relative;height:calc(24px + var(--rows,1) *
|
|
95
|
+
.pm-ds .pm-dline .line{position:relative;height:calc(24px + var(--rows,1) * 76px);background:linear-gradient(var(--line),var(--line)) 0 12px/100% 1px no-repeat}
|
|
96
96
|
.pm-ds .pm-dline .line>.pm-now{bottom:auto;height:34px;top:-8px}
|
|
97
97
|
.pm-ds .pm-dline .ms{position:absolute;top:0;width:0}
|
|
98
98
|
.pm-ds .pm-dline .ms>.pm-dia{top:12px}
|
|
99
|
-
.pm-ds .pm-dline .ms .lb{position:absolute;top:calc(28px + var(--row) *
|
|
99
|
+
.pm-ds .pm-dline .ms .lb{position:absolute;top:calc(28px + var(--row) * 76px);left:-6px;display:flex;flex-direction:column;align-items:flex-start;gap:0;width:max-content;max-width:200px;height:68px;font-size:13px;line-height:20px;overflow:hidden}
|
|
100
|
+
.pm-ds .pm-dline .ms.flip .lb{left:auto;right:-6px;align-items:flex-end;text-align:right}
|
|
101
|
+
.pm-ds .pm-dline .ms .lb .hd{display:flex;align-items:center;gap:6px;height:22px}
|
|
102
|
+
.pm-ds .pm-dline .ms .lb .pm-badge{height:20px;padding:0 6px;font-size:12px}
|
|
103
|
+
.pm-ds .pm-dline .ms .lb b, .pm-ds .pm-dline .ms .lb .pm-meta{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
100
104
|
.pm-ds .pm-dline .ms .lb b{font-size:15px;line-height:24px;font-weight:600}
|
|
101
105
|
.pm-ds .pm-dline .ms .lb .code{font-family:var(--font-mono);color:var(--muted)}
|
|
102
|
-
.pm-ds .pm-dline .ms.low::before{content:"";position:absolute;left:0;top:20px;height:calc(var(--row) *
|
|
106
|
+
.pm-ds .pm-dline .ms.low::before{content:"";position:absolute;left:0;top:20px;height:calc(var(--row) * 76px + 6px);border-left:1px dashed var(--line)}
|
|
103
107
|
.pm-ds .pm-dline .ms.late .lb .code{color:var(--alert)}
|
|
104
108
|
.pm-ds .pm-more{position:absolute;top:20px;display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:none;padding:0;font:inherit;font-size:13px;color:var(--muted);cursor:pointer}
|
|
105
109
|
.pm-ds .pm-more.r{right:0}
|
|
@@ -623,8 +623,14 @@ function drawWork(L) {
|
|
|
623
623
|
goalGroups: (rows) => (GOALS ? GL.asGroups(rows, GOALS, (rs) => sortInis(pk, rs, lay, INI_ACC)) : null),
|
|
624
624
|
canMove: (r) => !ROC && !!(r.track && r.acts && (r.acts.stages || []).length > 1) });
|
|
625
625
|
const W = WV.lastWindow(), vis = WV.filterRows(L, { product: wkProduct, programOf: wkProgOf });
|
|
626
|
-
|
|
627
|
-
|
|
626
|
+
if (!W || WV.read().tl === false) return ST.standsHtml(vis, { sug: !ROC }) + list;
|
|
627
|
+
// the Next milestones strip keeps its own window, apart from the table's (Wawan 2026-11-22): it fits the next milestones on the full width
|
|
628
|
+
const NM = ST.nextMilestones(vis), DW = ST.dlineWindow(NM, new Date(), { off: DL_OFF });
|
|
629
|
+
DL_W = DW;
|
|
630
|
+
return ST.standsHtml(vis, { sug: !ROC }) + list + ST.dlineHtml(NM, DW, { sub: 'all initiatives', ro: ROC, moved: !!DL_OFF, lw: ($('#ibBody').clientWidth || innerWidth) - 90 });
|
|
631
|
+
}
|
|
632
|
+
/** How far the PM scrolled the Next milestones strip, in ms (0: it fits from today), and the window it was last drawn with. */
|
|
633
|
+
let DL_OFF = 0, DL_W = null;
|
|
628
634
|
/** The Suggestion's answers (WorkDS): Yes keeps the proposal (POST /api/proposals/keep, Undo in the toast), No drops it (POST
|
|
629
635
|
* /api/proposals/drop), the pencil opens the initiative, where its proposals can be changed before they are kept. */
|
|
630
636
|
async function sugPress(b) {
|
|
@@ -647,14 +653,19 @@ async function sugPress(b) {
|
|
|
647
653
|
* also press what is under it. */
|
|
648
654
|
{
|
|
649
655
|
const body = $('#ibBody'); let drag = null, raf = 0, moved = false;
|
|
650
|
-
|
|
656
|
+
// the table and the Next milestones strip scroll apart: each moves its own window (the strip's is DL_OFF, in ms)
|
|
657
|
+
const pxDays = (dl) => {
|
|
658
|
+
if (dl) { const x = $('#ibBody .pm-dline .line'), w = x ? x.getBoundingClientRect().width : 0; return DL_W && w ? (DL_W.to - DL_W.from) / 864e5 / w : 0; }
|
|
659
|
+
const W = WV.lastWindow(), x = $('#ibBody .wk-i .wk-bw') || $('#ibBody .wk-tl'); const w = x ? x.getBoundingClientRect().width : 0; return W && w ? (W.to - W.from) / 864e5 / w : 0;
|
|
660
|
+
};
|
|
661
|
+
const move = (dl, d) => { if (dl) DL_OFF += d * 864e5; else WV.scrollBy(d); };
|
|
651
662
|
const redraw = () => { if (raf) return; raf = requestAnimationFrame(() => { raf = 0; drawInit(); }); };
|
|
652
663
|
body.addEventListener('wheel', (e) => {
|
|
653
664
|
if (curView() !== 'work' || !e.target.closest('.wk-x, .pm-dline') || Math.abs(e.deltaX) <= Math.abs(e.deltaY)) return;
|
|
654
|
-
e.preventDefault(); const k = pxDays(); if (!k) return;
|
|
665
|
+
e.preventDefault(); const dl = !!e.target.closest('.pm-dline'), k = pxDays(dl); if (!k) return; move(dl, e.deltaX * k); redraw();
|
|
655
666
|
}, { passive: false });
|
|
656
|
-
body.addEventListener('pointerdown', (e) => { if (curView() !== 'work' || e.button !== 0 || !e.target.closest('.wk-x, .pm-dline') || e.target.closest('button')) return; drag = { x: e.clientX, k: pxDays() }; moved = false; });
|
|
657
|
-
addEventListener('pointermove', (e) => { if (!drag || !drag.k) return; const dx = e.clientX - drag.x; if (!moved && Math.abs(dx) < 5) return; moved = true; document.body.classList.add('wk-drag');
|
|
667
|
+
body.addEventListener('pointerdown', (e) => { if (curView() !== 'work' || e.button !== 0 || !e.target.closest('.wk-x, .pm-dline') || e.target.closest('button')) return; const dl = !!e.target.closest('.pm-dline'); drag = { x: e.clientX, dl, k: pxDays(dl) }; moved = false; });
|
|
668
|
+
addEventListener('pointermove', (e) => { if (!drag || !drag.k) return; const dx = e.clientX - drag.x; if (!moved && Math.abs(dx) < 5) return; moved = true; document.body.classList.add('wk-drag'); move(drag.dl, -dx * drag.k); drag.x = e.clientX; redraw(); });
|
|
658
669
|
addEventListener('pointerup', () => { if (!drag) return; drag = null; document.body.classList.remove('wk-drag'); if (moved) setTimeout(() => { moved = false; }, 0); });
|
|
659
670
|
body.addEventListener('click', (e) => { if (moved) { e.stopImmediatePropagation(); e.preventDefault(); } }, true);
|
|
660
671
|
}
|
|
@@ -890,7 +901,8 @@ $('#ibBody').addEventListener('click', (e) => {
|
|
|
890
901
|
if (curView() === 'work') {
|
|
891
902
|
const op = e.target.closest('[data-wkopen]'); if (op) { e.preventDefault(); openIni(rowOf(op.dataset.wkopen), op); return; }
|
|
892
903
|
const sg = e.target.closest('[data-wksug]'); if (sg) { sugPress(sg); return; }
|
|
893
|
-
|
|
904
|
+
// the strip's +N marks and Fit move only the strip, never the table
|
|
905
|
+
const dl = e.target.closest('[data-wkdl]'); if (dl && dl.dataset.wkdl !== 'add') { DL_OFF = dl.dataset.wkdl === 'fit' || !DL_W ? 0 : DL_OFF + (+dl.dataset.at - +DL_W.from); drawInit(); const n = $(`#ibBody [data-wkdl="${dl.dataset.wkdl}"]`) || $('#ibBody .wk-next .pm-more') || $('#ibBody [data-wknav="today"]'); if (n) n.focus(); return; }
|
|
894
906
|
if (workPress(e)) return;
|
|
895
907
|
}
|
|
896
908
|
if (e.target.closest('#fold, [data-mefold]')) { foldOpen = !foldOpen; drawInit(); const f = $('#fold') || $('#ibBody [data-mefold]'); if (f) f.focus(); return; }
|
|
@@ -35,7 +35,7 @@ export const VIEW_CONTROLS = [
|
|
|
35
35
|
'.wk-hd', '[data-wkspan]', '[data-wkspick]', '[data-wktl]', '[data-wkclosed]', '.wk-i[data-key]', '[data-wkbar] .tg-bar', '[data-wkbar] .wk-bar', '.wk-card', '[data-wkclear]',
|
|
36
36
|
// WorkDS (initiative work-ds-initiatives): Where it stands' names (open the initiative), the scale tabs, Earlier / Go to today / Later,
|
|
37
37
|
// Choose columns (the copy's filter and sort), the timeline switch in it, the Next milestones line's +N marks
|
|
38
|
-
'[data-wkopen]', '[data-wknav]', '[data-wkmenu]', '.wk-menu [data-wktlsw]', '[data-wkdl="on"]', '[data-wkdl="back"]',
|
|
38
|
+
'[data-wkopen]', '[data-wknav]', '[data-wkmenu]', '.wk-menu [data-wktlsw]', '[data-wkdl="on"]', '[data-wkdl="back"]', '[data-wkdl="fit"]',
|
|
39
39
|
'#bdFind', '#roFind', '#bdFilter', '.wk-menu [data-wkf]', '.wk-menu [data-wkmore]', '.wk-menu [data-wksortp]', '.wk-menu [data-wksortx]', '.wk-menu [data-wkreset]',
|
|
40
40
|
// the popup of a row, read only (Part A 4): its close and its edge, Details, a stage's fold, the done and far folds
|
|
41
41
|
// its path and ← back to the page it came from (the design-system popup, #1432: "Work ›" and "Back to Work") only navigate
|
package/workspace/server.js
CHANGED
|
@@ -7370,11 +7370,10 @@ async function handleRequest(req, res) {
|
|
|
7370
7370
|
res.writeHead(302, { Location: '/premium.html' + (s ? '?' + s : ''), 'Cache-Control': 'no-store' });
|
|
7371
7371
|
return res.end();
|
|
7372
7372
|
}
|
|
7373
|
-
// Today is the place of Home (
|
|
7374
|
-
//
|
|
7375
|
-
//
|
|
7376
|
-
|
|
7377
|
-
if ((p === '/premium' || p === '/premium.html') && process.env.PMOS_DESK_HOME !== 'keep' && [...url.searchParams.keys()].every((k) => k === 'ws' || k === 'item')) {
|
|
7373
|
+
// Today is the place of Home. PMOS_DESK_HOME=keep (set by test-run.js) keeps Home at its address for the suites that still read its parts.
|
|
7374
|
+
// home-page-retire slice 1 (Wawan 2026-11-22, "Remove Home on desktop and phone"): every Home address opens Today with the same query. On a
|
|
7375
|
+
// desk Today opens what the query names in the one popup (pm/home-app.js addressChat); a phone's Today is still Home's layout until slice 2.
|
|
7376
|
+
if ((p === '/premium' || p === '/premium.html') && process.env.PMOS_DESK_HOME !== 'keep') {
|
|
7378
7377
|
res.writeHead(302, { Location: '/today.html' + url.search, 'Cache-Control': 'no-store' });
|
|
7379
7378
|
return res.end();
|
|
7380
7379
|
}
|