create-pmos 0.613.0 → 0.614.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.
Files changed (35) hide show
  1. package/package.json +14 -14
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/changelog.json +13 -0
  7. package/workspace/guide/cli.md +2 -1
  8. package/workspace/guide/layout.md +22 -8
  9. package/workspace/guide/settings-and-switches.md +1 -0
  10. package/workspace/lib/events-place.js +2 -2
  11. package/workspace/lib/mention-cli.js +6 -3
  12. package/workspace/lib/mention-store.js +49 -10
  13. package/workspace/lib/routes-events-place.js +2 -1
  14. package/workspace/package-lock.json +2 -2
  15. package/workspace/package.json +1 -1
  16. package/workspace/public/pm/cozy-home-rows.css +55 -0
  17. package/workspace/public/pm/cozy-nav.js +15 -2
  18. package/workspace/public/pm/cozy-pop-work.css +3 -0
  19. package/workspace/public/pm/cozy-pop-work.js +5 -3
  20. package/workspace/public/pm/cozy-today-app.js +119 -12
  21. package/workspace/public/pm/cozy-today-model.js +278 -21
  22. package/workspace/public/pm/cozy-today-page.css +74 -15
  23. package/workspace/public/pm/cozy-today-view.js +89 -31
  24. package/workspace/public/pm/home-app.js +14 -6
  25. package/workspace/public/pm/home-data.js +1 -1
  26. package/workspace/public/pm/home-ini.js +17 -1
  27. package/workspace/public/pm/home-mentions.js +121 -6
  28. package/workspace/public/pm/ini-edit.js +2 -0
  29. package/workspace/public/pm/ini-view.css +2 -0
  30. package/workspace/public/pm/mention-one-model.js +115 -0
  31. package/workspace/public/pm/pop-work-model.js +17 -11
  32. package/workspace/run-tests.js +11 -4
  33. package/workspace/server.js +8 -0
  34. package/workspace/skills/morning-brief.skill +1 -1
  35. package/workspace/test-run.js +2 -0
@@ -7,7 +7,8 @@
7
7
  body.cz-today #hmDesk > .hm-list, body.cz-today #hmDesk > .hm-chat, body.cz-today #hmDesk > .cz-pn-div, body.cz-today #hmUnfold, body.cz-today .hm-top { display: none !important; }
8
8
  /* the white page panel: the only big container, beside the rail (as the Board's) */
9
9
  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); }
10
- body.cz-today .td-page { display: block; max-width: 1360px; margin: 0 auto; }
10
+ /* 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 */
11
+ body.cz-today .td-page { display: block; margin: 0; }
11
12
  /* a thing that still opens beside the page (the PM's "open work beside the page", a deep link) slides over Today on the right:
12
13
  the one slide-over of the panel rule, so Today is never squeezed or covered by a column it does not own */
13
14
  body.cz-today #hmDesk > .hm-vw { position: fixed; top: 16px; right: 16px; bottom: 16px; z-index: 40; border-radius: 24px; box-shadow: var(--cz-lift); background: var(--cz-card); }
@@ -15,14 +16,36 @@
15
16
  }
16
17
  .td-page[hidden] { display: none !important; }
17
18
 
18
- .td { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; font-family: var(--cz-sans); color: var(--cz-ink); }
19
+ .td { display: grid; grid-template-columns: minmax(0, 1100px) 320px; justify-content: start; gap: 28px; align-items: start; font-family: var(--cz-sans); color: var(--cz-ink); }
19
20
  @media (max-width: 1100px) { .td { grid-template-columns: minmax(0, 1fr); } }
21
+ .td-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
22
+
23
+ /* the Overview: one grey box, written by PMOS (✦), as the popup's Overview */
24
+ .td-ov { border-radius: 20px; background: var(--cz-well); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
25
+ .td-ov h2 { font-size: var(--fs-label); font-weight: var(--fw-strong); letter-spacing: .06em; text-transform: uppercase; color: var(--cz-ink3); }
26
+ .td-ov h2 b { color: var(--cz-blueink); }
27
+ .td-ov p { margin: 0; font-size: var(--fs-row); line-height: var(--lh-row); color: var(--cz-ink); max-width: 860px; }
28
+ .td-ovs { display: flex; align-items: center; gap: 8px; font-size: var(--fs-meta); color: var(--cz-ink2); }
29
+ .td-ovs b { color: var(--cz-blueink); font-weight: var(--fw-strong); }
30
+ .td-ovs .td-ib { width: 26px; height: 26px; border-radius: 999px; background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); }
31
+ .td-chips { display: flex; flex-wrap: wrap; gap: 6px; }
32
+ .td-chip { border: 0; border-radius: 999px; padding: 4px 11px; background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); font: inherit; font-size: var(--fs-meta); color: var(--cz-ink2); cursor: pointer; }
33
+ .td-chip b { font-weight: var(--fw-strong); color: var(--cz-ink); margin-left: 2px; }
34
+ .td-chip.on { background: var(--cz-ink); color: var(--cz-card); box-shadow: none; }
35
+ .td-chip.on b { color: var(--cz-card); }
36
+ .td-chip:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
20
37
  .td h2 { margin: 0; font-size: var(--fs-section); font-weight: var(--fw-strong); line-height: var(--lh-section); color: var(--cz-ink); }
21
38
  .td-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
22
39
  .td button { font-family: var(--cz-sans); }
23
40
 
24
- /* the title and its one quiet line */
25
- .td-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; }
41
+ /* the page head: the day and the time, small, then the greeting */
42
+ .td-top { display: flex; flex-direction: column; gap: 2px; margin: 0 0 18px; font-family: var(--cz-sans); }
43
+ .td-when { font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--cz-ink3); letter-spacing: .04em; text-transform: uppercase; }
44
+ .td-top h1 { margin: 0; font-size: var(--fs-display); font-weight: var(--fw-strong); line-height: 1.2; color: var(--cz-ink); }
45
+
46
+ /* the log's title line: "Today's log · 12" at the left, the jobs at the right */
47
+ .td-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; }
48
+ .td-h h2 { font-size: var(--fs-label); font-weight: var(--fw-strong); letter-spacing: .06em; text-transform: uppercase; color: var(--cz-ink3); margin-right: auto; }
26
49
  .td-sum { font-size: var(--fs-meta); color: var(--cz-ink3); }
27
50
 
28
51
  /* the capture line */
@@ -38,7 +61,9 @@
38
61
 
39
62
  /* the log: one card, one row height, one text size */
40
63
  .td-tt { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--cz-hair); background: var(--cz-card); overflow: hidden; }
