create-pmos 0.676.0 → 0.678.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 +22 -16
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +21 -2
- package/workspace/guide/layout.md +1 -1
- package/workspace/guide/settings-and-switches.md +1 -1
- package/workspace/package-lock.json +2 -29
- package/workspace/package.json +1 -6
- package/workspace/public/pm/cozy-today-page.css +1 -0
- package/workspace/public/pm/home-app.js +29 -12
- package/workspace/server.js +6 -7
- package/workspace/home-shot.js +0 -38
- package/workspace/premium-agreed-viewer-shots.js +0 -76
- package/workspace/public/pm/cozy-welcome.css +0 -145
- package/workspace/public/pm/premium-welcome.js +0 -286
- package/workspace/public/premium-welcome.html +0 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.678.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": {
|
|
@@ -34,8 +34,21 @@
|
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
36
|
{
|
|
37
|
-
"v": "0.
|
|
38
|
-
"at": "2026-11-22T06:
|
|
37
|
+
"v": "0.678.0",
|
|
38
|
+
"at": "2026-11-22T06:40:11.793Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1473,
|
|
43
|
+
"t": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
44
|
+
"s": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
45
|
+
"k": "new"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"v": "0.677.0",
|
|
51
|
+
"at": "2026-11-22T06:18:36.434Z",
|
|
39
52
|
"f": 4,
|
|
40
53
|
"prs": [
|
|
41
54
|
{
|
|
@@ -49,6 +62,12 @@
|
|
|
49
62
|
"t": "A task Jira closed carries the resolution day as its finish day",
|
|
50
63
|
"s": "A task Jira closed carries the resolution day as its finish day",
|
|
51
64
|
"k": "new"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"n": 1471,
|
|
68
|
+
"t": "Remove the unreachable Welcome page, dead screenshot scripts and unused dev dependencies",
|
|
69
|
+
"s": "Remove the unreachable Welcome page, dead screenshot scripts and unused dev dependencies",
|
|
70
|
+
"k": "x"
|
|
52
71
|
}
|
|
53
72
|
]
|
|
54
73
|
},
|
|
@@ -357,19 +376,6 @@
|
|
|
357
376
|
"k": "new"
|
|
358
377
|
}
|
|
359
378
|
]
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
"v": "0.644.0",
|
|
363
|
-
"at": "2026-11-20T02:28:58.438Z",
|
|
364
|
-
"f": 4,
|
|
365
|
-
"prs": [
|
|
366
|
-
{
|
|
367
|
-
"n": 1426,
|
|
368
|
-
"t": "Today, Home and the chat on the PMOS design system, plus two shell fixes",
|
|
369
|
-
"s": "Today, Home and the chat on the PMOS design system, plus two shell fixes",
|
|
370
|
-
"k": "new"
|
|
371
|
-
}
|
|
372
|
-
]
|
|
373
379
|
}
|
|
374
380
|
]
|
|
375
381
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T06:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T06:40:08Z"}
|
|
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:40:08Z"}
|
|
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:40:08Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"v": "0.
|
|
4
|
-
"at": "2026-11-22T06:
|
|
3
|
+
"v": "0.678.0",
|
|
4
|
+
"at": "2026-11-22T06:40:11.793Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1473,
|
|
9
|
+
"t": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
10
|
+
"s": "Every old Home address opens Today; on a desk its chat, session or setup opens in the popup",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"v": "0.677.0",
|
|
17
|
+
"at": "2026-11-22T06:18:36.434Z",
|
|
5
18
|
"f": 4,
|
|
6
19
|
"prs": [
|
|
7
20
|
{
|
|
@@ -15,6 +28,12 @@
|
|
|
15
28
|
"t": "A task Jira closed carries the resolution day as its finish day",
|
|
16
29
|
"s": "A task Jira closed carries the resolution day as its finish day",
|
|
17
30
|
"k": "new"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"n": 1471,
|
|
34
|
+
"t": "Remove the unreachable Welcome page, dead screenshot scripts and unused dev dependencies",
|
|
35
|
+
"s": "Remove the unreachable Welcome page, dead screenshot scripts and unused dev dependencies",
|
|
36
|
+
"k": "x"
|
|
18
37
|
}
|
|
19
38
|
]
|
|
20
39
|
},
|
|
@@ -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.678.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.678.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
"bin": {
|
|
21
21
|
"pmos": "bin/pmos.js"
|
|
22
22
|
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"pixelmatch": "^7.1.0",
|
|
25
|
-
"pngjs": "^7.0.0"
|
|
26
|
-
},
|
|
27
23
|
"engines": {
|
|
28
24
|
"node": ">=18"
|
|
29
25
|
}
|
|
@@ -127,19 +123,6 @@
|
|
|
127
123
|
"node-addon-api": "^7.1.0"
|
|
128
124
|
}
|
|
129
125
|
},
|
|
130
|
-
"node_modules/pixelmatch": {
|
|
131
|
-
"version": "7.2.0",
|
|
132
|
-
"resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-7.2.0.tgz",
|
|
133
|
-
"integrity": "sha512-xhcb4yHu9sM/G7foGzoLtXYcC0zHEaOXXjRKhGup0fw78Nf2Tkiapv4EQyMzrbcmQPsllAI7DbFY2UT7PlI9Pg==",
|
|
134
|
-
"dev": true,
|
|
135
|
-
"license": "ISC",
|
|
136
|
-
"dependencies": {
|
|
137
|
-
"pngjs": "^7.0.0"
|
|
138
|
-
},
|
|
139
|
-
"bin": {
|
|
140
|
-
"pixelmatch": "bin/pixelmatch"
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
126
|
"node_modules/playwright-core": {
|
|
144
127
|
"version": "1.61.1",
|
|
145
128
|
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.61.1.tgz",
|
|
@@ -152,16 +135,6 @@
|
|
|
152
135
|
"node": ">=18"
|
|
153
136
|
}
|
|
154
137
|
},
|
|
155
|
-
"node_modules/pngjs": {
|
|
156
|
-
"version": "7.0.0",
|
|
157
|
-
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-7.0.0.tgz",
|
|
158
|
-
"integrity": "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==",
|
|
159
|
-
"dev": true,
|
|
160
|
-
"license": "MIT",
|
|
161
|
-
"engines": {
|
|
162
|
-
"node": ">=14.19.0"
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
138
|
"node_modules/standardwebhooks": {
|
|
166
139
|
"version": "1.1.1",
|
|
167
140
|
"resolved": "https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.1.1.tgz",
|
package/workspace/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.678.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,10 +31,5 @@
|
|
|
31
31
|
"node-pty": "^1.0.0",
|
|
32
32
|
"playwright-core": "^1.61.1",
|
|
33
33
|
"ws": "^8.18.0"
|
|
34
|
-
},
|
|
35
|
-
"//devDependencies": "pixelmatch and pngjs have no consumer since design-parity.js was deleted (Run 3, slice 3D). They stay listed until a later chore removes them. Kept OUT of dependencies deliberately: `create-pmos workspace` installs this package with `npm install -g`, which takes dependencies and not devDependencies.",
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"pixelmatch": "^7.1.0",
|
|
38
|
-
"pngjs": "^7.0.0"
|
|
39
34
|
}
|
|
40
35
|
}
|
|
@@ -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
|
package/workspace/server.js
CHANGED
|
@@ -7355,7 +7355,7 @@ async function handleRequest(req, res) {
|
|
|
7355
7355
|
// Today (public/today.html, slice 5 of the six-place navigation) is the page the app lands on: '/' and '/index.html' serve it. It is Home
|
|
7356
7356
|
// with data-today: a desk draws Today's log and agenda, a phone keeps Home. Home (public/premium.html) stays at its address. The console (/console.html, /c3.html) and the
|
|
7357
7357
|
// classic shell (/classic.html) were removed (workspace-legacy-cleanup); their old links open Home with the same query. The
|
|
7358
|
-
// old first-run
|
|
7358
|
+
// old first-run pages (/welcome, /premium-welcome.html) open Home's setup conversation (below).
|
|
7359
7359
|
// premium-agreed-design H3: Home replaced the Briefing, My work and Chat. My work and Chat open Home with their own query, so an
|
|
7360
7360
|
// ?item=, ?about=, ?open= or ?say= link still lands on what it named.
|
|
7361
7361
|
if (p === '/premium-work' || p === '/premium-work.html' || p === '/premium-chat' || p === '/premium-chat.html') {
|
|
@@ -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
|
}
|
|
@@ -7400,7 +7399,7 @@ async function handleRequest(req, res) {
|
|
|
7400
7399
|
res.writeHead(302, { Location: '/premium.html?onboard=1', 'Cache-Control': 'no-store' });
|
|
7401
7400
|
return res.end();
|
|
7402
7401
|
}
|
|
7403
|
-
const PAGES = { '/premium-routine': 'premium-routine.html', '/premium-routine.html': 'premium-routine.html', '/': 'today.html', '/index.html': 'today.html', '/today': 'today.html', '/today.html': 'today.html', '/premium': 'premium.html', '/premium.html': 'premium.html', '/premium-board': 'premium-board.html', '/premium-board.html': 'premium-board.html', '/premium-intelligence': 'premium-intelligence.html', '/premium-intelligence.html': 'premium-intelligence.html', '/premium-events': 'premium-events.html', '/premium-events.html': 'premium-events.html', '/premium-library': 'premium-library.html', '/premium-library.html': 'premium-library.html', '/premium-goals': 'premium-goals.html', '/premium-goals.html': 'premium-goals.html', '/premium-insights': 'premium-intelligence.html', '/premium-insights.html': 'premium-intelligence.html', '/premium-
|
|
7402
|
+
const PAGES = { '/premium-routine': 'premium-routine.html', '/premium-routine.html': 'premium-routine.html', '/': 'today.html', '/index.html': 'today.html', '/today': 'today.html', '/today.html': 'today.html', '/premium': 'premium.html', '/premium.html': 'premium.html', '/premium-board': 'premium-board.html', '/premium-board.html': 'premium-board.html', '/premium-intelligence': 'premium-intelligence.html', '/premium-intelligence.html': 'premium-intelligence.html', '/premium-events': 'premium-events.html', '/premium-events.html': 'premium-events.html', '/premium-library': 'premium-library.html', '/premium-library.html': 'premium-library.html', '/premium-goals': 'premium-goals.html', '/premium-goals.html': 'premium-goals.html', '/premium-insights': 'premium-intelligence.html', '/premium-insights.html': 'premium-intelligence.html', '/premium-viewer': 'premium-viewer.html', '/premium-viewer.html': 'premium-viewer.html', '/premium-rec': 'premium-rec.html', '/premium-rec.html': 'premium-rec.html', '/premium-workflows': 'premium-workflows.html', '/premium-workflows.html': 'premium-workflows.html', '/pm/present': 'premium-present.html', '/premium-buddy': 'premium-buddy.html', '/premium-buddy.html': 'premium-buddy.html' };
|
|
7404
7403
|
const page = capture ? 'capture.html' : Object.prototype.hasOwnProperty.call(PAGES, p) ? PAGES[p] : null;
|
|
7405
7404
|
if (page) {
|
|
7406
7405
|
// pm-os-absorb Run 2 (R25, X11): the per-launch nonce goes into the base meta line, nowhere else. no-store, so a
|
package/workspace/home-shot.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
/* home-shot.js — screenshots of Home (initiative premium-agreed-design) at 1440x900 and 390x844 against the Briefing's fixture model.
|
|
4
|
-
* Not a suite: a look at the page. OUT=<dir> names where the PNGs go (default: the state folder of this run). */
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const { spawn } = require('child_process');
|
|
8
|
-
const { findBrowser } = require('./lib/find-browser');
|
|
9
|
-
const T = require('./test-run').configure({ name: 'home-shot' });
|
|
10
|
-
const B = require('./lib/briefing-premium.js');
|
|
11
|
-
const F = require('./fixtures/briefing-premium-facts.js');
|
|
12
|
-
const OUT = process.env.OUT || T.STATE_DIR;
|
|
13
|
-
(async () => {
|
|
14
|
-
const { chromium } = require('playwright-core');
|
|
15
|
-
const srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
16
|
-
await T.waitForServer(T.BASE);
|
|
17
|
-
const browser = await chromium.launch({ executablePath: findBrowser() });
|
|
18
|
-
const MODEL = B.build(F.facts());
|
|
19
|
-
const errs = [];
|
|
20
|
-
for (const [w, h, name] of [[1440, 900, 'desktop'], [390, 844, 'phone']]) {
|
|
21
|
-
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
22
|
-
await ctx.route('**/api/briefing-premium?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, model: MODEL, as_of: Date.now() }) }));
|
|
23
|
-
await ctx.route('**/api/briefing-premium', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, model: MODEL, as_of: Date.now() }) }));
|
|
24
|
-
const p = await ctx.newPage();
|
|
25
|
-
p.on('pageerror', (e) => errs.push(name + ': ' + e.message));
|
|
26
|
-
p.on('console', (m) => { if (m.type() === 'error') errs.push(name + ' console: ' + m.text()); });
|
|
27
|
-
await p.goto(T.BASE + '/premium.html' + (process.env.Q || ''));
|
|
28
|
-
await p.waitForTimeout(2500);
|
|
29
|
-
fs.mkdirSync(OUT, { recursive: true });
|
|
30
|
-
await p.screenshot({ path: path.join(OUT, 'home-' + name + '.png') });
|
|
31
|
-
if (process.env.SCROLL) { await p.evaluate(() => { const s = document.querySelector('main.stage'); s.scrollTop = 750; window.scrollTo(0, 1500); }); await p.waitForTimeout(300); await p.screenshot({ path: path.join(OUT, 'home-' + name + '-lower.png') }); }
|
|
32
|
-
if (name === 'desktop' && process.env.ROW && await p.$('#rank .rhd')) { await p.click('#rank .rhd'); await p.waitForTimeout(1200); await p.screenshot({ path: path.join(OUT, 'home-desktop-row.png') }); }
|
|
33
|
-
if (name === 'phone' && process.env.ROW && await p.$('#rank .rhd')) { await p.click('#rank .rhd'); await p.waitForTimeout(1200); await p.screenshot({ path: path.join(OUT, 'home-phone-row.png') }); }
|
|
34
|
-
await ctx.close();
|
|
35
|
-
}
|
|
36
|
-
console.log(errs.join('\n') || 'no page errors');
|
|
37
|
-
await browser.close(); srv.kill('SIGKILL'); T.killTmux(); process.exit(0);
|
|
38
|
-
})();
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
/* premium-agreed-viewer-shots.js — screenshots of the initiative page and the Viewer in the Agreed design (initiative premium-agreed-design, area viewer).
|
|
4
|
-
* Not a suite: it serves the real page from the real server, answers the routes from the fixtures the browser suites use, and writes PNGs to
|
|
5
|
-
* the directory given as the first argument (default: ./shots). Run: node premium-agreed-viewer-shots.js /mnt/project-files/agreed-build */
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const { spawn } = require('child_process');
|
|
9
|
-
const { findBrowser } = require('./lib/find-browser');
|
|
10
|
-
const T = require('./test-run').configure({ name: 'agreed-viewer-shots' });
|
|
11
|
-
const IP = require('./lib/initiative-premium.js');
|
|
12
|
-
const F = require('./fixtures/initiative-premium-facts.js');
|
|
13
|
-
|
|
14
|
-
const OUT = path.resolve(process.argv[2] || 'shots');
|
|
15
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
16
|
-
(async () => {
|
|
17
|
-
fs.mkdirSync(OUT, { recursive: true });
|
|
18
|
-
const srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
19
|
-
await T.waitForServer(T.BASE);
|
|
20
|
-
const { chromium } = require('playwright-core');
|
|
21
|
-
const browser = await chromium.launch({ executablePath: findBrowser() });
|
|
22
|
-
const model = IP.build(F.facts());
|
|
23
|
-
const NOW = new Date(F.NOW);
|
|
24
|
-
const tickets = { ok: true, initiative: 'self-serve-v2', title: 'Self-serve onboarding v2', checkedAt: new Date(F.NOW - 12 * 60000).toISOString(), sectionNames: [{ key: 'story', name: 'User Story' }],
|
|
25
|
-
tickets: [{ id: 'TD-01', key: 'ONB-12', summary: 'Sandbox key step', type: 'Story', priority: 'High', depends: [], sections: { story: 'As a partner I get a sandbox key in one step.' }, jira: { status: 'In Progress', category: 'doing', assignee: { displayName: 'Rudi' }, sprint: { name: 'Sprint 14', state: 'active', start: '2026-10-07', end: '2026-10-21' } } }] };
|
|
26
|
-
const shot = async (name, w, h, theme, act) => {
|
|
27
|
-
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
28
|
-
const page = await ctx.newPage();
|
|
29
|
-
await page.clock.setFixedTime(NOW).catch(() => {});
|
|
30
|
-
await page.route('**/api/initiative-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model, as_of: F.NOW }) }));
|
|
31
|
-
await page.route('**/api/jira/tickets*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(tickets) }));
|
|
32
|
-
await page.route('**/api/boards/sprints*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, source: 'none', sprints: [] }) }));
|
|
33
|
-
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
|
|
34
|
-
await page.goto(T.BASE + '/premium-initiative.html?id=self-serve-v2&ws=w1&board=w1&theme=' + theme);
|
|
35
|
-
for (let i = 0; i < 100 && !(await page.$('#cIniTk')); i++) await sleep(100);
|
|
36
|
-
await sleep(600);
|
|
37
|
-
if (act) await act(page);
|
|
38
|
-
await page.screenshot({ path: path.join(OUT, name + '.png') });
|
|
39
|
-
await ctx.close();
|
|
40
|
-
};
|
|
41
|
-
await shot('viewer-initiative-1440', 1440, 900, 'light');
|
|
42
|
-
await shot('viewer-initiative-1440-dark', 1440, 900, 'dark');
|
|
43
|
-
await shot('viewer-initiative-390', 390, 844, 'light');
|
|
44
|
-
await shot('viewer-initiative-1440-folded', 1440, 900, 'light', async (p) => { await p.click('#czBox [data-czfold]'); await sleep(200); });
|
|
45
|
-
const ticket = async (p) => { await p.click('#cIniTk [data-task="task:ONB-12"]'); await sleep(1500); };
|
|
46
|
-
await shot('viewer-jira-1440', 1440, 900, 'light', ticket);
|
|
47
|
-
await shot('viewer-jira-390', 390, 844, 'light', ticket);
|
|
48
|
-
// the meeting views and the calendar in the cozy dialog: opened on this page with the shell's own dialog, from fixture answers
|
|
49
|
-
const iso = (d) => d.toISOString(), key = (d) => d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0');
|
|
50
|
-
const START = new Date(F.NOW - 10 * 60000), END = new Date(START.getTime() + 45 * 60000);
|
|
51
|
-
const mon = new Date(NOW.getFullYear(), NOW.getMonth(), NOW.getDate() - ((NOW.getDay() + 6) % 7));
|
|
52
|
-
const cells = []; for (let i = 0; i < 7; i++) { const d = new Date(mon.getFullYear(), mon.getMonth(), mon.getDate() + i); cells.push({ key: key(d), start: key(d), end: key(d), events: [] }); }
|
|
53
|
-
cells.find((c) => c.key === key(START)).events.push({ id: 'ev-sync', at: iso(START), end: iso(END), title: 'Weekly sync', attendees: ['Dara', 'Sam'] });
|
|
54
|
-
const week = { ok: true, view: 'week', range: { start: cells[0].key, end: cells[6].key }, cells, events_source: 'calendar-memory', today: key(NOW), context: {}, link_boards: [], gantt: [] };
|
|
55
|
-
const NOTE = { id: 'n1', title: 'Weekly sync', state: 'ended', updated_at: iso(NOW), meeting_ms: 32 * 60000, series: { key: 'weekly-sync' },
|
|
56
|
-
meeting: { kind: 'event', event_id: 'ev-sync', start: iso(START), end: iso(END), title: 'Weekly sync', context: { with: 'Dara and Sam', purpose: 'Agree what blocks the release.', agenda: ['Migration check status'] } },
|
|
57
|
-
final_notes: { overview: 'The team reviewed the migration check.', decisions: [{ text: 'Keep the new copy', why: 'Completion rose six points.' }], actions: [{ text: 'Start the migration check', owner: 'Sam', due: '2026-10-22' }], questions: [{ text: 'Do old workspaces need a manual step?' }] },
|
|
58
|
-
final: { segments: [{ t: 61000, spk: 'meeting', text: 'The migration check status is not started.' }] }, speakers: { meeting: 'Dara' } };
|
|
59
|
-
const meet = async (p, which) => {
|
|
60
|
-
await p.route('**/api/calendar-views*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(week) }));
|
|
61
|
-
await p.route('**/api/notes/one*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, note: NOTE }) }));
|
|
62
|
-
await p.route('**/api/notes/series?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, series: { key: 'weekly-sync', meetings: [] } }) }));
|
|
63
|
-
await p.evaluate(async (w) => {
|
|
64
|
-
const S = await import('/pm/premium-shell.js');
|
|
65
|
-
const d = { ...S, pmGet: (u) => fetch(u).then((r) => r.json()).catch(() => null), pmPost: async () => ({ ok: true }), task: async () => ({ ok: false }), openRow: () => {} };
|
|
66
|
-
if (w === 'cal') { const C = await import('/pm/premium-vw-cal.js'); C.openCalendar(d); }
|
|
67
|
-
else { S.openDlg({ eye: 'Meeting · real data', title: 'Weekly sync', say: 'The notes of the meeting.', stream: S.turnA(S.ptx('The notes of the meeting.')), pane: '<article class="paper doc"><p class="note">The meeting.</p></article>', label: 'Meeting' }); const M = await import('/pm/premium-vw-meet.js'); await M.openNoteTab(d, 'n1'); }
|
|
68
|
-
}, which);
|
|
69
|
-
await sleep(1500);
|
|
70
|
-
};
|
|
71
|
-
await shot('viewer-calendar-1440', 1440, 900, 'light', (p) => meet(p, 'cal'));
|
|
72
|
-
await shot('viewer-meeting-1440', 1440, 900, 'light', (p) => meet(p, 'note'));
|
|
73
|
-
await shot('viewer-meeting-390', 390, 844, 'light', (p) => meet(p, 'note'));
|
|
74
|
-
await browser.close(); srv.kill('SIGKILL'); T.killTmux();
|
|
75
|
-
console.log('wrote', fs.readdirSync(OUT).filter((f) => /^viewer-/.test(f)).join(' '));
|
|
76
|
-
})().catch((e) => { console.error(e); process.exit(1); });
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/* pm/cozy-welcome.css — the Welcome page (premium-welcome.html, premium-welcome.js; initiative premium-welcome), on the PMOS design
|
|
2
|
-
* system (design-system-meeting-pages). The page no longer loads premium.css: body.pm-ds, the single-column layout, one pm-block per
|
|
3
|
-
* step, the system's inputs and Bar. Every colour, corner, space and shadow is a system token; sizes and weights are the type roles.
|
|
4
|
-
* The step buttons keep their words: a first-run step needs to say where it goes (Next, Import 12 initiatives, Open Home). The
|
|
5
|
-
* Claude-setup panel (cozy-claude-setup.js, cs-*) is drawn here too, so its rules moved with the page. */
|
|
6
|
-
body.pm-ds.wl-page { min-height: 100vh; font-variant-numeric: tabular-nums; overflow-x: hidden; }
|
|
7
|
-
.wl-page h1, .wl-page h2, .wl-page h3, .wl-page p { margin: 0; }
|
|
8
|
-
:where(.wl-page) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
|
|
9
|
-
.wl-page :focus-visible { outline: none; box-shadow: var(--glow); }
|
|
10
|
-
.wl-page .i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
11
|
-
.wl-page .note { font-size: var(--fs-meta); color: var(--muted); line-height: var(--lh-meta); }
|
|
12
|
-
.wl-page .mono, .wl-page code { font-family: var(--font-mono); }
|
|
13
|
-
.wl-page .chip { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-8); border-radius: var(--radius-pill); background: var(--well); color: var(--muted); font-size: var(--fs-badge); font-weight: var(--fw-regular); line-height: var(--lh-badge); white-space: nowrap; }
|
|
14
|
-
|
|
15
|
-
/* the toast: the system's Toast, ink on the page */
|
|
16
|
-
.wl-page .toast { position: fixed; z-index: 50; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 24px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: var(--space-12); padding: 10px var(--space-16); border-radius: var(--radius-md); background: var(--ink); color: var(--card); box-shadow: var(--lift); font-size: var(--fs-meta); line-height: var(--lh-meta); transition: opacity var(--duration-enter) var(--ease-out), transform var(--duration-enter) var(--ease-out); }
|
|
17
|
-
.wl-page .toast:empty { display: none; }
|
|
18
|
-
.wl-page .toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
|
|
19
|
-
.wl-page .toast span { overflow-wrap: anywhere; }
|
|
20
|
-
|
|
21
|
-
/* the column */
|
|
22
|
-
.wl-in { position: relative; max-width: 700px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top, 0px)) var(--space-16) calc(40px + env(safe-area-inset-bottom, 0px)); }
|
|
23
|
-
.wl-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
|
|
24
|
-
.wl-brand { height: 44px; display: inline-flex; align-items: center; gap: var(--space-12); font-weight: var(--fw-strong); }
|
|
25
|
-
.wl-brand small { font-size: var(--fs-meta); font-weight: var(--fw-regular); line-height: var(--lh-meta); color: var(--muted); }
|
|
26
|
-
|
|
27
|
-
/* the step buttons: primary blue, outline for the second choice, quiet for Not now and Back */
|
|
28
|
-
.wl-page .wl-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); height: 40px; padding: 0 var(--space-16); border-radius: var(--radius-sm); background: var(--blue); color: var(--on-blue); font-size: var(--fs-row); font-weight: var(--fw-strong); line-height: var(--lh-row); white-space: nowrap; transition: background var(--duration-quick) var(--ease-out); }
|
|
29
|
-
.wl-page .wl-btn:active { transform: translateY(1px); }
|
|
30
|
-
.wl-page .wl-btn:disabled { opacity: .4; pointer-events: none; }
|
|
31
|
-
.wl-page .wl-btn.alt { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
|
|
32
|
-
.wl-page .wl-btn.quiet { background: none; color: var(--ink); padding: 0 var(--space-12); }
|
|
33
|
-
@media (hover: hover) { .wl-page .wl-btn.alt:hover, .wl-page .wl-btn.quiet:hover { background: var(--well); } }
|
|
34
|
-
.wl-page .wl-btn svg { width: 16px; height: 16px; }
|
|
35
|
-
|
|
36
|
-
/* the steps: the system's Bar, one per step; the step you are on is the one lit (leaf) */
|
|
37
|
-
.wl-steps { display: flex; gap: var(--space-8); list-style: none; margin: var(--space-24) 0 0; padding: 0; }
|
|
38
|
-
.wl-steps li { flex: 1; min-width: 0; }
|
|
39
|
-
.wl-steps b { display: block; height: 4px; border-radius: var(--radius-pill); background: var(--well); margin-bottom: var(--space-8); overflow: hidden; }
|
|
40
|
-
.wl-steps b i { display: block; height: 100%; width: 0; background: var(--muted); border-radius: var(--radius-pill); transition: width var(--duration-leaf) var(--ease-drift); }
|
|
41
|
-
.wl-steps li[data-s="done"] b i { width: 100%; background: var(--muted); }
|
|
42
|
-
.wl-steps li[data-s="now"] b i { width: 100%; background: var(--leaf); }
|
|
43
|
-
.wl-steps span { display: block; font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: var(--lh-label); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
44
|
-
.wl-steps li[data-s="now"] span { color: var(--ink); }
|
|
45
|
-
@media (prefers-reduced-motion: reduce) { .wl-steps b i { transition: none; } }
|
|
46
|
-
|
|
47
|
-
/* the step: one block */
|
|
48
|
-
.pm-ds .wl-card.pm-block { margin-top: var(--space-16); padding: var(--space-32); display: block; }
|
|
49
|
-
.wl-card h1 { font-size: var(--fs-page); line-height: var(--lh-page); font-weight: var(--fw-strong); text-wrap: balance; }
|
|
50
|
-
.wl-lede { margin-top: 10px; color: var(--muted); max-width: 56ch; text-wrap: pretty; }
|
|
51
|
-
.wl-lede:empty { display: none; }
|
|
52
|
-
.wl-sec { display: flex; align-items: center; gap: 10px; margin: var(--space-32) 0 10px; font-size: var(--fs-section); font-weight: var(--fw-strong); line-height: var(--lh-section); color: var(--ink); }
|
|
53
|
-
.wl-sec .chip { margin-left: auto; }
|
|
54
|
-
.wl-sec0 { margin: 0; }
|
|
55
|
-
|
|
56
|
-
/* fields: the system's Input */
|
|
57
|
-
.wl-f { display: grid; gap: var(--space-16); margin-top: var(--space-24); }
|
|
58
|
-
.wl-f label, .wl-edit label { display: grid; gap: 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--ink); line-height: var(--lh-label); }
|
|
59
|
-
.wl-f label em { font-style: normal; font-weight: var(--fw-regular); color: var(--muted); margin-left: 4px; }
|
|
60
|
-
.wl-f input, .wl-f select, .wl-f textarea, .wl-edit input, .wl-edit select, .wl-q select, .wl-q input, .wl-first-task input {
|
|
61
|
-
height: 40px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); padding: 0 var(--space-12); font: inherit; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); min-width: 0; width: 100%; }
|
|
62
|
-
.wl-f textarea { height: auto; min-height: 118px; padding: var(--space-12); resize: vertical; }
|
|
63
|
-
.wl-f input:focus, .wl-f select:focus, .wl-f textarea:focus, .wl-edit input:focus, .wl-edit select:focus, .wl-q select:focus, .wl-q input:focus, .wl-first-task input:focus { outline: none; box-shadow: var(--glow); }
|
|
64
|
-
@media (pointer: coarse) { .wl-f input, .wl-f select, .wl-edit input, .wl-edit select, .wl-q select, .wl-q input, .wl-first-task input { font-size: var(--fs-field); min-height: 44px; } }
|
|
65
|
-
|
|
66
|
-
/* rows: the system's ListRow on the well */
|
|
67
|
-
.wl-list { display: grid; gap: var(--space-8); list-style: none; margin: 0; padding: 0; }
|
|
68
|
-
.wl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px var(--space-16); border-radius: var(--radius-md); background: var(--well); width: 100%; text-align: left; }
|
|
69
|
-
@media (hover: hover) { button.wl-row:hover { box-shadow: inset 0 0 0 1px var(--line); } }
|
|
70
|
-
.wl-row > .wl-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink); }
|
|
71
|
-
.wl-row b { display: block; font-weight: var(--fw-strong); overflow-wrap: anywhere; }
|
|
72
|
-
.wl-row small { display: block; margin-top: 2px; font-size: var(--fs-meta); color: var(--muted); line-height: var(--lh-meta); }
|
|
73
|
-
.wl-row .path { font: var(--fw-regular) var(--fs-meta)/var(--lh-meta) var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
|
|
74
|
-
.wl-row.off { opacity: .62; }
|
|
75
|
-
.wl-page .wl-tog { min-height: 32px; padding: 0 var(--space-12); border-radius: var(--radius-pill); display: inline-flex; align-items: center; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: var(--lh-label); white-space: nowrap; }
|
|
76
|
-
button.wl-row[aria-pressed="true"] .wl-tog { background: var(--leaf); color: var(--card); box-shadow: none; } /* chosen: the switch's leaf */
|
|
77
|
-
.wl-n, .wl-row .wl-ic.wl-n { font: var(--fw-strong) var(--fs-label)/var(--lh-label) var(--font-mono); color: var(--ink); }
|
|
78
|
-
.wl-edit { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); margin: 10px 0 0; }
|
|
79
|
-
.wl-ed { background: var(--well); border-radius: var(--radius-md); padding: 14px var(--space-16); }
|
|
80
|
-
.wl-ed .wl-row { padding: 0; background: none; border-radius: 0; }
|
|
81
|
-
.wl-ed .acts { display: flex; gap: 6px; align-items: center; }
|
|
82
|
-
.wl-ed.off b { text-decoration: line-through; text-decoration-color: var(--muted); }
|
|
83
|
-
.wl-page .wl-ed .wgo, .wl-page .wl-q .wgo { flex: none; white-space: nowrap; min-height: 32px; padding: 0 var(--space-12); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: var(--lh-label); }
|
|
84
|
-
@media (pointer: coarse) { .wl-ed .wgo, .wl-q .wgo { min-height: 44px; padding: 0 var(--space-16); } .wl-page .wl-btn.quiet { min-height: 44px; } }
|
|
85
|
-
|
|
86
|
-
/* what PMOS will set: the Detail block's fields, flat and dashed (later) */
|
|
87
|
-
.wl-def { margin-top: var(--space-24); border-radius: var(--radius-md); border: 1px dashed var(--line); padding: var(--space-16) 18px; }
|
|
88
|
-
.wl-def dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; margin: 10px 0 0; font-size: var(--fs-meta); line-height: var(--lh-meta); }
|
|
89
|
-
.wl-def dt { color: var(--muted); font-weight: var(--fw-regular); }
|
|
90
|
-
.wl-def dd { margin: 0; color: var(--ink); }
|
|
91
|
-
|
|
92
|
-
.wl-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: var(--space-32); flex-wrap: wrap; }
|
|
93
|
-
.wl-foot .r { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
|
|
94
|
-
.wl-lock { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; }
|
|
95
|
-
.wl-lock svg { width: 16px; height: 16px; margin-top: 2px; }
|
|
96
|
-
.wl-scan { display: grid; gap: var(--space-12); margin-top: var(--space-24); }
|
|
97
|
-
.wl-scan div { display: flex; gap: var(--space-12); align-items: center; color: var(--ink); }
|
|
98
|
-
.wl-scan svg { width: 18px; height: 18px; color: var(--muted); }
|
|
99
|
-
.wl-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: wl-spin .8s linear infinite; flex: none; } /* PMOS working: the one loop allowed */
|
|
100
|
-
@keyframes wl-spin { to { transform: rotate(360deg); } }
|
|
101
|
-
@media (prefers-reduced-motion: reduce) { .wl-spin { animation: none; } }
|
|
102
|
-
.wl-about { margin-top: 18px; }
|
|
103
|
-
.wl-about summary { cursor: pointer; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--ink); padding: var(--space-8) 0; line-height: var(--lh-label); }
|
|
104
|
-
.wl-about ul { margin: var(--space-8) 0 0; padding-left: 18px; font-size: var(--fs-meta); color: var(--muted); line-height: var(--lh-meta); display: grid; gap: 6px; }
|
|
105
|
-
.wl-about code { font: var(--fw-regular) var(--fs-meta)/var(--lh-meta) var(--font-mono); }
|
|
106
|
-
.wl-first { margin-top: var(--space-24); }
|
|
107
|
-
.wl-first-note { margin: var(--space-12) 0 14px; }
|
|
108
|
-
.wl-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
|
|
109
|
-
.wl-err, .wl-bad, .wl-first-err { color: var(--alert); font-size: var(--fs-meta); line-height: var(--lh-meta); margin: var(--space-12) 0 0; }
|
|
110
|
-
.wl-add { margin-top: 10px; }
|
|
111
|
-
.wl-bh { display: flex; align-items: center; gap: 10px; margin: 14px 0 var(--space-8); }
|
|
112
|
-
.wl-qs { display: grid; gap: 14px; margin-top: 14px; }
|
|
113
|
-
.wl-q { display: grid; gap: var(--space-8); }
|
|
114
|
-
.wl-q .wgo { justify-self: start; }
|
|
115
|
-
.wl-in h1:focus { outline: none; box-shadow: none; }
|
|
116
|
-
.wl-ad { max-width: 420px; margin: 0 0 var(--space-12); }
|
|
117
|
-
.wl-hi { margin: 0 0 6px; font-weight: var(--fw-strong); color: var(--ink); }
|
|
118
|
-
.wl-first-task { display: grid; gap: var(--space-12); margin: var(--space-16) 0; }
|
|
119
|
-
.wl-first-task label { display: grid; gap: 6px; }
|
|
120
|
-
.wl-source-progress { margin: var(--space-12) 0; }
|
|
121
|
-
|
|
122
|
-
/* the Claude-setup panel (cozy-claude-setup.js), drawn inside a step */
|
|
123
|
-
.cs-panel { display: grid; gap: 14px; max-width: 100%; }
|
|
124
|
-
.cs-panel p { margin: 0; }
|
|
125
|
-
.cs-label { display: grid; gap: 6px; }
|
|
126
|
-
.cs-label select { max-width: 100%; min-height: 44px; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-8); font: inherit; }
|
|
127
|
-
.cs-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); }
|
|
128
|
-
.cs-term { height: 320px; width: 100%; min-width: 0; overflow: hidden; border-radius: var(--radius-md); }
|
|
129
|
-
.cs-term .xterm { height: 100%; }
|
|
130
|
-
.cs-checklist { padding: var(--space-16); margin: var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-md); font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
131
|
-
.cs-checklist p { margin: var(--space-8) 0; }
|
|
132
|
-
.cs-checklist a { display: inline-block; min-height: 44px; padding: 10px 0; color: var(--blue); text-decoration: underline; }
|
|
133
|
-
|
|
134
|
-
@media (max-width: 640px) {
|
|
135
|
-
.pm-ds .wl-card.pm-block { padding: 22px 18px; border-radius: var(--radius-card); }
|
|
136
|
-
.wl-brand small { display: none; }
|
|
137
|
-
.wl-edit { grid-template-columns: minmax(0, 1fr); }
|
|
138
|
-
.wl-row { grid-template-columns: auto minmax(0, 1fr); }
|
|
139
|
-
.wl-row > :nth-child(3) { grid-column: 2; justify-self: start; }
|
|
140
|
-
.wl-row > :nth-child(3):empty { display: none; }
|
|
141
|
-
.wl-foot { position: sticky; bottom: 0; margin: 28px -18px -22px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-card) var(--radius-card); z-index: 2; }
|
|
142
|
-
.wl-foot .r { flex: 1; justify-content: flex-end; }
|
|
143
|
-
.wl-foot .wl-btn { flex: 1; }
|
|
144
|
-
.wl-foot .wl-btn.quiet { flex: 0 0 auto; }
|
|
145
|
-
}
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
/* Guided Claude setup, explicit work reads, and reviewed folder imports. */
|
|
2
|
-
import { pmGet, pmPost } from './http.js';
|
|
3
|
-
import * as W from './premium-welcome-model.js';
|
|
4
|
-
import { mountClaudeSetup, signInTerminal } from './cozy-claude-setup.js';
|
|
5
|
-
import { adlerScene, prefs as adPrefs } from './cozy-adler.js'; // Adler says hello once (batch 16 item 2, canvas AdH6), and reads with his glasses on
|
|
6
|
-
|
|
7
|
-
const $ = (s, r = document) => r.querySelector(s);
|
|
8
|
-
const esc = (v) => String(v == null ? '' : v).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
9
|
-
const store = { get(k) { try { return localStorage.getItem(k); } catch { return null; } }, set(k, v) { try { localStorage.setItem(k, v); } catch { /* no storage */ } } };
|
|
10
|
-
const params = new URLSearchParams(location.search);
|
|
11
|
-
{ const t = params.get('theme') || store.get('pmos.c3.theme'); if (t === 'light' || t === 'dark') document.documentElement.dataset.theme = t; }
|
|
12
|
-
|
|
13
|
-
const S = {
|
|
14
|
-
ws: params.get('ws') || '', folder: null, added: [], step: 'claude', ready: false, manual: false, review: null, permissionSession: null, setup: {}, readRows: [], readItems: [], item: null, draft: { title: '', due: '', request_id: crypto.randomUUID() }, busy: '', error: '', note: '',
|
|
15
|
-
about: { name: '', role: '', work: '', duties: '' }, pick: {}, sources: {},
|
|
16
|
-
look: null, structure: null, checked: {}, titles: {}, boardOf: {}, edit: {}, answers: {}, skipped: {}, defs: false,
|
|
17
|
-
};
|
|
18
|
-
const I = {
|
|
19
|
-
folder: '<svg class="i" viewBox="0 0 24 24"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>',
|
|
20
|
-
plus: '<svg class="i" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg>',
|
|
21
|
-
lock: '<svg class="i" viewBox="0 0 24 24"><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg>',
|
|
22
|
-
calendar: '<svg class="i" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="16" rx="3"/><path d="M3 10h18M8 3v4M16 3v4"/></svg>',
|
|
23
|
-
'my-work': '<svg class="i" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><path d="M8 12l3 3 5-6"/></svg>',
|
|
24
|
-
inbox: '<svg class="i" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="14" rx="3"/><path d="m4 8 8 6 8-6"/></svg>',
|
|
25
|
-
slack: '<svg class="i" viewBox="0 0 24 24"><path d="M5 9h14M5 15h14M9 4 8 20M16 4l-1 16"/></svg>',
|
|
26
|
-
check: '<svg class="i" viewBox="0 0 24 24"><path d="m5 12.5 4.5 4.5L19 7.5"/></svg>',
|
|
27
|
-
off: '<svg class="i" viewBox="0 0 24 24"><path d="M6 12h12"/></svg>',
|
|
28
|
-
};
|
|
29
|
-
const dis = (on) => (on ? ' disabled' : '');
|
|
30
|
-
const spin = (txt) => `<span class="wl-spin" aria-hidden="true"></span>${esc(txt)}`;
|
|
31
|
-
|
|
32
|
-
/* ── actions ───────────────────────────────────────────────────────────────────────────────────── */
|
|
33
|
-
const fail = (r, what) => { S.error = (r && r.error) || `${what} did not work.`; };
|
|
34
|
-
async function run(label, fn) {
|
|
35
|
-
S.busy = label; S.error = ''; draw();
|
|
36
|
-
try { await fn(); } catch (e) { S.error = String((e && e.message) || e); }
|
|
37
|
-
S.busy = ''; draw();
|
|
38
|
-
}
|
|
39
|
-
const go = (step) => { S.step = step; S.error = ''; draw(true); };
|
|
40
|
-
const addFolder = () => run('add', async () => {
|
|
41
|
-
const p = await pmPost('/api/pick-folder', {});
|
|
42
|
-
if (!p || !p.ok) { if (p && p.cancelled) return; S.note = (p && p.unsupported) ? 'This system has no folder chooser. Start pmos in the folder instead.' : ''; if (!S.note) fail(p, 'Choosing a folder'); return; }
|
|
43
|
-
const w = await pmPost('/api/workspaces', { root: p.root, name: p.root.split(/[\\/]/).filter(Boolean).pop(), focus: false });
|
|
44
|
-
if (!w || !w.workspace) { fail(w, 'Adding the folder'); return; }
|
|
45
|
-
S.ws = w.workspace.id; S.folder = { name: w.workspace.name, root: w.workspace.root }; S.added = []; S.step = 'sources'; await remember();
|
|
46
|
-
});
|
|
47
|
-
/* Each ticked tool is its own read-only agent session. A tool that cannot start says why on its row and does not stop the folder scan. */
|
|
48
|
-
const setupPost = (verb, body = {}) => pmPost('/api/setup/' + verb, { ws: S.ws, ...body });
|
|
49
|
-
let disposeClaude = null;
|
|
50
|
-
const remember = () => { clearTimeout(S.saveTimer); return setupPost('progress', { step: S.step, manual: S.manual, draft: S.draft, review: S.review }); };
|
|
51
|
-
async function readTools() {
|
|
52
|
-
const check = await pmGet('/api/setup/state?ws=' + encodeURIComponent(S.ws));
|
|
53
|
-
if (!check || !check.ok || !check.claude.status.ready) { S.error = 'Check and use a Claude profile before reading a work tool.'; return; }
|
|
54
|
-
for (const source of ['calendar', 'my-work'].filter(k => S.pick[k])) {
|
|
55
|
-
const r = await setupPost('read', { source });
|
|
56
|
-
if (!r || !r.ok) S.error = (r && r.error) || 'The read could not start.';
|
|
57
|
-
}
|
|
58
|
-
await refreshSetup();
|
|
59
|
-
}
|
|
60
|
-
async function refreshSetup() {
|
|
61
|
-
const r = await pmGet('/api/setup/state?ws=' + encodeURIComponent(S.ws));
|
|
62
|
-
if (!r || !r.ok) return;
|
|
63
|
-
S.setup = r.progress; S.readRows = r.sources || []; S.ready = !!r.claude.status.ready;
|
|
64
|
-
S.readItems = S.readRows.filter(r => r.state === 'complete').flatMap(r => r.preview || []).map(title => ({ title }));
|
|
65
|
-
}
|
|
66
|
-
async function finish() {
|
|
67
|
-
const r = await setupPost('finish', { skip_import: !!(S.structure && !W.counts(S.structure, S).n) });
|
|
68
|
-
if (!r || !r.ok) { fail(r, 'Finishing setup'); return; }
|
|
69
|
-
location.assign('/?ws=' + encodeURIComponent(S.ws));
|
|
70
|
-
}
|
|
71
|
-
const addTask = () => run('task', async () => {
|
|
72
|
-
await remember();
|
|
73
|
-
const r = await setupPost('task', S.draft);
|
|
74
|
-
if (!r || !r.ok) { fail(r, 'Adding the task'); return; }
|
|
75
|
-
S.item = r.item; S.setup = r.progress; S.review = 'task'; S.step = 'found'; await remember();
|
|
76
|
-
});
|
|
77
|
-
const scan = () => run('scan', async () => {
|
|
78
|
-
await remember();
|
|
79
|
-
const r = await pmPost('/api/onboarding/scan', { ws: S.ws, extra_roots: S.added.map((a) => a.root) });
|
|
80
|
-
if (!r || !r.ok) { fail(r, 'The scan'); return; }
|
|
81
|
-
const st = await pmGet(`/api/onboarding/structure?ws=${encodeURIComponent(S.ws)}`);
|
|
82
|
-
if (!st || !st.ok) { fail(st, 'Reading the portfolio'); return; }
|
|
83
|
-
S.look = r.first_look; S.structure = st; S.boardOf = {}; S.edit = {}; S.answers = {}; S.skipped = {}; S.defs = false;
|
|
84
|
-
Object.assign(S, W.startChoices(st));
|
|
85
|
-
S.review = 'folder'; S.step = 'found'; await remember();
|
|
86
|
-
});
|
|
87
|
-
const importNow = () => {
|
|
88
|
-
if (!W.counts(S.structure, S).n) return;
|
|
89
|
-
run('apply', async () => {
|
|
90
|
-
if (S.imported) { await finish(); return; }
|
|
91
|
-
const r = await pmPost('/api/onboarding/apply', W.applyBody(S.ws, S.structure, S));
|
|
92
|
-
if (!r || !r.ok) { fail(r, 'The import'); return; }
|
|
93
|
-
S.imported = true;
|
|
94
|
-
try { sessionStorage.setItem(W.FIRST_KEY, JSON.stringify(S.sources)); } catch { /* no storage */ }
|
|
95
|
-
await finish();
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
// "Not now": Welcome stops opening on its own for this folder (`pmos welcome` still opens it), then the premium Briefing opens
|
|
99
|
-
const notNow = () => run('dismiss', async () => {
|
|
100
|
-
const r = await pmPost('/api/onboarding/dismiss', { ws: S.ws });
|
|
101
|
-
if (!r || !r.ok) { fail(r, 'Not now'); return; }
|
|
102
|
-
location.assign('/premium.html?ws=' + encodeURIComponent(S.ws));
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
/* ── views ─────────────────────────────────────────────────────────────────────────────────────── */
|
|
106
|
-
/* Icon-only for a step that can be taken back (Komorebi Button v7): Open Home and Back show an icon, the label is the tooltip and
|
|
107
|
-
* aria-label. The answers to a step that cannot be undone (Import 12 initiatives) keep their words. */
|
|
108
|
-
const ICON_ONLY = { finish: '<svg class="pm-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 11l9-7 9 7"/><path d="M5 10v10h14V10"/></svg>', back: '<svg class="pm-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M19 12H5M11 6l-6 6 6 6"/></svg>' };
|
|
109
|
-
const btn = (act, label, o = {}) => ICON_ONLY[act] && !(S.busy === o.busy && o.busyText)
|
|
110
|
-
? `<button class="pm-btn ${act === 'finish' ? 'primary' : 'outline'}" type="button" data-w="${act}" aria-label="${esc(label)}" title="${esc(label)}"${o.attrs || ''}${dis(o.off || (S.busy && !o.free))}>${ICON_ONLY[act]}</button>`
|
|
111
|
-
: `<button class="wl-btn${o.alt ? ' alt' : ''}${o.quiet ? ' quiet' : ''}" type="button" data-w="${act}"${o.attrs || ''}${dis(o.off || (S.busy && !o.free))}${S.busy === o.busy ? ' aria-busy="true"' : ''}>${S.busy === o.busy && o.busyText ? spin(o.busyText) : (o.lead || '') + label}</button>`;
|
|
112
|
-
const foot = (left, right) => `<div class="wl-foot"><div>${left}</div><div class="r">${right}</div></div>`;
|
|
113
|
-
const err = () => (S.error ? `<p class="wl-err" role="alert">${esc(S.error)}</p>` : '');
|
|
114
|
-
|
|
115
|
-
function toolRow(x) {
|
|
116
|
-
const on = !!S.pick[x.source], st = S.sources[x.source] || {};
|
|
117
|
-
return `<li><button type="button" class="wl-row" data-w="tool" data-k="${esc(x.source)}" aria-pressed="${on}"${dis(S.busy)}><span class="wl-ic">${I[x.source] || ''}</span><span><b>${esc(x.name)}</b><small>${esc(x.adds)}</small>${st.error ? `<small class="wl-bad" role="alert">${esc(st.error)}</small>` : ''}</span><span class="wl-tog">${on ? 'Read it' : 'Off'}</span></button></li>`;
|
|
118
|
-
}
|
|
119
|
-
function rowView(r) {
|
|
120
|
-
const id = r.proposal_id, ed = !!S.edit[id], on = !!S.checked[id], t = S.titles[id];
|
|
121
|
-
const docs = (r.docs || []).length;
|
|
122
|
-
const opts = S.structure.boards.map((b) => `<option value="${esc(b.key)}"${b.key === W.boardOfRow(r, S) ? ' selected' : ''}>${esc(b.name)}</option>`).join('');
|
|
123
|
-
const meta = [r.lane, r.anchor || 'no anchor', r.stage, W.plural(docs, 'document', 'documents')].filter(Boolean).map(esc).join(' · ');
|
|
124
|
-
return `<li class="wl-ed${on ? '' : ' off'}"><div class="wl-row"><span class="wl-ic wl-n">${on ? I.check : I.off}</span><span><b>${esc(t)}</b><small>${meta}</small></span>
|
|
125
|
-
<span class="acts"><button type="button" class="wgo" data-w="inc" data-id="${esc(id)}" aria-pressed="${on}" aria-label="${on ? 'Leave out' : 'Import'} ${esc(t)}"${dis(S.busy)}>${on ? 'Leave out' : 'Import'}</button><button type="button" class="wgo" data-w="edit" data-id="${esc(id)}" aria-expanded="${ed}"${dis(!on || S.busy)}>${ed ? 'Done' : 'Edit'}</button></span></div>
|
|
126
|
-
${ed ? `<div class="wl-edit"><label>Title<input data-f="title" data-id="${esc(id)}" value="${esc(t)}" maxlength="80"></label><label>Board<select data-f="board" data-id="${esc(id)}">${opts}</select></label></div>` : ''}</li>`;
|
|
127
|
-
}
|
|
128
|
-
function questionInputs() {
|
|
129
|
-
return W.defaultsView(S.structure, S).map((q) => {
|
|
130
|
-
const cur = S.answers[q.id] != null ? S.answers[q.id] : ((S.structure.questions.find((x) => x.id === q.id) || {}).default);
|
|
131
|
-
const input = q.options.length
|
|
132
|
-
? `<select data-f="answer" data-id="${esc(q.id)}" aria-label="${esc(q.text)}"${dis(q.skipped)}>${q.options.map((o) => `<option value="${esc(o.value)}"${String(cur) === o.value ? ' selected' : ''}>${esc(o.text)}</option>`).join('')}</select>`
|
|
133
|
-
: `<input data-f="answer" data-id="${esc(q.id)}" aria-label="${esc(q.text)}" value="${esc(cur == null ? '' : cur)}"${dis(q.skipped)}>`;
|
|
134
|
-
return `<div class="wl-q"><b>${esc(q.text)}</b>${input}<button type="button" class="wgo" data-w="skipq" data-id="${esc(q.id)}" aria-pressed="${q.skipped}">${q.skipped ? 'Skipped. Use the default' : 'Skip'}</button></div>`;
|
|
135
|
-
}).join('');
|
|
136
|
-
}
|
|
137
|
-
function viewPortfolio() {
|
|
138
|
-
const L = S.look || {}, c = W.counts(S.structure, S), all = W.rowsOf(S.structure), found = W.findingsOf(L), defs = W.defaultsView(S.structure, S);
|
|
139
|
-
const boards = S.structure.boards.map((b) => {
|
|
140
|
-
const mine = all.filter((r) => W.boardOfRow(r, S) === b.key);
|
|
141
|
-
return `<div class="wl-bh"><b>${esc(b.name)}</b><span class="chip">${W.plural((b.unsorted || []).length, 'document', 'documents')} unsorted</span></div><ul class="wl-list">${mine.length ? mine.map(rowView).join('') : '<li class="note">No initiatives here.</li>'}</ul>`;
|
|
142
|
-
}).join('');
|
|
143
|
-
return `<h1 id="wlH" tabindex="-1">What PMOS found</h1>${L.sentence ? `<p class="wl-lede">${esc(L.sentence)}</p>` : ''}
|
|
144
|
-
${S.look ? `<p class="wl-sec">What matters most<span class="chip mono">${found.length}</span></p>` : ''}
|
|
145
|
-
${!S.look ? '' : found.length ? `<ol class="wl-list">${found.map((f, i) => `<li class="wl-row"><span class="wl-ic wl-n">${String(i + 1).padStart(2, '0')}</span><span><b>${esc(f.title)}</b>${f.why ? `<small>${esc(f.why)}</small>` : ''}<span class="path">${esc(f.ref)}</span></span><span></span></li>`).join('')}</ol>` : '<p class="note">Nothing in this folder needs you urgently.</p>'}
|
|
146
|
-
<p class="wl-sec">Your portfolio<span class="chip mono">${c.n} of ${all.length} to import</span></p>${boards}
|
|
147
|
-
<div class="wl-def"><span class="wl-sec wl-sec0">Defaults PMOS chose</span>${defs.length ? `<dl>${defs.map((d) => `<dt>${esc(d.text)}</dt><dd>${esc(d.value)}</dd>`).join('')}</dl>` : '<p class="note">The scan left no questions. Nothing needs a default.</p>'}
|
|
148
|
-
${S.defs && defs.length ? `<div class="wl-qs">${questionInputs()}</div>` : ''}
|
|
149
|
-
${defs.length ? `<div class="wl-add">${btn('defs', S.defs ? 'Done' : 'Change the defaults', { alt: true, attrs: ` aria-expanded="${S.defs}"` })}</div>` : ''}</div>${err()}`
|
|
150
|
-
+ foot(btn('back', 'Back', { alt: true }), btn('import', esc(W.importText(c)), { busy: 'apply', busyText: 'Importing', off: !c.n }));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function viewClaude() {
|
|
154
|
-
return '<h1 id="wlH" tabindex="-1">Give PMOS a Claude login</h1><p class="wl-lede">Connect Claude, add your work, then review and start.</p><div id="wlClaude"></div>';
|
|
155
|
-
}
|
|
156
|
-
function readSummary() {
|
|
157
|
-
return S.readRows.map(r => `<p class="wl-source-progress"><b>${r.id === 'my-work' ? 'Jira' : 'Calendar'}</b>: ${esc({ reading: 'Reading with the selected Claude profile…', complete: 'Read complete' + (r.count === 0 ? ' · No items returned in this scope' : r.count != null ? ' · ' + r.count + ' items' : ''), failed: 'The read failed. Check this profile’s source permissions.', interrupted: 'Read interrupted. Try reading this source again.' }[r.state])}${r.read_at ? ' · ' + esc(new Date(r.read_at).toLocaleString()) : ''} · profile: ${esc(r.profile)}</p>`).join('');
|
|
158
|
-
}
|
|
159
|
-
function viewSources() {
|
|
160
|
-
return `<h1 id="wlH" tabindex="-1">Where should we start?</h1><p class="wl-lede">Choose a project folder, read a connected tool, or add one real task.</p>
|
|
161
|
-
<p class="wl-sec">Project folder</p><p>${esc(S.folder && S.folder.name)} <span class="path">${esc(S.folder && S.folder.root)}</span></p>
|
|
162
|
-
${btn('folder', 'Choose another folder', { alt: true })} ${btn('scan', 'Scan this folder', { busy: 'scan', busyText: 'Scanning' })}
|
|
163
|
-
<p class="note">The folder scan runs locally. You review the proposed initiatives before importing them.</p>
|
|
164
|
-
<p class="wl-sec">Work tools</p><p class="note">Jira reads open items assigned to your connected account. Calendar reads today and the next 14 days. Connector access is checked by the actual read. Other connections stay in Settings.</p>
|
|
165
|
-
<ul class="wl-list">${W.TOOLS.filter(x => ['calendar', 'my-work'].includes(x.source)).map(toolRow).join('')}</ul>
|
|
166
|
-
${btn('read', 'Read selected tools', { off: !S.ready || !['calendar', 'my-work'].some(k => S.pick[k]), busy: 'read', busyText: 'Starting the read' })}
|
|
167
|
-
${!S.ready ? '<p class="note">Connect and check Claude before reading a work tool. Manual tasks and folder scans still work.</p>' : ''}${readSummary()}
|
|
168
|
-
${btn('permissions', 'Open Claude connections and permissions', { alt: true })}${S.permissionSession ? '<p>Use this profile’s Claude session to connect your tool and review its read permissions. Then retry the read above.</p><div id="wlPermissions" class="cs-term" aria-label="Claude connections terminal"></div>' : ''}
|
|
169
|
-
${S.readRows.some(r => r.state === 'complete') ? btn('review', 'Review the read') : ''}
|
|
170
|
-
<p class="note">These reads do not create a recurring schedule.</p>
|
|
171
|
-
<p class="wl-sec">Or add one task</p><div class="wl-first-task"><label>What needs your attention?<input data-f="taskTitle" maxlength="500" value="${esc(S.draft.title)}" autocomplete="off"></label><label>Due date (optional)<input data-f="taskDue" type="date" value="${esc(S.draft.due)}"></label></div>
|
|
172
|
-
${btn('task', 'Add my task', { off: !S.draft.title.trim(), busy: 'task', busyText: 'Adding' })}${err()}
|
|
173
|
-
${foot(btn('back', 'Back', { alt: true }), '')}`;
|
|
174
|
-
}
|
|
175
|
-
function viewFound() {
|
|
176
|
-
if (S.imported) return '<h1 id="wlH" tabindex="-1">Your work is already imported</h1><p>Open Home to use it, or go back to add a task.</p>' + err() + btn('finish', 'Open Home') + btn('back', 'Add work', { alt: true });
|
|
177
|
-
if (S.structure) {
|
|
178
|
-
const html = viewPortfolio();
|
|
179
|
-
return W.counts(S.structure, S).n ? html : html + '<p>The folder scan finished. No initiatives are selected for import.</p>' + btn('finish', 'Open Home') + btn('back', 'Add a task instead', { alt: true });
|
|
180
|
-
}
|
|
181
|
-
if (S.review !== 'sources' && (S.item || S.setup.item)) {
|
|
182
|
-
const item = S.item || S.setup.item;
|
|
183
|
-
return `<h1 id="wlH" tabindex="-1">Your first task is ready</h1><p class="wl-lede">${esc(item.title)}</p><p>${item.due ? 'Due ' + esc(item.due) : 'Added to Today'}</p><p>Open it on Home to set a date, mark it done, or brief PMOS when connected.</p>${err()}${foot(btn('back', 'Add more work', { alt: true }), btn('finish', 'Open Home'))}`;
|
|
184
|
-
}
|
|
185
|
-
return `<h1 id="wlH" tabindex="-1">Here’s what PMOS found</h1>${readSummary()}${S.readItems.length ? '<ul class="wl-list">' + S.readItems.map(i => '<li>' + esc(i.title || i.key || 'Work item') + '</li>').join('') + '</ul>' : '<p>A completed read may contain no open items in this scope. Review your sources on Home or add a task.</p>'}${err()}${foot(btn('back', 'Add or change work', { alt: true }), btn('finish', 'Use these reads and open Home'))}`;
|
|
186
|
-
}
|
|
187
|
-
const VIEWS = { claude: viewClaude, sources: viewSources, found: viewFound };
|
|
188
|
-
function draw(focusHead) {
|
|
189
|
-
if (disposeClaude) { disposeClaude(); disposeClaude = null; }
|
|
190
|
-
const at = Math.max(0, W.STEPS.findIndex(([k]) => k === S.step));
|
|
191
|
-
$('#wlSteps').innerHTML = W.STEPS.map(([, t], i) => `<li data-s="${i < at ? 'done' : i === at ? 'now' : 'todo'}"${i === at ? ' aria-current="step"' : ''}><b><i></i></b><span>${esc(t)}</span></li>`).join('');
|
|
192
|
-
$('#wlCount').textContent = `Set up · step ${at + 1} of ${W.STEPS.length}`;
|
|
193
|
-
$('#wlSkip').disabled = !!S.busy;
|
|
194
|
-
const keep = document.activeElement && document.activeElement.dataset ? [document.activeElement.dataset.w, document.activeElement.dataset.id || document.activeElement.dataset.k || '', document.activeElement.dataset.f] : null;
|
|
195
|
-
const y = scrollY;
|
|
196
|
-
$('#wlCard').innerHTML = VIEWS[S.step]();
|
|
197
|
-
$('#wlCard').setAttribute('aria-busy', S.busy ? 'true' : 'false');
|
|
198
|
-
if (S.step === 'claude' && S.ws) disposeClaude = mountClaudeSetup($('#wlClaude'), { ws: S.ws,
|
|
199
|
-
onReady: async () => { S.ready = true; S.manual = false; S.step = 'sources'; await remember(); draw(true); },
|
|
200
|
-
onManual: async () => { S.manual = true; S.step = 'sources'; await remember(); draw(true); } });
|
|
201
|
-
const permissionTerminal = $('#wlPermissions');
|
|
202
|
-
if (permissionTerminal && S.permissionSession) signInTerminal(permissionTerminal, S.permissionSession).then(stop => { disposeClaude = stop; }).catch(() => { permissionTerminal.textContent = 'The terminal could not load. Reload and reopen it.'; });
|
|
203
|
-
if (focusHead) { const h = $('#wlH'); if (h) h.focus({ preventScroll: true }); scrollTo(0, 0); }
|
|
204
|
-
else {
|
|
205
|
-
scrollTo(0, y);
|
|
206
|
-
if (keep && (keep[0] || keep[2])) {
|
|
207
|
-
const again = [...document.querySelectorAll('#wlCard [data-w],#wlCard [data-f]')].find((x) => (x.dataset.w || null) === (keep[0] || null) && (x.dataset.id || x.dataset.k || '') === keep[1] && (x.dataset.f || undefined) === keep[2]);
|
|
208
|
-
if (again && !again.disabled) again.focus();
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* ── events: one delegate for presses, input and change on the card ──────────────────────────── */
|
|
214
|
-
document.addEventListener('click', (e) => {
|
|
215
|
-
const b = e.target.closest('[data-w]'); if (!b || b.disabled || !b.closest('#wlRoot')) return;
|
|
216
|
-
const a = b.dataset.w, id = b.dataset.id;
|
|
217
|
-
if (a === 'back') { S.structure = null; go(S.step === 'found' ? 'sources' : 'claude'); remember(); }
|
|
218
|
-
else if (a === 'folder') addFolder();
|
|
219
|
-
else if (a === 'tool') { S.pick[b.dataset.k] = !S.pick[b.dataset.k]; draw(); }
|
|
220
|
-
else if (a === 'scan') scan();
|
|
221
|
-
else if (a === 'task') addTask();
|
|
222
|
-
else if (a === 'read') run('read', readTools);
|
|
223
|
-
else if (a === 'permissions') run('permissions', async () => { const state = await pmGet('/api/setup/state?ws=' + encodeURIComponent(S.ws)); const r = await setupPost('login', { profile: state && state.claude && state.claude.selected, purpose: 'permissions' }); if (r && r.ok) S.permissionSession = r.session; else fail(r, 'Opening Claude connections'); });
|
|
224
|
-
else if (a === 'review') { S.review = 'sources'; S.step = 'found'; S.structure = null; remember(); draw(true); }
|
|
225
|
-
else if (a === 'finish') run('finish', finish);
|
|
226
|
-
else if (a === 'inc') { S.checked[id] = !S.checked[id]; if (!S.checked[id]) S.edit[id] = false; draw(); }
|
|
227
|
-
else if (a === 'edit') { S.edit[id] = !S.edit[id]; draw(); }
|
|
228
|
-
else if (a === 'defs') { S.defs = !S.defs; draw(); }
|
|
229
|
-
else if (a === 'skipq') { S.skipped[id] = !S.skipped[id]; draw(); }
|
|
230
|
-
else if (a === 'import') importNow();
|
|
231
|
-
else if (a === 'skip') notNow();
|
|
232
|
-
});
|
|
233
|
-
const card = $('#wlCard');
|
|
234
|
-
card.addEventListener('input', (e) => {
|
|
235
|
-
const t = e.target, f = t.dataset && t.dataset.f; if (!f) return;
|
|
236
|
-
if (f === 'taskTitle' || f === 'taskDue') {
|
|
237
|
-
if (S.setup.task_request_id === S.draft.request_id) S.draft.request_id = crypto.randomUUID();
|
|
238
|
-
S.draft[f === 'taskTitle' ? 'title' : 'due'] = t.value;
|
|
239
|
-
const add = document.querySelector('[data-w="task"]'); if (add) add.disabled = !S.draft.title.trim();
|
|
240
|
-
clearTimeout(S.saveTimer); S.saveTimer = setTimeout(remember, 400);
|
|
241
|
-
}
|
|
242
|
-
else if (W.FIELDS.includes(f)) S.about[f] = t.value;
|
|
243
|
-
else if (f === 'title') S.titles[t.dataset.id] = t.value;
|
|
244
|
-
else if (f === 'answer') {
|
|
245
|
-
const q = ((S.structure && S.structure.questions) || []).find((x) => x.id === t.dataset.id);
|
|
246
|
-
S.answers[t.dataset.id] = t.value.trim() ? t.value : (q ? q.default : t.value); // an emptied answer goes back to the default
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
card.addEventListener('change', (e) => {
|
|
250
|
-
const t = e.target, f = t.dataset && t.dataset.f; if (!f) return;
|
|
251
|
-
if (f === 'board') { S.boardOf[t.dataset.id] = t.value; draw(); }
|
|
252
|
-
else if (f === 'answer') draw();
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
/* ── start ────────────────────────────────────────────────────────────────────────────────────── */
|
|
256
|
-
async function start() {
|
|
257
|
-
draw();
|
|
258
|
-
const list = await pmGet('/api/workspaces');
|
|
259
|
-
const all = (list && list.workspaces) || [];
|
|
260
|
-
const mine = all.find((w) => w.id === S.ws) || (!S.ws ? all[0] : null);
|
|
261
|
-
if (!mine) { S.error = 'This folder is not open in PMOS. Start pmos in the folder, then reload.'; $('#wlCard').setAttribute('aria-busy', 'false'); draw(); return; }
|
|
262
|
-
S.ws = mine.id; await refreshSetup();
|
|
263
|
-
S.step = W.STEPS.some(([k]) => k === S.setup.step) ? S.setup.step : 'claude';
|
|
264
|
-
if (S.setup.draft) S.draft = S.setup.draft;
|
|
265
|
-
S.manual = !!S.setup.manual; S.review = S.setup.review || null;
|
|
266
|
-
S.folder = { name: mine.name, root: mine.root };
|
|
267
|
-
const st = await pmGet(`/api/onboarding/status?ws=${encodeURIComponent(S.ws)}`);
|
|
268
|
-
S.imported = !!(st && st.ok && st.state === 'imported');
|
|
269
|
-
if (W.STEPS.some(([k]) => k === params.get('step'))) S.step = params.get('step');
|
|
270
|
-
S.about = W.aboutOf(await pmGet('/api/proactive/settings'));
|
|
271
|
-
if (params.get('step') === 'found') { // back from "Undo this import": the scan is still on disk, but its first-look sentence is not, so the page does not show one
|
|
272
|
-
const sr = await pmGet(`/api/onboarding/structure?ws=${encodeURIComponent(S.ws)}`);
|
|
273
|
-
if (sr && sr.ok) { S.structure = sr; Object.assign(S, W.startChoices(sr)); S.step = 'found'; } else fail(sr, 'Reading the portfolio');
|
|
274
|
-
}
|
|
275
|
-
if (S.step === 'found' && !S.setup.item) {
|
|
276
|
-
const sr = await pmGet('/api/onboarding/structure?ws=' + encodeURIComponent(S.ws));
|
|
277
|
-
if (sr && sr.ok) { S.structure = sr; Object.assign(S, W.startChoices(sr)); }
|
|
278
|
-
}
|
|
279
|
-
draw(true);
|
|
280
|
-
}
|
|
281
|
-
setInterval(async () => {
|
|
282
|
-
if (!S.ws || !S.readRows.some(r => r.state === 'reading') || S.busy) return;
|
|
283
|
-
const before = JSON.stringify(S.readRows); await refreshSetup();
|
|
284
|
-
if (before !== JSON.stringify(S.readRows) && S.step !== 'claude') draw();
|
|
285
|
-
}, 3000);
|
|
286
|
-
start();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="pmos-nonce" content="" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
|
-
<title>PMOS · Welcome</title>
|
|
8
|
-
<!-- The premium Welcome (initiative premium-welcome). The first-run flow in the Briefing's shell: About you, Your sources, What PMOS found, then the premium Briefing. It reads and writes only through the onboarding routes (lib/routes-onboarding.js) and the proactive settings, every press behind the launch nonce.
|
|
9
|
-
It is on the PMOS design system (design-system-meeting-pages): pm-ds, a single column, one pm-block per step; cozy-welcome.css
|
|
10
|
-
is its only page sheet (it no longer loads premium.css). -->
|
|
11
|
-
<link rel="preload" href="/vendor/plus-jakarta-sans-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
12
|
-
<link rel="stylesheet" href="/pm/cozy.css" />
|
|
13
|
-
<link rel="stylesheet" href="/pm/brand.css" />
|
|
14
|
-
<link rel="stylesheet" href="/pm/charts.css" />
|
|
15
|
-
<link rel="stylesheet" href="/pm/komorebi.css" />
|
|
16
|
-
<link rel="stylesheet" href="/pm/ds-bridge.css" />
|
|
17
|
-
<link rel="stylesheet" href="/pm/cozy-welcome.css" />
|
|
18
|
-
</head>
|
|
19
|
-
<body class="pm-ds wl-page">
|
|
20
|
-
<div class="toast" id="toast" role="status"></div>
|
|
21
|
-
<main class="wl-in" id="wlRoot">
|
|
22
|
-
<div class="wl-top"><span class="wl-brand">PMOS <small id="wlCount">Set up</small></span><button class="wl-btn quiet" id="wlSkip" type="button" data-w="skip">Not now</button></div>
|
|
23
|
-
<ol class="wl-steps" id="wlSteps" aria-label="Setup steps"></ol>
|
|
24
|
-
<section class="pm-block wl-card" id="wlCard" aria-live="polite" aria-busy="true"><h1 id="wlH" tabindex="-1">Welcome to PMOS</h1><p class="wl-lede">Reading this folder.</p></section>
|
|
25
|
-
</main>
|
|
26
|
-
<noscript>This page needs JavaScript.</noscript>
|
|
27
|
-
<script type="module" src="/pm/premium-welcome.js"></script>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|