create-pmos 0.402.0 → 0.404.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 (110) hide show
  1. package/package.json +25 -30
  2. package/payload/AGENTS.md +2 -0
  3. package/payload/KIT-VERSION +1 -1
  4. package/payload/mods/pmos-cockpit/hooks/lib/session-facts.mjs +1 -1
  5. package/payload/planning/evals/eval-calibration.md +1 -1
  6. package/payload/planning/okrs/health-budgets.md +1 -1
  7. package/payload/state/discoveries.md +1 -1
  8. package/workspace/board-programs-test.js +32 -5
  9. package/workspace/briefing-premium-adddoc-test.js +28 -22
  10. package/workspace/briefing-premium-board-test.js +91 -73
  11. package/workspace/briefing-premium-calendar-2-test.js +23 -10
  12. package/workspace/briefing-premium-calendar-3-test.js +23 -19
  13. package/workspace/briefing-premium-calendar-test.js +19 -17
  14. package/workspace/briefing-premium-initiative-test.js +25 -12
  15. package/workspace/briefing-premium-insights-test.js +31 -18
  16. package/workspace/briefing-premium-metrics-test.js +8 -8
  17. package/workspace/briefing-premium-test.js +4 -3
  18. package/workspace/changelog.json +24 -0
  19. package/workspace/fixtures/premium-viewer-fixtures.js +24 -2
  20. package/workspace/guide/jira.md +38 -6
  21. package/workspace/guide/programs.md +2 -0
  22. package/workspace/home-rows-test.js +184 -0
  23. package/workspace/lib/briefing-premium-agent.js +3 -0
  24. package/workspace/lib/calendar-layers.js +8 -4
  25. package/workspace/lib/initiative-layout.js +4 -3
  26. package/workspace/lib/jira-cli.js +17 -12
  27. package/workspace/lib/jira-status.js +1 -1
  28. package/workspace/lib/jira-tickets.js +126 -24
  29. package/workspace/lib/meeting-files.js +58 -0
  30. package/workspace/lib/meeting-learn.js +139 -0
  31. package/workspace/lib/meeting-material.js +12 -5
  32. package/workspace/lib/notes.js +3 -0
  33. package/workspace/lib/program-chat.js +32 -0
  34. package/workspace/lib/routes-brief-page.js +8 -1
  35. package/workspace/lib/routes-calendar-views.js +24 -3
  36. package/workspace/lib/routes-meeting-material.js +38 -0
  37. package/workspace/lib/routes-meeting-points.js +23 -3
  38. package/workspace/package-lock.json +2 -2
  39. package/workspace/package.json +1 -1
  40. package/workspace/premium-board-actions-test.js +30 -24
  41. package/workspace/premium-chat-context-test.js +1 -1
  42. package/workspace/premium-chat-goal-view-test.js +1 -1
  43. package/workspace/premium-chat-viewer-test.js +1 -1
  44. package/workspace/premium-core-doc-issue-test.js +13 -7
  45. package/workspace/premium-discuss-landing-test.js +83 -0
  46. package/workspace/premium-link-suggest-test.js +103 -0
  47. package/workspace/premium-report-read-test.js +86 -82
  48. package/workspace/premium-vw-backlog-test.js +6 -5
  49. package/workspace/premium-vw-cal-test.js +46 -23
  50. package/workspace/premium-vw-item-test.js +8 -6
  51. package/workspace/premium-vw-jira-test.js +3 -2
  52. package/workspace/premium-vw-meet-test.js +122 -66
  53. package/workspace/premium-vw-notes-test.js +7 -6
  54. package/workspace/premium-vw-rec-test.js +14 -13
  55. package/workspace/premium-vw-slides-test.js +11 -5
  56. package/workspace/program-panel-test.js +64 -55
  57. package/workspace/public/pm/bd-acts.js +1 -1
  58. package/workspace/public/pm/bd-asks.js +22 -7
  59. package/workspace/public/pm/bd-ini-panel.js +232 -0
  60. package/workspace/public/pm/bd-pop.js +2 -2
  61. package/workspace/public/pm/bd-prog-panel.js +176 -191
  62. package/workspace/public/pm/cozy-board.css +5 -28
  63. package/workspace/public/pm/cozy-evui.js +4 -2
  64. package/workspace/public/pm/cozy-home-rows.css +54 -0
  65. package/workspace/public/pm/cozy-home.css +9 -0
  66. package/workspace/public/pm/cozy-insights.css +1 -2
  67. package/workspace/public/pm/cozy-mtg-present.css +160 -0
  68. package/workspace/public/pm/cozy-panel.css +11 -34
  69. package/workspace/public/pm/cozy-rec-pill.css +12 -0
  70. package/workspace/public/pm/cozy-rec-pill.js +46 -0
  71. package/workspace/public/pm/cozy-viewer.js +307 -43
  72. package/workspace/public/pm/cozy-vw-mtg.css +96 -94
  73. package/workspace/public/pm/cozy-vw-rp.css +40 -25
  74. package/workspace/public/pm/cozy-vw-shell.css +127 -0
  75. package/workspace/public/pm/cozy-xv.css +51 -0
  76. package/workspace/public/pm/cozy-xv.js +34 -0
  77. package/workspace/public/pm/goal-chat.js +1 -1
  78. package/workspace/public/pm/home-app.js +122 -58
  79. package/workspace/public/pm/home-chat.js +11 -2
  80. package/workspace/public/pm/home-day.js +64 -0
  81. package/workspace/public/pm/home-ini-model.js +1 -1
  82. package/workspace/public/pm/home-ini.js +197 -54
  83. package/workspace/public/pm/home-list.js +6 -14
  84. package/workspace/public/pm/home-mentions.js +187 -0
  85. package/workspace/public/pm/home-rec-row.js +67 -0
  86. package/workspace/public/pm/home-review.js +20 -10
  87. package/workspace/public/pm/home-task.js +19 -18
  88. package/workspace/public/pm/home-today.js +3 -3
  89. package/workspace/public/pm/premium-board.js +83 -235
  90. package/workspace/public/pm/premium-insights.js +118 -82
  91. package/workspace/public/pm/premium-mtg-present.js +408 -100
  92. package/workspace/public/pm/premium-mtg-replay.js +70 -10
  93. package/workspace/public/pm/premium-report-read.js +118 -63
  94. package/workspace/public/pm/premium-vw-cal.js +62 -34
  95. package/workspace/public/pm/premium-vw-mtg.js +348 -192
  96. package/workspace/public/pm/rec-state.js +63 -0
  97. package/workspace/public/pm/rp-parts.js +33 -8
  98. package/workspace/public/pm/tk-draft.js +107 -0
  99. package/workspace/public/pm/tk-model.js +134 -0
  100. package/workspace/public/pm/tk-send.js +124 -0
  101. package/workspace/public/pm/tk-tasks.css +120 -0
  102. package/workspace/public/premium-board.html +0 -1
  103. package/workspace/server.js +4 -2
  104. package/workspace/skills/jira-push.skill +3 -3
  105. package/workspace/test-lists/prd-to-jira.json +6 -0
  106. package/workspace/test-lists/program-chat.json +6 -0
  107. package/workspace/test-lists/viewer-home-rows.json +9 -0
  108. package/workspace/test-lists/viewer-meetings.json +9 -0
  109. package/workspace/test-lists/viewer-shell-a.json +15 -0
  110. package/workspace/tk-tasks-test.js +199 -0