41
- .td-r { display: grid; grid-template-columns: 18px 20px minmax(0, 1fr) minmax(0, 160px) 56px 128px 92px; align-items: center; column-gap: 8px; min-height: 44px; padding: 0 12px; font-size: var(--fs-row); line-height: var(--lh-row); }
64
+ .td-r { display: grid; grid-template-columns: 18px 20px minmax(0, 1fr) 100px minmax(0, 150px) 52px 120px 92px; align-items: center; column-gap: 8px; min-height: 44px; padding: 0 12px; font-size: var(--fs-row); line-height: var(--lh-row); }
65
+ .td-tt.nowork .td-r { grid-template-columns: 18px 20px minmax(0, 1fr) 100px 52px 120px 92px; }
66
+ .td-tt.nowork .td-w, .td-tt.nowork .td-wh { display: none; }
42
67
  .td-r + .td-r { box-shadow: inset 0 1px 0 var(--cz-hair); }
43
68
  .td-hd { min-height: 36px; background: var(--cz-well); font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink3); }
44
69
  .td-p b { color: var(--cz-late); font-weight: var(--fw-strong); display: block; text-align: center; }
@@ -49,6 +74,17 @@
49
74
  button.td-t { cursor: pointer; }
50
75
  button.td-t:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 4px; }
51
76
  .td-r.note .td-t { font-weight: var(--fw-regular); color: var(--cz-ink2); }
77
+ /* the group rows (Do first, Today, Can wait), grey as Library's */
78
+ .td-gr { display: flex; align-items: center; min-height: 34px; padding: 0 12px; background: var(--cz-well); box-shadow: inset 0 1px 0 var(--cz-hair); font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink2); }
79
+ .td-gr em { font-style: normal; font-weight: var(--fw-regular); color: var(--cz-ink3); margin-left: 6px; }
80
+ .td-fold { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
81
+ .td-fold svg { color: var(--cz-ink3); }
82
+ .td-fold[aria-expanded="true"] svg { transform: rotate(180deg); }
83
+ .td-fold:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 4px; }
84
+ .td-rs { display: block; font-size: var(--fs-meta); color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
85
+ .td-r.why { padding-top: 6px; padding-bottom: 6px; }
86
+ .td-ty { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--cz-ink2); white-space: nowrap; }
87
+ .td-ty svg { color: var(--cz-ink3); flex: none; }
52
88
  .td-w { font-size: var(--fs-meta); color: var(--cz-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
53
89
  .td-k { font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink2); }
54
90
  .td-d { font-size: var(--fs-meta); color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@@ -71,30 +107,53 @@ button.td-t:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2
71
107
  .td-sg .td-ib { width: 26px; height: 26px; border-radius: 999px; background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); }
72
108
  .td-sg.lab { color: var(--cz-ink3); }
73
109
  .td-none { margin: 6px 2px; font-size: var(--fs-row); color: var(--cz-ink3); }
74
- .td-more { margin-top: 10px; border: 0; background: none; padding: 4px 2px; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-blueink); cursor: pointer; }
75
110
 
76
- /* today's agenda: one grey box */
77
- .td-ag { border-radius: 20px; background: var(--cz-well); padding: 16px 16px 14px; box-sizing: border-box; }
78
- .td-agh { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; }
111
+ /* today's agenda: one grey box, as tall as the log; the day by hours fills it (a line every hour, a label every two) */
112
+ .td-ag { border-radius: 20px; background: var(--cz-well); padding: 16px 16px 14px; box-sizing: border-box; display: flex; flex-direction: column; }
113
+ .td-agh { display: flex; align-items: baseline; gap: 8px; margin: 0 0 14px; }
114
+ .td-agh h2 { font-size: var(--fs-panel); }
79
115
  .td-agh small { font-size: var(--fs-meta); color: var(--cz-ink3); margin-right: auto; }
80
- .td-agh .td-ib { align-self: center; }
81
- .td-tl { position: relative; height: calc(var(--rows) * var(--px)); margin: 6px 0 4px 46px;
82
- background-image: repeating-linear-gradient(to bottom, var(--cz-hair) 0, var(--cz-hair) 1px, transparent 1px, transparent var(--px)); }
83
- .td-hr { position: absolute; left: -46px; top: var(--y); transform: translateY(-50%); font-size: var(--fs-badge); color: var(--cz-ink3); }
84
- .td-ev { position: absolute; left: 4px; right: 0; top: var(--y); height: var(--h); box-sizing: border-box; overflow: hidden; border: 0; border-radius: 10px; padding: 5px 9px; text-align: left;
116
+ .td-evl { font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-blueink); text-decoration: none; }
117
+ .td-evl:hover { text-decoration: underline; }
118
+ .td-evl:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 4px; }
119
+ .td-tl { position: relative; flex: none; height: calc(var(--rows) * 64px); margin: 8px 0 8px 46px;
120
+ background-image: linear-gradient(to bottom, var(--cz-hair) 0, var(--cz-hair) 1px, transparent 1px); background-size: 100% calc(100% / var(--rows)); background-repeat: repeat-y; box-shadow: inset 0 -1px 0 var(--cz-hair); }
121
+ .td-hr { position: absolute; left: -46px; top: var(--t); transform: translateY(-50%); font-size: var(--fs-badge); color: var(--cz-ink3); }
122
+ .td-ev { position: absolute; left: calc(4px + (100% - 4px) * var(--c, 0) / var(--n, 1)); width: calc((100% - 4px) / var(--n, 1) - 3px); top: var(--t); height: max(30px, calc(var(--h) - 3px)); box-sizing: border-box; overflow: hidden; border: 0; border-radius: 10px; padding: 6px 9px; text-align: left;
85
123
  background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); font: inherit; color: var(--cz-ink); display: flex; flex-direction: column; gap: 1px; }
124
+ .td-ev.focus { background: var(--cz-card); box-shadow: none; border: 1.5px dashed var(--cz-blue); }
125
+ .td-ev.report { box-shadow: inset 0 0 0 1px var(--cz-hair); }
126
+ .td-dk, .td-dm { display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 2px; vertical-align: middle; }
127
+ .td-dk { border-radius: 2px; transform: rotate(45deg); background: var(--cz-c-6b4fa3); }
128
+ .td-dm { border-radius: 50%; background: var(--cz-blue); }
129
+ .td-ev small { padding-left: 18px; }
130
+ .td-ev.own small, .td-ev.short small { padding-left: 0; }
86
131
  button.td-ev { cursor: pointer; }
87
132
  button.td-ev:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
