@harborppm/cli 0.109.0 → 0.110.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/README.md +2 -2
- package/dist/app.mjs +120 -41
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,12 +37,12 @@ harbor # name your harbor and its first project, and you're in
|
|
|
37
37
|
9. **Calendar**: the month with each day's tasks and milestones; arrows move the day, `[` `]` the month, Enter goes into the day's tasks.
|
|
38
38
|
10. **Brief** (`0`): the weekly brief the website writes, for all portfolios or one (`p`), with how many programs sit at each health and the notes that opened; `f` swaps in the shipping forecast and `y` copies what's shown (in a terminal that lets apps copy; tmux needs `set-clipboard on`).
|
|
39
39
|
11. **Crew** (`C`): who's aboard and what each can do. The owner switches someone between editing and viewing (Enter), invites by email (`i`), copies (`y`) or withdraws (`w`) a letter still out, makes a read-only share link to a portfolio (`s`) and picks who gets its Monday update (`m`), and makes a project's intake form (`f`). Everyone sees the apps they connected (`d` disconnects one), turns their emails on or off, and opens Keep in the browser.
|
|
40
|
-
12. **Goals** (`G`): each portfolio's goals with how far along they are, off track in red, and their key results. `n` sets a goal;
|
|
40
|
+
12. **Goals** (`G`): each portfolio's goals with how far along they are, off track in red, and their key results. Enter folds a goal open to read why it matters, what each key result counts and who last moved its number, and folds it shut again; it changes nothing, so a viewer can read too. `n` sets a goal; `e` on a goal renames it, gives it an owner, a due day or why it matters, adds a number key result or counts a program or project toward it; `e` on a number key result moves it; `d` removes the goal or key result.
|
|
41
41
|
13. **Reports** (`O`): the Reports page's dashboards, each chart drawn as bars with its numbers. `n` makes a dashboard (the first starts with a few charts), `a` adds a chart (what it counts, then how it's split), Enter renames a dashboard or chart, splits a chart another way or moves it, `[` `]` move one, `d` removes it.
|
|
42
42
|
|
|
43
43
|
`:` also opens three pages that aren't screens of their own. **Recently deleted** lists what was deleted in the last 30 days, and Enter brings one back (for editors; it says first when what it sat in is gone too). **Sheet links** lists yours, `n` makes one for a program (or, for the owner, the whole harbor) and copies it, since it shows only once, and `d` turns one off. **API keys** lists yours with when each was last used, and `d` revokes one; `n` opens the website, where a new key is made and shown once.
|
|
44
44
|
|
|
45
|
-
A task changes in place too: title, status, owner, due date (`2026-10-14`, `today`, `+3`), priority, project, what it waits on (type a key or words), how it repeats, notes, checklist steps, comments (`C` changes or takes out one of yours). `s` adds a subtask under it and `T` saves it as one of its project's templates. On a project, `T` starts a task from a template and `M` opens its Messages: one conversation for the whole project, where `n` writes, `e` changes yours and `d` deletes.
|
|
45
|
+
A task changes in place too: title, status, owner, due date (`2026-10-14`, `today`, `+3`), priority, project, what it waits on (type a key or words), how it repeats, notes, checklist steps, comments (`C` changes or takes out one of yours). `s` adds a subtask under it and `T` saves it as one of its project's templates. On a project, `T` starts a task from a template and `M` opens its Messages: one conversation for the whole project, where `n` writes, `a` answers the message in the cursor (the answer sits under it), `e` changes yours and `d` deletes. `M` on a program opens the program's Messages the same way.
|
|
46
46
|
|
|
47
47
|
Keys: `↑↓` (or `j k`) and `←→` (or `h l`) move, Enter opens, Esc goes back, `:` finds anything (a screen, "new project", a project or program by name), `/` finds a task by its key or words, `n` makes something new, `e` changes what's open, `[` `]` move a card a column, `x` marks it done, `d` deletes (it asks first), `u` undoes your last change, `H` switches harbor, `?` lists them all.
|
|
48
48
|
|
package/dist/app.mjs
CHANGED
|
@@ -6707,8 +6707,22 @@ const STATUS_COLOR = {
|
|
|
6707
6707
|
"off-track": "bad",
|
|
6708
6708
|
achieved: "good"
|
|
6709
6709
|
};
|
|
6710
|
-
/**
|
|
6711
|
-
function
|
|
6710
|
+
/** What a work key result counts, by name: "Ridge Runner (program), Colorway refresh". */
|
|
6711
|
+
function linkedNames(kr, data) {
|
|
6712
|
+
return (kr.linkIds ?? []).map((id) => {
|
|
6713
|
+
const program = data.programs.find((p) => p.id === id);
|
|
6714
|
+
if (program) return `${program.name} (program)`;
|
|
6715
|
+
const project = data.projects.find((p) => p.id === id);
|
|
6716
|
+
if (project) return project.name;
|
|
6717
|
+
return data.tasks.find((t) => t.id === id)?.title ?? null;
|
|
6718
|
+
}).filter(Boolean).join(", ");
|
|
6719
|
+
}
|
|
6720
|
+
/**
|
|
6721
|
+
* Goals and their key results, as the Goals page lists them, one portfolio
|
|
6722
|
+
* after another. A goal in `open` also shows why it matters and what each
|
|
6723
|
+
* key result counts or who last moved it.
|
|
6724
|
+
*/
|
|
6725
|
+
function goalRows(data, today, open = /* @__PURE__ */ new Set()) {
|
|
6712
6726
|
const out = [];
|
|
6713
6727
|
const people = new Map(data.people.map((p) => [p.id, p.name]));
|
|
6714
6728
|
for (const portfolio of data.portfolios) {
|
|
@@ -6741,24 +6755,50 @@ function goalRows(data, today) {
|
|
|
6741
6755
|
goal
|
|
6742
6756
|
}
|
|
6743
6757
|
});
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
}
|
|
6758
|
+
const unfolded = open.has(goal.id);
|
|
6759
|
+
if (unfolded) out.push({
|
|
6760
|
+
key: `${goal.id}-why`,
|
|
6761
|
+
text: goal.why?.trim() ? ` Why: ${goal.why.trim()}` : " No why yet. e adds one.",
|
|
6762
|
+
plain: true
|
|
6763
|
+
});
|
|
6764
|
+
if (unfolded && !goal.keyResults.length) out.push({
|
|
6765
|
+
key: `${goal.id}-nokr`,
|
|
6766
|
+
text: " No key results yet. e adds one.",
|
|
6767
|
+
plain: true
|
|
6752
6768
|
});
|
|
6769
|
+
for (const kr of goal.keyResults) {
|
|
6770
|
+
out.push({
|
|
6771
|
+
key: kr.id,
|
|
6772
|
+
text: ` ${kr.title} · ${keyResultText(kr, data)}`,
|
|
6773
|
+
item: {
|
|
6774
|
+
portfolio,
|
|
6775
|
+
goal,
|
|
6776
|
+
kr
|
|
6777
|
+
}
|
|
6778
|
+
});
|
|
6779
|
+
const names = unfolded && kr.kind === "work" ? linkedNames(kr, data) : "";
|
|
6780
|
+
if (names) out.push({
|
|
6781
|
+
key: `${kr.id}-links`,
|
|
6782
|
+
text: ` counts ${names}`,
|
|
6783
|
+
plain: true
|
|
6784
|
+
});
|
|
6785
|
+
const mover = kr.updatedBy ? people.get(kr.updatedBy) : void 0;
|
|
6786
|
+
if (unfolded && kr.kind === "number" && kr.updatedAt) out.push({
|
|
6787
|
+
key: `${kr.id}-moved`,
|
|
6788
|
+
text: ` moved ${kr.updatedAt.slice(0, 10)}${mover ? ` by ${mover}` : ""}`,
|
|
6789
|
+
plain: true
|
|
6790
|
+
});
|
|
6791
|
+
}
|
|
6753
6792
|
}
|
|
6754
6793
|
}
|
|
6755
6794
|
return out;
|
|
6756
6795
|
}
|
|
6757
6796
|
/**
|
|
6758
6797
|
* Goals: each portfolio's goals with how far along they are and their key
|
|
6759
|
-
* results.
|
|
6760
|
-
*
|
|
6761
|
-
*
|
|
6798
|
+
* results. Enter folds a goal open (why it matters, what each key result
|
|
6799
|
+
* counts). n sets a goal, e on a goal changes it (name, owner, due day, why,
|
|
6800
|
+
* a key result, work to count), e on a number key result moves it, d
|
|
6801
|
+
* removes the goal or key result in the cursor.
|
|
6762
6802
|
*/
|
|
6763
6803
|
function GoalsView({ active, width, height, go }) {
|
|
6764
6804
|
const { store, today } = useDeps();
|
|
@@ -6769,19 +6809,21 @@ function GoalsView({ active, width, height, go }) {
|
|
|
6769
6809
|
const people = useHarbor((s) => s.people);
|
|
6770
6810
|
const viewOnly = useHarbor((s) => s.myRole === "viewer" || s.keepPaused);
|
|
6771
6811
|
const day = today();
|
|
6812
|
+
const [open, setOpen] = useState(() => /* @__PURE__ */ new Set());
|
|
6772
6813
|
const rows = useMemo(() => goalRows({
|
|
6773
6814
|
portfolios,
|
|
6774
6815
|
programs,
|
|
6775
6816
|
projects,
|
|
6776
6817
|
tasks,
|
|
6777
6818
|
people
|
|
6778
|
-
}, day), [
|
|
6819
|
+
}, day, open), [
|
|
6779
6820
|
portfolios,
|
|
6780
6821
|
programs,
|
|
6781
6822
|
projects,
|
|
6782
6823
|
tasks,
|
|
6783
6824
|
people,
|
|
6784
|
-
day
|
|
6825
|
+
day,
|
|
6826
|
+
open
|
|
6785
6827
|
]);
|
|
6786
6828
|
const [at, setAt] = useState(0);
|
|
6787
6829
|
const here = standOn(rows, at);
|
|
@@ -6790,10 +6832,16 @@ function GoalsView({ active, width, height, go }) {
|
|
|
6790
6832
|
useInput((input, key) => {
|
|
6791
6833
|
if (key.upArrow || input === "k") return setAt(nextRow(rows, here, -1));
|
|
6792
6834
|
if (key.downArrow || input === "j") return setAt(nextRow(rows, here, 1));
|
|
6793
|
-
if (
|
|
6835
|
+
if (key.return && cursor) return setOpen((was) => {
|
|
6836
|
+
const next = new Set(was);
|
|
6837
|
+
if (next.has(cursor.goal.id)) next.delete(cursor.goal.id);
|
|
6838
|
+
else next.add(cursor.goal.id);
|
|
6839
|
+
return next;
|
|
6840
|
+
});
|
|
6841
|
+
if (viewOnly && (input === "n" || input === "d" || input === "e")) return go.notify("You can only view this harbor.");
|
|
6794
6842
|
if (input === "n") return newGoal(store, go, portfolios, cursor?.portfolio);
|
|
6795
6843
|
if (!cursor) return;
|
|
6796
|
-
if (
|
|
6844
|
+
if (input === "e") return cursor.kr ? moveKr(store, go, cursor) : goalMenu(store, go, cursor);
|
|
6797
6845
|
if (input === "d") {
|
|
6798
6846
|
const what = cursor.kr ? `the key result “${cursor.kr.title}”` : `the goal “${cursor.goal.title}”`;
|
|
6799
6847
|
return go.confirm(`Remove ${what}? u undoes it.`, () => save(store, go, cursor.portfolio, (g) => withoutGoal(g, cursor.goal.id, cursor.kr?.id)), "Remove");
|
|
@@ -6806,7 +6854,7 @@ function GoalsView({ active, width, height, go }) {
|
|
|
6806
6854
|
paddingX: 1,
|
|
6807
6855
|
children: [
|
|
6808
6856
|
/* @__PURE__ */ jsx(Heading, {
|
|
6809
|
-
right: "↑↓ goal · Enter change · n new goal · d remove",
|
|
6857
|
+
right: "↑↓ goal · Enter open · e change · n new goal · d remove",
|
|
6810
6858
|
children: "Goals"
|
|
6811
6859
|
}),
|
|
6812
6860
|
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
@@ -6845,7 +6893,7 @@ function newGoal(store, go, portfolios, near) {
|
|
|
6845
6893
|
id: uid("goal"),
|
|
6846
6894
|
now: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6847
6895
|
newId: () => uid("kr")
|
|
6848
|
-
}))) go.notify("Set.
|
|
6896
|
+
}))) go.notify("Set. e on it adds a key result.");
|
|
6849
6897
|
});
|
|
6850
6898
|
if (near || portfolios.length === 1) return ask(near ?? portfolios[0]);
|
|
6851
6899
|
go.pick("Which portfolio is it for?", portfolios.map((p) => ({
|
|
@@ -7075,19 +7123,26 @@ function when(iso) {
|
|
|
7075
7123
|
return `${d.toLocaleString("en-US", { month: "short" })} ${d.getDate()}, ${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
7076
7124
|
}
|
|
7077
7125
|
/**
|
|
7078
|
-
* A project's Messages tab
|
|
7079
|
-
*
|
|
7080
|
-
*
|
|
7126
|
+
* A project's Messages tab, or a program's Messages card: one conversation
|
|
7127
|
+
* for everyone on it, each message with its answers under it, oldest at the
|
|
7128
|
+
* top and the cursor on the newest. n writes (@Name tells them), a answers
|
|
7129
|
+
* the message in the cursor, e changes your own, d deletes your own (the
|
|
7130
|
+
* owner can take any down).
|
|
7081
7131
|
*/
|
|
7082
|
-
function MessagesView({ active, width, height, go,
|
|
7132
|
+
function MessagesView({ active, width, height, go, place, onBack }) {
|
|
7083
7133
|
const { store } = useDeps();
|
|
7084
|
-
const
|
|
7134
|
+
const placeName = useHarbor((s) => place.kind === "program" ? s.programs.find((p) => p.id === place.id)?.name : s.projects.find((p) => p.id === place.id)?.name);
|
|
7135
|
+
const fallback = place.kind === "program" ? "the program" : "the project";
|
|
7085
7136
|
const reflections = useHarbor((s) => s.reflections);
|
|
7086
7137
|
const people = useHarbor((s) => s.people);
|
|
7087
7138
|
const me = useHarbor((s) => s.currentUserId);
|
|
7088
7139
|
const role = useHarbor((s) => s.myRole);
|
|
7089
7140
|
const viewOnly = useHarbor((s) => s.myRole === "viewer" || s.keepPaused);
|
|
7090
|
-
const list = useMemo(() =>
|
|
7141
|
+
const list = useMemo(() => threadsOf(messagesIn(reflections, place)).flatMap((t) => [t.message, ...t.replies]), [
|
|
7142
|
+
reflections,
|
|
7143
|
+
place.kind,
|
|
7144
|
+
place.id
|
|
7145
|
+
]);
|
|
7091
7146
|
const [at, setAt] = useState(null);
|
|
7092
7147
|
const here = Math.min(at ?? list.length - 1, list.length - 1);
|
|
7093
7148
|
const message = list[here];
|
|
@@ -7096,15 +7151,26 @@ function MessagesView({ active, width, height, go, projectId, onBack }) {
|
|
|
7096
7151
|
if (key.escape || key.backspace) return onBack();
|
|
7097
7152
|
if (key.upArrow || input === "k") return setAt(Math.max(0, here - 1));
|
|
7098
7153
|
if (key.downArrow || input === "j") return setAt(Math.min(list.length - 1, here + 1));
|
|
7099
|
-
if (viewOnly && "
|
|
7100
|
-
|
|
7154
|
+
if (viewOnly && "naed".includes(input) && input) return go.notify("You can only view this harbor.");
|
|
7155
|
+
const write = (body, replyToId) => {
|
|
7101
7156
|
if (!body.trim()) return;
|
|
7102
7157
|
const problem = messageProblem(body);
|
|
7103
7158
|
if (problem) return go.notify(problem);
|
|
7104
|
-
store.getState()
|
|
7105
|
-
|
|
7106
|
-
|
|
7159
|
+
const s = store.getState();
|
|
7160
|
+
if (place.kind === "program") s.postProgramMessage(place.id, body, replyToId);
|
|
7161
|
+
else s.postMessage(place.id, body, replyToId);
|
|
7162
|
+
if (!replyToId) setAt(null);
|
|
7163
|
+
};
|
|
7164
|
+
if (input === "n") return go.ask(`A message to everyone on ${placeName ?? fallback}`, (body) => write(body));
|
|
7107
7165
|
if (!message) return;
|
|
7166
|
+
if (input === "a") {
|
|
7167
|
+
const root = replyRoot(reflections, place, message.id) ?? message.id;
|
|
7168
|
+
return go.ask(`Your answer to ${name(message.authorId)}`, (body) => {
|
|
7169
|
+
write(body, root);
|
|
7170
|
+
const t = threadsOf(messagesIn(store.getState().reflections, place)).flatMap((t) => [t.message, ...t.replies]).reduce((last, m, i) => m.replyToId === root ? i : last, -1);
|
|
7171
|
+
if (t >= 0) setAt(t);
|
|
7172
|
+
});
|
|
7173
|
+
}
|
|
7108
7174
|
if (input === "e") {
|
|
7109
7175
|
if (!mayChangeMessage(message, me, role, "edit")) return go.notify("Only the person who wrote it can change it.");
|
|
7110
7176
|
return go.ask("Your message", (body) => {
|
|
@@ -7119,10 +7185,12 @@ function MessagesView({ active, width, height, go, projectId, onBack }) {
|
|
|
7119
7185
|
}
|
|
7120
7186
|
}, { isActive: active });
|
|
7121
7187
|
const blocks = list.map((m, i) => {
|
|
7188
|
+
const answer = Boolean(m.replyToId && list.some((r) => r.id === m.replyToId));
|
|
7122
7189
|
return {
|
|
7123
7190
|
i,
|
|
7124
|
-
head: `${name(m.authorId)} · ${when(m.createdAt)}${m.editedAt ? " (edited)" : ""}`,
|
|
7125
|
-
|
|
7191
|
+
head: `${answer ? "↳ " : ""}${name(m.authorId)} · ${when(m.createdAt)}${m.editedAt ? " (edited)" : ""}`,
|
|
7192
|
+
answer,
|
|
7193
|
+
body: wrapLines(m.body, width - (answer ? 9 : 6))
|
|
7126
7194
|
};
|
|
7127
7195
|
});
|
|
7128
7196
|
const rows = Math.max(1, height - 2);
|
|
@@ -7147,8 +7215,8 @@ function MessagesView({ active, width, height, go, projectId, onBack }) {
|
|
|
7147
7215
|
paddingX: 1,
|
|
7148
7216
|
children: [
|
|
7149
7217
|
/* @__PURE__ */ jsxs(Heading, {
|
|
7150
|
-
right: "↑↓ · n write · e change yours · d delete · Esc back",
|
|
7151
|
-
children: [
|
|
7218
|
+
right: "↑↓ · n write · a answer · e change yours · d delete · Esc back",
|
|
7219
|
+
children: [placeName ?? (place.kind === "program" ? "Program" : "Project"), " · Messages"]
|
|
7152
7220
|
}),
|
|
7153
7221
|
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
7154
7222
|
list.length === 0 ? /* @__PURE__ */ jsx(Text, {
|
|
@@ -7162,10 +7230,14 @@ function MessagesView({ active, width, height, go, projectId, onBack }) {
|
|
|
7162
7230
|
color: on ? theme.selected : theme.muted,
|
|
7163
7231
|
bold: on,
|
|
7164
7232
|
wrap: "truncate-end",
|
|
7165
|
-
children: [
|
|
7233
|
+
children: [
|
|
7234
|
+
on ? "› " : " ",
|
|
7235
|
+
b.answer ? " " : "",
|
|
7236
|
+
b.head
|
|
7237
|
+
]
|
|
7166
7238
|
}), b.body.map((line, j) => /* @__PURE__ */ jsxs(Text, {
|
|
7167
7239
|
wrap: "truncate-end",
|
|
7168
|
-
children: [" ", line]
|
|
7240
|
+
children: [b.answer ? " " : " ", line]
|
|
7169
7241
|
}, j))]
|
|
7170
7242
|
}, list[b.i].id);
|
|
7171
7243
|
})
|
|
@@ -16685,7 +16757,7 @@ const HELP$1 = [
|
|
|
16685
16757
|
["m R P t D", "milestone / risk / pre-mortem / dry dock / Done"],
|
|
16686
16758
|
["c a C S", "on a task: comment / step / yours / sounding"],
|
|
16687
16759
|
["s T", "on a task: add a subtask / save as a template"],
|
|
16688
|
-
["M T", "
|
|
16760
|
+
["M T", "messages (project, program) / from a template"],
|
|
16689
16761
|
["f c / f p", "Today: focus, check in · board: owner, priority"],
|
|
16690
16762
|
["q", "quit (saves first)"]
|
|
16691
16763
|
];
|
|
@@ -33393,6 +33465,7 @@ function ProgramView({ programId, active, width, height, go, onBack }) {
|
|
|
33393
33465
|
if (input === "n") return go.create("project", { programId });
|
|
33394
33466
|
if (input === "m") return go.create("milestone", { programId });
|
|
33395
33467
|
if (input === "c") return go.openPanel("shore", programId);
|
|
33468
|
+
if (input === "M") return go.openMessages(programId, "program");
|
|
33396
33469
|
if (input === "R") return go.create("raid", {});
|
|
33397
33470
|
if (input === "D" && split.done.length > 0) {
|
|
33398
33471
|
setSide("projects");
|
|
@@ -36775,9 +36848,10 @@ function App({ ui, startIn }) {
|
|
|
36775
36848
|
kind: "portfolio",
|
|
36776
36849
|
id
|
|
36777
36850
|
}),
|
|
36778
|
-
openMessages: (id) => push({
|
|
36851
|
+
openMessages: (id, on = "project") => push({
|
|
36779
36852
|
kind: "messages",
|
|
36780
|
-
id
|
|
36853
|
+
id,
|
|
36854
|
+
on
|
|
36781
36855
|
}),
|
|
36782
36856
|
openBridge: (programIds) => push({
|
|
36783
36857
|
kind: "bridge",
|
|
@@ -37160,6 +37234,7 @@ function App({ ui, startIn }) {
|
|
|
37160
37234
|
] : page?.kind === "messages" ? [
|
|
37161
37235
|
["↑↓", "move"],
|
|
37162
37236
|
["n", "write"],
|
|
37237
|
+
["a", "answer"],
|
|
37163
37238
|
["e", "change yours"],
|
|
37164
37239
|
["d", "delete"],
|
|
37165
37240
|
["Esc", "back"]
|
|
@@ -37189,6 +37264,7 @@ function App({ ui, startIn }) {
|
|
|
37189
37264
|
...page.kind === "program" ? [
|
|
37190
37265
|
["m", "milestone"],
|
|
37191
37266
|
["c", "chat channel"],
|
|
37267
|
+
["M", "messages"],
|
|
37192
37268
|
["←→", "lists"]
|
|
37193
37269
|
] : [],
|
|
37194
37270
|
["Esc", "back"]
|
|
@@ -37220,9 +37296,12 @@ function App({ ui, startIn }) {
|
|
|
37220
37296
|
}, page.id);
|
|
37221
37297
|
else if (page?.kind === "messages") screenNode = /* @__PURE__ */ jsx(MessagesView, {
|
|
37222
37298
|
...viewProps,
|
|
37223
|
-
|
|
37299
|
+
place: {
|
|
37300
|
+
kind: page.on,
|
|
37301
|
+
id: page.id
|
|
37302
|
+
},
|
|
37224
37303
|
onBack: back
|
|
37225
|
-
}, page.id);
|
|
37304
|
+
}, `${page.on}-${page.id}`);
|
|
37226
37305
|
else if (page?.kind === "program") screenNode = /* @__PURE__ */ jsx(ProgramView, {
|
|
37227
37306
|
...viewProps,
|
|
37228
37307
|
programId: page.id,
|