create-pmos 0.692.0 → 0.694.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/adler-moments-test.js +3 -35
- package/workspace/adler-seasons-test.js +1 -1
- package/workspace/briefing-premium-adddoc-test.js +1 -1
- package/workspace/briefing-premium-board-test.js +1 -1
- package/workspace/briefing-premium-doc-edit-test.js +1 -1
- package/workspace/briefing-premium-work-test.js +2 -2
- package/workspace/changelog.json +21 -2
- package/workspace/chat-asks-test.js +1 -1
- package/workspace/core-docs-workflow-test.js +1 -1
- package/workspace/ev-everywhere-test.js +3 -14
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/settings-and-switches.md +0 -1
- package/workspace/impact-screens-test.js +2 -47
- package/workspace/ini-workflow-test.js +1 -1
- package/workspace/lib/board-grill.js +17 -24
- package/workspace/lib/discovery-questions.js +36 -0
- package/workspace/lib/routes-board-grill.js +31 -3
- package/workspace/live-pill-round-test.js +6 -18
- package/workspace/milestone-suggest-test.js +4 -28
- package/workspace/news-viewers-test.js +3 -29
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +3 -3
- package/workspace/premium-briefing-depth-test.js +4 -4
- package/workspace/premium-chat-attach-test.js +3 -2
- package/workspace/premium-chat-chart-tab-test.js +8 -7
- package/workspace/premium-chat-context-test.js +3 -1
- package/workspace/premium-chat-goal-view-test.js +3 -1
- package/workspace/premium-chat-line-test.js +8 -6
- package/workspace/premium-chat-report-tab-test.js +13 -5
- package/workspace/premium-chat-term-test.js +2 -2
- package/workspace/premium-chat-viewer-test.js +10 -16
- package/workspace/premium-core-doc-issue-test.js +7 -2
- package/workspace/premium-discuss-landing-test.js +9 -5
- package/workspace/premium-html-viewer-test.js +7 -3
- package/workspace/premium-link-suggest-test.js +6 -10
- package/workspace/premium-phone-card-test.js +2 -2
- package/workspace/premium-viewer-download-test.js +1 -1
- package/workspace/premium-viewer-flicker-test.js +1 -1
- package/workspace/premium-viewer-share-test.js +2 -2
- package/workspace/premium-viewer-test.js +1 -1
- package/workspace/premium-vw-cal-test.js +1 -1
- package/workspace/premium-vw-copy-test.js +3 -3
- package/workspace/premium-vw-doc-test.js +1 -1
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-work-depth-test.js +2 -2
- package/workspace/program-charter-test.js +1 -12
- package/workspace/program-leave-test.js +2 -2
- package/workspace/program-order-test.js +3 -65
- package/workspace/project-onboard-flow-test.js +5 -5
- package/workspace/public/pm/bd-asks.js +6 -5
- package/workspace/public/pm/cozy-home.css +0 -6
- package/workspace/public/pm/cozy-panels.js +2 -6
- package/workspace/public/pm/cozy-popup.css +1 -0
- package/workspace/public/pm/cozy-popup.js +15 -2
- package/workspace/public/pm/cozy-today-page.css +1 -1
- package/workspace/public/pm/cozy-today.css +0 -14
- package/workspace/public/pm/cozy-viewer.js +14 -38
- package/workspace/public/pm/goal-chat.js +2 -2
- package/workspace/public/pm/home-app.js +8 -67
- package/workspace/public/pm/home-chat.js +1 -1
- package/workspace/public/pm/home-ses-name.js +3 -2
- package/workspace/public/pm/home-today.js +4 -18
- package/workspace/public/pm/ini-view-model.js +2 -2
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/premium-intelligence.html +1 -1
- package/workspace/public/premium-viewer.html +1 -1
- package/workspace/public/premium-workflows.html +1 -1
- package/workspace/ready-dash-ui-test.js +1 -1
- package/workspace/rename-test.js +2 -2
- package/workspace/server.js +11 -12
- package/workspace/session-names-test.js +34 -56
- package/workspace/sort-order-test.js +2 -71
- package/workspace/split-merge-ui-test.js +1 -1
- package/workspace/stage-card-tasks-test.js +1 -1
- package/workspace/stage-card-test.js +1 -1
- package/workspace/task-card-test.js +1 -1
- package/workspace/task-press-test.js +1 -1
- package/workspace/task-views-test.js +1 -1
- package/workspace/test-lists/adler-seasons-art.json +3 -6
- package/workspace/test-lists/batch18-asks.json +1 -1
- package/workspace/test-lists/briefing-premium.json +1 -11
- package/workspace/test-lists/discovery-three-questions.json +5 -0
- package/workspace/test-lists/premium-agreed-viewer.json +1 -1
- package/workspace/test-run.js +0 -2
- package/workspace/test-timings.json +0 -4
- package/workspace/tk-tasks-test.js +3 -17
- package/workspace/viewer-trail-test.js +2 -2
- package/workspace/workflows-setup-test.js +4 -2
- package/workspace/adler-seasons-art-test.js +0 -116
- package/workspace/briefing-premium-initiative-test.js +0 -289
- package/workspace/briefing-premium-products-test.js +0 -209
- package/workspace/briefing-premium-sources-test.js +0 -250
- package/workspace/briefing-premium-test.js +0 -282
- package/workspace/home-other-product-test.js +0 -197
- package/workspace/home-pill-test.js +0 -138
- package/workspace/home-railcard-test.js +0 -196
- package/workspace/home-rows-test.js +0 -389
- package/workspace/panels-test.js +0 -454
- package/workspace/public/premium.html +0 -48
- package/workspace/test-lists/batch18-panels.json +0 -9
- package/workspace/test-lists/home-railcard.json +0 -9
- package/workspace/test-lists/home-sessions-pill.json +0 -6
- package/workspace/test-lists/viewer-home-rows.json +0 -9
|
@@ -23,13 +23,8 @@ body.cz-home { min-height: 100vh; overflow: hidden; }
|
|
|
23
23
|
/* batch 26 item 2 (NpBw): the chat sits on the same soft gradient as on a phone */
|
|
24
24
|
body.cz-home .hm-chat { background: var(--cz-ground); border-radius: var(--radius-panel, 24px); padding: 16px 24px 20px; box-shadow: 0 10px 30px -24px var(--cz-c-9da3ac); }
|
|
25
25
|
body.cz-home .hm-vw .cz-vw { flex-basis: min(500px, max(380px, calc(100vw - 852px))); width: min(500px, max(380px, calc(100vw - 852px))); }
|
|
26
|
-
body.cz-home.hm-folded:not(.cz-vw-rail) .hm-desk { padding-left: 56px; }
|
|
27
26
|
body.cz-home .hm-reopen { top: 12px; right: 12px; }
|
|
28
27
|
}
|
|
29
|
-
.hm-folded:not(.cz-vw-rail) .hm-list { display: none; } /* with a Viewer open, the folded list is the rail (batch 20 item 6) */
|
|
30
|
-
.hm-unfold { display: none; }
|
|
31
|
-
.hm-folded:not(.cz-vw-rail) .hm-unfold { display: grid; place-items: center; position: absolute; left: 10px; top: 24px; z-index: 2; width: 36px; height: 36px; border-radius: var(--radius-md, 12px); border: 0; background: var(--cz-well); color: var(--cz-ink2); cursor: pointer; }
|
|
32
|
-
.hm-folded:not(.cz-vw-rail) .hm-desk { padding-left: 56px; }
|
|
33
28
|
.hm-desk button { font-family: var(--cz-sans); }
|
|
34
29
|
.hm-ib { width: 36px; height: 36px; border-radius: var(--radius-md, 12px); display: grid; place-items: center; border: 0; background: none; color: var(--cz-ink2); cursor: pointer; padding: 0; flex: none; }
|
|
35
30
|
.hm-ib:hover { background: var(--cz-well2); }
|
|
@@ -493,7 +488,6 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
493
488
|
* where the phone chat has no button */
|
|
494
489
|
body.cz-home #hmFoot::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 72px; pointer-events: none; background: var(--cz-ground); background-size: 100% 1000px; -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%); mask-image: linear-gradient(to bottom, transparent, black 40%); } /* the ground is a gradient: its first colours meet the composer's top */
|
|
495
490
|
.hm-x { opacity: 1; }
|
|
496
|
-
.hm-unfold, .hm-folded .hm-unfold { display: none; }
|
|
497
491
|
.hm-reopen { display: none; }
|
|
498
492
|
.hm-bub, .hm-qb { max-width: 88%; }
|
|
499
493
|
.hm-sheet .cz-fabw { z-index: 45; }
|
|
@@ -157,7 +157,7 @@ function layout() {
|
|
|
157
157
|
sync();
|
|
158
158
|
const B = document.body, phone = isPhone(), man = managed(), ids = [C, ...vs().map((p) => p.id)];
|
|
159
159
|
const back = S.man && !man; // back to today's split: cozy-viewer.js decides the width and the rail again
|
|
160
|
-
if (back) { S.keepList = false; P.rail(
|
|
160
|
+
if (back) { S.keepList = false; P.rail(false); }
|
|
161
161
|
S.man = man;
|
|
162
162
|
B.classList.toggle('cz-pn', !phone);
|
|
163
163
|
B.classList.toggle('cz-pn-man', man);
|
|
@@ -184,11 +184,7 @@ function layout() {
|
|
|
184
184
|
if (man && !phone && !S.page) {
|
|
185
185
|
const room = S.desk.clientWidth - 64 - (S.row.length - 1) * 22; // the desk less its padding and the gaps
|
|
186
186
|
const list = document.getElementById('hmList'), lw = list ? list.offsetWidth || 316 : 0;
|
|
187
|
-
|
|
188
|
-
// unfold (remembered), and not after the rail's "Show the list" in this layout (batch 25 item 12: the PM can always open or close it)
|
|
189
|
-
const own = P.owned ? P.owned() : null;
|
|
190
|
-
const startFold = !S.keepList && !(P.chosen && P.chosen()) && S.row.length === 1 && S.row[0] !== C;
|
|
191
|
-
const fold = own !== null ? own || startFold : !S.keepList && (!S.row.includes(C) || room - lw < S.row.length * PANEL);
|
|
187
|
+
const fold = !S.keepList && (!S.row.includes(C) || room - lw < S.row.length * PANEL);
|
|
192
188
|
if (fold !== P.railOn()) P.rail(fold);
|
|
193
189
|
}
|
|
194
190
|
if (back) P.rest(); else P.relayout();
|
|
@@ -38,6 +38,7 @@ body.cz-pop-drag, body.cz-pop-drag * { cursor: col-resize !important; user-selec
|
|
|
38
38
|
.cz-pop-t span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
39
39
|
.cz-pop-go:focus-visible, .cz-pop-t:focus-visible, .cz-pop-ib:focus-visible, .cz-pop-x:focus-visible, .cz-pop-sr:focus-visible, .cz-pop-f:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
40
40
|
.cz-pop-tw { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 0; }
|
|
41
|
+
.cz-pop-tw .hm-ren { flex: 1 1 100%; } /* renaming: the field fills the title */
|
|
41
42
|
/* the context line under the session (round 3 point 19a): one quiet line, cut with … */
|
|
42
43
|
.cz-pop-cx { flex: 1 0 100%; min-width: 0; padding-left: 10px; font-size: var(--fs-meta); color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
43
44
|
.cz-pop-mm { left: auto; right: 12px; width: 260px; }
|
|
@@ -37,7 +37,7 @@ const I = {
|
|
|
37
37
|
chat: 'M5 6.5A2.5 2.5 0 0 1 7.5 4h9A2.5 2.5 0 0 1 19 6.5v7a2.5 2.5 0 0 1-2.5 2.5H11l-4 3.5V16h.5A2.5 2.5 0 0 1 5 13.5z',
|
|
38
38
|
hide: 'M4 5h16v14H4zM14.5 5v14M9 10l2 2-2 2', close: 'M6 6l12 12M18 6L6 18', down: 'M7 10l5 5 5-5', back: 'M15 6l-6 6 6 6',
|
|
39
39
|
plus: 'M12 5v14M5 12h14', list: 'M5 7h14M5 12h14M5 17h14', find: 'M11 4.5a6.5 6.5 0 1 0 0 13a6.5 6.5 0 1 0 0-13M16 16l4 4', flag: 'M5 21V4h11l-2 4 2 4H5',
|
|
40
|
-
side: 'M3.5 5h17v14h-17zM12 5v14', more: 'M5 12h.01M12 12h.01M19 12h.01',
|
|
40
|
+
side: 'M3.5 5h17v14h-17zM12 5v14', more: 'M5 12h.01M12 12h.01M19 12h.01', pen: 'M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4',
|
|
41
41
|
};
|
|
42
42
|
const CLAUDE = { key: 'claude', name: 'PMOS', initial: 'P' };
|
|
43
43
|
const MIN_WORK = 480, MIN_CHAT = 320, DEF_CHAT = 460, DAY_MS = 864e5, POLL = 6000, UNDO = 6000, CHOOSER = 5;
|
|
@@ -56,6 +56,8 @@ const S = {
|
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
/* ── the page's hooks ── */
|
|
59
|
+
/** The page's chat changed a session (a rename): the title draws again now, and the sessions are read again. */
|
|
60
|
+
export function refresh() { if (!S.open) return; drawTitle(); read(); }
|
|
59
61
|
export function useChat(p) { S.home = p && p.el && typeof p.open === 'function' ? p : null; }
|
|
60
62
|
export function setTitles(fn) { S.titles = typeof fn === 'function' ? fn : null; }
|
|
61
63
|
export function setOpener(fn) { S.opener = typeof fn === 'function' ? fn : null; }
|
|
@@ -312,10 +314,19 @@ function rowHtml(r, sel) {
|
|
|
312
314
|
function drawTitle() {
|
|
313
315
|
if (!S.title || !S.open) return;
|
|
314
316
|
if (S.view === 'all') {
|
|
317
|
+
delete S.title.dataset.ren;
|
|
315
318
|
S.title.innerHTML = `<button type="button" class="cz-pop-ib" data-pop="unall" aria-label="Back to the session you were in" title="Back to the session you were in">${svg(I.back)}</button><b class="t-row">All sessions</b>`;
|
|
316
319
|
return;
|
|
317
320
|
}
|
|
318
|
-
|
|
321
|
+
// a chat with no session yet (an address's ?about, Discuss in chat) is named by what it is about, not "Ask PMOS"
|
|
322
|
+
const ct = !curRow() && S.chat && S.chat.current ? S.chat.current() : null;
|
|
323
|
+
const r = curRow(), name = r ? r.name : (ct && ct.title) || 'Ask PMOS', on = !!S.menu && S.menu.dataset.kind !== 'more';
|
|
324
|
+
// a rename in progress: the title is the name field (home-ses-name.js draws it; Enter saves, Esc cancels)
|
|
325
|
+
if (r && S.home && S.home.renaming && S.home.renaming(r.id)) {
|
|
326
|
+
// the sessions' poll draws the title again: the same field stays as it is, so the typing and the focus stay in it
|
|
327
|
+
const h = S.home.nameHtml(r.id, r.name); if (S.title.dataset.ren !== h) { S.title.innerHTML = h; S.title.dataset.ren = h; } return;
|
|
328
|
+
}
|
|
329
|
+
delete S.title.dataset.ren;
|
|
319
330
|
// one quiet context line under the session (round 3 point 19a, the phone chat's line): what the chat is about, said once
|
|
320
331
|
const a = S.about, cx = a && a.title ? (a.kind === 'initiative' ? 'Initiative' : a.kind === 'program' ? 'Program' : 'About') + ' · ' + a.title : '';
|
|
321
332
|
S.title.innerHTML = `<button type="button" class="cz-pop-t" data-pop="pick" aria-haspopup="menu" aria-expanded="${on}" title="Change session" aria-label="${esc(name + '. Change session')}"><span>${esc(name)}</span>${svg(I.down, 16)}</button>`
|
|
@@ -352,6 +363,7 @@ function openMore() {
|
|
|
352
363
|
m.innerHTML = `<button type="button" class="cz-pop-f" role="menuitem" data-pop="where">${svg(I.side, 16)}${beside() ? 'Open work in this popup' : 'Open work beside the page'}</button>`
|
|
353
364
|
+ `<button type="button" class="cz-pop-f" role="menuitem" data-pop="hide">${svg(I.hide, 16)}Hide the chat<span>Ctrl J</span></button>`
|
|
354
365
|
+ `<button type="button" class="cz-pop-f" role="menuitem" data-pop="pick">${svg(I.list, 16)}Sessions</button>`
|
|
366
|
+
+ (r && S.home && S.home.nameHtml ? `<button type="button" class="cz-pop-f" role="menuitem" data-hm-rn="${esc(r.id)}">${svg(I.pen, 16)}Rename session</button>` : '')
|
|
355
367
|
+ (r && r.live ? `<hr><button type="button" class="cz-pop-f" role="menuitem" data-end="${esc(r.id)}">${svg(I.close, 16)}End session</button>` : '');
|
|
356
368
|
S.right.appendChild(m); S.menu = m;
|
|
357
369
|
const mb = S.card.querySelector('[data-pop="more"]'); if (mb) mb.setAttribute('aria-expanded', 'true');
|
|
@@ -441,6 +453,7 @@ async function newSession() {
|
|
|
441
453
|
}
|
|
442
454
|
|
|
443
455
|
function onClick(e) {
|
|
456
|
+
if (e.target.closest('[data-hm-rn]')) { closeMenu(); return; } // Rename session: home-ses-name.js takes the press from here
|
|
444
457
|
const end1 = e.target.closest('[data-end]'); if (end1) { e.preventDefault(); end(end1.dataset.end); return; }
|
|
445
458
|
const row = e.target.closest('[data-sid]'); if (row) { e.preventDefault(); pick(row.dataset.sid); return; }
|
|
446
459
|
const b = e.target.closest('[data-pop]'); if (!b) return;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* end of this file) in place of Home's list. */
|
|
9
9
|
|
|
10
10
|
@media (min-width: 761px) {
|
|
11
|
-
body.cz-today #hmDesk > .hm-list, body.cz-today #hmDesk > .hm-chat, body.cz-today #hmDesk > .cz-pn-div, body.cz-today
|
|
11
|
+
body.cz-today #hmDesk > .hm-list, body.cz-today #hmDesk > .hm-chat, body.cz-today #hmDesk > .cz-pn-div, body.cz-today .hm-top { display: none !important; }
|
|
12
12
|
/* the white page panel: the only big container, beside the rail (as the Board's) */
|
|
13
13
|
body.cz-home.cz-today #hmDesk { display: block; overflow: auto; top: 16px; right: 16px; bottom: 16px; left: var(--cz-railx, 16px); padding: 28px 32px 32px; background: var(--cz-card); border-radius: 28px; box-shadow: var(--cz-lift); }
|
|
14
14
|
/* the page starts at the left edge of the panel, like Work and Library; on a wide screen the log stops at about 1100 px */
|
|
@@ -530,20 +530,6 @@ body.cz-home .hm-hd.hv-bar > .hv-hi { flex: 1 0 auto; max-width: 100%; }
|
|
|
530
530
|
/* the weekly review done for the week (batch 17 item 4-B, AdM1): Adler calm beside the words */
|
|
531
531
|
.rv-done { display: flex; align-items: center; gap: 10px; }
|
|
532
532
|
|
|
533
|
-
/* The folded rail's card (batch 18 item 14, FlA1–FlA5): beside the pressed tile, Home's popover look, Home's own rows inside. The pill's
|
|
534
|
-
* sessions open in place under the row (.hv-rcs), not as a second popover. Its left and top are set from the tile (home-app.js). */
|
|
535
|
-
.hv-rc { position: fixed; z-index: 60; width: 372px; max-width: calc(100vw - 96px); max-height: calc(100vh - 24px); overflow-y: auto; background: var(--cz-card); border-radius: 20px; padding: 6px; box-shadow: 0 24px 50px -20px rgba(42,46,53,.4), 0 0 0 1px var(--cz-hair); box-sizing: border-box; text-align: left; }
|
|
536
|
-
.hv-rch { display: flex; align-items: center; gap: 6px; min-height: 44px; }
|
|
537
|
-
.hv-rch .hv-pt { flex: 0 1 auto; gap: 8px; }
|
|
538
|
-
.hv-rch .hv-pt .hv-tl { width: 26px; height: 26px; border-radius: 8px; }
|
|
539
|
-
.hv-rch .hv-pt > svg { color: var(--cz-ink3); flex: none; }
|
|
540
|
-
.hv-rch .hv-msd { margin-left: auto; }
|
|
541
|
-
.hv-rch .hv-ib { margin-left: auto; flex: none; }
|
|
542
|
-
.hv-rch .hv-msd + .hv-ib { margin-left: 2px; }
|
|
543
|
-
.hv-rcb .hm-none { margin: 6px 10px 10px; }
|
|
544
|
-
.hv-rcs { margin: 0 0 4px; padding: 4px; background: color-mix(in srgb, var(--cz-well) 55%, var(--cz-card)); border-radius: 14px; }
|
|
545
|
-
.hv-rcs .hv-r::before { display: none; }
|
|
546
|
-
.hv-rcs .hv-r.safe { background: var(--cz-bluebg); border-radius: 14px; }
|
|
547
533
|
/* Home's one grill line (canvas FcPhone, Home): quiet, with ✦ at its end */
|
|
548
534
|
.hv-gn { display: flex; align-items: center; gap: 8px; color: var(--cz-ink2); }
|
|
549
535
|
.hv-gn span { flex: 1; min-width: 0; }
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
* word press, only where a decision has two answers (Return it | Keep it as is).
|
|
79
79
|
* czSections([{ id, title, count, open, render | html, tail? }], { key }) → the folding rows. A row folds and unfolds in place, and the fold
|
|
80
80
|
* is remembered per key and id (localStorage, a private window forgets it). render(): a string of markup, called once when drawn.
|
|
81
|
-
* widthOf(kind) · setWidth(px) · wide(on?) · railOn() for the page and the tests;
|
|
81
|
+
* widthOf(kind) · setWidth(px) · wide(on?) · railOn() for the page and the tests; railSync(key?) for a page
|
|
82
82
|
* that draws a card for a rail tile (Home).
|
|
83
83
|
* The look is in cozy-vw-shell.css (loaded here once) over cozy.css (.cz-vw…). The old #dlg path (premium-viewer.js) is separate. */
|
|
84
84
|
import { czPlaceholder } from './cozy-placeholder.js';
|
|
@@ -128,13 +128,7 @@ const kindKey = (k) => String(k || 'item').trim().toLowerCase().replace(/^file
|
|
|
128
128
|
* key or the last open() went to, so the exported API always speaks of the Viewer used last. G is what the page has once: its list's rail,
|
|
129
129
|
* the listeners, the rail's card. Only the first instance (#czViewer) writes the browser history; another keeps its own ← → trail.
|
|
130
130
|
* Without cozy-panels.js (Board, Intelligence) the limit stays 1 and there is one Viewer, as before. */
|
|
131
|
-
const G = { chat: null, subs: [],
|
|
132
|
-
/** The list's fold, when the page owns it (Home, batch 20 item 6): { folded() → bool, show() }. Then only the list's own icon folds or unfolds it:
|
|
133
|
-
* a Viewer's width, its reset, open wide and its close never do. null: the Viewer folds the list to a rail as it needs (a page without one). */
|
|
134
|
-
export function listFold(o) { G.own = o && typeof o.folded === 'function' ? o : null; }
|
|
135
|
-
const owned = () => (G.own ? !!G.own.folded() : null);
|
|
136
|
-
/** true: the PM has pressed the list's fold or unfold, so a full Viewer keeps the list as the PM left it (no starting fold). */
|
|
137
|
-
const chosen = () => !!(G.own && typeof G.own.chosen === 'function' && G.own.chosen());
|
|
131
|
+
const G = { chat: null, subs: [], railKey: null, rail: false, lw: 0, tick: 0, limit: 1, beside: null, place: null, managed: null, popH: null, popNext: null };
|
|
138
132
|
const mk = (i) => ({ i, el: null, cur: null, back: null, stack: [], fwd: [], wide: false, w: 0, drill: false, over: false, used: 0, ph: false, via: '', pop: false });
|
|
139
133
|
let V = mk(0);
|
|
140
134
|
const ALL = [V];
|
|
@@ -211,7 +205,9 @@ export function headHtml(it) {
|
|
|
211
205
|
const from = o.pop && o.from ? `<button type="button" data-cz-vw-path="from">${esc(o.from)}</button><span aria-hidden="true">›</span>` : '';
|
|
212
206
|
const pth = o.pop && ((o.path || []).length || from) ? `<nav class="cz-vw-path" aria-label="Path">${from}${(o.path || []).map((t, i, a) => `<button type="button" data-cz-vw-path="${i - a.length}">${esc(t || 'Back')}</button><span aria-hidden="true">›</span>`).join('')}</nav>` : '';
|
|
213
207
|
// kindChip: the small kind chip after the title in the popup (Meeting notes, Report, Prototype)
|
|
214
|
-
|
|
208
|
+
// a read-only item (an ended session's terminal) says so in the popup too, where the kind line is not drawn (honest state)
|
|
209
|
+
const kc = o.kindChip || (o.pop && /\bread only\b/i.test(o.kind || '') ? 'Read only' : '');
|
|
210
|
+
const kchip = o.pop && kc ? `<span class="cz-vw-kchip">${esc(kc)}</span>` : '';
|
|
215
211
|
const chip = o.chip && (o.chip.n > 0 || o.chip.looking) ? `<button type="button" class="cz-vw-chip${o.chip.looking ? ' live' : ''}" data-cz-vw="chip" aria-haspopup="dialog" aria-label="${esc(o.chip.label || 'PMOS proposes ' + o.chip.n + '. Open')}" title="${esc(o.chip.label || 'PMOS proposes')}">${svg(ICONS.spark, 13, 2)}${o.chip.n > 0 && !o.chip.quiet ? `<b>${esc(o.chip.n)}</b>` : ''}</button>` : '';
|
|
216
212
|
const canBack = o.canBack || !!from;
|
|
217
213
|
return (canBack || phone ? ib('back', o.canBack ? (o.backTo ? 'Back to ' + o.backTo : 'Back') : from ? 'Back to ' + o.from : 'Close the viewer', P.back) : '')
|
|
@@ -319,12 +315,9 @@ function setRail(on) {
|
|
|
319
315
|
bar.innerHTML = `<button type="button" class="cz-vw-ib" data-cz-vw-rail="show" aria-label="Show the list" title="Show the list">${svg(P.list, 18)}</button><div class="cz-vw-railtiles"></div>`;
|
|
320
316
|
bar.addEventListener('click', (e) => {
|
|
321
317
|
const b = e.target.closest('[data-cz-vw-rail]'); if (!b) return;
|
|
322
|
-
if (b.dataset.czVwRail === 'show' && G.own) { if (G.own.show) G.own.show(); if (G.rail) setRail(false); return; } // the page unfolds its own list; a layout that folded it never holds it folded
|
|
323
318
|
if (b.dataset.czVwRail === 'show' && G.managed && ALL.some((x) => shown(x) && G.managed('v' + x.i))) { setRail(false); return; } // cozy-panels.js lays it out
|
|
324
319
|
if (b.dataset.czVwRail === 'show') { V.wide = false; apply(Math.min(V.w, sideMax())); redraw(); return; }
|
|
325
|
-
// a group's tile: the
|
|
326
|
-
if (G.card) { G.card(b.dataset.czVwRail, b, e.detail === 0); return; }
|
|
327
|
-
// a page without a card: the list comes back, at that group
|
|
320
|
+
// a group's tile: the list comes back, at that group
|
|
328
321
|
const src = list.querySelector('[data-cz-rail-tile="' + CSS.escape(b.dataset.czVwRail) + '"]');
|
|
329
322
|
V.wide = false; apply(Math.min(V.w, sideMax())); redraw();
|
|
330
323
|
if (src && src.scrollIntoView) src.scrollIntoView({ block: 'nearest' });
|
|
@@ -338,21 +331,18 @@ function setRail(on) {
|
|
|
338
331
|
function railTiles(list, bar) {
|
|
339
332
|
const tiles = [...list.querySelectorAll('[data-cz-rail-tile]')].slice(0, 8);
|
|
340
333
|
const box = bar.querySelector('.cz-vw-railtiles');
|
|
341
|
-
const sig = tiles.map((t) => t.outerHTML).join('')
|
|
334
|
+
const sig = tiles.map((t) => t.outerHTML).join('');
|
|
342
335
|
if (box.__sig !== sig) {
|
|
343
336
|
box.__sig = sig; box.innerHTML = '';
|
|
344
337
|
tiles.forEach((t) => { // a copy of the tile itself (its tint, initials and dot), in a press that names the group
|
|
345
338
|
const nm = t.dataset.czRailName || t.textContent.trim(), here = t.hasAttribute('data-cz-rail-here');
|
|
346
339
|
const btn = document.createElement('button'); btn.type = 'button'; btn.className = 'cz-vw-railtile' + (here ? ' here' : ''); btn.dataset.czVwRail = t.dataset.czRailTile;
|
|
347
|
-
btn.setAttribute('aria-label',
|
|
348
|
-
if (G.card) btn.setAttribute('aria-haspopup', 'dialog');
|
|
340
|
+
btn.setAttribute('aria-label', 'Show the list at ' + nm); btn.title = nm;
|
|
349
341
|
const c = t.cloneNode(true); c.removeAttribute('data-cz-rail-tile'); c.removeAttribute('data-cz-rail-name'); c.removeAttribute('data-cz-rail-here'); btn.appendChild(c); box.appendChild(btn);
|
|
350
342
|
});
|
|
351
343
|
}
|
|
352
|
-
box.querySelectorAll('.cz-vw-railtile').forEach((b) => { const on = b.dataset.czVwRail === G.railKey; b.classList.toggle('on', on);
|
|
344
|
+
box.querySelectorAll('.cz-vw-railtile').forEach((b) => { const on = b.dataset.czVwRail === G.railKey; b.classList.toggle('on', on); });
|
|
353
345
|
}
|
|
354
|
-
/** A page that draws a card for a rail tile (Home): fn(key, tile, byKey) on a tile's press, in place of bringing the list back. */
|
|
355
|
-
export function railCard(fn) { G.card = typeof fn === 'function' ? fn : null; railSync(); }
|
|
356
346
|
/** The tile whose card is open (null: none): its ring and aria-expanded. The page calls it after a redraw of its list, so the rail's tiles
|
|
357
347
|
* follow the list (a new "here" bar, a dot). */
|
|
358
348
|
export function railSync(key) {
|
|
@@ -360,8 +350,6 @@ export function railSync(key) {
|
|
|
360
350
|
const list = listEl(), bar = G.rail && list && list.querySelector(':scope > .cz-vw-railbar');
|
|
361
351
|
if (bar) railTiles(list, bar);
|
|
362
352
|
}
|
|
363
|
-
/** The next open() keeps the Viewer as wide as it is and the rail folded (a pick from the rail's card, FlA4After). */
|
|
364
|
-
export function keepWide() { G.hold = Date.now() + 2000; }
|
|
365
353
|
const sideMax = () => { const r = room(); return r.float ? r.side : Math.max(MIN, r.side); };
|
|
366
354
|
/** Set the width in px: past what the chat leaves, the list folds to a rail first; never under 420 or over about 70%. */
|
|
367
355
|
function apply(px) {
|
|
@@ -372,17 +360,6 @@ function apply(px) {
|
|
|
372
360
|
// cozy-panels.js lays the panels out itself (two Viewers, a Viewer full or sliding over): it sizes this one, the rail is its own call
|
|
373
361
|
if (G.managed && G.managed('v' + V.i)) { el.style.width = ''; el.classList.toggle('cz-vw-w2', el.offsetWidth >= W2); return; } // its flex is the engine's; V.w keeps the width beside the chat
|
|
374
362
|
let r = room();
|
|
375
|
-
if (G.own) {
|
|
376
|
-
// the page owns the fold: the rail is its choice, and the Viewer takes only the room beside it (batch 20 item 6)
|
|
377
|
-
setRail(owned()); r = room();
|
|
378
|
-
const over = !r.float && r.hasList && r.side < MIN && !!(el.parentNode && el.parentNode.hasAttribute('data-cz-vw-overlay'));
|
|
379
|
-
if (over !== V.over) { V.over = over; document.body.classList.toggle('cz-vw-over', over); }
|
|
380
|
-
const cap = r.float ? r.wideMax : over ? r.right : Math.max(MIN, G.rail ? r.wideMax : r.side);
|
|
381
|
-
const w = Math.max(Math.min(MIN, cap), Math.min(Math.round(px || r.def), cap));
|
|
382
|
-
V.w = w; el.style.width = w + 'px'; el.style.flexBasis = w + 'px'; el.classList.toggle('cz-vw-w2', w >= W2);
|
|
383
|
-
const g = el.querySelector('.cz-vw-grip'); if (g) { g.setAttribute('aria-valuenow', String(w)); g.setAttribute('aria-valuemin', String(MIN)); g.setAttribute('aria-valuemax', String(cap)); }
|
|
384
|
-
return;
|
|
385
|
-
}
|
|
386
363
|
// a host that keeps its list (Home, HbCNarrow): with no room beside the chat the Viewer lies over the chat, at most the room right of the list
|
|
387
364
|
const over = !r.float && r.hasList && r.side < MIN && !V.wide && !!(el.parentNode && el.parentNode.hasAttribute('data-cz-vw-overlay'));
|
|
388
365
|
if (over !== V.over) { V.over = over; document.body.classList.toggle('cz-vw-over', over); }
|
|
@@ -413,7 +390,7 @@ export function wide(on) {
|
|
|
413
390
|
redraw();
|
|
414
391
|
return V.wide;
|
|
415
392
|
}
|
|
416
|
-
function resetW() { if (!V.cur) return; store.set('cz-vw-w:' + kindKey(V.cur.kind), null); V.wide = false;
|
|
393
|
+
function resetW() { if (!V.cur) return; store.set('cz-vw-w:' + kindKey(V.cur.kind), null); V.wide = false; setRail(false); apply(room().def); redraw(); }
|
|
417
394
|
function grip(el) {
|
|
418
395
|
const g = document.createElement('div'), x = V;
|
|
419
396
|
g.className = 'cz-vw-grip'; g.setAttribute('role', 'separator'); g.setAttribute('aria-orientation', 'vertical'); g.tabIndex = 0;
|
|
@@ -688,8 +665,7 @@ export function open(it) {
|
|
|
688
665
|
body.className = 'cz-vw-body'; body.onclick = null; body.oninput = null; body.onchange = null; body.onkeydown = null; // what one item's render added to the body does not reach the next
|
|
689
666
|
const wasHidden = el.hidden;
|
|
690
667
|
el.hidden = false;
|
|
691
|
-
|
|
692
|
-
if (!hold && !(sameKind && !wasHidden && (V.wide || G.rail))) { const k = widthOf(o.kind); V.wide = false; apply(k || room().def); redraw(); }
|
|
668
|
+
if (!(sameKind && !wasHidden && (V.wide || G.rail))) { const k = widthOf(o.kind); V.wide = false; apply(k || room().def); redraw(); }
|
|
693
669
|
if (typeof o.render === 'function') o.render(body); else if (o.html) body.innerHTML = o.html;
|
|
694
670
|
emit();
|
|
695
671
|
if (isPhone()) el.focus();
|
|
@@ -823,7 +799,7 @@ function holdable(el, x) {
|
|
|
823
799
|
}
|
|
824
800
|
/** A hold that opened the trail list is not also a press. */
|
|
825
801
|
function held() { if (HOLD.fired && Date.now() - HOLD.fired < 800) { HOLD.fired = 0; return true; } return false; }
|
|
826
|
-
const PAGES = { '/
|
|
802
|
+
const PAGES = { '/': 'Today', '/today.html': 'Today', '/premium-board.html': 'Board', '/premium-intelligence.html': 'Intelligence', '/premium-insights.html': 'Intelligence' };
|
|
827
803
|
function trailMenu(b, x) {
|
|
828
804
|
if (!V.cur || !V.el) return;
|
|
829
805
|
const old = V.el.querySelector('.cz-vw-trail'); if (old) old.remove();
|
|
@@ -881,7 +857,7 @@ export const panels = {
|
|
|
881
857
|
relayout() { ALL.filter(shown).forEach((x) => on(x, () => { apply(V.wide ? room().wideMax : V.w || room().def); redraw(); })); },
|
|
882
858
|
/** Back beside the chat after the engine laid it out: the width its kind keeps, else the default. */
|
|
883
859
|
rest() { ALL.filter(shown).forEach((x) => on(x, () => { const k = widthOf(V.cur.kind); V.wide = false; apply(k || room().def); redraw(); })); },
|
|
884
|
-
rail(v) { setRail(!!v); }, railOn: () => G.rail,
|
|
860
|
+
rail(v) { setRail(!!v); }, railOn: () => G.rail,
|
|
885
861
|
};
|
|
886
862
|
/* ── the popup (slice 2, pm/cozy-popup.js) ── */
|
|
887
863
|
/** cozy-popup.js registers { host() → the popup's left element, show(pop) → the popup is shown with the chat about pop }. */
|
|
@@ -895,4 +871,4 @@ const popShown = () => ALL.some((y) => y.pop && shown(y));
|
|
|
895
871
|
export function popNext(pop) { G.popNext = pop ? { pop, t: Date.now() } : null; }
|
|
896
872
|
/** Close the popup's Viewer (an item with unsaved changes asks first). */
|
|
897
873
|
export function closePop() { const x = ALL.find((y) => y.pop && shown(y)); if (x) { use(x); guarded(close); } }
|
|
898
|
-
if (typeof window !== 'undefined') window.czViewer = { open, close, closeOf, bodyOf, back, forward, trail, replaceUrl, drill, setPresses, setChip, setCheck, isOpen, current, body, onChange, placeholder, retitle, czSummary, czSections, widthOf, setWidth, wide, railOn,
|
|
874
|
+
if (typeof window !== 'undefined') window.czViewer = { open, close, closeOf, bodyOf, back, forward, trail, replaceUrl, drill, setPresses, setChip, setCheck, isOpen, current, body, onChange, placeholder, retitle, czSummary, czSections, widthOf, setWidth, wide, railOn, railSync, ICONS };
|
|
@@ -100,7 +100,7 @@ export function methodHtml(block, { live = false, open = false } = {}) {
|
|
|
100
100
|
const why = block.why ? String(block.why) : m ? m.fits : '';
|
|
101
101
|
const inner = `Method: <b>${esc(name)}</b>${live ? P(ICON.down, 14) : ''}${why ? `<em>${esc(why)}</em>` : ''}`;
|
|
102
102
|
if (!live) return `<p class="gmeth">${inner}</p>`;
|
|
103
|
-
const menu = `<span class="gmenu" role="menu" aria-label="Ask with another method"${open ? '' : ' hidden'}>${METHODS.filter((x) => !m || x.id !== m.id).map((x) => `<button type="button" role="menuitem" data-goal-method="${esc(x.id)}"><b>${esc(x.name)}</b><em>${esc(x.fits)}</em></button>`).join('')}</span>`;
|
|
103
|
+
const menu = `<span class="gmenu" role="menu" aria-label="Ask with another method"${open ? ' data-esc-layer' : ' hidden'}>${METHODS.filter((x) => !m || x.id !== m.id).map((x) => `<button type="button" role="menuitem" data-goal-method="${esc(x.id)}"><b>${esc(x.name)}</b><em>${esc(x.fits)}</em></button>`).join('')}</span>`;
|
|
104
104
|
return `<span class="gmw"><button type="button" class="gmeth" data-goal-meth aria-haspopup="menu" aria-expanded="${open}" title="Change the method">${inner}</button>${menu}</span>`;
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -183,7 +183,7 @@ export function editedDraft(base, fields) {
|
|
|
183
183
|
/** The choice when /goal is typed while a goal works here: one goal runs in a chat at a time. here: the working goal's sentence.
|
|
184
184
|
* newChat: false where this page cannot open a new chat (then only "Here" is offered). Esc or another message closes it (home-chat.js). */
|
|
185
185
|
export function goalChoiceHtml(here, { newChat = true } = {}) {
|
|
186
|
-
return `<div class="hm-a gchoice"><div class="hm-ab"><div class="askc" role="group" aria-label="Where should the new goal go?"><p class="k">One goal runs in a chat at a time</p><b>Where should the new goal go?</b><div class="gchips">`
|
|
186
|
+
return `<div class="hm-a gchoice" data-esc-layer><div class="hm-ab"><div class="askc" role="group" aria-label="Where should the new goal go?"><p class="k">One goal runs in a chat at a time</p><b>Where should the new goal go?</b><div class="gchips">`
|
|
187
187
|
+ (newChat ? `<button type="button" class="gchip rec" data-goal-where="new">In a new chat<small>recommended · this goal keeps going</small></button>` : '')
|
|
188
188
|
+ `<button type="button" class="gchip" data-goal-where="here">Here, instead of this goal<small class="warn">stops “${esc(here || 'the goal')}”</small></button>`
|
|
189
189
|
+ '</div></div></div></div>';
|
|
@@ -136,7 +136,7 @@ const S = {
|
|
|
136
136
|
ini: P.get('ini') || null, // the initiative whose page is open ('product' for the product)
|
|
137
137
|
head: null, // the selected heading of the list: a program's or a product's group key
|
|
138
138
|
sel: null, // the selected row's id
|
|
139
|
-
allNeeds: false, kids: new Set(), shut: new Set(JSON.parse(store.get('pmos.home.shut') || '[]')),
|
|
139
|
+
allNeeds: false, kids: new Set(), shut: new Set(JSON.parse(store.get('pmos.home.shut') || '[]')),
|
|
140
140
|
IM: null, IMid: null, // the selected initiative's model (GET /api/initiative-premium)
|
|
141
141
|
iniWs: {}, // another product's initiative found by a read (loadIni), by id: the workspace it was found in
|
|
142
142
|
doneOpen: false, stepsMore: false, sheet: false, rec: {}, pin: new Set(JSON.parse(store.get('pmos.home.pin') || '[]')),
|
|
@@ -385,7 +385,6 @@ function homeListHtml() {
|
|
|
385
385
|
const T = null; // the top of Home (A′, HmA2) is off: the list is navigation only (Wawan 2026-11-17); topOf(M) draws it again
|
|
386
386
|
S.topHtml = T ? TOP.topHtml(T) : ''; // drawn into its own node (drawTopNode), so a late read changes the top, never the rows under it
|
|
387
387
|
const sel = S.sel || (S.ini && S.ini !== 'product' ? 'i:' + S.ini : null);
|
|
388
|
-
S.lo = { sel, ses: S.ses, restOpen: (k) => S.rest.has(k), pin: S.pin, phone: false }; // the folded rail's card draws Home's rows with these
|
|
389
388
|
return TD.listHtml(M, todayModel(), {
|
|
390
389
|
sel, selHead: S.head, ses: S.ses, pOpen, here: isPhone() ? null : TD.groupOfOpen(M, sel) || S.head, restOpen: (k) => S.rest.has(k), cap: S.cap, pin: S.pin, avHtml, ready: S.ready, err: S.D.err.length ? S.D.err[0] : '',
|
|
391
390
|
pick: S.D.pick, tones: pickTones(), review: R, mic: canDictate(), phone: isPhone(), day: S.day, news: S.news && S.news.ok ? S.news.count : 0, top: S.ready ? revealLeft(S.reveal) + RECROW.html() + (S.drift ? DRIFT.rowHtml(S.drift.c, { esc, sel: S.sel === 'drift' }) : '') + (T ? '<i data-hm-topslot hidden></i>' : '') : '', held: T ? T.held : null, // chief-of-staff C3: the Mentions and Your impact cards are gone; their asks land in Your move
|
|
@@ -916,9 +915,7 @@ function drawList() {
|
|
|
916
915
|
if (FST && sc.firstElementChild !== FST) sc.prepend(FST);
|
|
917
916
|
if (SETUP_CHECKLIST && !sc.contains(SETUP_CHECKLIST)) sc.prepend(SETUP_CHECKLIST);
|
|
918
917
|
if (PHC && PHC.el.parentNode === sc) PHC.el.remove();
|
|
919
|
-
document.body.classList.toggle('hm-folded', S.folded && !isPhone());
|
|
920
918
|
document.body.classList.toggle('hm-plist', isPhone() && !S.phoneChat); // a phone: the list is the page until a row opens its conversation (HmPhone)
|
|
921
|
-
drawRailCard();
|
|
922
919
|
drawRecTop();
|
|
923
920
|
drawAsk();
|
|
924
921
|
if (TDY) TDY.draw(); // Today on a desk (today.html): the log and the agenda, from the same reads
|
|
@@ -947,47 +944,6 @@ function drawAsk() {
|
|
|
947
944
|
const h = askHtml(askGroups(R.all, S.D.sessions || [], { titleOf: (id) => (iniRowOf(id) ? iniTitle(id) : ''), now: NOW() }), { ready: S.ready });
|
|
948
945
|
if (el.__h !== h) { el.__h = h; el.innerHTML = h; }
|
|
949
946
|
}
|
|
950
|
-
/** The list's own fold (batch 20 item 6): kept on this computer, the one thing that folds or unfolds the list. With a Viewer open it is the rail. */
|
|
951
|
-
function setFold(on) {
|
|
952
|
-
S.folded = !!on; store.set('pmos.home.fold', on ? '1' : '0'); drawList(); // '0': the PM opened it, and a full Viewer keeps it open from now on
|
|
953
|
-
if (VW.isOpen() && VW.panels) {
|
|
954
|
-
VW.panels.relayout();
|
|
955
|
-
// a Viewer the panels lay out (full, two side by side) does not ask the page again: the press folds or unfolds the list now, in every layout
|
|
956
|
-
if (VW.panels.railOn() !== (S.folded && !isPhone())) VW.panels.rail(S.folded && !isPhone());
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
/* ── the folded rail's card (batch 18 item 14, FlA1–FlA5) ──
|
|
960
|
-
* With the Viewer wide, Home's list folds to a rail of group tiles (cozy-viewer.js). A tile's press opens a card beside it with that group's
|
|
961
|
-
* rows, Home's own (iniHtml): a row opens as on Home and the card closes, the rail and the Viewer's width stay; the pill lists the sessions
|
|
962
|
-
* in place. A second press on the tile, ×, Escape or a press outside closes it. The card sits in the rail, inside #hmList, so the list's
|
|
963
|
-
* own presses work in it. S.rc: the group whose card is open. */
|
|
964
|
-
function drawRailCard() {
|
|
965
|
-
const bar = $('#hmList > .cz-vw-railbar');
|
|
966
|
-
if (!bar || isPhone() || !VW.railOn() || !S.M || !S.M.groups.some((g) => g.key === S.rc)) S.rc = null;
|
|
967
|
-
let card = bar && bar.querySelector(':scope > .hv-rc');
|
|
968
|
-
if (!S.rc) { if (card) card.remove(); VW.railSync(null); return; }
|
|
969
|
-
if (!card) { card = document.createElement('div'); card.className = 'hv-rc'; card.setAttribute('role', 'dialog'); card.setAttribute('data-esc-layer', ''); bar.append(card); }
|
|
970
|
-
const g = S.M.groups.find((x) => x.key === S.rc);
|
|
971
|
-
card.setAttribute('aria-label', g.name);
|
|
972
|
-
const html = TD.railCardHtml(S.M, S.rc, S.lo);
|
|
973
|
-
if (card.__h !== html) { card.__h = html; card.innerHTML = html; }
|
|
974
|
-
VW.railSync(S.rc);
|
|
975
|
-
// beside the tile, its top with the tile's, kept inside the window
|
|
976
|
-
const t = bar.querySelector(`[data-cz-vw-rail="${CSS.escape(S.rc)}"]`);
|
|
977
|
-
if (!t) return;
|
|
978
|
-
const r = t.getBoundingClientRect();
|
|
979
|
-
card.style.left = Math.round(r.right + 12) + 'px';
|
|
980
|
-
card.style.top = Math.round(Math.max(12, Math.min(r.top - 10, innerHeight - card.offsetHeight - 12))) + 'px';
|
|
981
|
-
}
|
|
982
|
-
function railCard(key, o = {}) {
|
|
983
|
-
const was = S.rc;
|
|
984
|
-
S.rc = key || null; S.ses = null;
|
|
985
|
-
drawList();
|
|
986
|
-
if (S.rc) { const f = $('#hmList .hv-rc .hv-rcb .hm-rm, #hmList .hv-rc .hv-rcb .hv-fold'); if (f && o.focus !== false) f.focus({ preventScroll: true }); return; }
|
|
987
|
-
const t = was && o.back && $(`#hmList [data-cz-vw-rail="${CSS.escape(was)}"]`); if (t) t.focus();
|
|
988
|
-
}
|
|
989
|
-
VW.railCard((key) => railCard(S.rc === key ? null : key, { back: true }));
|
|
990
|
-
document.addEventListener('cz:vw-rail', (e) => { if (!e.detail.on && S.rc) S.rc = null; });
|
|
991
947
|
/* A phone chat has no floating menu, so while a meeting records its pill sits in the top bar (XcbOptions B, case 7): a red dot and the
|
|
992
948
|
* clock (home-rec-row.js ticks every [data-hr-clock]); a press opens the live meeting in place. No recording: no pill. */
|
|
993
949
|
function drawRecTop() {
|
|
@@ -1038,7 +994,7 @@ function drawTop() {
|
|
|
1038
994
|
if (PH) PH.draw();
|
|
1039
995
|
}
|
|
1040
996
|
const SN = mountSesName({ esc, pmPost, toast, toastUndo: (m, u) => toastUndo(m, u), session: (sid) => S.D.sessions.find((x) => x.id === sid) || null, shown: (x) => H.nameOf(x),
|
|
1041
|
-
changed: () => { drawTop(); chat.refresh(); drawList(); } });
|
|
997
|
+
changed: () => { drawTop(); chat.refresh(); drawList(); POP.refresh(); } });
|
|
1042
998
|
|
|
1043
999
|
/* ── the chat ── */
|
|
1044
1000
|
// a chat Home opened by itself on load (the first Needs-you row) is not the PM touching it: a touch counts after the PM's first press or
|
|
@@ -2037,7 +1993,7 @@ function menCtx() {
|
|
|
2037
1993
|
function chatAbout(t) {
|
|
2038
1994
|
S.phoneChat = isPhone(); if (isPhone()) VW.close();
|
|
2039
1995
|
S.sel = null; // the conversation is about its own item, not the row picked in the list (its header named that row)
|
|
2040
|
-
|
|
1996
|
+
addressChat({ ...homeTarget(), key: t.key, title: t.title, scope: t.scope && t.scope.text ? { text: String(t.scope.text), icon: t.scope.icon || I.chat } : { text: 'Report · ' + t.title, icon: I.chat }, intro: t.intro ? { role: CLAUDE, text: t.intro } : undefined,
|
|
2041
1997
|
placeholder: t.placeholder || 'Message PMOS', context: t.context });
|
|
2042
1998
|
drawList(); chat.focus();
|
|
2043
1999
|
}
|
|
@@ -2206,7 +2162,6 @@ $('#hmDesk').onclick = (e) => { if (S.sheet && e.target === $('#hmDesk')) sheet(
|
|
|
2206
2162
|
$('#hmList').onclick = (e) => { // delegated: every press on the list is a <button>
|
|
2207
2163
|
const b = e.target.closest('button'); if (!b) return;
|
|
2208
2164
|
const d = b.dataset;
|
|
2209
|
-
if ('hmRcx' in d) { railCard(null, { back: true }); return; } // × on the folded rail's card
|
|
2210
2165
|
// the top of Home (home-your-move-waiting): a Your move row presses as it does on Good morning; Waiting on others opens its nudge or source
|
|
2211
2166
|
if (b.closest('.hy')) {
|
|
2212
2167
|
if (/^mv-/.test(d.yd || '')) { movePress(b); return; }
|
|
@@ -2214,14 +2169,12 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
2214
2169
|
if ('hmTopall' in d) { S.topAll = !S.topAll; drawList(); const f = $('#hmList [data-hm-topall]'); if (f) f.focus(); return; }
|
|
2215
2170
|
if (d.hmNudge || d.hmWait) { waitPress(b); return; }
|
|
2216
2171
|
}
|
|
2217
|
-
// a pick in the rail's card: the card closes, the rail stays folded and the Viewer as wide (FlA4After)
|
|
2218
|
-
if (S.rc && b.closest('.hv-rc') && (d.hmSel || d.hmProg || d.hmProdopen || d.hmSesnew)) { S.rc = null; S.ses = null; VW.keepWide(); }
|
|
2219
2172
|
if (d.hmSes) { sesPill(d.hmSes === S.ses ? null : d.hmSes); return; } // an initiative's pill: what sits in it, under it (a sheet on a phone)
|
|
2220
2173
|
if ('hmSesx' in d) { sesPill(null); return; }
|
|
2221
2174
|
if (d.hmSesnew) { sesPill(null, false); newIn(d.hmSesnew); return; }
|
|
2222
2175
|
if (d.hmProdnew) { sesPill(null, false); const g = ((S.M && S.M.groups) || []).find((x) => x.key === d.hmProdnew); if (g && g.kind === 'program') goProgram(g.program.id); else if (g && !g.primary && g.product && g.product.ws) goOtherProduct(g); else goIni('product'); { const c = chat.current(); if (c && c.newChat) c.newChat(); } return; }
|
|
2223
2176
|
if (d.hmCompact) { compact(d.hmCompact); return; } // ✓ on Claude's ✦ Compact (batch 13 item 8): the pill's list stays open
|
|
2224
|
-
if (S.ses && !b.closest('.hv-spp, .hv-sps
|
|
2177
|
+
if (S.ses && !b.closest('.hv-spp, .hv-sps')) sesPill(null, false); // a press anywhere else in the list closes it
|
|
2225
2178
|
if (d.hmSel) { if (S.ses) sesPill(null, false); if (S.day) S.day = false; select(d.hmSel); return; }
|
|
2226
2179
|
if ('hrImpact' in d) { if (S.day) S.day = false; S.sel = 'impact'; if (isPhone()) S.phoneChat = true; openTarget(homeTarget()); drawList(); return; } // Your impact: Home's own chat, on the weekly check
|
|
2227
2180
|
if ('hrDrift' in d) { if (S.day) S.day = false; S.sel = 'drift'; if (isPhone()) S.phoneChat = true; openTarget(homeTarget()); drawList(); return; } // What you might have missed: Home's own chat, on the weekly ✦
|
|
@@ -2255,7 +2208,6 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
2255
2208
|
if ('hmNew' in d) { menu(b, newItems(), 'New'); return; }
|
|
2256
2209
|
// the list header's fold (batch 18 item 15; batch 20 item 6): with a Viewer open the list folds to the rail; with none, it folds away and the
|
|
2257
2210
|
// button at the top left brings it back. Only this fold and its unfold change the list: a Viewer's width, wide or close never do
|
|
2258
|
-
if ('hmFold' in d) { setFold(true); return; }
|
|
2259
2211
|
if ('hmMeet' in d) { const m = H.meetLineOf(S.D.today); if (m) openMeeting(m.meeting); return; }
|
|
2260
2212
|
if ('hmCal' in d) { openCalendar(); return; }
|
|
2261
2213
|
if ('hmRec' in d) { MORE.openRecorder().then(() => drawList()); return; }
|
|
@@ -2276,23 +2228,13 @@ function sesPill(id, back = true) {
|
|
|
2276
2228
|
const was = S.ses;
|
|
2277
2229
|
S.ses = id || null;
|
|
2278
2230
|
drawList();
|
|
2279
|
-
const f = id ? $('#hmList .hv-spp .hm-rm, #hmList .hv-sps .hm-rm
|
|
2231
|
+
const f = id ? $('#hmList .hv-spp .hm-rm, #hmList .hv-sps .hm-rm') : back && was ? $(`#hmList [data-hm-ses="${CSS.escape(was)}"]`) : null;
|
|
2280
2232
|
if (f) f.focus();
|
|
2281
2233
|
}
|
|
2282
2234
|
// Escape closes it wherever the focus is (a redraw of the list can drop the focus to the page); a press outside the list closes it too
|
|
2283
2235
|
window.addEventListener('keydown', (e) => { if (e.key === 'Escape' && S.ses && menuEl.hidden) { e.preventDefault(); e.stopPropagation(); sesPill(null); } }, true); // before the Viewer's own Escape
|
|
2284
2236
|
// a press outside the list (the chat, the Viewer) closes an open pill list too
|
|
2285
2237
|
document.addEventListener('pointerdown', (e) => { if (S.ses && !e.target.closest('#hmList')) sesPill(null, false); });
|
|
2286
|
-
// the rail's card: Escape closes it (after an open pill list) and gives the focus back to its tile; a press outside it closes it
|
|
2287
|
-
window.addEventListener('keydown', (e) => { if (e.key === 'Escape' && S.rc && !e.defaultPrevented && menuEl.hidden) { e.preventDefault(); e.stopPropagation(); railCard(null, { back: true }); } }, true);
|
|
2288
|
-
document.addEventListener('pointerdown', (e) => { if (S.rc && !e.target.closest('.hv-rc, .cz-vw-railtile')) railCard(null); });
|
|
2289
|
-
// arrows move between the card's rows
|
|
2290
|
-
$('#hmList').addEventListener('keydown', (e) => {
|
|
2291
|
-
if ((e.key !== 'ArrowDown' && e.key !== 'ArrowUp') || !e.target.closest('.hv-rc')) return;
|
|
2292
|
-
const all = [...document.querySelectorAll('#hmList .hv-rc .hv-rcb .hm-rm, #hmList .hv-rc .hv-rcb .hv-fold, #hmList .hv-rc .hv-rcb [data-hm-sesnew]')];
|
|
2293
|
-
const i = all.indexOf(e.target.closest('button')); if (!all.length) return;
|
|
2294
|
-
e.preventDefault(); all[Math.max(0, Math.min(all.length - 1, i < 0 ? 0 : i + (e.key === 'ArrowDown' ? 1 : -1)))].focus();
|
|
2295
|
-
});
|
|
2296
2238
|
$('#hmList').addEventListener('submit', async (e) => { // the capture box: Enter adds the task
|
|
2297
2239
|
if (e.target.id !== 'hmCapF') return;
|
|
2298
2240
|
e.preventDefault();
|
|
@@ -2343,9 +2285,6 @@ async function todayPress(k, b) {
|
|
|
2343
2285
|
load();
|
|
2344
2286
|
}
|
|
2345
2287
|
}
|
|
2346
|
-
$('#hmDesk').insertAdjacentHTML('afterbegin', `<button type="button" class="hm-unfold" id="hmUnfold" aria-label="Show the list" title="Show the list">${SVG(I.fold, 16)}</button>`);
|
|
2347
|
-
$('#hmUnfold').onclick = () => setFold(false);
|
|
2348
|
-
VW.listFold({ folded: () => S.folded && !isPhone(), chosen: () => store.get('pmos.home.fold') !== null, show: () => setFold(false) });
|
|
2349
2288
|
function cta() {
|
|
2350
2289
|
if (S.ini === 'product') { const C = H.productCard(S.D); if (C.sent) openUpdateViewer(); else { select('n:update'); } return; }
|
|
2351
2290
|
const h = S.H || {};
|
|
@@ -2431,7 +2370,9 @@ PH.draw();
|
|
|
2431
2370
|
/* The one popup (slice 2): Home's own chat is the popup's chat, so the page never holds two; a session picked in it opens the way Home opens a
|
|
2432
2371
|
* session; the chat icon opens a session's initiative on the popup's left. */
|
|
2433
2372
|
POP.useChat({ el: $('#hmChat'), open: (t) => openTarget(t), current: () => (chat.current ? chat.current() : null), focus: () => chat.focus(),
|
|
2434
|
-
sessionTarget: (row) => { const s = (S.D.sessions || []).find((x) => x.id === row.id); return s ? sessionTarget(s) : null; }
|
|
2373
|
+
sessionTarget: (row) => { const s = (S.D.sessions || []).find((x) => x.id === row.id); return s ? sessionTarget(s) : null; },
|
|
2374
|
+
// on a desk the popup's top bar replaced Home's chat header: ⋯ › Rename session, and the title becomes the name field (session names A)
|
|
2375
|
+
nameHtml: (sid, name) => SN.titleHtml(sid, name), renaming: (sid) => SN.renaming(sid) });
|
|
2435
2376
|
POP.setTitles((id) => (iniRowOf(id) ? iniTitle(id) : ''));
|
|
2436
2377
|
POP.setOpener((id) => { openIniFrom(id).then(() => iniPage()); });
|
|
2437
2378
|
mountPanels({
|
|
@@ -648,7 +648,7 @@ export function mountChat(el, host) {
|
|
|
648
648
|
const shutAdd = (focus) => { if (!C.addOpen) return; C.addOpen = false; drawFoot({ role: role() }); if (focus) { const a = foot.querySelector('#hmAdd'); if (a) a.focus(); } };
|
|
649
649
|
document.addEventListener('click', (e) => { if (C.addOpen && e.target.isConnected && !e.target.closest('.hm-addw')) shutAdd(false); }, true);
|
|
650
650
|
// Escape closes the goal choice or method menu wherever the focus is: the redraw that opens the choice can drop the focus to the page
|
|
651
|
-
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !e.defaultPrevented && el.isConnected && !el.contains(e.target) && !document.
|
|
651
|
+
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !e.defaultPrevented && el.isConnected && !el.contains(e.target) && ![...document.querySelectorAll('[data-esc-layer]')].some((x) => !el.contains(x)) && GU.escape()) e.preventDefault(); });
|
|
652
652
|
el.addEventListener('keydown', (e) => {
|
|
653
653
|
if (e.key === 'Escape' && C.addOpen) { e.preventDefault(); e.stopPropagation(); shutAdd(true); return; }
|
|
654
654
|
if (e.key === 'Escape' && NPU.escape()) { e.preventDefault(); e.stopPropagation(); return; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* pm/home-ses-name.js — tap a session's name to rename it (session names A, canvas XmsNames; the agreed rename field of RnATask).
|
|
2
|
-
* The open session's name is the press in the phone's top bar
|
|
2
|
+
* The open session's name is the press in the phone's top bar; on a desk, "Rename session" in the popup's ⋯ menu (cozy-popup.js). A tap turns it into one field with a blue
|
|
3
3
|
* check: Enter saves, Esc cancels, an empty or unchanged name saves nothing, a refusal keeps the field with the reason. The PM's name locks
|
|
4
4
|
* the session's name: Claude never renames it again (lib/session-name.js). "Renamed" with Undo, and every row shows the new name at once.
|
|
5
5
|
*
|
|
@@ -13,7 +13,8 @@ const CHECK = '<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true
|
|
|
13
13
|
export function mountSesName(host) {
|
|
14
14
|
const { esc } = host;
|
|
15
15
|
const R = { sid: null, value: '', busy: false, err: '' };
|
|
16
|
-
|
|
16
|
+
// the field you can see: on a desk the popup's top bar holds it, and Home's own chat header (hidden there) draws one too
|
|
17
|
+
const field = () => { const all = [...document.querySelectorAll('[data-hm-ren] input')]; return all.find((i) => i.offsetParent) || all[0] || null; };
|
|
17
18
|
|
|
18
19
|
function titleHtml(sid, title, cls = '') {
|
|
19
20
|
if (!sid) return esc(title || '');
|
|
@@ -131,10 +131,10 @@ function pillHtml(r, o) {
|
|
|
131
131
|
}
|
|
132
132
|
/** A product's own chats as a row for the pill (the same pill and list an initiative row has; Wawan, batch 20 item 10). */
|
|
133
133
|
const prodRow = (g) => ({ id: 'product', at: -1, name: g.name, kids: g.kids || [], prodNew: g.key });
|
|
134
|
-
const prodPillHtml = (g, o) =>
|
|
134
|
+
const prodPillHtml = (g, o) => pillHtml(prodRow(g), { ...o, gk: g.key });
|
|
135
135
|
function prodPopHtml(g, o) {
|
|
136
136
|
const r = prodRow(g);
|
|
137
|
-
return !o.
|
|
137
|
+
return !o.phone && r.kids.length && o.ses === sesKey(r, { gk: g.key }) ? `<div class="hv-spp hv-spp-p" data-esc-layer role="dialog" aria-label="In ${esc(g.name)}">${sesListHtml(r, o)}</div>` : '';
|
|
138
138
|
}
|
|
139
139
|
/** The list behind the pill: the rows that used to nest, waiting first, then + for a new session here. */
|
|
140
140
|
function sesListHtml(r, o) {
|
|
@@ -156,7 +156,7 @@ export function sesSheetHtml(M, o) {
|
|
|
156
156
|
function iniHtml(r, o, po) {
|
|
157
157
|
const on = o.ses === sesKey(r, o) && !o.phone && r.kids.length;
|
|
158
158
|
// in the folded rail's card (batch 18 item 14, FlA2) the sessions open in place under the row, inside the card
|
|
159
|
-
const pop = !on ? '' :
|
|
159
|
+
const pop = !on ? '' : `<div class="hv-spp" data-esc-layer role="dialog" aria-label="In ${esc(r.name)}">${sesListHtml(r, o)}</div>`;
|
|
160
160
|
const t = track(r.at, r.stage, r.steps);
|
|
161
161
|
return `<div class="hm-r hv-r ini st-${esc(r.state)}${o.sel === r.id ? ' sel' : ''}${on ? ' sp-on' : ''}" data-id="${esc(r.id)}"${po ? ` data-po-id="${esc(r.ini || r.id)}"` : ''}>${po ? gripHtml(r.name) : ''}<button type="button" class="hm-rm" data-hm-sel="${esc(r.id)}"${o.sel === r.id ? ' aria-current="true"' : ''} title="${esc(r.hint)}">${markHtml(r.yours && r.state !== 'blocked' ? { state: 'needs' } : r)}`
|
|
162
162
|
+ `<span class="hm-rt"><b>${esc(r.name)}</b></span></button>${pillHtml(r, o)}${t ? `<button type="button" class="hv-tk" data-hm-sel="${esc(r.id)}" tabindex="-1" aria-hidden="true">${t}</button>` : ''}${o.card ? '' : pop}</div>${o.card ? pop : ''}`;
|
|
@@ -252,19 +252,6 @@ export function groupOfOpen(M, sel) {
|
|
|
252
252
|
}
|
|
253
253
|
return null;
|
|
254
254
|
}
|
|
255
|
-
/** The folded rail's card (batch 18 item 14, FlA1–FlA5): a group's tile, name and › (opens the program or product), a program's next
|
|
256
|
-
* milestone, ×; then Home's own rows for that group (the quiet ones folded, the open one shown), the pill's sessions in place. */
|
|
257
|
-
export function railCardHtml(M, key, o) {
|
|
258
|
-
const g = M && (M.groups || []).find((x) => x.key === key && x.kind !== 'loose');
|
|
259
|
-
if (!g) return '';
|
|
260
|
-
const prog = g.kind === 'program';
|
|
261
|
-
const tile = prog ? `<span class="hv-tl tp" aria-hidden="true">${svg(P.layers, 16)}</span>` : `<span class="hv-tl t${g.tone}" aria-hidden="true">${esc(g.initials)}</span>`;
|
|
262
|
-
const go = prog ? `data-hm-prog="${esc(g.program.id)}" aria-label="Open ${esc(g.name)}, a program"` : `data-hm-prodopen="${esc(g.key)}" aria-label="Open ${esc(g.name)}, a product"`;
|
|
263
|
-
const oc = { ...o, card: true };
|
|
264
|
-
return `<div class="hv-rch"><button type="button" class="hv-pt" ${go}>${tile}<b>${esc(g.name)}</b>${svg(P.chevR, 16)}</button>${prog ? msHtml(g) : ''}`
|
|
265
|
-
+ `<button type="button" class="ut-ib hv-ib" data-hm-rcx aria-label="Close" title="Close">${svg(P.x, 18)}</button></div>`
|
|
266
|
-
+ `<div class="hv-rcb">${prog ? programBody(g, oc, false) : productBody(g, oc, false)}</div>`;
|
|
267
|
-
}
|
|
268
255
|
/** "Not in an initiative" (HvAC .lh): a line under the groups. Folded it shows a blue dot when a row waits on you, an amber square when one
|
|
269
256
|
* of your own is late, and the count; open, the rows in a card. */
|
|
270
257
|
function looseHtml(g, o) {
|
|
@@ -346,8 +333,7 @@ export function listHtml(M, T, o) {
|
|
|
346
333
|
+ (o.phone ? '' : `<button type="button" class="ut-ib hv-ib${flt ? ' on' : ''}" data-hm-flt aria-haspopup="menu" aria-label="Show: Today, Mine, Kept or Done${flt ? '. Now ' + esc(flt.label) : ''}" title="Show: Today, Mine, Kept or Done">${svg(P.filter, 18)}</button>`)
|
|
347
334
|
+ SO.btnHtml('ut-ib hv-ib' + (SO.layout().sort !== 'mine' ? ' on' : ''))
|
|
348
335
|
+ `<button type="button" class="ut-ib hv-ib" data-hm-new aria-haspopup="menu" aria-label="New" title="New">${svg(P.plus, 20)}</button>`
|
|
349
|
-
|
|
350
|
-
+ (o.phone ? '' : `<button type="button" class="ut-ib hv-ib" data-hm-fold aria-label="Fold the list to the rail" title="Fold the list to the rail">${svg(P.fold, 18)}</button>`) + '</span></div>'
|
|
336
|
+
+ '</span></div>'
|
|
351
337
|
// Claude grilled something by itself this week and left findings (canvas FcPhone, Home): one quiet line with ✦, else nothing
|
|
352
338
|
+ (o.grill ? `<p class="hv-sub hv-gn"><span>${esc(o.grill.text)}</span><button type="button" class="ut-ib hv-ib" data-hm-gn="${esc(o.grill.id)}" aria-label="${esc('Open the ' + o.grill.n + (o.grill.n === 1 ? ' finding' : ' findings') + ' on ' + o.grill.title)}" title="Open the findings">${svg('M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z', 18)}</button></p>` : '');
|
|
353
339
|
// the Today card only while the day has a moment; the plain day (its meetings and load) is in Your day
|
|
@@ -107,7 +107,7 @@ export function statusOf(r, grill, fmt) {
|
|
|
107
107
|
const ps = provenStatus(r), from = fromLine(r.signal);
|
|
108
108
|
if (r.acts && r.acts.life === 'hold') return { tone: 'q', text: 'On hold' + (r.acts.back ? ' · back ' + r.acts.back : '') };
|
|
109
109
|
if (t.you) return { tone: 'you', text: t.you };
|
|
110
|
-
const g = grill; if (g && g.open && !g.later) return { tone: 'you', text: plural(g.open, 'question', 'questions')
|
|
110
|
+
const g = grill; if (g && g.open && !g.later) return { tone: 'you', text: plural(g.open, 'question', 'questions') };
|
|
111
111
|
if (r.late) return { tone: 'late', text: r.overDays > 0 ? plural(r.overDays, 'day', 'days') + ' over' : 'Late' };
|
|
112
112
|
if (ps === 'at risk') return { tone: 'risk', text: 'At risk' + (r.owner ? '' : ' · no owner'), from };
|
|
113
113
|
if (t.idle != null) return { tone: 'q', text: 'Idle ' + t.idle + ' days' };
|
|
@@ -343,7 +343,7 @@ export function iniView(r, ctx = {}) {
|
|
|
343
343
|
else if (ctx.ask && ctx.ask.title) wait = { text: '“' + ctx.ask.title + '” needs your answer.', say: 'Can you answer “' + ctx.ask.title + '”? I’ll carry on once you do.', primary: { act: 'ask', label: 'Answer: ' + ctx.ask.title } };
|
|
344
344
|
else if (you && youKind) wait = { text: youWhy, primary: youKind === 'drift' && it.links && it.links.prd ? { act: 'doc:' + it.links.prd, label: 'Open the PRD' } : youKind === 'commit' ? { act: 'commit', label: 'Send to Jira' } : { act: 'page', label: you } };
|
|
345
345
|
else if (you) { const opn = tk.filter((k) => k.status !== 'Done').length; wait = { text: opn ? plural(opn, 'ticket is', 'tickets are') + ' still open, so the sign-off can wait until they close.' : 'Every release ticket is done.', primary: { act: 'page', label: you } }; }
|
|
346
|
-
else if (ctx.grill && ctx.grill.open && !ctx.grill.later) wait = { text: 'PMOS asks
|
|
346
|
+
else if (ctx.grill && ctx.grill.open && !ctx.grill.later) wait = { text: 'PMOS asks who has this problem, how we know, and what would change our mind.', primary: { act: 'grill', label: 'Answer the questions' } };
|
|
347
347
|
const summary = wait
|
|
348
348
|
? { line: 'Waits on you', tone: 'you', right: progress, text: [wait.text, lateSay].filter(Boolean).join(' '), primary: wait.primary,
|
|
349
349
|
status: s.tone === 'you' ? null : { tone: s.tone, text: s.tone === 'late' ? 'Late' : s.text } }
|