@harborppm/cli 0.93.0 → 0.94.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/dist/app.mjs +13 -9
- package/package.json +1 -1
package/dist/app.mjs
CHANGED
|
@@ -2879,9 +2879,10 @@ function tideForecast(project, tasks, now, opts = {}) {
|
|
|
2879
2879
|
};
|
|
2880
2880
|
const weekly = weeklyFinished(tasks, project.startDate, now);
|
|
2881
2881
|
const finished = weekly.reduce((a, b) => a + b, 0);
|
|
2882
|
-
if (finished
|
|
2882
|
+
if (finished < 3) return {
|
|
2883
2883
|
kind: "no-pace",
|
|
2884
|
-
remaining
|
|
2884
|
+
remaining,
|
|
2885
|
+
finished
|
|
2885
2886
|
};
|
|
2886
2887
|
const today = todayISO(now);
|
|
2887
2888
|
const base = noon$3(today);
|
|
@@ -2947,11 +2948,11 @@ function tideQuiet(tide) {
|
|
|
2947
2948
|
case "empty": return "No tasks yet, so there's nothing to forecast.";
|
|
2948
2949
|
case "done": return "Every task is done.";
|
|
2949
2950
|
case "paused": return "Paused, so its pace says nothing about when it ends.";
|
|
2950
|
-
case "no-pace": return `Nothing finished in the last ${6} weeks, so there's no pace to forecast from yet.`;
|
|
2951
|
+
case "no-pace": return tide.finished === 0 ? `Nothing finished in the last ${6} weeks, so there's no pace to forecast from yet.` : `${tide.finished === 1 ? "One task has" : `${tide.finished} tasks have`} finished so far. Dates come once ${3} have, so they rest on a real pace.`;
|
|
2951
2952
|
default: return null;
|
|
2952
2953
|
}
|
|
2953
2954
|
}
|
|
2954
|
-
var TIDE_WEEKS, TRIALS, MAX_WEEKS, ROUGH_BELOW, noon$3;
|
|
2955
|
+
var TIDE_WEEKS, TRIALS, MAX_WEEKS, ROUGH_BELOW, TIDE_MIN_FINISHED, noon$3;
|
|
2955
2956
|
var init_tide = __esmMin((() => {
|
|
2956
2957
|
init_date_fns();
|
|
2957
2958
|
init_format();
|
|
@@ -2961,6 +2962,7 @@ var init_tide = __esmMin((() => {
|
|
|
2961
2962
|
TRIALS = 1e3;
|
|
2962
2963
|
MAX_WEEKS = 104;
|
|
2963
2964
|
ROUGH_BELOW = 5;
|
|
2965
|
+
TIDE_MIN_FINISHED = 3;
|
|
2964
2966
|
noon$3 = (iso) => /* @__PURE__ */ new Date(`${iso.slice(0, 10)}T12:00:00`);
|
|
2965
2967
|
}));
|
|
2966
2968
|
|
|
@@ -6293,7 +6295,7 @@ function tideLine(data, project, today) {
|
|
|
6293
6295
|
const tasks = tasksOf(data.tasks, project.id);
|
|
6294
6296
|
const tide = tideForecast(project, tasks, parseIso(`${today}T12:00:00`), tideOptions(data));
|
|
6295
6297
|
if (tide.kind === "no-pace") return {
|
|
6296
|
-
text: "No forecast yet: nothing finished in the last few weeks",
|
|
6298
|
+
text: tide.finished === 0 ? "No forecast yet: nothing finished in the last few weeks" : `No forecast yet: ${tide.finished} finished, dates come at 3`,
|
|
6297
6299
|
late: false
|
|
6298
6300
|
};
|
|
6299
6301
|
if (tide.kind !== "forecast") return null;
|
|
@@ -10028,19 +10030,21 @@ function mayChangeMessage(message, personId, role, action) {
|
|
|
10028
10030
|
* What a person's Inbox says about project messages since `since`: each
|
|
10029
10031
|
* message that @mentions them, and for each project they've written in, the
|
|
10030
10032
|
* messages others posted after their last one (a mention among them is
|
|
10031
|
-
* already its own line).
|
|
10033
|
+
* already its own line). A finished project's replies are left out, but a
|
|
10034
|
+
* mention there still reaches you: a wrap-up "thanks @Dana" is meant to.
|
|
10032
10035
|
*/
|
|
10033
10036
|
function messageLines(data, personId, since) {
|
|
10034
10037
|
const done = new Set(data.projects.filter((p) => p.health === "done").map((p) => p.id));
|
|
10035
10038
|
const byProject = /* @__PURE__ */ new Map();
|
|
10036
10039
|
for (const r of data.reflections ?? []) {
|
|
10037
|
-
if (!isMessage(r)
|
|
10040
|
+
if (!isMessage(r)) continue;
|
|
10038
10041
|
const list = byProject.get(r.projectId);
|
|
10039
10042
|
if (list) list.push(r);
|
|
10040
10043
|
else byProject.set(r.projectId, [r]);
|
|
10041
10044
|
}
|
|
10042
10045
|
const out = [];
|
|
10043
|
-
for (const list of byProject
|
|
10046
|
+
for (const [projectId, list] of byProject) {
|
|
10047
|
+
const finished = done.has(projectId);
|
|
10044
10048
|
list.sort((a, b) => a.createdAt.localeCompare(b.createdAt) || a.id.localeCompare(b.id));
|
|
10045
10049
|
let joined = false;
|
|
10046
10050
|
let replies = [];
|
|
@@ -10059,7 +10063,7 @@ function messageLines(data, personId, since) {
|
|
|
10059
10063
|
});
|
|
10060
10064
|
continue;
|
|
10061
10065
|
}
|
|
10062
|
-
if (joined) replies.push(m);
|
|
10066
|
+
if (joined && !finished) replies.push(m);
|
|
10063
10067
|
}
|
|
10064
10068
|
const latest = replies.at(-1);
|
|
10065
10069
|
if (latest) out.push({
|