create-pmos 0.186.0 → 0.187.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 +1 -1
- 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/scripts/workflow-state.js +2 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/c3-ib-triage-backlog-test.js +20 -13
- package/workspace/c3-ini-life-test.js +167 -0
- package/workspace/c3-initiatives-test.js +6 -6
- package/workspace/c3-phone-test.js +67 -16
- package/workspace/c3-quiet-test.js +2 -1
- package/workspace/guide/initiative-boards.md +37 -2
- package/workspace/guide/phone-companion.md +19 -4
- package/workspace/lib/engine/boards.js +73 -18
- package/workspace/lib/engine/workflow-state.js +2 -1
- package/workspace/lib/initiative-rows.js +2 -2
- package/workspace/lib/routes-boards.js +119 -6
- package/workspace/lib/routes-meeting-focus.js +19 -7
- package/workspace/lib/vendor/scripts/workflow-state.js +2 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/c3-demo-boards.js +82 -17
- package/workspace/public/pm/c3-demo-focus.js +39 -1
- package/workspace/public/pm/c3-focus.css +53 -0
- package/workspace/public/pm/c3-focus.js +188 -44
- package/workspace/public/pm/c3-ib-initiatives.js +127 -60
- package/workspace/public/pm/c3-ib-items.js +2 -2
- package/workspace/public/pm/c3-ini-life.css +32 -0
- package/workspace/public/pm/c3-ini-life.js +379 -0
- package/workspace/public/pm/c3-ini-ui.js +12 -7
- package/workspace/public/pm/c3-initiatives.js +14 -4
- package/workspace/public/pm/c3-phone.css +3 -1
- package/workspace/public/pm/c3-phone.js +28 -8
- package/workspace/server.js +7 -2
- package/workspace/test-lists/c3-ini-life.json +9 -0
package/workspace/server.js
CHANGED
|
@@ -1969,7 +1969,8 @@ function readLifecycle(w) {
|
|
|
1969
1969
|
for (const r of readLedger(w, 'lifecycle.jsonl')) {
|
|
1970
1970
|
if (!r || typeof r.initiative_id !== 'string') continue;
|
|
1971
1971
|
if (r.state !== 'active' && !STOPPED_STATES.includes(r.state)) continue;
|
|
1972
|
-
|
|
1972
|
+
// `back` (c3-initiative-lifecycle): the day an on-hold initiative comes back to the PM, when the hold named one.
|
|
1973
|
+
latest.set(r.initiative_id, { state: r.state, reason: r.reason || '', pm: r.pm || '', at: r.at || '', ...(r.state === 'on-hold' && /^\d{4}-\d{2}-\d{2}$/.test(r.back || '') ? { back: r.back } : {}) });
|
|
1973
1974
|
}
|
|
1974
1975
|
return latest;
|
|
1975
1976
|
}
|
|
@@ -8648,6 +8649,10 @@ async function handleRequest(req, res) {
|
|
|
8648
8649
|
if (body.state !== 'active' && !STOPPED_STATES.includes(body.state)) {
|
|
8649
8650
|
return json(res, { ok: false, error: `state must be one of ${STOPPED_STATES.concat('active').join(', ')}` }, 400);
|
|
8650
8651
|
}
|
|
8652
|
+
// A hold may name the day it comes back to the PM (c3-initiative-lifecycle). Only on-hold carries it.
|
|
8653
|
+
if (body.back != null && (body.state !== 'on-hold' || !/^\d{4}-\d{2}-\d{2}$/.test(String(body.back)))) {
|
|
8654
|
+
return json(res, { ok: false, error: 'back is a day (YYYY-MM-DD) and only goes with on-hold' }, 400);
|
|
8655
|
+
}
|
|
8651
8656
|
const w = getWs(body.ws);
|
|
8652
8657
|
if (!w) return json(res, { ok: false, error: 'no workspace' }, 400);
|
|
8653
8658
|
const known = new Set(initiativeIndex(w.root).initiatives.map((x) => x.id));
|
|
@@ -8662,7 +8667,7 @@ async function handleRequest(req, res) {
|
|
|
8662
8667
|
grant = m.grant_id;
|
|
8663
8668
|
}
|
|
8664
8669
|
const at = nowISO();
|
|
8665
|
-
const recs = ids.map((x) => ({ initiative_id: x, state: body.state, reason, pm: 'wawan', by: g.actor.by, via: g.actor.via, at, ...(grant ? { grant } : {}) }));
|
|
8670
|
+
const recs = ids.map((x) => ({ initiative_id: x, state: body.state, reason, ...(body.back ? { back: String(body.back) } : {}), pm: 'wawan', by: g.actor.by, via: g.actor.via, at, ...(grant ? { grant } : {}) }));
|
|
8666
8671
|
const rec = recs[0];
|
|
8667
8672
|
// The ledger the ENGINE reads for this repository's layout (scripts/workflow-state.js#layout): a repository
|
|
8668
8673
|
// with planning/initiatives/ keeps its ledgers in planning/runs/, a kit in pmos/state/. Writing anywhere else
|