@bli-cockpit/cli 0.2.284 → 0.2.285
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.
|
@@ -20,7 +20,16 @@ const HOW_WORDS = { tap: "approved by you", edit: "approved by you with an edit"
|
|
|
20
20
|
function checkWhat(actKind) {
|
|
21
21
|
return `check ${checkWhere(actKind)}, then approve with --checked-sent sent or --checked-sent not-sent`;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* A meeting review card (`notes.review`) that Tower closed because the review moved on reads `rejected` in the database
|
|
25
|
+
* (the card states have no "withdrawn"), exactly like one the person dismissed. Neither is a "no" to anything, so the
|
|
26
|
+
* words say it was closed and that the review itself is untouched.
|
|
27
|
+
*/
|
|
28
|
+
const REVIEW_CARD_KIND = "notes.review";
|
|
29
|
+
const REVIEW_CARD_CLOSED = "closed: the review moved on, or you dismissed this card. The review itself is unchanged";
|
|
23
30
|
export function statusWords(card) {
|
|
31
|
+
if (card.act_kind === REVIEW_CARD_KIND && card.status === "rejected")
|
|
32
|
+
return REVIEW_CARD_CLOSED;
|
|
24
33
|
if (card.status === "executing" && card.stuck)
|
|
25
34
|
return `stuck sending, it may or may not have gone out: ${checkWhat(card.act_kind)}`;
|
|
26
35
|
if (card.status === "failed" && card.delivery_unknown)
|
|
@@ -91,8 +100,10 @@ export function cardDetailLines(card, color) {
|
|
|
91
100
|
const lines = [`${card.title} [${statusWords(card)}]`, `Kind: ${card.kind_label}`, `To: ${card.recipient_label}`, `Why: ${card.reason}`, `From: ${sourceLine(card)}`];
|
|
92
101
|
for (const fact of card.facts ?? [])
|
|
93
102
|
lines.push(`${fact.label}: ${fact.value}`);
|
|
94
|
-
if (card.decided_how)
|
|
95
|
-
|
|
103
|
+
if (card.decided_how) {
|
|
104
|
+
const closedReview = card.act_kind === REVIEW_CARD_KIND && card.decided_how === "reject";
|
|
105
|
+
lines.push(`Decision: ${closedReview ? REVIEW_CARD_CLOSED : (HOW_WORDS[card.decided_how] ?? card.decided_how)}`);
|
|
106
|
+
}
|
|
96
107
|
if (card.rule)
|
|
97
108
|
lines.push(`Standing rule: ${card.rule.label}`);
|
|
98
109
|
lines.push("", ...contentLines(card));
|
|
@@ -21,7 +21,7 @@ export async function runCockpitCli(argv, io) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if (command === "--version" || command === "-V" || command === "version") {
|
|
24
|
-
writeLine(io?.stdout ?? process.stdout, "0.2.
|
|
24
|
+
writeLine(io?.stdout ?? process.stdout, "0.2.285");
|
|
25
25
|
return 0;
|
|
26
26
|
}
|
|
27
27
|
|