@harborppm/cli 0.5.0 → 0.5.1
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 +20 -17
- package/package.json +1 -1
package/dist/app.mjs
CHANGED
|
@@ -2078,8 +2078,9 @@ function forecastLine(f) {
|
|
|
2078
2078
|
//#endregion
|
|
2079
2079
|
//#region src/tui/theme.ts
|
|
2080
2080
|
/**
|
|
2081
|
-
* Dark: Harbor's teal and coral lifted so they read on black,
|
|
2082
|
-
*
|
|
2081
|
+
* Dark: Harbor's teal and coral lifted so they read on black, and status in
|
|
2082
|
+
* softened hues rather than the terminal's own loud green and yellow (a
|
|
2083
|
+
* 16-colour terminal still gets its nearest plain colour). Light: the brand's own darker teal
|
|
2083
2084
|
* and coral, and status in hues dark enough for text on white (4.5:1 or more).
|
|
2084
2085
|
*/
|
|
2085
2086
|
const PALETTES = {
|
|
@@ -2089,10 +2090,10 @@ const PALETTES = {
|
|
|
2089
2090
|
muted: "gray",
|
|
2090
2091
|
selected: "#3dbcab",
|
|
2091
2092
|
border: "gray",
|
|
2092
|
-
good: "
|
|
2093
|
-
warn: "
|
|
2094
|
-
bad: "
|
|
2095
|
-
done: "
|
|
2093
|
+
good: "#86c294",
|
|
2094
|
+
warn: "#e3b55c",
|
|
2095
|
+
bad: "#f2665d",
|
|
2096
|
+
done: "#7fb6cc"
|
|
2096
2097
|
},
|
|
2097
2098
|
light: {
|
|
2098
2099
|
accent: "#0f6e64",
|
|
@@ -3462,17 +3463,19 @@ function PeopleView({ active, width, height, go }) {
|
|
|
3462
3463
|
const { today } = useDeps();
|
|
3463
3464
|
const rows = useMemo(() => {
|
|
3464
3465
|
const now = /* @__PURE__ */ new Date(`${today()}T12:00:00`);
|
|
3466
|
+
const nameWidth = Math.max(0, ...people.map((p) => p.name.length));
|
|
3465
3467
|
return people.map((p) => {
|
|
3466
3468
|
const open = tasks.filter((t) => t.assigneeId === p.id && t.status !== "done");
|
|
3467
3469
|
const load = weeklyLoad(tasks, p.id, now, 4);
|
|
3468
3470
|
const cap = p.weeklyCapacity ?? 5;
|
|
3469
|
-
const weeks = load.weeks.map((w) => w.due > cap ? `${w.due}!` : String(w.due)).join("
|
|
3471
|
+
const weeks = load.weeks.map((w) => (w.due === 0 ? "·" : w.due > cap ? `${w.due}!` : String(w.due)).padStart(3)).join("");
|
|
3472
|
+
const late = load.overdue ? `${load.overdue} late` : "";
|
|
3470
3473
|
return {
|
|
3471
3474
|
id: p.id,
|
|
3472
3475
|
kind: "person",
|
|
3473
3476
|
depth: 0,
|
|
3474
|
-
title: p.name,
|
|
3475
|
-
detail: `${
|
|
3477
|
+
title: p.name.padEnd(nameWidth),
|
|
3478
|
+
detail: `${String(open.length).padStart(3)} open ${late.padEnd(7)} weeks${weeks} of ${cap} · ${p.role}`
|
|
3476
3479
|
};
|
|
3477
3480
|
});
|
|
3478
3481
|
}, [
|
|
@@ -5166,7 +5169,7 @@ function ProjectView({ projectId, active, width, height, go, onBack }) {
|
|
|
5166
5169
|
]
|
|
5167
5170
|
});
|
|
5168
5171
|
}
|
|
5169
|
-
/** One card on the board: its key,
|
|
5172
|
+
/** One card on the board: its key, due date and owner, then the title on up to two lines. */
|
|
5170
5173
|
function Card({ taskKey, title, owner, due, late, waits, priority, selected }) {
|
|
5171
5174
|
return /* @__PURE__ */ jsxs(Box, {
|
|
5172
5175
|
flexDirection: "column",
|
|
@@ -5182,10 +5185,6 @@ function Card({ taskKey, title, owner, due, late, waits, priority, selected }) {
|
|
|
5182
5185
|
}),
|
|
5183
5186
|
" ",
|
|
5184
5187
|
/* @__PURE__ */ jsx(PriorityMark, { priority }),
|
|
5185
|
-
owner ? /* @__PURE__ */ jsxs(Text, {
|
|
5186
|
-
color: selected ? void 0 : theme.muted,
|
|
5187
|
-
children: [" ", owner]
|
|
5188
|
-
}) : null,
|
|
5189
5188
|
due ? /* @__PURE__ */ jsxs(Text, {
|
|
5190
5189
|
color: late ? theme.bad : selected ? void 0 : theme.muted,
|
|
5191
5190
|
children: [" ", due]
|
|
@@ -5193,6 +5192,10 @@ function Card({ taskKey, title, owner, due, late, waits, priority, selected }) {
|
|
|
5193
5192
|
waits ? /* @__PURE__ */ jsx(Text, {
|
|
5194
5193
|
color: theme.warn,
|
|
5195
5194
|
children: " waits"
|
|
5195
|
+
}) : null,
|
|
5196
|
+
owner ? /* @__PURE__ */ jsxs(Text, {
|
|
5197
|
+
color: selected ? void 0 : theme.muted,
|
|
5198
|
+
children: [" ", owner]
|
|
5196
5199
|
}) : null
|
|
5197
5200
|
]
|
|
5198
5201
|
}), /* @__PURE__ */ jsx(Box, {
|
|
@@ -5464,7 +5467,7 @@ function TaskPanel({ taskId, width, height, go, onClose }) {
|
|
|
5464
5467
|
status: STATUS_LABEL[task.status],
|
|
5465
5468
|
assignee: owner?.name ?? "Nobody yet",
|
|
5466
5469
|
due: task.dueDate ? `${shortDay(task.dueDate, day)}${isLate(task, day) ? " (late)" : ""}` : "None",
|
|
5467
|
-
priority: task.priority,
|
|
5470
|
+
priority: PRIORITY_LABEL[task.priority],
|
|
5468
5471
|
project: project ? `${project.name}${project.key ? ` (${project.key})` : ""}` : "",
|
|
5469
5472
|
notes: task.description.replace(/\s+/g, " ").trim() || "None"
|
|
5470
5473
|
};
|
|
@@ -5525,7 +5528,7 @@ function TaskPanel({ taskId, width, height, go, onClose }) {
|
|
|
5525
5528
|
} else if (f === "priority") editor = /* @__PURE__ */ jsx(Picker, {
|
|
5526
5529
|
title: "Priority",
|
|
5527
5530
|
choices: PRIORITIES.map((p) => ({
|
|
5528
|
-
label: p,
|
|
5531
|
+
label: PRIORITY_LABEL[p],
|
|
5529
5532
|
value: p
|
|
5530
5533
|
})),
|
|
5531
5534
|
initial: PRIORITIES.indexOf(task.priority),
|
|
@@ -5628,7 +5631,7 @@ function TaskPanel({ taskId, width, height, go, onClose }) {
|
|
|
5628
5631
|
children: [
|
|
5629
5632
|
" ",
|
|
5630
5633
|
"Checklist",
|
|
5631
|
-
task.checklist.length ? ` ${task.checklist.filter((c) => c.done).length}/${task.checklist.length}` : ""
|
|
5634
|
+
task.checklist.length ? ` ${task.checklist.filter((c) => c.done).length}/${task.checklist.length}` : " · none yet, a adds a step"
|
|
5632
5635
|
]
|
|
5633
5636
|
}),
|
|
5634
5637
|
task.checklist.map((item, i) => {
|