88
133
  .td-ev b { font-size: var(--fs-meta); font-weight: var(--fw-strong); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
89
134
  .td-ev small { font-size: var(--fs-badge); color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
90
135
  .td-ev.short { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 0; padding-bottom: 0; }
91
136
  .td-ev.short small { flex: none; }
137
+ .td-ev.side { height: max(40px, calc(var(--h) - 3px)); padding: 4px 8px; justify-content: flex-start; }
138
+ .td-ev b, .td-ev small { flex: none; }
139
+ .td-ev.short:not(.side) b { flex: 0 1 auto; min-width: 0; }
140
+ .td-ev.side .td-dm, .td-ev.side .td-dk { display: none; }
141
+ .td-ev.side.short { flex-direction: column; justify-content: center; align-items: stretch; gap: 0; }
142
+ .td-ev.side small { padding-left: 0; }
92
143
  .td-ev.own { background: none; box-shadow: inset 0 0 0 1.5px var(--cz-hair); }
93
144
  .td-ev.on { box-shadow: inset 0 0 0 1.5px var(--cz-blue); }
94
145
  .td-ev.past b { color: var(--cz-ink3); }
95
- .td-now { position: absolute; left: -6px; right: 0; top: var(--y); height: 2px; background: var(--cz-late); }
146
+ .td-now { position: absolute; left: -6px; right: 0; top: var(--t); height: 2px; background: var(--cz-late); }
96
147
  .td-now::before { content: ''; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--cz-late); }
97
148
 
98
149
  /* the date chooser beside a row (set a date) */
99
150
  .td-dp { position: fixed; z-index: 80; display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 14px; background: var(--cz-card); box-shadow: var(--cz-lift); }
100
151
  .td-dp input { font: inherit; font-size: var(--fs-row); color: var(--cz-ink); background: var(--cz-well); border: 0; border-radius: 10px; padding: 6px 8px; color-scheme: light dark; }
152
+ /* round 3 point 13: what PMOS did on a row, a small ✦ with the count before the reason */
153
+ .td-did { display: inline-flex; align-items: center; gap: 2px; margin-right: 8px; color: var(--cz-blueink); font-weight: var(--fw-strong); }
154
+ .td-did b { font-weight: var(--fw-regular); }
155
+
156
+ /* PMOS handled · N (design check of round 3): the asks the self check cleared today, each with Undo */
157
+ .td-undo { border: 0; background: none; padding: 4px 6px; font: inherit; font-size: var(--fs-meta); color: var(--cz-blueink); cursor: pointer; }
158
+ .td-undo:hover, .td-undo:focus-visible { text-decoration: underline; }
159
+ .td-r.hd .td-rs { text-decoration: none; }
@@ -5,9 +5,11 @@
5
5
  * One page, no views (one container rule): the title and the quiet count line sit on the panel; Today's log is one card with a thin
6
6
  * border; today's agenda is one grey box on the right.
7
7
  * The first line captures a task, an event or a note. Enter only adds the row: it opens no popup and starts no session.
8
- * A row: "!" when it comes first, its bullet (• task, ○ event, – note, × done, ✦ a PMOS suggestion), What, Work, Job, When, and on
8
+ * Round 2 (Wawan on his real data): the Overview on top (overviewHtml), the log in three groups (Do first with each reason, Today, and
9
+ * Can wait folded to one line), a Type column after What, and Reply for an ask from a person.
10
+ * A row: "!" when the PM marked it first, its bullet (• task, ○ event, – note, × done, ✦ a PMOS suggestion), What, Work, Job, When, and on
9
11
  * hover or focus three plain icons: done, move to tomorrow, set a date. A Lab finding has ✓ (keep: start an initiative) and ✕ (drop).
10
- * Carried too long, a ✦ line under the row: PMOS suggests to drop it, ✓ ✕.
12
+ * Waiting too long, a ✦ line under the row: PMOS suggests to drop it, ✓ ✕.
11
13
  * Press a row or an agenda event: the popup on its work (home-app.js).
12
14
  * Every icon-only button has an aria-label. The UI says PMOS. Text from records goes through esc(). */
13
15
 
@@ -15,7 +17,12 @@ export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) =>
15
17
  const svg = (d, w = 15, sw = 1.9) => `<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>`;
16
18
  export const I = {
17
19
  done: 'M5 12.5l4.5 4.5L19 7.5', tomorrow: 'M5 12h14M13 6l6 6-6 6', date: 'M4 5.5h16v14H4zM4 10h16M8.5 3.5v4M15.5 3.5v4', plus: 'M12 6v12M6 12h12',
18
- yes: 'M5 12.5l4.5 4.5L19 7.5', no: 'M6 6l12 12M18 6L6 18', cal: 'M4 5.5h16v14H4zM4 10h16M8.5 3.5v4M15.5 3.5v4',
20
+ yes: 'M5 12.5l4.5 4.5L19 7.5', no: 'M6 6l12 12M18 6L6 18', cal: 'M4 5.5h16v14H4zM4 10h16M8.5 3.5v4M15.5 3.5v4', more: 'M8 10l4 4 4-4',
21
+ };
22
+ /** The small sign of each type in the Type column (one stroke icon, the word beside it). */
23
+ const TI = {
24
+ Ask: 'M5 5h14v10H9l-4 4z', Decision: 'M12 4l8 8-8 8-8-8z', Check: 'M5 12.5l4.5 4.5L19 7.5', Milestone: 'M6 20V4M6 5h11l-2.5 3.5L17 12H6',
25
+ Task: 'M5 5h14v14H5z', Report: 'M7 3.5h7l4 4V20.5H7zM14 3.5v4h4M10 12h5M10 16h5', Note: 'M6 12h12',
19
26
  };
20
27
  const BULLET = { task: ['•', 'Task'], event: ['○', 'Event'], note: ['–', 'Note'], lab: ['✦', 'PMOS suggests'] };
21
28
  const ib = (act, label, d, key, extra = '') => `<button type="button" class="td-ib" data-td="${act}" data-key="${esc(key)}" aria-label="${esc(label)}" title="${esc(label)}"${extra}>${svg(d)}</button>`;
