create-pmos 0.735.0 → 0.737.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +57 -33
- package/payload/AGENTS.md +1 -0
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +56 -0
- package/workspace/guide/cli.md +9 -0
- package/workspace/guide/home.md +1 -0
- package/workspace/guide/initiatives-and-next-steps.md +1 -1
- package/workspace/guide/layout.md +13 -3
- package/workspace/guide/positioning.md +5 -3
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/positioning-cli.js +91 -0
- package/workspace/lib/use-log.js +26 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/action-keys.js +1 -1
- package/workspace/public/pm/bd-ini-panel.js +3 -2
- package/workspace/public/pm/bd-pop-ds.css +18 -0
- package/workspace/public/pm/bd-pop-ds.js +33 -3
- package/workspace/public/pm/bd-views.js +9 -1
- package/workspace/public/pm/cozy-board.css +7 -0
- package/workspace/public/pm/cozy-day-pick.css +0 -1
- package/workspace/public/pm/cozy-ev.css +9 -0
- package/workspace/public/pm/cozy-nav.js +2 -0
- package/workspace/public/pm/cozy-pop-work.js +16 -13
- package/workspace/public/pm/cozy-today-app.js +37 -3
- package/workspace/public/pm/cozy-today-model.js +12 -4
- package/workspace/public/pm/cozy-today-page.css +7 -0
- package/workspace/public/pm/cozy-today-view.js +15 -9
- package/workspace/public/pm/cozy-viewer.js +17 -2
- package/workspace/public/pm/focus-mode.js +161 -0
- package/workspace/public/pm/home-chat.js +4 -2
- package/workspace/public/pm/ini-tasks.js +8 -18
- package/workspace/public/pm/open-questions-view.js +96 -0
- package/workspace/public/pm/range-pick.css +50 -0
- package/workspace/public/pm/range-pick.js +155 -0
- package/workspace/public/pm/task-card.css +2 -19
- package/workspace/public/pm/task-card.js +16 -36
- package/workspace/stage-card-tasks-test.js +11 -11
- package/workspace/task-card-test.js +17 -10
- package/workspace/task-views-test.js +7 -5
- package/workspace/test-lists/chat-open-keeps-back.json +9 -0
- package/workspace/test-lists/focus-mode.json +9 -0
- package/workspace/test-lists/open-questions-view.json +9 -0
- package/workspace/test-lists/range-pick.json +5 -0
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
* section and the initiative → tasks/edit, the group → /api/initiative-layout place,
|
|
24
24
|
* a Jira ticket's notes → tickets/note. Each answers { ok, from } so Undo is save(from). */
|
|
25
25
|
|
|
26
|
+
import { rangeHtml, mountRange } from './range-pick.js'; // start and due on one calendar (the same picker everywhere a task's dates are set)
|
|
27
|
+
|
|
26
28
|
export const STATES = ['To do', 'In progress', 'Done', "Won't do", 'Archived']; // a task's only stage is its state (scripts/boards.js TASK_STATES)
|
|
27
29
|
const SKEY = { 'To do': 'todo', 'In progress': 'prog', Done: 'done', "Won't do": 'wont', Archived: 'arch' };
|
|
28
30
|
const SICON = {
|
|
@@ -44,7 +46,6 @@ const I = {
|
|
|
44
46
|
const ico = (d, w = 16) => `<svg width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${d}</svg>`;
|
|
45
47
|
export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
|
46
48
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
47
|
-
const MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
48
49
|
const DAY = /^(\d{4})-(\d{2})-(\d{2})/;
|
|
49
50
|
const pad = (n) => String(n).padStart(2, '0');
|
|
50
51
|
export const isoOf = (d) => d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate());
|
|
@@ -112,29 +113,11 @@ export function checkOf(t) {
|
|
|
112
113
|
return t.status === 'Done' ? { state, label: 'Mark not done', title: 'Mark not done' } : { state, label: 'Mark done', title: 'Mark done' };
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
/** The start and due picker (pm/range-pick.js): one calendar, the first tap the start and the second the due day; a milestone one date
|
|
117
|
+
* (batch 18 item 16, StA4Milestone). o: { field, month: 'YYYY-MM', one, head — a sheet's own head (its title and ✕), drawn first } */
|
|
115
118
|
function picker(t, o, now) {
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
const y = base.getFullYear(), m = base.getMonth(), first = new Date(y, m, 1), lead = (first.getDay() + 6) % 7, today = isoOf(todayOf(now));
|
|
119
|
-
const cells = [];
|
|
120
|
-
for (let i = 0; i < 42; i++) {
|
|
121
|
-
const d = new Date(y, m, 1 - lead + i), iso = isoOf(d);
|
|
122
|
-
if (i >= 35 && d.getMonth() !== m) break;
|
|
123
|
-
const cls = [d.getMonth() !== m ? 'm' : '', iso === t.start || iso === t.due ? 'a' : t.start && t.due && iso > t.start && iso < t.due ? 'rg' : '', iso === today ? 'td' : ''].filter(Boolean).join(' ');
|
|
124
|
-
cells.push(`<button type="button" data-tkc-day="${iso}"${cls ? ` class="${cls}"` : ''} aria-label="${d.getDate()} ${MONTHS[d.getMonth()]}"${iso === t[field] ? ' aria-pressed="true"' : ''}>${d.getDate()}</button>`);
|
|
125
|
-
}
|
|
126
|
-
const fri = (() => { const d = todayOf(now); d.setDate(d.getDate() + ((5 - d.getDay() + 7) % 7 || 7)); return isoOf(d); })();
|
|
127
|
-
const tom = (() => { const d = todayOf(now); d.setDate(d.getDate() + 1); return isoOf(d); })();
|
|
128
|
-
const two = ['start', 'due'].map((f) => `<button type="button" data-tkc-field="${f}"${f === field ? ' class="on" aria-pressed="true"' : ' aria-pressed="false"'}><small>${f === 'start' ? 'Start' : 'Due'}</small><b>${esc(short(t[f]) || 'None')}</b></button>`).join('');
|
|
129
|
-
const prevM = isoOf(new Date(y, m - 1, 1)).slice(0, 7), nextM = isoOf(new Date(y, m + 1, 1)).slice(0, 7);
|
|
130
|
-
// one date (batch 18 item 16, StA4Milestone): a milestone has its day only, so the Start and Due tabs give way to "◇ Date"; o.head: a
|
|
131
|
-
// sheet's own head (its title and ✕), drawn first
|
|
132
|
-
const top = o.one ? (o.head ? '' : `<div class="one">${ico('<path d="M12 4l8 8-8 8-8-8z"/>', 14)}<b>Date</b></div>`) : `<div class="two">${two}</div>`;
|
|
133
|
-
return `<div class="tkc-pop tkc-dp${o.one ? ' one' : ''}" role="dialog" aria-label="${o.one ? 'Date' : 'Start and due'}">${o.head || ''}${top}`
|
|
134
|
-
+ `<div class="qk"><button type="button" data-tkc-day="${today}">Today</button><button type="button" data-tkc-day="${tom}">Tomorrow</button><button type="button" data-tkc-day="${fri}">Fri</button>`
|
|
135
|
-
+ `<button type="button" data-tkc-day="" aria-label="Clear the ${field === 'start' ? 'start' : 'due'} date" title="Clear">${ico(I.clear, 14)}</button></div>`
|
|
136
|
-
+ `<div class="mh"><button type="button" class="tkc-ib s" data-tkc-month="${prevM}" aria-label="Previous month">${ico(I.prev, 16)}</button><span>${MONTHS[m]} ${y}</span><button type="button" class="tkc-ib s" data-tkc-month="${nextM}" aria-label="Next month">${ico(I.next, 16)}</button></div>`
|
|
137
|
-
+ `<div class="g">${['M', 'T', 'W', 'T', 'F', 'S', 'S'].map((x) => `<span class="h" aria-hidden="true">${x}</span>`).join('')}${cells.join('')}</div></div>`;
|
|
119
|
+
const s = { start: o.one ? '' : t.start || '', due: t.due || '', field: o.field, month: o.month, one: !!o.one };
|
|
120
|
+
return `<div class="tkc-pop tkc-dp${o.one ? ' one' : ''}" role="dialog" aria-label="${o.one ? 'Date' : 'Start and due'}">${rangeHtml(s, { today: isoOf(todayOf(now)), head: o.head })}</div>`;
|
|
138
121
|
}
|
|
139
122
|
function listPop(label, items, extra = '') {
|
|
140
123
|
return `<div class="tkc-pop" role="menu" aria-label="${esc(label)}">${extra}${items.map((x) => x.sep ? '<hr>' : `<button type="button" role="menuitemradio" class="o${x.on ? ' hl' : ''}" aria-checked="${x.on ? 'true' : 'false'}" ${x.attr}>${x.icon || ''}<span>${esc(x.label)}</span>${x.on ? `<span class="k" aria-hidden="true">${ico(I.tick, 14)}</span>` : ''}</button>`).join('')}</div>`;
|
|
@@ -181,7 +164,7 @@ export function cardHtml(t, o = {}) {
|
|
|
181
164
|
// last, after its own divider, the trash (batch 17 item 2): the same Delete as the Tasks list's status picker, with Undo in the toast
|
|
182
165
|
const delBtn = o.del ? `<span class="vr" aria-hidden="true"></span><button type="button" class="ivq-del" data-tkc-del aria-label="Delete task" title="Delete task">${ico(I.bin, 15)}</button>` : '';
|
|
183
166
|
const facts = `<div class="ovf tkc-f"><span class="k">Status</span><div class="v"><div class="seg" role="radiogroup" aria-label="Status">${seg}${msBtn}${delBtn}</div></div>`
|
|
184
|
-
+ `<span class="k">Due</span><div class="v"><span class="anc">${dueBtn}${dOpen ? picker(t, o, now) : ''}</span>${late}</div>`
|
|
167
|
+
+ `<span class="k">Due</span><div class="v"><span class="anc">${dueBtn}${dOpen ? picker(t, { ...o, one: !!t.milestone }, now) : ''}</span>${late}</div>`
|
|
185
168
|
+ `<span class="k">Owner</span><div class="v"><span class="anc">${ownerBtn}${ownerPop}</span></div></div>`;
|
|
186
169
|
const notes = `<div class="ovb"><label class="ovl" for="tkcNotes">Notes</label><textarea class="nt" id="tkcNotes" data-tkc-notes rows="2" maxlength="4000" placeholder="Add notes">${esc(t.notes)}</textarea></div>`;
|
|
187
170
|
// where it sits: initiative › section › breakdown item; the move icon changes the section (or the group, or the initiative)
|
|
@@ -234,13 +217,20 @@ const WORDS = {
|
|
|
234
217
|
|
|
235
218
|
export function mountCard(el, t, h) {
|
|
236
219
|
cardStyle();
|
|
237
|
-
const st = { open: null, field: '
|
|
220
|
+
const st = { open: null, field: 'start', month: '', msg: '' };
|
|
238
221
|
const lists = () => ({ owners: h.owners ? h.owners() : [], groups: h.groups ? h.groups() : null, sections: h.sections ? h.sections() : null, inis: h.inis ? h.inis() : [] });
|
|
239
222
|
const draw = () => {
|
|
240
223
|
const keep = document.activeElement && el.contains(document.activeElement) && document.activeElement.matches('[data-tkc-notes]');
|
|
241
224
|
if (keep) return; // never redraw under the PM's typing
|
|
225
|
+
const inDp = !!(document.activeElement && document.activeElement.closest && document.activeElement.closest('.tkc-dp'));
|
|
242
226
|
el.innerHTML = cardHtml(t, { ...st, ...lists(), hist: st.hist, histOpen: st.histOpen, del: !!h.remove, now: h.now ? h.now() : Date.now() });
|
|
243
227
|
const f = el.querySelector('.tkc-new input'); if (f && (st.open === 'owner' || st.open === 'group')) f.focus();
|
|
228
|
+
// the dates picker wires itself; each tap saves with Undo, and the second tap (the due day) closes it
|
|
229
|
+
const dp = el.querySelector('.tkc-dp');
|
|
230
|
+
if (dp) mountRange(dp, { start: t.start, due: t.due, one: !!t.milestone, field: st.field, month: st.month, today: isoOf(todayOf(h.now ? h.now() : Date.now())),
|
|
231
|
+
onState: (s) => { st.field = s.field; st.month = s.month; },
|
|
232
|
+
onPick: (patch, done) => { if (done) st.open = null; change('dates', patch); } });
|
|
233
|
+
if (dp && inDp) dp.querySelector('.rp-g [tabindex="0"]')?.focus({ preventScroll: true });
|
|
244
234
|
};
|
|
245
235
|
const word = (kind) => (WORDS[kind] || (() => 'Saved'))(t, h);
|
|
246
236
|
// one change: write it, show it, then "… · Undo" puts back what was there
|
|
@@ -259,13 +249,6 @@ export function mountCard(el, t, h) {
|
|
|
259
249
|
return u || { ok: false };
|
|
260
250
|
});
|
|
261
251
|
};
|
|
262
|
-
const pick = (iso) => {
|
|
263
|
-
const f = st.field, p = { [f]: iso };
|
|
264
|
-
if (iso && f === 'due' && t.start && iso < t.start) p.start = iso; // a due day before the start moves the start with it
|
|
265
|
-
if (iso && f === 'start' && t.due && iso > t.due) p.due = iso;
|
|
266
|
-
if (f === 'start' && iso) st.field = 'due'; // after the start, the next tap is the due day
|
|
267
|
-
change('dates', p);
|
|
268
|
-
};
|
|
269
252
|
el.onclick = (e) => {
|
|
270
253
|
const b = e.target.closest('button'); if (!b || b.disabled || !el.contains(b)) return;
|
|
271
254
|
const d = b.dataset;
|
|
@@ -278,16 +261,13 @@ export function mountCard(el, t, h) {
|
|
|
278
261
|
if (d.tkcState) { if (d.tkcState !== t.status) { st.open = null; change('status', { status: d.tkcState }); } return; }
|
|
279
262
|
if ('tkcMs' in d) { st.open = null; change('milestone', { milestone: !t.milestone }); return; }
|
|
280
263
|
if ('tkcDel' in d && h.remove) { st.open = null; b.disabled = true; Promise.resolve(h.remove()).catch(() => null).then(() => { if (b.isConnected) b.disabled = false; }); return; }
|
|
281
|
-
if (d.tkcDay != null && b.closest('.tkc-dp')) { pick(d.tkcDay); return; }
|
|
282
|
-
if (d.tkcField) { st.field = d.tkcField; st.month = ''; draw(); return; }
|
|
283
|
-
if (d.tkcMonth) { st.month = d.tkcMonth; draw(); return; }
|
|
284
264
|
if (d.tkcOwner != null) { st.open = null; if (d.tkcOwner !== t.owner) change('owner', { owner: d.tkcOwner }); else draw(); return; }
|
|
285
265
|
if (d.tkcGroup != null) { st.open = null; if (d.tkcGroup !== t.group) change('group', { group: d.tkcGroup }); else draw(); return; }
|
|
286
266
|
if (d.tkcSection != null) { st.open = null; if (d.tkcSection !== t.section) change('section', { section: d.tkcSection }); else draw(); return; }
|
|
287
267
|
if (d.tkcMove) { st.open = null; change('initiative', { initiative: d.tkcMove }); return; }
|
|
288
268
|
const k = d.tkc;
|
|
289
269
|
if (k === 'ini') { if (h.openIni) h.openIni(t.ini); return; }
|
|
290
|
-
if (k === 'dates' || k === 'owner' || k === 'move') { st.open = st.open === k ? null : k; st.field = '
|
|
270
|
+
if (k === 'dates' || k === 'owner' || k === 'move') { st.open = st.open === k ? null : k; st.field = 'start'; st.month = ''; draw(); }
|
|
291
271
|
};
|
|
292
272
|
el.onsubmit = (e) => {
|
|
293
273
|
const f = e.target.closest('[data-tkc-form]'); if (!f) return;
|
|
@@ -207,13 +207,13 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
|
|
|
207
207
|
/* S5 the date chips: a phone's picker is a bottom sheet; Start opens on the start */
|
|
208
208
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-ed [data-f="start"]')));
|
|
209
209
|
await p.click('#czViewer .iv-ed [data-f="start"]');
|
|
210
|
-
const dp = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq.sheet .tkc-dp'); if (!q) return null; const r = q.getBoundingClientRect();
|
|
211
|
-
ok('S5 Start opens the task card\'s picker on the start day, as a bottom sheet on a phone', dp && dp.on === '
|
|
210
|
+
const dp = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq.sheet .tkc-dp'); if (!q) return null; const r = q.getBoundingClientRect(); const on = q.querySelector('[data-rp-end].on'); return { on: on ? on.dataset.rpEnd + '|' + on.querySelector('.rp-in').value : '', bottom: Math.round(innerHeight - r.bottom), head: (q.querySelector('.ivd-h b') || {}).textContent, sub: (q.querySelector('.ivd-s') || {}).textContent }; }));
|
|
211
|
+
ok('S5 Start opens the task card\'s picker on the start day, as a bottom sheet on a phone', dp && dp.on === 'start|30 Oct 2026' && dp.bottom <= 1 && dp.head === 'Dates' && /Brief support/.test(dp.sub || ''), JSON.stringify(dp));
|
|
212
212
|
await shot(p, 'S5-dates-390');
|
|
213
|
-
await p.click('.tkc.ivq [data-
|
|
213
|
+
await p.click('.tkc.ivq .rp-g [data-rp-day="2026-10-28"]');
|
|
214
214
|
const ds = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.start === '2026-10-28' ? x : null; });
|
|
215
|
-
const dueNext = await until(() => p.evaluate(() => (document.querySelector('.tkc.ivq [data-
|
|
216
|
-
ok('S5 a start picked saves at once, and the next tap is the due day', !!ds &&
|
|
215
|
+
const dueNext = await until(() => p.evaluate(() => ((document.querySelector('.tkc.ivq [data-rp-end].on') || {}).dataset || {}).rpEnd));
|
|
216
|
+
ok('S5 a start picked saves at once, and the next tap is the due day', !!ds && dueNext === 'due', JSON.stringify({ ds, dueNext }));
|
|
217
217
|
await p.click('.tkc.ivq [data-ivd-x]');
|
|
218
218
|
|
|
219
219
|
/* S6 ⋯ */
|
|
@@ -251,10 +251,10 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
|
|
|
251
251
|
// settle, or its late scroll event closes the picker the click just opened (a scroll outside the picker closes it)
|
|
252
252
|
await p.$eval('#czViewer .iv-ed .iv-edd', (n) => n.scrollIntoView({ block: 'center' })); await p.evaluate(() => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))));
|
|
253
253
|
await p.click('#czViewer .iv-ed .iv-edd');
|
|
254
|
-
const op7 = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); return q ? {
|
|
255
|
-
ok('S7 its picker is one date: "◇ Date", no Start and Due
|
|
254
|
+
const op7 = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); return q ? { ends: q.querySelectorAll('[data-rp-end]').length, one: !!q.querySelector('.rp.one'), head: (q.querySelector('.ivd-h b') || {}).textContent, sub: (q.querySelector('.ivd-s') || {}).textContent } : null; }));
|
|
255
|
+
ok('S7 its picker is one date: "◇ Date", no Start and Due', op7 && op7.ends === 1 && op7.one && op7.head === 'Date' && /one date: the milestone/.test(op7.sub || ''), JSON.stringify(op7));
|
|
256
256
|
await shot(p, 'S7-milestone-390');
|
|
257
|
-
await p.click('.tkc.ivq [data-
|
|
257
|
+
await p.click('.tkc.ivq .rp-g [data-rp-day="2026-11-13"]');
|
|
258
258
|
const m7 = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.due === '2026-11-13' ? x : null; });
|
|
259
259
|
ok('S7 a day picked saves the due day only, and the picker closes', m7 && m7.body.start == null && await until(() => p.evaluate(() => !document.querySelector('.tkc.ivq')), 2000), JSON.stringify(m7));
|
|
260
260
|
await p.keyboard.press('Escape');
|
|
@@ -285,7 +285,7 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
|
|
|
285
285
|
await shot(p, 'S9-jira-390');
|
|
286
286
|
await p.click('#czViewer .iv-ed [data-f="due"]');
|
|
287
287
|
await until(() => p.evaluate(() => !!document.querySelector('.tkc.ivq .tkc-dp')));
|
|
288
|
-
await p.click('.tkc.ivq [data-
|
|
288
|
+
await p.click('.tkc.ivq .rp-g [data-rp-day="2026-11-09"]');
|
|
289
289
|
const jd = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.task === 'task-b2' ? x : null; });
|
|
290
290
|
ok('S9 its due day saves to the task, kept in PMOS', jd && jd.body.due === '2026-11-09', JSON.stringify(jd));
|
|
291
291
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-ed [data-iv-more]')));
|
|
@@ -375,8 +375,8 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
|
|
|
375
375
|
const T12 = await until(() => c.evaluate(() => { const d = document.querySelector('#czViewer .ivt [data-ivt-bar="task-d1"]'); return d ? { cls: d.className, one: d.dataset.one, label: (document.querySelector('#czViewer .ivt-ms.lb b') || {}).textContent } : null; }));
|
|
376
376
|
ok('S12 Timeline: a milestone is its ◇ on its date with no bar, the date beside it', T12 && /\bivt-d\b/.test(T12.cls) && /\bms\b/.test(T12.cls) && !/ivt-b/.test(T12.cls) && T12.label === 'Nov 14', JSON.stringify(T12));
|
|
377
377
|
await c.click('#czViewer .ivt [data-ivt-bar="task-d1"]');
|
|
378
|
-
const p12 = await until(() => c.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); return q ? {
|
|
379
|
-
ok('S12 its press opens the one-date picker', p12 && p12.
|
|
378
|
+
const p12 = await until(() => c.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); return q ? { ends: q.querySelectorAll('[data-rp-end]').length, one: !!q.querySelector('.rp.one') } : null; }));
|
|
379
|
+
ok('S12 its press opens the one-date picker', p12 && p12.ends === 1 && p12.one, JSON.stringify(p12));
|
|
380
380
|
await c.keyboard.press('Escape');
|
|
381
381
|
await shot(c, 'S12-timeline-1440');
|
|
382
382
|
const dms = await c.evaluate(() => { const d = document.querySelector('#czViewer .ivt [data-ivt-bar="task-d1"]').getBoundingClientRect(); return { x: d.left + d.width / 2, y: d.top + d.height / 2 }; });
|
|
@@ -82,8 +82,8 @@ async function pure() {
|
|
|
82
82
|
&& C.dueLine({ start: '2026-09-28', due: '2026-10-10' }, now).text === 'Sep 28 → Oct 10' && C.dueLine({}, now).none);
|
|
83
83
|
ok('P3 late text: "1 day late", "Today", nothing when closed', C.dueLine({ due: '2026-10-24', status: 'To do' }, now).lateText === '1 day late' && C.dueLine({ due: '2026-10-25', status: 'To do' }, now).lateText === 'Today' && C.dueLine({ due: '2026-10-01', status: "Won't do" }, now).lateText === '');
|
|
84
84
|
const dp = C.cardHtml({ ...t, due: '2026-10-10' }, { now, open: 'dates' });
|
|
85
|
-
ok('P4 the picker opens under the due button: Start and Due, Today/Tomorrow/Fri
|
|
86
|
-
&&
|
|
85
|
+
ok('P4 the picker opens under the due button: Start and Due on one calendar, Today/Tomorrow/Fri, the month, the range as one band, No date', /class="anc"><button type="button" class="due-b[^"]*open"[^]*<div class="tkc-pop tkc-dp"/.test(dp) && /data-rp-end="start"><small>Start<\/small><input[^>]*value="8 Oct 2026"/.test(dp)
|
|
86
|
+
&& /data-rp-end="due"><small>Due<\/small><input[^>]*value="10 Oct 2026"/.test(dp) && />Tomorrow</.test(dp) && /October 2026/.test(dp) && /class="rp-d rg"[^>]*><span>9</.test(dp) && /class="rp-d a be" data-rp-day="2026-10-10"/.test(dp) && /data-rp-clear>No date</.test(dp), dp.slice(dp.indexOf('tkc-dp'), dp.indexOf('tkc-dp') + 900));
|
|
87
87
|
ok('P5 the check box: half for In progress, a press marks it done; Done marks it not done; a Jira ticket\'s is not a press', C.checkOf(t).state === 'prog' && C.checkOf(t).label === 'Mark done'
|
|
88
88
|
&& C.checkOf({ ...t, status: 'Done' }).label === 'Mark not done' && C.checkOf({ ...t, jira: { key: 'CIAM-214' } }).disabled === true);
|
|
89
89
|
const TV = await mod('tk-view.js');
|
|
@@ -208,15 +208,22 @@ async function pure() {
|
|
|
208
208
|
await until(async () => (await view(p)).on === 'To do');
|
|
209
209
|
// dates
|
|
210
210
|
await p.click(C + ' [data-tkc="dates"]');
|
|
211
|
-
const dp = await until(() => p.evaluate((c) => { const pop = document.querySelector(c + ' .tkc-dp'), b = document.querySelector(c + ' .due-b'); if (!pop || !b) return null; const r = pop.getBoundingClientRect(), br = b.getBoundingClientRect(); return { under: r.top >= br.bottom - 1 && Math.abs(r.left - br.left) < 4,
|
|
212
|
-
ok('D4 a tap on the due line opens the picker right under it, on
|
|
211
|
+
const dp = await until(() => p.evaluate((c) => { const pop = document.querySelector(c + ' .tkc-dp'), b = document.querySelector(c + ' .due-b'); if (!pop || !b) return null; const r = pop.getBoundingClientRect(), br = b.getBoundingClientRect(); return { under: r.top >= br.bottom - 1 && Math.abs(r.left - br.left) < 4, start: pop.querySelector('[data-rp-end="start"]').classList.contains('on') }; }, C));
|
|
212
|
+
ok('D4 a tap on the due line opens the picker right under it, on Start (the first tap sets the start)', dp && dp.under && dp.start, JSON.stringify(dp));
|
|
213
213
|
await shot(p, 'task-dates-1440', '#czViewer');
|
|
214
|
-
await p.click(C + ' .tkc-dp [data-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
await p.click(C + '
|
|
219
|
-
|
|
214
|
+
await p.click(C + ' .tkc-dp [data-rp-end="due"]');
|
|
215
|
+
await p.click(C + ' .tkc-dp .rp-g [data-rp-day="2026-10-29"]');
|
|
216
|
+
ok('D4 with Due picked, a day saves the due date at once (tasks/edit) with Undo, and the picker closes', await until(async () => /Oct 20 → 29/.test((await view(p)).due)) && last(A, '/api/boards/tasks/edit').body.due === '2026-10-29'
|
|
217
|
+
&& await until(() => p.evaluate((c) => !document.querySelector(c + ' .tkc-dp'), C)));
|
|
218
|
+
await p.click(C + ' [data-tkc="dates"]');
|
|
219
|
+
await until(() => p.evaluate((c) => !!document.querySelector(c + ' .tkc-dp'), C));
|
|
220
|
+
await p.click(C + ' .tkc-dp .rp-g [data-rp-day="2026-10-31"]');
|
|
221
|
+
ok('D4 the first tap: a start after the due day moves the due day with it, and the due day is next', await until(() => { const b = last(A, '/api/boards/tasks/edit').body; return b.start === '2026-10-31' && b.due === '2026-10-31'; })
|
|
222
|
+
&& await until(() => p.evaluate((c) => { const e = document.querySelector(c + ' .tkc-dp [data-rp-end="due"]'); return !!e && e.classList.contains('on'); }, C)), JSON.stringify(last(A, '/api/boards/tasks/edit')));
|
|
223
|
+
await p.click(C + ' .tkc-dp .rp-g [data-rp-day="2026-11-01"]');
|
|
224
|
+
ok('D4 the second tap sets the due day and closes the picker', await until(() => last(A, '/api/boards/tasks/edit').body.due === '2026-11-01') && await until(() => p.evaluate((c) => !document.querySelector(c + ' .tkc-dp'), C)));
|
|
225
|
+
await p.click(C + ' [data-tkc="dates"]');
|
|
226
|
+
await until(() => p.evaluate((c) => !!document.querySelector(c + ' .tkc-dp'), C));
|
|
220
227
|
await p.mouse.click(5, 5);
|
|
221
228
|
ok('D4 a press outside closes the picker', await until(() => p.evaluate((c) => !document.querySelector(c + ' .tkc-dp'), C)));
|
|
222
229
|
// owner
|
|
@@ -168,11 +168,12 @@ const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', {
|
|
|
168
168
|
const dbtn = await p.evaluate(() => { const b = document.querySelector('#czViewer .iv-tr [data-iv-date="task-c"]'); const n = document.querySelector('#czViewer .iv-tr [data-iv-date="task-d"]'); return { t: b && b.textContent, w: b && b.classList.contains('w'), none: n && getComputedStyle(n).opacity, nl: n && n.getAttribute('aria-label') }; });
|
|
169
169
|
ok('V3 the dates in a row are a press, amber when late; an undated row shows none (batch 18 item 16: zero is silence, its open row sets them)', dbtn.t === 'Oct 8 – Oct 10' && dbtn.w && dbtn.none == null, JSON.stringify(dbtn));
|
|
170
170
|
await p.click('#czViewer .iv-tr [data-iv-date="task-c"]');
|
|
171
|
-
const dp = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); if (!q) return null; return { two: [...q.querySelectorAll('[data-
|
|
172
|
-
ok('V3 the start and due picker opens
|
|
173
|
-
await p.click('.tkc.ivq .tkc-dp [data-
|
|
171
|
+
const dp = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); if (!q) return null; return { two: [...q.querySelectorAll('[data-rp-end]')].map((b) => b.dataset.rpEnd + ' ' + b.querySelector('.rp-in').value).join('|'), on: (q.querySelector('[data-rp-end].on') || {}).dataset.rpEnd, band: q.querySelectorAll('.rp-g .rp-d.rg').length }; }));
|
|
172
|
+
ok('V3 the start and due picker opens on one calendar, on Start, the days between as a band', dp && dp.two === 'start 8 Oct 2026|due 10 Oct 2026' && dp.on === 'start' && dp.band === 1, JSON.stringify(dp));
|
|
173
|
+
await p.click('.tkc.ivq .tkc-dp [data-rp-end="due"]');
|
|
174
|
+
await p.click('.tkc.ivq .tkc-dp .rp-g [data-rp-day="2026-10-24"]');
|
|
174
175
|
const dd = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.task === 'task-c' ? x : null; });
|
|
175
|
-
ok('V3 a day picked there saves the due day at once', dd && dd.body.due === '2026-10-24' && dd.body.start == null, JSON.stringify(dd));
|
|
176
|
+
ok('V3 with Due pressed, a day picked there saves the due day at once', dd && dd.body.due === '2026-10-24' && dd.body.start == null, JSON.stringify(dd));
|
|
176
177
|
const dt = await until(() => p.evaluate(() => { const t = document.querySelector('#bdToast'); return t && !t.hidden && /Dates saved/.test(t.textContent) ? t.textContent : null; }));
|
|
177
178
|
ok('V3 the toast says the dates are saved, with Undo', /Undo/.test(dt || ''), dt);
|
|
178
179
|
await p.click('#bdToast .bd-undo');
|
|
@@ -432,7 +433,8 @@ const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', {
|
|
|
432
433
|
await j.click('#czViewer .iv-tr [data-iv-date="j2"]');
|
|
433
434
|
await until(() => j.evaluate(() => !!document.querySelector('.tkc.ivq .tkc-dp')));
|
|
434
435
|
const tip = await j.evaluate(() => document.querySelector('#czViewer .iv-tr [data-iv-date="j2"]').getAttribute('title'));
|
|
435
|
-
await j.click('.tkc.ivq .tkc-dp [data-
|
|
436
|
+
await j.click('.tkc.ivq .tkc-dp [data-rp-end="due"]');
|
|
437
|
+
await j.click('.tkc.ivq .tkc-dp .rp-g [data-rp-day="2026-10-24"]');
|
|
436
438
|
const dd = await until(() => J.posts.find((x) => x.path === '/api/boards/tasks/edit' && x.body.task === 'j2'));
|
|
437
439
|
ok('H7 a linked task\'s dates are the PM\'s: the date press saves the day on the task, kept in PMOS', !!dd && dd.body.due === '2026-10-24' && /kept in PMOS/.test(tip || ''), JSON.stringify({ dd: dd && dd.body, tip }));
|
|
438
440
|
const lkc = await j.evaluate(() => { const e = document.querySelector('#czViewer .iv-tr .iv-tt em.lk'); return e ? getComputedStyle(e).color : ''; });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Back after the chat opens a file by itself (initiative chat-open-keeps-back, done test C1-C4): the pure keepsBehind() of cozy-viewer.js and a read of home-chat.js. No browser.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"chat-open-back.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"chat-open-back.test.js": 2
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Focus mode, one item and its chat (bet A335, initiative focus-mode, done test planning/done-tests/focus-mode.md F1-F8): the key, what is kept, hiding and putting back, Leave focus, the next decision in view, the local use-log count, and the menu's mount. No server, network or browser.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"focus-mode.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"focus-mode.test.js": 2
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "initiative open-questions-today (bet A420): the register in Today's Decide tab, desk and phone, and the Overview sentence (pure ESM, no browser).",
|
|
3
|
+
"modules": [
|
|
4
|
+
"open-questions-view.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"open-questions-view.test.js": 1
|
|
8
|
+
}
|
|
9
|
+
}
|