@@ -0,0 +1,120 @@
1
+ /* pm/tk-tasks.css — the PRD-to-Jira tasks (kit 2, T1 to T3): the epic groups (PgTkList, PgTkSent), the drafted ticket (PgTkDraft) and the
2
+ * Send sheet (PgTkSend). Colors come from the cozy tokens (cozy.css), so dark mode follows them. Loaded by home-ini.js and tk-send.js. */
3
+
4
+ /* ── T1 · the epic groups ── */
5
+ .tk-g { display: flex; flex-direction: column; }
6
+ .tk-gh { position: relative; display: flex; align-items: center; }
7
+ .tk-ghb { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 6px 0 2px; padding: 0 8px; background: none; border: 0; font: inherit; color: var(--cz-ink); text-align: left; cursor: pointer; border-radius: 12px; }
8
+ .tk-gh.s .tk-ghb { padding-right: 8px; }
9
+ .tk-ghb b { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
10
+ .tk-gh.s .tk-ghb b { padding-right: 44px; }
11
+ .tk-ghb[aria-expanded="false"] b { color: var(--cz-ink2); font-weight: 700; }
12
+ .tk-ghr { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--cz-ink3); }
13
+ .tk-ghb:focus-visible, .tk-snd:focus-visible, .tk-row:focus-visible, .tk-fold:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -2px; }
14
+ /* the send icon sits before the count, inside the header row (PgTkList .gh .r) */
15
+ .tk-snd { position: absolute; right: 52px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 999px; border: 0; background: none; color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
16
+ .tk-snd:hover { background: var(--cz-well); color: var(--cz-ink); }
17
+ .tk-list { background: var(--cz-card); border-radius: 20px; padding: 2px 0; box-shadow: 0 8px 24px -20px rgba(42, 46, 53, .35); }
18
+ .tk-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 14px 6px 12px; background: none; border: 0; font: inherit; color: var(--cz-ink); text-align: left; cursor: pointer; border-radius: 16px; }
19
+ .tk-row + .tk-row::before, .tk-row + .tk-fold::before { content: ""; position: absolute; left: 42px; right: 14px; top: 0; height: 1px; background: var(--cz-hair); }
20
+ .tk-row:hover { background: color-mix(in srgb, var(--cz-well) 45%, var(--cz-card)); }
21
+ .tk-ck { width: 18px; display: inline-flex; justify-content: center; flex: none; }
22
+ .tk-sq { width: 10px; height: 10px; border-radius: 3px; display: block; background: color-mix(in srgb, var(--cz-blue) 30%, var(--cz-card)); }
23
+ .tk-sq.doing { background: var(--cz-blue); }
24
+ .tk-sq.done { background: var(--cz-ok); }
25
+ .tk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
26
+ .tk-t b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
27
+ .tk-t span { font-size: 12.5px; color: var(--cz-ink3); }
28
+ .tk-mk { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
29
+ .tk-mk.warn { background: var(--cz-risk); }
30
+ .tk-mk.info { background: var(--cz-blue); }
31
+ .tk-av { width: 24px; height: 24px; border-radius: 50%; background: var(--cz-well); color: var(--cz-ink2); font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
32
+ .tk-fold { position: relative; display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 14px 0 42px; background: none; border: 0; font: 600 14px var(--cz-sans); color: var(--cz-ink2); cursor: pointer; text-align: left; justify-content: space-between; border-radius: 16px; }
33
+ .tk-read { margin: 8px 8px 0; font-size: 13px; color: var(--cz-ink3); }
34
+ .tk-card { background: var(--cz-card); border-radius: 20px; padding: 12px 14px; box-shadow: 0 8px 24px -20px rgba(42, 46, 53, .35); }
35
+ .tk-empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
36
+ .tk-empty p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--cz-ink2); }
37
+ .hi-v .tk-g.hi-tg { border-radius: 0; }
38
+
39
+ /* ── T2 · one drafted ticket ── */
40
+ .tk-v { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; position: relative; }
41
+ .tk-crumb { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); }
42
+ .tk-flag { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cz-ink2); }
43
+ .tk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
44
+ .tk-f { background: var(--cz-card); border: 0; border-radius: 14px; padding: 8px 12px; min-height: 52px; display: flex; flex-direction: column; justify-content: center; text-align: left; font: inherit; color: var(--cz-ink); cursor: pointer; box-shadow: 0 8px 24px -20px rgba(42, 46, 53, .35); }
45
+ .tk-f:hover { background: color-mix(in srgb, var(--cz-well) 45%, var(--cz-card)); }
46
+ .tk-f:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
47
+ .tk-fl { font-size: 11px; font-weight: 800; color: var(--cz-ink3); }
48
+ .tk-fv { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
49
+ .tk-fv.mut, .tk-mut { color: var(--cz-ink3); font-weight: 600; }
50
+ .tk-sh { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
51
+ .tk-sh h3 { flex: 1; margin: 0; font-size: 12.5px; font-weight: 800; color: var(--cz-ink3); }
52
+ .tk-sec2 p, .tk-cb2 p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.45; }
53
+ .tk-sec2 ol, .tk-sec2 ul, .tk-cb2 ol, .tk-cb2 ul { margin: 0 0 6px; padding-left: 20px; font-size: 13.5px; line-height: 1.45; }
54
+ .tk-ac { display: flex; gap: 8px; font-size: 13px; line-height: 1.4; padding: 6px 0; border-top: 1px solid var(--cz-hair); }
55
+ .tk-ac:first-of-type { border-top: 0; }
56
+ .tk-ac em { font-style: normal; font-weight: 800; color: var(--cz-ink3); flex: none; }
57
+ .tk-miss { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cz-ink2); }
58
+ .tk-ib { width: 32px; height: 32px; border-radius: 999px; border: 0; background: none; color: var(--cz-ink3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
59
+ .tk-ib:hover { background: var(--cz-well); color: var(--cz-ink); }
60
+ .tk-folds { padding: 0 14px; }
61
+ .tk-coll + .tk-coll { border-top: 1px solid var(--cz-hair); }
62
+ .tk-cr { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0; background: none; border: 0; font: inherit; color: var(--cz-ink); cursor: pointer; text-align: left; }
63
+ .tk-cr b { flex: 1; font-size: 13.5px; font-weight: 700; }
64
+ .tk-cn { font-size: 12px; color: var(--cz-ink3); font-weight: 600; }
65
+ .tk-cr svg { color: var(--cz-ink3); }
66
+ .tk-cb2 { padding: 0 0 10px; }
67
+ .tk-cba { display: flex; justify-content: flex-end; }
68
+ .tk-ed { display: flex; flex-direction: column; gap: 8px; }
69
+ .tk-ed textarea { width: 100%; box-sizing: border-box; min-height: 120px; border: 1px solid var(--cz-hair); border-radius: 12px; padding: 10px 12px; font: 13.5px/1.45 var(--cz-sans); color: var(--cz-ink); background: var(--cz-card); resize: vertical; }
70
+ .tk-eda { display: flex; gap: 8px; }
71
+ .tk-vh { position: absolute; left: -9999px; }
72
+ .tk-fab { position: sticky; bottom: 16px; align-self: flex-end; margin-top: 0; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--cz-solid); color: var(--cz-onsolid); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 14px 34px -12px rgba(42, 46, 53, .45); z-index: 2; }
73
+ .tk-fab:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 3px; }
74
+ .tk-msg { margin: 0; font-size: 13px; color: var(--cz-late); min-height: 0; }
75
+ .tk-msg:empty { display: none; }
76
+
77
+ /* ── T3 · the Send sheet ── */
78
+ .tk-scrim { position: fixed; inset: 0; background: rgba(42, 46, 53, .38); z-index: 1000; }
79
+ .tk-sheet { position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; box-sizing: border-box;
80
+ background: var(--cz-card); color: var(--cz-ink); border-radius: 28px; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 14px; font-family: var(--cz-sans); box-shadow: 0 30px 80px -30px rgba(42, 46, 53, .5); }
81
+ .tk-sheet.phone { left: 0; right: 0; bottom: 0; top: auto; transform: none; width: auto; max-height: calc(100vh - 150px); border-radius: 28px 28px 0 0; padding: 10px 18px 20px; }
82
+ .tk-grab { display: none; width: 40px; height: 5px; border-radius: 3px; background: var(--cz-hair); margin: 0 auto 4px; }
83
+ .tk-sheet.phone .tk-grab { display: block; }
84
+ .tk-h { margin: 0; font-size: 19px; font-weight: 800; }
85
+ .tk-note { margin: 0; font-size: 13.5px; color: var(--cz-ink2); }
86
+ .tk-where { background: var(--cz-well); border-radius: 18px; overflow: hidden; }
87
+ .tk-wr { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 46px; font-size: 13.5px; box-sizing: border-box; }
88
+ .tk-wr + .tk-wr, .tk-where > .tk-wr ~ .tk-wr { border-top: 1px solid var(--cz-hair); }
89
+ .tk-wl { width: 64px; flex: none; font-size: 12px; font-weight: 800; color: var(--cz-ink3); }
90
+ .tk-wv { flex: 1; min-width: 0; font-weight: 700; }
91
+ .tk-wv.mut { color: var(--cz-ink3); font-weight: 600; }
92
+ .tk-sel { flex: 1; font: 700 13.5px var(--cz-sans); color: var(--cz-ink); background: none; border: 0; }
93
+ .tk-chg { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; font: 700 13px var(--cz-sans); color: var(--cz-ink3); cursor: pointer; min-height: 36px; }
94
+ .tk-chgbox { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 12px; }
95
+ .tk-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--cz-card); border: 1px solid var(--cz-hair); border-radius: 14px; padding: 8px 12px; font: 700 13.5px var(--cz-sans); color: var(--cz-ink); cursor: pointer; }
96
+ .tk-opt.on { border-color: var(--cz-blue); }
97
+ .tk-opt em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--cz-ink3); }
98
+ .tk-fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; color: var(--cz-ink3); }
99
+ .tk-row2 { display: flex; gap: 8px; }
100
+ .tk-fld input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--cz-hair); border-radius: 12px; padding: 0 12px; font: 13.5px var(--cz-sans); color: var(--cz-ink); background: var(--cz-card); }
101
+ .tk-use { height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--cz-solid); color: var(--cz-onsolid); font: 700 13px var(--cz-sans); cursor: pointer; }
102
+ .tk-sec { display: flex; flex-direction: column; gap: 8px; }
103
+ .tk-sn { margin: 0; font-size: 12px; font-weight: 800; color: var(--cz-ink3); }
104
+ .tk-items { display: flex; flex-direction: column; }
105
+ .tk-it { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; background: none; border: 0; border-top: 1px solid var(--cz-hair); font: inherit; color: var(--cz-ink); text-align: left; cursor: pointer; }
106
+ .tk-it:first-child { border-top: 0; }
107
+ .tk-itx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
108
+ .tk-it b { font-size: 13.5px; font-weight: 700; }
109
+ .tk-it[aria-disabled="true"] { cursor: default; color: var(--cz-ink3); }
110
+ .tk-it:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 8px; }
111
+ .tk-why { font-size: 12px; font-weight: 600; color: var(--cz-ink3); }
112
+ .tk-cb { width: 20px; height: 20px; border-radius: 6px; background: var(--cz-solid); color: var(--cz-onsolid); display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; }
113
+ .tk-cb.off { background: transparent; border: 1.5px solid var(--cz-ink3); opacity: .6; }
114
+ .tk-acts { margin-top: auto; display: flex; gap: 8px; }
115
+ .tk-acts button, .tk-go.sm, .tk-c.sm { flex: 1; height: 50px; border-radius: 999px; font: 800 14px var(--cz-sans); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
116
+ .tk-go.sm, .tk-c.sm { flex: none; height: 38px; padding: 0 16px; font-size: 13px; }
117
+ .tk-c { background: var(--cz-card); border: 1px solid var(--cz-hair); color: var(--cz-ink); }
118
+ .tk-go { background: var(--cz-solid); border: 0; color: var(--cz-onsolid); }
119
+ .tk-go:disabled { opacity: .45; cursor: default; }
120
+ .tk-acts button:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
@@ -69,7 +69,6 @@
69
69
  <div class="bd-pop bd-pop-xw" id="popRules" role="dialog" aria-labelledby="hRules" hidden></div>
70
70
 
71
71
  <!-- the initiative panel and the Jira ticket panel (a bottom sheet on a phone) -->
72
- <aside class="bd-peek" id="peek" aria-labelledby="pkTitle" hidden></aside>
73
72
  <div class="bd-toast" id="bdToast" role="status" hidden></div>
74
73
  </main>
75
74
  <noscript>This page needs JavaScript.</noscript>
@@ -8226,7 +8226,7 @@ async function handleRequest(req, res) {
8226
8226
  try {
8227
8227
  if (act === 'draft') return answer(jiraTickets.draft(w.root, id));
8228
8228
  if (act === 'edit') return answer(jiraTickets.edit(w.root, id, String(body.id || ''), body.patch));
8229
- if (act === 'epic') return answer(jiraTickets.setEpic(w.root, id, { mode: body.mode, key: body.key }));
8229
+ if (act === 'epic') return answer(jiraTickets.setEpic(w.root, id, { mode: body.mode, key: body.key, group: body.group == null ? null : String(body.group) }));
8230
8230
  if (act === 'prd') return answer(jiraTickets.resolvePrd(w.root, id, String(body.id || ''), String(body.use || '')));
8231
8231
  const start = (skill, name, origin, ask, map) => {
8232
8232
  const task = taskById(skill, w.root);
@@ -8242,7 +8242,9 @@ async function handleRequest(req, res) {
8242
8242
  const ids = Array.isArray(body.ids) ? body.ids.map(String).slice(0, 200) : [];
8243
8243
  const r = jiraTickets.approve(w.root, id, ids);
8244
8244
  if (!r.ok) return answer(r);
8245
- return start('jira-push', 'Push to Jira', 'jira:push', `\n\nThis push:\n- initiative: ${id}\n- tickets: ${r.approved.join(', ')}`, jiraPushSessions);
8245
+ // the Send sheet names the Jira project when no epic key does (the board's project, T3); the session uses it
8246
+ const project = /^[A-Z][A-Z0-9_]{0,30}$/.test(String(body.project || '')) ? String(body.project) : '';
8247
+ return start('jira-push', 'Push to Jira', 'jira:push', `\n\nThis push:\n- initiative: ${id}\n- tickets: ${r.approved.join(', ')}${project ? `\n- project: ${project}` : ''}`, jiraPushSessions);
8246
8248
  }
8247
8249
  if (busy(jiraCheckSessions)) return json(res, { ok: false, error: 'a check is already running for this initiative' }, 409);
8248
8250
  const q = jiraStatus.queryFor(w.root, id);
@@ -22,9 +22,9 @@ Rules that always hold:
22
22
 
23
23
  Procedure:
24
24
  1. Take the initiative from the task ("This push: initiative …"), else ask the PM. Run `pmos jira pending <initiative> --json`. If it lists nothing to create or update, say so under "Needs you" and stop.
25
- 2. Find the Jira project: the project of the epic key when the plan names one. Otherwise ask the PM for the project key before you create anything.
26
- 3. If the plan's epic has no key, create the epic from `epic.create`. Then run `pmos jira record <initiative> --epic <KEY>`.
27
- 4. For each ticket under `create`: create it in that project with its summary, description, issue type, priority and labels, as a child of the epic (the parent field). If the project has no such issue type or priority, use the nearest one and say which under "Needs you". Then run `pmos jira record <initiative> <ticket>=<KEY>`, for example `pmos jira record checkout TD-01=ATL-491`.
25
+ 2. Find the Jira project: the project of an epic key the plan names; else the project the task names ("- project: …", from the Send sheet). Otherwise ask the PM for the project key before you create anything.
26
+ 3. Create the epics that have no key. For each entry of `epics` with no key, create the epic from its `create`, then run `pmos jira record <initiative> --epic <KEY> --group <group>`. If the plan's `epic` is not null and has no key, create it from `epic.create`, then run `pmos jira record <initiative> --epic <KEY>`. An initiative can have several epics: one per epic group of its PRD.
27
+ 4. For each ticket under `create`: create it in that project with its summary, description, issue type, priority and labels, as a child of its epic (the parent field). Its epic is `parent` when that is set; else the epic you created for its `epic_group`; else the plan's `epic`. If the project has no such issue type or priority, use the nearest one and say which under "Needs you". Then run `pmos jira record <initiative> <ticket>=<KEY>`, for example `pmos jira record checkout TD-01=ATL-491`.
28
28
  5. For each ticket under `update`: update its summary, description, issue type and priority in Jira. Then run `pmos jira record <initiative> --updated <ticket>[,<ticket>]`.
29
29
  6. For each pushed ticket with `blocked_by`: link it as "is blocked by" each key there. A `blocked_by` entry with no key is a ticket not in Jira yet: skip it and say so under "Not sent".
30
30
  7. Run `pmos jira pending <initiative>` again. It must list nothing to create or update. If it does, report what is left.
@@ -0,0 +1,6 @@
1
+ {
2
+ "_comment": "prd-to-jira (kit 2, T1 to T3 of the program-hierarchy PRD): the initiative's Tasks grouped by the epic each ticket goes into, a drafted ticket in the team's template, and the Send to Jira sheet. tk-model.test.js is the pure model (public/pm/tk-model.js) on a view lib/jira-tickets.js builds; tk-tasks-test.js runs Home's Tasks, the draft, the sheet and the Board's Commit row in a browser. Several epics per initiative in lib/jira-tickets.js run in jira-wbs.test.js.",
3
+ "modules": ["tk-model.test.js"],
4
+ "panels": ["tk-tasks-test.js"],
5
+ "seconds": { "tk-model.test.js": 2, "tk-tasks-test.js": 40 }
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_comment": "Bug 2026-10-24 (Set Project Ascent as Program): the program rule a chat carries, and Turn into a program in the initiative's ⋯ (program-hierarchy P7).",
3
+ "modules": [
4
+ "program-chat.test.js"
5
+ ]
6
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Viewer kit: the pinned recording row and @Mentions at the top of Home, and the Mentions Viewer (home-mentions.js, home-rec-row.js; canvas XvANew, XvAMention*, XvARecHome). A browser suite.",
3
+ "panels": [
4
+ "home-rows-test.js"
5
+ ],
6
+ "seconds": {
7
+ "home-rows-test.js": 40
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Viewer kit build, meetings (XvAReplayEdit, XvAMaterial, XvARecHome): corrections and what PMOS learns (lib/meeting-learn.js), uploaded material (lib/meeting-files.js, POST/GET /api/meeting-material/file), unconfirmed captures never counted as facts (confirmedPoints), one recording state (pm/rec-state.js) and the material row. The pages run in premium-vw-meet-test.js.",
3
+ "modules": [
4
+ "viewer-meetings.test.js"
5
+ ],
6
+ "seconds": {
7
+ "viewer-meetings.test.js": 2
8
+ }
9
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "_comment": "viewer-shell-a: Your day in the Viewer (pure, node), Discuss in chat landing from the shell, and the loose chat's initiative suggestion.",
3
+ "modules": [
4
+ "home-day.test.js"
5
+ ],
6
+ "panels": [
7
+ "premium-discuss-landing-test.js",
8
+ "premium-link-suggest-test.js"
9
+ ],
10
+ "seconds": {
11
+ "home-day.test.js": 1,
12
+ "premium-discuss-landing-test.js": 30,
13
+ "premium-link-suggest-test.js": 30
14
+ }
15
+ }
@@ -0,0 +1,199 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* tk-tasks-test.js — the PRD-to-Jira tasks in Home's Viewer (kit 2, T1 to T3; canvas PgTkList, PgTkDraft, PgTkSend, PgTkSent, XvATasks).
4
+ * Serves the real page from the real server. GET /api/jira/tickets answers the view lib/jira-tickets.js builds from a synthetic repository
5
+ * (two epics, a ticket that lacks text); the writes are caught, so nothing reaches Jira or the repository. Screenshots go to SHOTS when set.
6
+ * T1 the tasks grouped by epic, the send icon, the sent state · T2 the drafted ticket · T3 the Send sheet, its one labeled Send */
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+ const { spawn } = require('child_process');
10
+ const { findBrowser } = require('./lib/find-browser');
11
+ const T = require('./test-run').configure({ name: 'tk-tasks' });
12
+ const IP = require('./lib/initiative-premium.js');
13
+ const F = require('./fixtures/initiative-premium-facts.js');
14
+ const BP = require('./lib/board-premium.js');
15
+ const BF = require('./fixtures/board-premium-facts.js');
16
+ const BRP = require('./lib/briefing-premium.js');
17
+ const BRF = require('./fixtures/briefing-premium-facts.js');
18
+ const TK = require('./lib/jira-tickets.js');
19
+ const { makeRepos, write } = require('./plan-test-repos');
20
+
21
+ const BASE = T.BASE;
22
+ const SHOTS = process.env.TK_SHOTS || '';
23
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
24
+ const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
25
+ const results = [];
26
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
27
+ let srv = null; let browser = null;
28
+ const R = makeRepos('tk-tasks');
29
+ const finish = async (code) => {
30
+ if (browser) await browser.close().catch(() => {});
31
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
32
+ T.killTmux(); R.cleanup();
33
+ const bad = results.filter((x) => !x.cond).length;
34
+ console.log(`\n${results.length - bad}/${results.length} tk-tasks assertions passed`);
35
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
36
+ };
37
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
38
+
39
+ // the view, from a real draft of a synthetic PRD (the fixture initiative's id)
40
+ const I = 'self-serve-v2';
41
+ write(R.code, `planning/initiatives/${I}.md`, '---\ntype: Initiative\ntitle: "Descope feature parity"\ntimestamp: 2026-10-01\nlane: feature\nparent_kr: health:tech\nprd_path: planning/prd/tk.md\n---\n\n# x\n');
42
+ const story = (id, t, o = {}) => `#### ${id} · ${t}\nType: Story · Priority: High${o.est ? ' · Estimate: ' + o.est : ''}\n\nAs a customer, I want ${t.toLowerCase()}, so that nothing changes for me after the move.\n\n`
43
+ + (o.bare ? '' : '##### User Flow\n1. Open the sign-in page.\n2. Enter the email and password.\n3. Land where I was.\n\n##### Functional Requirements\n1. Same fields.\n2. Same error text.\n\n##### Acceptance Criteria\n- Email and password sign-in works for every account in the parity inventory.\n- Error text for a wrong password matches today\'s text.\n- A locked account sees the same lockout message and wait time.\n');
44
+ write(R.code, 'planning/prd/tk.md', `---\ntype: PRD\ntitle: d\ntimestamp: 2026-10-01\n---\n\n# d\n\n## User stories\n\n### Sign-in and sign-up\n\n${story('S1', 'Sign-in parity', { est: 'M' })}${story('S2', 'Sign-up parity', { est: 'M' })}${story('S3', 'Password reset parity', { est: 'S' })}${story('S4', 'Social sign-in parity', { est: 'M' })}${story('S5', 'Accounts with no email', { bare: true })}### Sessions, SSO and second factor\n\n${story('S6', 'Session and SSO parity', { est: 'L' })}${story('S7', 'Second factor by SMS and app', { est: 'M' })}`);
45
+ TK.draft(R.code, I, { now: Date.parse('2026-10-24T08:00:00Z') });
46
+ const VIEW = JSON.parse(JSON.stringify(TK.view(R.code, I)));
47
+ TK.approve(R.code, I, ['S1', 'S2', 'S3']);
48
+ TK.record(R.code, I, { epic: 'IDPF-401', group: 'sign-in-and-sign-up' });
49
+ TK.record(R.code, I, { tickets: { S1: 'IDPF-411', S2: 'IDPF-412', S3: 'IDPF-413' } });
50
+ const SENT = JSON.parse(JSON.stringify(TK.view(R.code, I)));
51
+ SENT.tickets.find((t) => t.id === 'S1').jira = { status: 'In Progress', category: 'doing', assignee: 'Rudi' };
52
+ SENT.tickets.find((t) => t.id === 'S2').jira = { status: 'To Do', category: 'todo', assignee: 'Mei' };
53
+ SENT.checkedAt = new Date(new Date().setHours(9, 2, 0, 0)).toISOString();
54
+
55
+ const mk = () => IP.build(F.facts());
56
+ const BOARD = BP.build(BF.facts());
57
+ const BRIEF = BRP.build(BRF.facts());
58
+
59
+ (async () => {
60
+ const exe = findBrowser();
61
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
62
+ let chromium;
63
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
64
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
65
+ await T.waitForServer(BASE);
66
+ browser = await chromium.launch({ executablePath: exe });
67
+
68
+ const open = async ({ w = 1440, h = 900, theme = 'light', view = VIEW, layout = {} } = {}) => {
69
+ const ctx = await browser.newContext({ viewport: { width: w, height: h } });
70
+ const page = await ctx.newPage();
71
+ const errors = [], posts = [];
72
+ let cur = view;
73
+ page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
74
+ page.on('request', (rq) => { if (rq.method() === 'POST') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); });
75
+ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
76
+ await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: mk(), as_of: Date.now() }));
77
+ await page.route(/\/api\/board-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BOARD, as_of: Date.now() }));
78
+ await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRIEF, as_of: Date.now() }));
79
+ await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
80
+ await page.route(/\/api\/initiative-layout(\?.*)?$/, (r) => (r.request().method() === 'GET' ? json(r, { ok: true, auto: true, held: [], by: 'stage', names: [], of: {}, stage: {}, sets: [], ...layout }) : json(r, { ok: true, auto: true, held: [], by: (JSON.parse(r.request().postData() || '{}').by) || 'stage', picked: true, names: [], of: {}, stage: {}, sets: [] })));
81
+ await page.route(/\/api\/jira\/tickets(\?.*)?$/, (r) => json(r, { ...cur, ws: 'w1', pushing: null, checking: null }));
82
+ await page.route(/\/api\/boards\/items(\?.*)?$/, (r) => json(r, { ok: true, ws: 'w1', board: 'w1', jiraProjects: ['IDPF'], items: [], initiatives: [] }));
83
+ await page.route(/\/api\/jira\/(push|epic|edit|draft)$/, (r) => json(r, { ok: true, session: 's1', tickets: 7 }));
84
+ await page.goto(BASE + '/premium.html?ini=' + I + '&ws=w1&board=w1&theme=' + theme);
85
+ const up = await until(() => page.evaluate(() => !!document.querySelector('.hm-card [data-hm-ov]')), 30000);
86
+ return { ctx, page, errors, posts, up, set: (v) => { cur = v; } };
87
+ };
88
+ const V = '#czViewer:not([hidden])';
89
+ const tasks = async (p) => {
90
+ if (!(await p.evaluate(() => { const b = document.querySelector('.hm-card [data-hm-ov]'); return !!b && !!b.offsetParent; }))) await p.click('#hmNeeds');
91
+ await p.click('.hm-card [data-hm-ov]');
92
+ return until(() => p.evaluate((v) => !!document.querySelector(v + ' .tk-g .tk-row'), V), 30000);
93
+ };
94
+ const shot = async (p, name) => { if (!SHOTS) return; fs.mkdirSync(SHOTS, { recursive: true }); await sleep(250); await p.screenshot({ path: path.join(SHOTS, name) }); };
95
+ const txt = (p, s) => p.evaluate((q) => ((document.querySelector(q) || {}).textContent || '').replace(/\s+/g, ' ').trim(), s);
96
+
97
+ /* T1 · desktop: shell A, grouped by epic */
98
+ const A = await open(), p = A.page;
99
+ ok('0 Home draws the initiative', A.up);
100
+ ok('T1 the Tasks open grouped by epic once tickets are drafted', await tasks(p));
101
+ const heads = await p.evaluate((v) => [...document.querySelectorAll(v + ' .tk-g .tk-ghb b')].map((b) => b.textContent), V);
102
+ ok('T1 one group per epic, in the PRD\'s order, then Your tasks', heads.join('|') === 'Sign-in and sign-up|Sessions, SSO and second factor|Your tasks', JSON.stringify(heads));
103
+ ok('T1 each epic group has its send icon; Your tasks has none', await p.evaluate((v) => [...document.querySelectorAll(v + ' .tk-g')].map((g) => !!g.querySelector('[data-tk-sendg]')).join() === 'true,true,false', V));
104
+ ok('T1 a long group shows three tasks and "N more"', await p.evaluate((v) => { const g = document.querySelector(v + ' .tk-g'); return g.querySelectorAll('.tk-row').length === 3 && /^2 more/.test(g.querySelector('.tk-fold').textContent.trim()); }, V));
105
+ ok('T1 a drafted task reads "Story · M", with no status square', /Sign-in parity\s*Story · M/.test(await txt(p, V + ' .tk-row')) && !(await p.$(V + ' .tk-row .tk-sq')));
106
+ ok('T1 the summary card comes first, with one primary, Send to Jira', /drafted, not in Jira/.test(await txt(p, V + ' .czs-sum')) && (await txt(p, V + ' .czs-sum .czs-pri')) === 'Send to Jira' && (await p.$$(V + ' .czs-pri')).length === 1);
107
+ ok('T1 no Tasks | Documents | Stage switch on a desktop: they sit under ⋯', !(await p.$(V + ' [data-hi-view]')));
108
+ await p.click(V + ' .tk-g .tk-fold');
109
+ ok('T1 "N more" shows the rest, with the marker on the task that lacks text', await until(() => p.evaluate((v) => { const g = document.querySelector(v + ' .tk-g'); const m = g.querySelector('.tk-mk.warn'); return g.querySelectorAll('.tk-row').length === 5 && m && /Missing/.test(m.getAttribute('aria-label')); }, V)));
110
+ await shot(p, 'tasks-1440.png');
111
+
112
+ /* T3 · the Send sheet from a group's send icon */
113
+ await p.click(V + ' .tk-g [data-tk-sendg]');
114
+ const sheet = await until(() => p.evaluate(() => { const s = document.querySelector('.tk-sheet'); return s && s.querySelector('[data-tk-go]') ? s.textContent.replace(/\s+/g, ' ') : null; }));
115
+ ok('T3 the sheet names the project and the new epic after the group', !!sheet && /Project\s*IDPF/.test(sheet) && /Epic\s*New: Sign-in and sign-up/.test(sheet), sheet);
116
+ ok('T3 the complete tickets are ticked, the one that lacks text is not', await p.evaluate(() => [...document.querySelectorAll('.tk-sheet [data-tk-tick]')].map((b) => b.getAttribute('aria-checked') + (b.getAttribute('aria-disabled') ? '!' : '')).join() === 'true,true,true,true,false!'));
117
+ ok('T3 the one labeled press is "Send 4"', (await txt(p, '.tk-sheet [data-tk-go]')) === 'Send 4');
118
+ await shot(p, 'send-1440.png');
119
+ await p.click('.tk-sheet [data-tk-tick="S4"]');
120
+ ok('T3 a tick comes off, and Send counts it', (await txt(p, '.tk-sheet [data-tk-go]')) === 'Send 3');
121
+ await p.click('.tk-sheet [data-tk-change]');
122
+ await p.fill('.tk-sheet [data-tk-key]', 'https://acme.atlassian.net/browse/IDPF-400');
123
+ await p.click('.tk-sheet [data-tk-use]');
124
+ const ep = await until(() => A.posts.find((x) => x.path === '/api/jira/epic'));
125
+ ok('T3 Change writes the group\'s epic, as a page press', !!ep && ep.body.group === 'sign-in-and-sign-up' && ep.body.mode === 'existing' && /IDPF-400/.test(ep.body.key), JSON.stringify(ep));
126
+ ok('T3 nothing was sent before Send', !A.posts.some((x) => x.path === '/api/jira/push'));
127
+ await p.click('.tk-sheet [data-tk-go]');
128
+ const push = await until(() => A.posts.find((x) => x.path === '/api/jira/push'));
129
+ ok('T3 Send sends exactly the ticked tickets, with the project', !!push && push.body.ids.join() === 'S1,S2,S3' && push.body.initiative === I && push.body.ws === 'w1' && push.body.project === 'IDPF', JSON.stringify(push && push.body));
130
+ ok('T3 the sheet closes after the send', await until(() => p.evaluate(() => !document.querySelector('.tk-sheet'))));
131
+
132
+ /* T2 · one drafted ticket */
133
+ await p.click(V + ' .tk-row[data-tk-open="S1"]');
134
+ const dr = await until(() => p.evaluate((v) => { const b = document.querySelector(v + ' .tk-draft'); return b ? b.textContent.replace(/\s+/g, ' ') : null; }, V));
135
+ ok('T2 the drafted ticket: its four fields', !!dr && /Type\s*Story/.test(dr) && /Priority\s*High/.test(dr) && /Estimate\s*M/.test(dr) && /Depends on\s*Nothing/.test(dr), dr);
136
+ ok('T2 User story and Acceptance criteria shown, the criteria numbered', /User story\s*As a customer/.test(dr) && (await p.$$(V + ' .tk-ac')).length === 3);
137
+ ok('T2 the other sections fold with a count', /User flow\s*3 steps/.test(dr) && /Functional requirements\s*2/.test(dr) && /Refs\s*PRD/.test(dr));
138
+ ok('T2 one send icon, and ← back to the tasks', !!(await p.$(V + ' [data-tk-send]')) && !!(await p.$('#czViewer [data-cz-vw="back"]')));
139
+ await shot(p, 'draft-1440.png');
140
+ await p.click(V + ' [data-tk-field="priority"]');
141
+ await p.click('.hi-pop [role="menuitemradio"]:has-text("Highest")');
142
+ const ed = await until(() => A.posts.find((x) => x.path === '/api/jira/edit'));
143
+ ok('T2 a field changes in place: an edit of the draft, never Jira', !!ed && ed.body.id === 'S1' && ed.body.patch.priority === 'Highest', JSON.stringify(ed));
144
+ await p.click(V + ' [data-tk-fold="flow"]');
145
+ await p.click(V + ' [data-tk-edit="flow"]');
146
+ await p.fill(V + ' #tkEd', '1. Open the page.\n2. Sign in.');
147
+ await p.click(V + ' [data-tk-save="flow"]');
148
+ const ed2 = await until(() => A.posts.filter((x) => x.path === '/api/jira/edit')[1]);
149
+ ok('T2 a section is edited in place', !!ed2 && ed2.body.patch.sections && /Sign in/.test(ed2.body.patch.sections.flow), JSON.stringify(ed2));
150
+ await p.click(V + ' [data-tk-send]');
151
+ ok('T2 the send icon opens the sheet with this ticket ticked', await until(() => p.evaluate(() => [...document.querySelectorAll('.tk-sheet [data-tk-tick][aria-checked="true"]')].map((b) => b.dataset.tkTick).join() === 'S1')));
152
+ await p.keyboard.press('Escape');
153
+ await p.click('#czViewer [data-cz-vw="back"]');
154
+ ok('T2 ← returns to the tasks, still pressable', await until(() => p.evaluate((v) => !!document.querySelector(v + ' .tk-g .tk-row'), V)));
155
+ await p.click(V + ' [data-czs-act="tk-sendall"]');
156
+ ok('T3 the summary\'s Send to Jira opens the same sheet with every group', await until(() => p.evaluate(() => document.querySelectorAll('.tk-sheet .tk-sec').length === 2)));
157
+ await p.keyboard.press('Escape');
158
+ ok('0 no page error', !A.errors.length, A.errors.join(' | '));
159
+ await A.ctx.close();
160
+
161
+ /* T1 · after the send, and the phone */
162
+ {
163
+ const B = await open({ w: 390, h: 844, view: SENT }), q = B.page;
164
+ ok('T1 phone: the Tasks open grouped by epic', await tasks(q));
165
+ ok('T1 phone: the Tasks | Documents | Stage switch stays', !!(await q.$(V + ' [data-hi-view="tasks"]')));
166
+ const row = await q.evaluate((v) => { const r = document.querySelector(v + ' .tk-row'); return r ? { t: r.textContent.replace(/\s+/g, ' ').trim(), sq: (r.querySelector('.tk-sq') || {}).className, av: (r.querySelector('.tk-av') || {}).textContent, lab: (r.querySelector('.tk-ck') || {}).getAttribute && r.querySelector('.tk-ck').getAttribute('aria-label') } : null; }, V);
167
+ ok('T1 after the send: the key, a status square and the assignee', !!row && /Sign-in parity\s*IDPF-411/.test(row.t) && /doing/.test(row.sq) && row.av === 'Ru' && row.lab === 'In Jira: In Progress', JSON.stringify(row));
168
+ ok('T1 "Jira read at 9:02" is said once', (await q.$$eval(V + ' .tk-read', (n) => n.map((x) => x.textContent))).join() === 'Jira read at 9:02');
169
+ ok('T1 a group keeps its send icon while a task in it is not in Jira', await q.evaluate((v) => [...document.querySelectorAll(v + ' .tk-g')].slice(0, 2).map((g) => !!g.querySelector('[data-tk-sendg]')).join() === 'true,true', V));
170
+ await shot(q, 'sent-390.png');
171
+ await B.ctx.close();
172
+ const C = await open({ w: 390, h: 844 }), c = C.page;
173
+ await tasks(c);
174
+ await shot(c, 'tasks-390.png');
175
+ await c.click(V + ' .tk-g [data-tk-sendg]');
176
+ await until(() => c.evaluate(() => !!document.querySelector('.tk-sheet.phone [data-tk-go]')));
177
+ ok('T3 phone: the sheet rises from the bottom', await c.evaluate(() => { const r = document.querySelector('.tk-sheet').getBoundingClientRect(); return Math.abs(r.bottom - innerHeight) < 2 && r.left === 0; }));
178
+ await shot(c, 'send-390.png');
179
+ await c.keyboard.press('Escape');
180
+ await c.click(V + ' .tk-row[data-tk-open="S1"]');
181
+ await until(() => c.evaluate((v) => !!document.querySelector(v + ' .tk-draft'), V));
182
+ await shot(c, 'draft-390.png');
183
+ ok('0 phone: no page error', !C.errors.length && !B.errors.length, C.errors.concat(B.errors).join(' | '));
184
+ await C.ctx.close();
185
+ const D = await open({ theme: 'dark' }), d = D.page;
186
+ await tasks(d);
187
+ await shot(d, 'tasks-1440-dark.png');
188
+ await D.ctx.close();
189
+ }
190
+
191
+ /* the PM chose another grouping: it stays */
192
+ {
193
+ const E = await open({ layout: { by: 'mine', picked: true, names: ['Design'] } }), e = E.page;
194
+ await e.click('.hm-card [data-hm-ov]');
195
+ ok('T1 a grouping the PM chose wins over the Epic default', await until(() => e.evaluate((v) => !!document.querySelector(v + ' .hi-tg') && !document.querySelector(v + ' .tk-row'), V)));
196
+ await E.ctx.close();
197
+ }
198
+ finish();
199
+ })();