@@ -23,54 +30,105 @@ const ib = (act, label, d, key, extra = '') => `<button type="button" class="td-
23
30
  /** One row of the log. */
24
31
  export function rowHtml(r) {
25
32
  const [b, bl] = r.done ? ['×', 'Done'] : BULLET[r.bullet] || BULLET.task;
26
- const acts = r.done ? '' : r.src === 'lab'
33
+ const acts = r.done || r.src === 'note' ? '' : r.src === 'lab'
27
34
  ? ib('lab-keep', 'Keep it: start an initiative from ' + r.title, I.yes, r.key) + ib('lab-drop', 'Drop it: ' + r.title, I.no, r.key)
28
35
  : ib('done', 'Done: ' + r.title, I.done, r.key) + ib('tomorrow', 'Move to tomorrow: ' + r.title, I.tomorrow, r.key) + ib('date', 'Set a date: ' + r.title, I.date, r.key, ' aria-haspopup="dialog"');
29
- const cls = ['td-r', r.done ? 'done' : '', r.bullet === 'note' ? 'note' : '', r.src === 'lab' ? 'lab' : ''].filter(Boolean).join(' ');
36
+ const cls = ['td-r', r.done ? 'done' : '', r.bullet === 'note' ? 'note' : '', r.src === 'lab' ? 'lab' : '', r.reason ? 'why' : ''].filter(Boolean).join(' ');
30
37
  // a note, an own event and a done row open nothing: their words are the whole of it
31
- const opens = !r.done && r.src !== 'own' && r.src !== 'gone';
38
+ const opens = !r.done && r.src !== 'own' && r.src !== 'gone' && r.src !== 'note';
32
39
  const title = opens ? `<button type="button" class="td-t" data-td="open" data-key="${esc(r.key)}">${esc(r.title)}</button>` : `<span class="td-t">${esc(r.title)}</span>`;
33
- const sug = r.drop ? `<div class="td-sg" role="group" aria-label="PMOS suggests"><b aria-hidden="true">✦</b><span>Carried ${esc(r.carried)} days. PMOS suggests: drop it from your log.</span>`
40
+ const sug = r.drop ? `<div class="td-sg" role="group" aria-label="PMOS suggests"><b aria-hidden="true">✦</b><span>PMOS suggests: drop it from your log.</span>`
34
41
  + ib('drop', 'Drop it', I.yes, r.key) + ib('keep', 'Keep it', I.no, r.key) + '</div>' : '';
42
+ const lk = r.looks && !r.done ? `<div class="td-sg" role="group" aria-label="PMOS suggests"><b aria-hidden="true">✦</b><span>Looks answered: ${esc(r.looks.who ? r.looks.who + ' replied' : 'someone replied')} “${esc(r.looks.text)}”. Close it?</span>`
43
+ + ib('lk-yes', 'Yes, close it: it is answered', I.yes, r.key) + ib('lk-no', 'No, it still waits on me', I.no, r.key) + '</div>' : '';
35
44
  const why = r.src === 'lab' && r.why ? `<div class="td-sg lab"><span>${esc(r.why)}</span></div>` : '';
36
- return `<div class="${cls}" data-key="${esc(r.key)}" role="row"><span class="td-p" role="cell">${r.first && !r.done ? '<b aria-label="First">!</b>' : ''}</span>`
37
- + `<span class="td-b" role="cell"><i role="img" aria-label="${esc(bl)}">${b}</i></span><span role="cell" class="td-wt">${title}</span>`
45
+ // what PMOS did on it, from records (round 3 point 13): a small ✦ with the count; its words on hover and for a screen reader
46
+ const did = r.did && r.did.length && !r.done ? `<span class="td-did" title="${esc('PMOS did: ' + r.did.join('; '))}" aria-label="${esc('PMOS did: ' + r.did.join('; '))}"><b aria-hidden="true">✦</b>${r.did.length}</span>` : '';
47
+ const reason = r.reason || did ? `<small class="td-rs">${did}${esc(r.reason || '')}</small>` : '';
48
+ const type = r.type ? `<span class="td-ty" role="cell">${svg(TI[r.type] || TI.Task, 13, 1.8)}<span>${esc(r.type)}</span></span>` : '<span class="td-ty" role="cell"></span>';
49
+ return `<div class="${cls}" data-key="${esc(r.key)}" role="row"><span class="td-p" role="cell">${r.first && !r.done && r.src === 'own' ? '<b aria-label="First">!</b>' : ''}</span>`
50
+ + `<span class="td-b" role="cell"><i role="img" aria-label="${esc(bl)}">${b}</i></span><span role="cell" class="td-wt">${title}${reason}</span>${type}`
38
51
  + `<span class="td-w" role="cell">${esc(r.work)}</span><span class="td-k" role="cell">${esc(r.job)}</span>`
39
- + `<span class="td-d${r.late && !r.done ? ' late' : ''}" role="cell">${esc(r.when)}</span><span class="td-a" role="cell">${acts}</span>${sug}${why}</div>`;
52
+ + `<span class="td-d${r.late && !r.done ? ' late' : ''}" role="cell">${esc(r.when)}</span><span class="td-a" role="cell">${acts}</span>${sug}${lk}${why}</div>`;
53
+ }
54
+
55
+ /** The Overview, one grey box under the head, written by PMOS (✦): where to start and why, the free time, the suggestions with ✓ ✕,
56
+ * and the type chips (with their counts) that filter the log. O: overviewModel(). o.type: the chip that filters now. */
57
+ export function overviewHtml(O, o = {}) {
58
+ if (!O || (!O.said && !O.chips.length)) return '';
59
+ const sug = O.suggest.map((x) => `<div class="td-ovs" role="group" aria-label="PMOS suggests"><b aria-hidden="true">✦</b><span>${esc(x.text)}</span>`
60
+ + ib('ov-yes', x.text, I.yes, x.key) + ib('ov-no', 'Keep them: ' + x.text, I.no, x.key) + '</div>').join('');
61
+ const total = O.chips.reduce((n, c) => n + c.n, 0);
62
+ const chip = (t, label, n) => `<button type="button" class="td-chip${(o.type || '') === t ? ' on' : ''}" data-td="type" data-key="${esc(t)}" aria-pressed="${(o.type || '') === t}">${esc(label)} <b>${esc(n)}</b></button>`;
63
+ const chips = O.chips.length > 1 ? `<div class="td-chips" role="group" aria-label="Show one type">${chip('', 'All', total)}${O.chips.map((c) => chip(c.type, PLURAL[c.type] || c.type, c.n)).join('')}</div>` : '';
64
+ return `<section class="td-ov" aria-label="Overview"><h2><b aria-hidden="true">✦</b> Overview</h2>${O.said ? `<p>${esc(O.said)}</p>` : ''}${sug}${chips}</section>`;
40
65
  }
66
+ const PLURAL = { Ask: 'Asks', Decision: 'Decisions', Check: 'Checks', Milestone: 'Milestones', Task: 'Tasks', Report: 'Reports', Note: 'Notes' };
41
67
 
42
- /** Today's log: the title and its count line, the capture line, the one card. L: logModel(). o: { news: N new for you, draft: the line being typed } */
68
+ const HEAD_ROW = '<div class="td-r td-hd" role="row"><span role="columnheader"></span><span role="columnheader"><span class="td-vh">Bullet</span></span><span role="columnheader">What</span><span role="columnheader">Type</span><span role="columnheader" class="td-wh">Work</span><span role="columnheader">Job</span><span role="columnheader">When</span><span role="columnheader"><span class="td-vh">Actions</span></span></div>';
69
+ const groupRow = (label, n) => `<div class="td-gr" role="row"><span role="cell">${esc(label)}${n ? ` <em>${esc(n)}</em>` : ''}</span></div>`;
70
+
71
+ /** Today's log: the title with its count at the left and the jobs at the right, the capture line, the one card in three groups:
72
+ * Do first (each line with its reason), Today, and Can wait folded to one line. L: logModel().
73
+ * o: { draft: the line being typed, type: the chip that filters, open: Can wait is unfolded } */
43
74
  export function logHtml(L, o = {}) {
44
- const head = `<div class="td-h"><h2>Today’s log</h2>${L.line ? `<span class="td-sum">${esc(L.line)}</span>` : ''}</div>`;
75
+ const head = `<div class="td-h"><h2>Today’s log${L.open ? ' · ' + esc(L.open) : ''}</h2>${L.line ? `<span class="td-sum">${esc(L.line)}</span>` : ''}</div>`;
45
76
  const cap = `<form class="td-in" id="tdCapF" autocomplete="off"><label class="td-in-l" for="tdCap">${svg(I.plus, 16)}<span class="td-vh">Log a task, an event or a note</span></label>`
46
77
  + `<input id="tdCap" name="line" type="text" maxlength="240" placeholder="Log a task, an event or a note" value="${esc(o.draft || '')}" aria-describedby="tdCapKey" />`
47
78
  + `<span class="td-key" id="tdCapKey" aria-label="Start with o for an event, a dash for a note, ! for first">•<em>task</em>o<em>event</em>–<em>note</em>!<em>first</em></span></form>`;
48
- const rows = L.rows.length ? L.rows.map(rowHtml).join('') : '';
49
- const table = rows ? `<div class="td-tt" role="table" aria-label="Today’s log"><div class="td-r td-hd" role="row"><span role="columnheader"></span><span role="columnheader"><span class="td-vh">Bullet</span></span><span role="columnheader">What</span><span role="columnheader">Work</span><span role="columnheader">Job</span><span role="columnheader">When</span><span role="columnheader"><span class="td-vh">Actions</span></span></div>${rows}</div>`
50
- : '<p class="td-none">Nothing waits on you today.</p>';
51
- const news = o.news > 0 ? `<button type="button" class="td-more" data-td="news">${esc(o.news)} new for you</button>` : '';
52
- return `<section class="td-log" aria-label="Today’s log">${head}${cap}${table}${news}</section>`;
79
+ const pick = (rows) => (o.type ? (rows || []).filter((r) => r.type === o.type) : rows || []);
80
+ const first = pick(L.first), today = pick(L.todayRows), wait = pick(L.wait);
81
+ let body = '';
82
+ if (first.length) body += groupRow('Do first') + first.map(rowHtml).join('');
83
+ if (today.length) body += groupRow('Today') + today.map(rowHtml).join('');
84
+ if (wait.length) {
85
+ const oldest = Math.max(0, ...wait.map((r) => r.carried || 0));
86
+ const said = (first.length || today.length ? wait.length + ' more' : plural2(wait.length)) + (oldest ? ' · the oldest waits ' + oldest + (oldest === 1 ? ' day' : ' days') : '');
87
+ body += `<div class="td-gr" role="row"><span role="cell"><button type="button" class="td-fold" data-td="fold" aria-expanded="${!!o.open}">Can wait <em>${esc(said)}</em>${svg(I.more, 14)}</button></span></div>`;
88
+ if (o.open) body += wait.map(rowHtml).join('');
89
+ }
90
+ // PMOS handled · N: what the self check cleared today, folded last, Undo on each (design check of round 3, point 6)
91
+ const hd = o.handled || [];
92
+ if (hd.length) {
93
+ body += `<div class="td-gr" role="row"><span role="cell"><button type="button" class="td-fold" data-td="hfold" aria-expanded="${!!o.hopen}">PMOS handled <em>${esc(hd.length)}</em>${svg(I.more, 14)}</button></span></div>`;
94
+ if (o.hopen) body += hd.map((h) => `<div class="td-r done hd" data-key="hd:${esc(h.id)}" role="row"><span class="td-p" role="cell"></span><span class="td-b" role="cell"><i role="img" aria-label="Done">×</i></span>`
95
+ + `<span role="cell" class="td-wt"><span class="td-t">${esc(h.title)}</span><small class="td-rs">${esc(h.proof)}</small></span><span class="td-ty" role="cell">${svg(TI.Ask, 13, 1.8)}<span>Ask</span></span>`
96
+ + `<span class="td-w" role="cell"></span><span class="td-k" role="cell"></span><span class="td-d" role="cell"></span><span class="td-a" role="cell">`
97
+ + `<button type="button" class="td-undo" data-td="h-undo" data-key="${esc(h.id)}" aria-label="${esc('Undo: it still waits on me, ' + h.title)}">Undo</button></span></div>`).join('');
98
+ }
99
+ // no row in view names its work: the Work column goes, so What gets the room
100
+ const shown = first.concat(today, o.open ? wait : []), noWork = shown.length > 0 && shown.every((r) => !r.work);
101
+ const table = body ? `<div class="td-tt${noWork ? ' nowork' : ''}" role="table" aria-label="Today’s log">${HEAD_ROW}${body}</div>` : '<p class="td-none">Nothing waits on you today.</p>';
102
+ return `<section class="td-log" aria-label="Today’s log">${head}${cap}${table}</section>`;
53
103
  }
104
+ const plural2 = (n) => n + (n === 1 ? ' line' : ' lines');
54
105
 
55
- /** Today's agenda in one grey box: the hours, the meetings and the PM's own events, the line for now. A: agendaModel(). */
106
+ /** Today's agenda in one grey box: the day by hours (a line every hour, a label every two), the meetings, the reports that go out, the
107
+ * PM's own events and the focus time PMOS holds (dashed), and the red line for now. The grid shows on an empty day too. A: agendaModel().
108
+ * Places are a share of the day (--t, --h), so the column fills the box, as tall as the log. */
56
109
  export function agendaHtml(A) {
57
- const PX = 56;
110
+ const H = A.to - A.from, pc = (x) => (Math.round((x / H) * 10000) / 100) + '%';
58
111
  const hours = [];
59
- for (let h = A.from; h <= A.to; h += 2) hours.push(`<span class="td-hr" style="--y:${(h - A.from) * PX}px">${String(h).padStart(2, '0')}:00</span>`);
112
+ for (let h = A.from; h <= A.to; h += 2) hours.push(`<span class="td-hr" style="--t:${pc(h - A.from)}">${String(h).padStart(2, '0')}:00</span>`);
60
113
  const ev = A.items.map((x) => {
61
- const short = x.h * PX < 46; // a short slot says its time and title on one line
62
- const st = `--y:${Math.round(x.top * PX) + 1}px;--h:${Math.max(30, Math.round(x.h * PX) - 3)}px`;
63
- const cls = ['td-ev', x.kind, short ? 'short' : '', x.past ? 'past' : '', x.nowOn ? 'on' : ''].filter(Boolean).join(' ');
114
+ const short = x.h < 0.8; // a short slot says its time and title on one line
115
+ const st = `--t:${pc(x.top)};--h:${pc(x.h)};--c:${x.col || 0};--n:${x.cols || 1}`;
116
+ const cls = ['td-ev', x.kind, short ? 'short' : '', (x.cols || 1) > 1 ? 'side' : '', x.past ? 'past' : '', x.nowOn ? 'on' : ''].filter(Boolean).join(' ');
117
+ const mark = x.kind === 'report' ? '<i class="td-dk" aria-hidden="true"></i>' : x.kind === 'focus' || x.kind === 'meeting' ? '<i class="td-dm" aria-hidden="true"></i>' : '';
64
118
  const label = x.title + ', ' + x.sub;
65
- return x.kind === 'own' ? `<div class="${cls}" style="${st}" aria-label="${esc(label)}"><b>${esc(x.title)}</b><small>${esc(x.sub)}</small></div>`
66
- : `<button type="button" class="${cls}" style="${st}" data-td="ev" data-key="${esc(x.key)}" aria-label="${esc(label)}"><b>${esc(x.title)}</b><small>${esc(x.sub)}</small></button>`;
119
+ const inner = `<b>${mark}${esc(x.title)}</b><small>${esc(x.sub)}</small>`;
120
+ if (x.kind === 'own' || x.kind === 'report') return `<div class="${cls}" style="${st}" aria-label="${esc(label)}">${inner}</div>`;
121
+ if (x.kind === 'focus') return `<button type="button" class="${cls}" style="${st}" data-td="open" data-key="${esc(x.row)}" aria-label="${esc(label)}">${inner}</button>`;
122
+ return `<button type="button" class="${cls}" style="${st}" data-td="ev" data-key="${esc(x.key)}" aria-label="${esc(label)}">${inner}</button>`;
67
123
  }).join('');
68
- const nowLine = A.now != null ? `<i class="td-now" style="--y:${Math.round(A.now * PX)}px" aria-hidden="true"></i>` : '';
69
- const grid = A.empty ? '<p class="td-none">No meeting today.</p>'
70
- : `<div class="td-tl" style="--rows:${A.to - A.from};--px:${PX}px">${hours.join('')}${ev}${nowLine}</div>`;
124
+ const nowLine = A.now != null ? `<i class="td-now" style="--t:${pc(A.now)}" aria-hidden="true"></i>` : '';
71
125
  return `<aside class="td-ag" aria-label="Today’s agenda"><div class="td-agh"><h2>Today</h2><small>${esc(A.sub)}</small>`
72
- + `<button type="button" class="td-ib" data-td="cal" aria-label="Open the calendar" title="Open the calendar">${svg(I.cal, 16)}</button></div>${grid}</aside>`;
126
+ + `<a class="td-evl" href="/premium-events.html">Events</a></div>`
127
+ + `<div class="td-tl" style="--rows:${H}">${hours.join('')}${ev}${nowLine}</div></aside>`;
73
128
  }
74
129
 
75
- /** The whole page. */
76
- export function pageHtml(L, A, o = {}) { return `<div class="td">${logHtml(L, o)}${agendaHtml(A)}</div>`; }
130
+ /** The page head: the day and the time, small, then the greeting. Hd: headModel(). */
131
+ export const headHtml = (Hd) => `<header class="td-top"><span class="td-when">${esc(Hd.when)}</span><h1>${esc(Hd.hello)}</h1></header>`;
132
+
133
+ /** The whole page: the Overview and the log at the left, the agenda beside them. o.overview: overviewModel(). */
134
+ export function pageHtml(L, A, o = {}) { return `${o.head ? headHtml(o.head) : ''}<div class="td"><div class="td-main">${o.overview ? overviewHtml(o.overview, o) : ''}${logHtml(L, o)}</div>${agendaHtml(A)}</div>`; }
@@ -57,7 +57,7 @@ import * as MSG from './ms-suggest.js'; // Your move's ✓ on a program's mile
57
57
  import * as AD from './cozy-adler.js'; // Adler, Claude's face (batch 16 item 2)
58
58
  import * as OKL from './okr-list.js'; // the product page's Goals line (batch 16 item 6, GsProduct)
59
59
  import { canDictate, dictate } from './home-dictate.js';
60
- import { mountIni, iniList, iniOverview, iniPage, iniAddTask, iniFresh } from './home-ini.js'; // the initiative's page, its stage move, Tasks and Core documents (premium-uncovered-features, HbC)
60
+ import { mountIni, iniList, iniOverview, iniPage, iniAddTask, iniFresh, iniLight } from './home-ini.js'; // the initiative's page, its stage move, Tasks and Core documents (premium-uncovered-features, HbC)
61
61
  import * as MEN from './home-mentions.js';
62
62
  import * as LS from './load-shapes.js'; // the last view, the grey shapes and the held Viewer column while Home reads (page-open-speed) // @Mentions, the permanent row at the top of Home and its Viewer (Viewer kit, XvANew)
63
63
  import { mountRecRow, clockOf as recClock } from './home-rec-row.js';
@@ -368,7 +368,8 @@ function homeListHtml() {
368
368
  const M = L.homeList(S.D, { now: NOW(), filter: S.filter });
369
369
  S.M = M;
370
370
  // Adler's ears over the floating button (batch 17 item 4-B, AdP6): the place menu hears how many calls are the PM's
371
- { const n = (M.move || []).filter((r) => r.call).length; if (n !== S.calls) { S.calls = n; document.dispatchEvent(new CustomEvent('cz:calls', { detail: { count: n } })); } }
371
+ // on Today (a desk) the number is Today's own (pm/cozy-today-app.js: Do first and what waits today), so it is not sent here
372
+ if (!(TD_PAGE && !isPhone())) { const n = (M.move || []).filter((r) => r.call).length; if (n !== S.calls) { S.calls = n; document.dispatchEvent(new CustomEvent('cz:calls', { detail: { count: n } })); } }
372
373
  // the ✦ chip on "Not in an initiative" is gone (UI grill delete list): Claude's clean-up is a row in Your move (rankIn extra)
373
374
  const R = L.reviewModel(S.D, NOW());
374
375
  // a group is open until the PM folds it; another product starts folded; "Not in an initiative" starts folded on a phone (HvAC, HvACDesk)
@@ -429,8 +430,8 @@ function rankIn() {
429
430
  // the UI grill's delete list: Your impact's card and the ✦ chip on "Not in an initiative" are gone from Home; they land here instead
430
431
  const extra = [];
431
432
  if (S.impact && S.impact.c && !S.impact.c.looked) extra.push({ key: 'impact', go: 'impact', title: 'Your impact: ' + S.impact.c.label + ' is ready to check', sub: 'A thank-you and what really moved, from your records.' });
432
- const lp = LPV.chipOf(); if (lp) extra.push({ key: 'loose', go: 'loose', title: 'Not in an initiative: ' + lp.n + (lp.n === 1 ? ' row' : ' rows') + ' to tidy', sub: 'PMOS proposes where each one belongs.' });
433
- for (const l of S.lab || []) extra.push({ key: 'lab:' + l.ws, go: 'lab', ws: l.ws, board: l.board, title: 'Lab: ' + l.n + (l.n === 1 ? ' finding fits' : ' findings fit') + ' no initiative', sub: l.say || 'Keep one to start an initiative, or let it go.' });
433
+ const lp = LPV.chipOf(); if (lp) extra.push({ key: 'loose', go: 'loose', title: lp.n + (lp.n === 1 ? ' loose row' : ' loose rows') + ' to place in an initiative', sub: 'PMOS proposes where each one belongs.' });
434
+ for (const l of S.lab || []) extra.push({ key: 'lab:' + l.ws, go: 'lab', ws: l.ws, board: l.board, title: l.n + (l.n === 1 ? ' Lab finding' : ' Lab findings') + ' to keep or drop', sub: l.say || 'Keep one to start an initiative, or let it go.' });
434
435
  return { products, programs: S.D.programs || [], move: S.move || {}, mentions: MEN.mentionsOf(S.D).waiting, outbox: S.outbox || [], gaps: (S.wait && S.wait.gaps) || [], extra };
435
436
  }
436
437
  /** Each product's GET /api/your-move, read when Your day opens (never on Home's first draw: page speed). */
@@ -1497,6 +1498,7 @@ async function goIni(id, o = {}) {
1497
1498
  const was = S.ini;
1498
1499
  S.ini = id; S.sel = null; S.head = id === 'product' ? productKey() : null; S.doneOpen = false; S.stepsMore = false;
1499
1500
  if (was !== id) { S.IM = null; S.IMid = null; }
1501
+ iniLight(id, o.task || null); // a Today task row: the page opens at that task, lit (round 3 item 11b); any other open lights nothing
1500
1502
  if (isPhone()) sheet(false);
1501
1503
  drawList();
1502
1504
  // the address follows the page, so the entry before it (the trail's start, batch 14 item 7) keeps Home's own address
@@ -1814,7 +1816,7 @@ function openUpdateViewer(o = {}) {
1814
1816
  const it = (x) => x.key ? `<div class="czs-it"><span class="w">${esc(x.title)}<span>${esc([x.meta, x.text].filter(Boolean).join(' · '))}</span></span></div>` : `<button type="button" class="czs-it" data-hv-ini="${esc(x.id)}"><span class="w">${esc(x.title)}<span>${esc([x.meta, x.text].filter(Boolean).join(' · '))}</span>${x.flag ? `<span class="flag">${esc(x.flag)}</span>` : ''}</span></button>`;
1815
1817
  // "Before you send": Claude's risks the PM has not confirmed, with one press that confirms them all (each a ✓ Keep on its program's charter)
1816
1818
  const confirmAll = (L) => { const say = L.length === 1 ? 'Confirm this risk' : 'Confirm all ' + L.length + ' risks'; return `<p><button type="button" class="hv-chip" data-hv-confirm aria-label="${say}" title="${say}">${SVG(I.check, 15, 2.4)}</button></p>`; };
1817
- const secs = VW.czSections(U.sections.filter(([k, , L]) => L.length || k !== 'none').map(([k, h, L]) => ({ id: k, title: h, count: L.length, open: k !== 'ok' && L.length > 0, html: L.map(it).join('') + (k === 'confirm' && L.length ? confirmAll(L) : '') }))
1819
+ const secs = VW.czSections(U.sections.filter(([, , L]) => L.length).map(([k, h, L]) => ({ id: k, title: h, count: L.length, open: k !== 'ok' && L.length > 0, html: L.map(it).join('') + (k === 'confirm' && L.length ? confirmAll(L) : '') }))
1818
1820
  .concat([{ id: 'src', title: 'Sources', count: 'Jira, plan dates, confirmed risks · ' + H.hm(new Date(S.D.now).toISOString()), html: '<p>Drafted by Communicator from what PMOS read: the Jira tickets, the dates of the plan items and the risks you confirmed. An initiative nothing was read for is under Not read, never under On track.</p>' }]), { key: 'weekly' });
1819
1821
  const to = edit ? `<div class="hv-to"><span>To</span>${U.to.map((x, i) => `<button type="button" class="hv-chip" data-hv-rm="${i}" aria-label="Remove ${esc(x)}" title="Remove">${esc(x)}</button>`).join('')}<input id="hvTo" placeholder="${U.to.length ? 'Add' : 'Who gets it: a name, a mail or #channel'}" aria-label="Add a recipient"></div>` : '';
1820
1822
  const old = past ? `<div class="czs-secs"><div class="czs-body" style="padding-top:12px">${(U.sent || []).length ? U.sent.slice().reverse().map((x) => `<div class="czs-it"><span class="w">Week ${esc(x.week)}<span>${esc(new Date(x.at).toDateString())} · to ${esc((x.to || []).join(', '))}</span></span></div>`).join('') : '<p>No update was sent yet.</p>'}</div></div>` : '';
@@ -2398,7 +2400,11 @@ mountPanels({
2398
2400
  if (TD_PAGE) TDY = mountToday({ S, VW, POP, pmGet, pmPost, toast, toastUndo, isPhone, now: NOW,
2399
2401
  rank: () => { S.topRank = rankMove({ ...rankIn(), calls: YD.callsOf((S.M && S.M.move) || []), now: NOW() }); return S.topRank; },
2400
2402
  rows: () => new Map(allRows().map((r) => [r.id, r])), titleOf: (id) => (iniRowOf(id) ? iniTitle(id) : String(id || '').replace(/[-_]+/g, ' ').replace(/^./, (c) => c.toUpperCase())), hasIni: (id) => !!(id && iniRowOf(id)), boardWs, boardId,
2401
- goIni: (id) => goIni(id), select: (id) => select(id), movePress: (b) => movePress(b), openFinished, openReviewVw, openMeeting: (m) => openMeeting(m), openCalendar,
2403
+ goIni: (id, o) => goIni(id, o || {}), select: (id) => select(id),
2404
+ // a mention row opens that one mention (Today round 3), never the Mentions list
2405
+ openMention: (id, o) => { const L = MEN.mentionsOf(S.D), m = [...L.waiting, ...L.toread, ...L.answered].find((x) => x.id === id) || (o && o.m); if (!m) return false; MEN.openOneMention(m, menCtx(), o || {}); return true; },
2406
+ mentions: () => MEN.mentionsOf(S.D), mentionAct: (id, act) => pmPost('/api/mentions/act', { id, act }), reloadMentions: () => MEN.load(menCtx()).then(() => drawList()),
2407
+ movePress: (b) => movePress(b), openFinished, openReviewVw, openMeeting: (m) => openMeeting(m), openCalendar,
2402
2408
  openInbox: () => MORE.openInbox(searchGo, ''), reload: () => load(), review: () => L.reviewModel(S.D, NOW()), meetings: () => H.todayOf(S.D),
2403
2409
  news: () => (S.news && S.news.ok ? S.news.count || 0 : 0), chatNow: () => (chat.current ? chat.current() : null),
2404
2410
  openLab: (f) => import('./cozy-lab-ins.js').then((LB) => LB.openLab({ where: () => ({ ws: f.ws, board: f.board }), iniHref: (id) => '/premium-initiative.html?' + (f.ws ? 'ws=' + encodeURIComponent(f.ws) + '&' : '') + 'id=' + encodeURIComponent(id), toast: (m, undo) => (undo ? toastUndo(m, undo) : toast(m)) })) });
@@ -2436,6 +2442,8 @@ load().then(() => {
2436
2442
  if (open && !blockOpen) {
2437
2443
  // ?item=pt:<program>:<key> (the program panel's link to a program task) names the row by its id; Home lists no task, so the chat opens
2438
2444
  const r = allRows().find((x) => x.key === open || (/^pt:/.test(open) && x.id === open));
2445
+ // on Today the item opens in the one popup (design audit of slice 5); on Home, beside the list as before
2446
+ if (r && TD_PAGE && !isPhone()) VW.popNext({ keep: true, id: r.id, kind: 'item', title: r.name || r.title || '' });
2439
2447
  if (r) select(r.id); else if (KEY.test(open)) openTarget({ ...homeTarget(), key: open, title: open });
2440
2448
  }
2441
2449
  else if (sid) { const s = S.D.sessions.find((x) => x.id === sid); if (s) { S.sel = 's:' + s.id; openTarget(sessionTarget(s)); followViewer(s); drawList(); } else { openTarget(homeTarget()); toast('That session is not on this machine.'); } }
@@ -219,7 +219,7 @@ export function weeklyUpdate(D, now = Date.now()) {
219
219
  const t = trail[r.id], u = t && usual[String(r.stage || '').toLowerCase()];
220
220
  const days = t && t.days != null ? 'In ' + r.stage + ' for ' + plural(t.days, 'day', 'days') : 'In ' + (r.stage || 'no stage');
221
221
  const over = t && u && u.days != null && t.days > u.days ? ', ' + plural(t.days - u.days, 'day', 'days') + ' over its usual time' : '';
222
- const fin = r.finish ? '. Planned finish ' + r.finish : '';
222
+ const fin = r.finish ? (/^not planned$/i.test(String(r.finish).trim()) ? '. No planned finish' : '. Planned finish ' + r.finish) : '';
223
223
  const why = r.signal && r.signal.why ? '. ' + r.signal.why : '';
224
224
  return days + over + fin + why + '.';
225
225
  };
@@ -35,6 +35,7 @@ import { viewHtml, wireView } from './ini-view.js'; // the one initiative view
35
35
  import { ensureCss as ensureStepsCss } from './cozy-steps.js'; // stage card D: the card's last node and the move sheet's words // D99: the initiative's own workflow (Change picker, switch, Won't do, Archive)
36
36
  import * as DB from './dash-view.js'; // the ready-made Dashboard view (batch 17 item 1)
37
37
  import * as TL from './ini-tail.js';
38
+ import * as ED from './ini-edit.js'; // round 3 item 11b: a Today task row opens its initiative with that task's row open in place
38
39
  import * as PW from './cozy-pop-work.js'; // what the popup shows for work (slice 3 of the six-place navigation): in the popup, in place of the old page
39
40
  import * as PP from './ini-props.js'; // everything PMOS suggests, as a drill-in (the popup's ⋯) // under Linked, as the Board draws it (UI grill U1): drafted tickets, the PRD drift, Your impact
40
41
  import * as SWN from './cozy-status-when.js'; // the day a status move really happened, in the toast (round 3 point 18)
@@ -525,6 +526,21 @@ export function iniAddTask() {
525
526
  const KIND = { docs: 'Documents', stage: 'Stage' };
526
527
  const ICON = { docs: 'doc', stage: 'goal' };
527
528
  let BODY = null;
529
+ /* round 3 item 11b: a Today row that is a task opens its initiative at that task: the row lit, open in place (date, owner, status), in view */
530
+ let LIT = null; // { id, uid, seen }
531
+ /** The task the initiative's next draw lights. id: the initiative; uid: the task. */
532
+ export function iniLight(id, uid) {
533
+ LIT = id && uid ? { id, uid: String(uid), seen: false } : null;
534
+ if (id) PW.focus(id, LIT ? LIT.uid : '');
535
+ if (LIT) ED.openRow(id, LIT.uid);
536
+ }
537
+ function light(b, id) {
538
+ if (!LIT || LIT.id !== id || !b) return;
539
+ const sel = typeof CSS !== 'undefined' && CSS.escape ? CSS.escape(LIT.uid) : LIT.uid.replace(/["\\]/g, '');
540
+ const row = b.querySelector('[data-iv-r="' + sel + '"],[data-pw-row="' + sel + '"]'); if (!row) return;
541
+ row.classList.add('lit');
542
+ if (!LIT.seen) { LIT.seen = true; try { row.scrollIntoView({ block: 'center' }); } catch { /* an old browser: it stays where it is */ } }
543
+ }
528
544
  function segHtml(v) { return `<div class="cz-seg hi-seg" role="group" aria-label="Show">${Object.entries(KIND).map(([k, l]) => `<button type="button" data-hi-view="${k}" aria-pressed="${k === v}">${l}</button>`).join('')}</div>`; }
529
545
  function docRowHtml(d, cur, later, phases) {
530
546
  const draft = d.act && d.act.kind === 'draft' && !d.running && !d.path && d.st !== 'stale';
@@ -575,7 +591,7 @@ function draw(b) {
575
591
  const v = X.view;
576
592
  if (v !== 'page') b.__pg = null;
577
593
  if (v === 'page' && dashFor(id) && dashFor(id).shows()) { b.__pg = null; b.innerHTML = dashFor(id).html(() => ''); return; }
578
- if (v === 'page') { const h = PW.on(b) ? popHtml(id, M) : pageHtml(id, M); if (b.__pg !== h || !b.firstChild) { b.__pg = h; b.innerHTML = h; } return; }
594
+ if (v === 'page') { const h = PW.on(b) ? popHtml(id, M) : pageHtml(id, M); if (b.__pg !== h || !b.firstChild) { b.__pg = h; b.innerHTML = h; } light(b, id); return; }
579
595
  // Documents is shell A (XvADocs): no tabs, the summary card and folding groups straight in the body
580
596
  if (v === 'docs') { b.innerHTML = docsView(id, M) + '<p class="hi-small" role="status" id="ovMsg"></p>'; return; }
581
597
  // the phone keeps the Documents | Stage switch (PgTkList); in shell A on a desktop the other view sits under ⋯ (XvATasks)