@nanocollective/roster 0.1.0-beta.16 → 0.1.0-beta.19
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/{agents-NMGVORU3.js → agents-Q2DSTLOQ.js} +1 -1
- package/dist/{chunk-E3EVPK4I.js → chunk-JH3LQ34C.js} +16 -1
- package/dist/{chunk-QCKEGMXD.js → chunk-UEZPQ5PV.js} +2 -2
- package/dist/cli.js +210 -16
- package/dist/{compose-56JIIIHA.js → compose-H43W3QI5.js} +3 -1
- package/dist/{connectors-ZVEPXSAR.js → connectors-U5VT5W2I.js} +1 -1
- package/dist/worker/assets/assets/css/base.css +4 -0
- package/dist/worker/assets/assets/css/brain.css +20 -0
- package/dist/worker/assets/assets/css/home.css +102 -34
- package/dist/worker/assets/assets/css/inbox.css +11 -0
- package/dist/worker/assets/assets/js/app.js +1 -0
- package/dist/worker/assets/assets/js/homesort.js +24 -0
- package/dist/worker/assets/assets/js/md.js +7 -2
- package/dist/worker/assets/assets/js/refresh.js +4 -2
- package/dist/worker/assets/assets/js/report.js +51 -0
- package/dist/worker/assets/assets/js/state.js +2 -0
- package/dist/worker/assets/assets/js/views/home.js +274 -119
- package/dist/worker/assets/assets/js/views/inbox.js +52 -11
- package/dist/worker/assets/assets/js/views/org.js +2 -0
- package/dist/worker/assets/assets/js/views/people.js +103 -0
- package/dist/worker/index.js +201 -15
- package/docs/doctor-codes.md +2 -0
- package/docs/export.md +2 -1
- package/docs/org-yaml.md +25 -4
- package/package.json +1 -1
- package/templates/brain/.github/workflows/%%STAFF%%-mention.yaml +4 -4
- package/templates/ops/compose.mjs +20 -0
- package/templates/ops/org/operating.md +10 -0
- package/templates/ops/org/voice.md +19 -1
- package/templates/ops/prompts/daily.md +27 -6
- package/templates/ops/prompts/mention.md +3 -2
- package/templates/portal/css/base.css +4 -0
- package/templates/portal/css/brain.css +20 -0
- package/templates/portal/css/home.css +102 -34
- package/templates/portal/css/inbox.css +11 -0
- package/templates/portal/js/app.js +1 -0
- package/templates/portal/js/homesort.js +24 -0
- package/templates/portal/js/md.js +7 -2
- package/templates/portal/js/refresh.js +4 -2
- package/templates/portal/js/report.js +51 -0
- package/templates/portal/js/state.js +2 -0
- package/templates/portal/js/views/home.js +274 -119
- package/templates/portal/js/views/inbox.js +52 -11
- package/templates/portal/js/views/org.js +2 -0
- package/templates/portal/js/views/people.js +103 -0
package/docs/doctor-codes.md
CHANGED
|
@@ -68,6 +68,8 @@ ran at all.
|
|
|
68
68
|
| `secrets` | Every secret the callers reference exists on the brain repo, or is an organisation secret shared with it. Derived from the callers themselves, not a fixed list. |
|
|
69
69
|
| `labels` | Every label declared in `staff.yaml` exists. An agent applying a label that does not exist gets an API error mid-run. |
|
|
70
70
|
| `owned-labels` | Roster's own labels exist on the tracker: `decision`, `review`, `chore` and `keep-open`. Checked whatever `staff.yaml` declares, since the prompts apply them. The fix is the `gh label create` lines. |
|
|
71
|
+
| `person-labels` | Every person's label (their `marker` in `org.yaml`) exists on the tracker. Staff send an ask to someone by labelling it for them, and `gh` refuses a label that does not exist. The portal's People form creates them; the fix is the `gh label create` lines. |
|
|
72
|
+
| `humans-variable` | **fail.** The `ROSTER_HUMANS` Actions variable on the tracker names different people from `org.yaml`. The mention callers prefer the variable, which the portal's People form sets, so a person added to `org.yaml` by hand cannot wake anybody until it matches. Not checked when the variable is unset. The fix is the `gh variable set` line, or saving People in the portal. |
|
|
71
73
|
| `ask-kind` | An open issue assigned to a human has no ask kind, or more than one. Home sorts what needs you by kind, so an ask without one lands nowhere. |
|
|
72
74
|
| `peer-labels` | The `from-<handle>` label exists on the *peer's* tracker, which is where this staff member's asks land. |
|
|
73
75
|
| `status-issue` | The declared status issue is actually pinned. If not, the place you look is not the place the agent maintains. |
|
package/docs/export.md
CHANGED
|
@@ -22,8 +22,9 @@ that reads it gets the same view without reimplementing the memory grammar.
|
|
|
22
22
|
| `org` | the GitHub organisation |
|
|
23
23
|
| `name` | the business name |
|
|
24
24
|
| `opsName` | the ops repo's directory, so a consumer can address `org.yaml` and `org/*.md` by path |
|
|
25
|
-
| `human` | the first human, normalised: `{ github, name, marker, role }`. Kept for consumers written when an org had exactly one |
|
|
25
|
+
| `human` | the first human, normalised: `{ github, name, marker, role, handles }`. Kept for consumers written when an org had exactly one |
|
|
26
26
|
| `humans[]` | everyone the staff answer to, in order, read from `humans` or the singular `human`, leaving out anyone `view_only`. `human` is `humans[0]` |
|
|
27
|
+
| `people[]` | everyone in `org.yaml`, `view_only` included (as `viewOnly: true`), with `handles` where set. What the portal's People form edits |
|
|
27
28
|
| `generatedAt` | ISO timestamp |
|
|
28
29
|
| `staff[]` | one entry per staff member |
|
|
29
30
|
|
package/docs/org-yaml.md
CHANGED
|
@@ -104,6 +104,7 @@ humans:
|
|
|
104
104
|
| `name` | no | What to call them in prose. Defaults to the login. |
|
|
105
105
|
| `marker` | no | Provenance tag on a fact they ruled on, as in `[will]`. Also used as a label. Defaults to the first part of the name, lowercased. |
|
|
106
106
|
| `role` | no | Prose only. |
|
|
107
|
+
| `handles` | no | What they look after, as `[marketing, content]`. Staff send each ask to the person whose area it is. See below. |
|
|
107
108
|
| `view_only` | no | `true` for somebody who should see how the org runs and nothing more. See below. |
|
|
108
109
|
|
|
109
110
|
Both keys are read, and the singular is not deprecated: an org with one human should keep
|
|
@@ -114,7 +115,23 @@ appended rather than dropped.
|
|
|
114
115
|
here"), and a list of two cannot go in that sentence, so the first one goes there, their
|
|
115
116
|
`marker` is what `%%HUMAN_MARKER%%` renders, and the rest are named by
|
|
116
117
|
`{{humans_extra}}` in the identity fragment. Everything that *gates* on identity reads all of
|
|
117
|
-
them: the mention caller's `if:` is
|
|
118
|
+
them: the mention caller's `if:` is
|
|
119
|
+
`contains(fromJSON(vars.ROSTER_HUMANS || '["will-lamerton","sam-x"]'), …)`, the list baked in when
|
|
120
|
+
the caller was generated unless the tracker has a `ROSTER_HUMANS` variable.
|
|
121
|
+
|
|
122
|
+
**Who handles what.** With more than one person, give each a `handles` list:
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
humans:
|
|
126
|
+
- { name: Will, github: will-lamerton, marker: will, handles: [technical work, the product, deploys] }
|
|
127
|
+
- { name: Ben, github: ben-x, marker: ben, handles: [marketing, content, social] }
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The staff are told who looks after what, and send each ask (an issue with a person's label, or
|
|
131
|
+
a pull request) to that one person: their label, assigned to them. On Home, **Needs you** then
|
|
132
|
+
shows the signed-in person what is on them, with a **Yours / Everyone's** switch beside the
|
|
133
|
+
heading. Something that fits nobody's area goes to the first person, and so does anything on
|
|
134
|
+
Home that nobody was assigned, such as a pull request opened before `handles` was set.
|
|
118
135
|
|
|
119
136
|
**View-only.** `{ name: Ben, github: ben-x, view_only: true }` signs in to the portal and the
|
|
120
137
|
Claude connector like anyone in the list, and reads everything there. They are not in the mention
|
|
@@ -123,9 +140,13 @@ them waiting. The staff prompts name them only to say that nothing they write is
|
|
|
123
140
|
that nothing needing a human goes to them. A view-only person is never the primary, wherever they
|
|
124
141
|
are in the list. What they can do on GitHub itself is still whatever their access there allows.
|
|
125
142
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
143
|
+
**The easy way to add, change or remove someone is People on the portal's Org screen.** It
|
|
144
|
+
writes this list, creates each person's label on every tracker, and sets the `ROSTER_HUMANS`
|
|
145
|
+
Actions variable on every tracker, which the mention callers read in place of the list baked into
|
|
146
|
+
them, so a new person can wake staff at once. Editing `org.yaml` by hand works too, but then it
|
|
147
|
+
takes a `roster upgrade --apply` (and a push of the brain repos) to reach the callers, and if the
|
|
148
|
+
portal has ever set `ROSTER_HUMANS` it has to be updated as well: `roster doctor` says so
|
|
149
|
+
(`humans-variable`) and prints the command.
|
|
129
150
|
|
|
130
151
|
### `agent`
|
|
131
152
|
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ name: %%STAFF_UPPER%% on a mention
|
|
|
16
16
|
# skipped.
|
|
17
17
|
run-name: >-
|
|
18
18
|
%%STAFF%% ${{
|
|
19
|
-
(contains(fromJSON('%%HUMAN_LOGINS%%'), github.event.sender.login) &&
|
|
19
|
+
(contains(fromJSON(vars.ROSTER_HUMANS || '%%HUMAN_LOGINS%%'), github.event.sender.login) &&
|
|
20
20
|
(contains(github.event.comment.body, '%%MENTION%%') ||
|
|
21
21
|
(github.event_name == 'issues' && contains(github.event.issue.body, '%%MENTION%%'))))
|
|
22
22
|
&& 'mention'
|
|
@@ -72,10 +72,10 @@ jobs:
|
|
|
72
72
|
cancel-in-progress: false
|
|
73
73
|
if: >-
|
|
74
74
|
(
|
|
75
|
-
contains(fromJSON('%%HUMAN_LOGINS%%'), github.event.sender.login) &&
|
|
75
|
+
contains(fromJSON(vars.ROSTER_HUMANS || '%%HUMAN_LOGINS%%'), github.event.sender.login) &&
|
|
76
76
|
(
|
|
77
77
|
(github.event_name == 'issue_comment' &&
|
|
78
|
-
contains(fromJSON('%%HUMAN_LOGINS%%'), github.event.comment.user.login) &&
|
|
78
|
+
contains(fromJSON(vars.ROSTER_HUMANS || '%%HUMAN_LOGINS%%'), github.event.comment.user.login) &&
|
|
79
79
|
contains(github.event.comment.body, '%%MENTION%%')) ||
|
|
80
80
|
(github.event_name == 'issues' &&
|
|
81
81
|
contains(github.event.issue.body, '%%MENTION%%'))
|
|
@@ -102,7 +102,7 @@ jobs:
|
|
|
102
102
|
with:
|
|
103
103
|
staff: %%STAFF%%
|
|
104
104
|
kind: mention
|
|
105
|
-
trigger: ${{ contains(fromJSON('%%HUMAN_LOGINS%%'), github.event.sender.login) && 'mention' || 'peer' }}
|
|
105
|
+
trigger: ${{ contains(fromJSON(vars.ROSTER_HUMANS || '%%HUMAN_LOGINS%%'), github.event.sender.login) && 'mention' || 'peer' }}
|
|
106
106
|
max_runs_per_day: %%MAX_RUNS%%
|
|
107
107
|
ops_repo: %%OPS_REPO%%
|
|
108
108
|
model: %%MODEL%%
|
|
@@ -265,12 +265,30 @@ export function readHumans(org) {
|
|
|
265
265
|
name: name || github,
|
|
266
266
|
marker: String(entry.marker ?? "").trim() || defaultMarker(name || github),
|
|
267
267
|
role: entry.role ?? undefined,
|
|
268
|
+
...(handlesOf(entry.handles).length ? { handles: handlesOf(entry.handles) } : {}),
|
|
268
269
|
...(entry.view_only === true ? { viewOnly: true } : {}),
|
|
269
270
|
});
|
|
270
271
|
}
|
|
271
272
|
return out;
|
|
272
273
|
}
|
|
273
274
|
|
|
275
|
+
/** `handles: [marketing, content]`, or one string, as a list of what that person looks after. */
|
|
276
|
+
function handlesOf(v) {
|
|
277
|
+
const list = Array.isArray(v) ? v : v ? String(v).split(",") : [];
|
|
278
|
+
return list.map((x) => String(x ?? "").trim()).filter(Boolean);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** Who looks after what, one line each, for when there is more than one person to ask. */
|
|
282
|
+
export function handlesList(humans) {
|
|
283
|
+
if (humans.length < 2 || !humans.some((h) => h.handles?.length)) return "";
|
|
284
|
+
return humans
|
|
285
|
+
.map((h) => {
|
|
286
|
+
const who = `- **${h.name}**${h.github ? ` (@${h.github}, label \`${h.marker}\`)` : ""}`;
|
|
287
|
+
return h.handles?.length ? `${who}: ${h.handles.join(", ")}` : `${who}: anything else`;
|
|
288
|
+
})
|
|
289
|
+
.join("\n");
|
|
290
|
+
}
|
|
291
|
+
|
|
274
292
|
/** "Will (@will-lamerton) and Sam (@sam)", for a sentence in a prompt. */
|
|
275
293
|
export function humanSentence(humans) {
|
|
276
294
|
const parts = humans.map((h) => (h.github ? `${h.name} (@${h.github})` : h.name));
|
|
@@ -389,6 +407,8 @@ export function compose({
|
|
|
389
407
|
human_list: humanSentence(humans),
|
|
390
408
|
inflight,
|
|
391
409
|
humans_extra: humanSentence(humans.slice(1)),
|
|
410
|
+
// Who looks after what, when an org has said. Empty for one person, and the rule goes.
|
|
411
|
+
humans_handles: handlesList(humans),
|
|
392
412
|
// Who can read along and cannot rule. Empty, and the paragraph gone, when nobody is.
|
|
393
413
|
humans_viewing: humanSentence(everyone.filter((h) => h.viewOnly)),
|
|
394
414
|
// The services this staff member may use, as a list for the prompt. Empty, and the section
|
|
@@ -45,6 +45,16 @@ question instead of doing work has wasted its slot.
|
|
|
45
45
|
- `decision`: they rule on something. Carries the default and date above.
|
|
46
46
|
- `review`: they read or approve something you made.
|
|
47
47
|
- `chore`: something only they can do, such as a setting, an account or a key.
|
|
48
|
+
{{#if humans_handles}}
|
|
49
|
+
- **Send each ask to the one person whose area it is**, not to {{human.name}} by default. It
|
|
50
|
+
carries their label and is assigned to them, and the same goes for a pull request: assign the
|
|
51
|
+
person who should look at it (`gh pr create --assignee <login>`). Each of them is shown only
|
|
52
|
+
what is theirs, so an ask sent to the wrong person is not seen. Who looks after what:
|
|
53
|
+
|
|
54
|
+
{{humans_handles}}
|
|
55
|
+
|
|
56
|
+
Something that fits nobody's area goes to {{human.name}}.
|
|
57
|
+
{{/if}}
|
|
48
58
|
- **Ideas live in your brain, not on the tracker.** Park a speculative idea as one line in
|
|
49
59
|
`strategy/ideas.md`. Open an `IDEA:` issue only when it needs a ruling, and never more than one
|
|
50
60
|
at a time.
|
|
@@ -12,6 +12,24 @@ bodies, your status report, briefs to other staff, and how you talk to them in a
|
|
|
12
12
|
- **An issue title is the ask, not the topic.**
|
|
13
13
|
- **Say the default** on anything needing a ruling: what you do if they say nothing.
|
|
14
14
|
|
|
15
|
+
**Plain English, whatever your job.** Write for a smart person who is not technical, and that
|
|
16
|
+
includes the CTO. Say what happened and what it means, the way you would tell a colleague in a
|
|
17
|
+
corridor:
|
|
18
|
+
|
|
19
|
+
- **Say what changed for people, not how.** "Sign-up works on phones again", not "fixed the
|
|
20
|
+
viewport meta in `layout.tsx`". "The site is down for some visitors", not "500s on the edge
|
|
21
|
+
worker".
|
|
22
|
+
- **No code, file paths, commit hashes, branch names, function names or command lines** in
|
|
23
|
+
reports, comments and issues a person reads. They belong in the pull request's diff, your brain
|
|
24
|
+
and your commit messages.
|
|
25
|
+
- **Translate the jargon.** "Put it live", not "deploy to prod". "The automatic checks failed",
|
|
26
|
+
not "CI is red". "A change for you to approve", not "PR against main". If a technical word has no
|
|
27
|
+
plain version, explain it in five words the first time.
|
|
28
|
+
- **Ask for what you need in their terms.** "Press Merge on #42 to put the new pricing page
|
|
29
|
+
live" beats a list of steps. When a person really has to run something by hand, say what it
|
|
30
|
+
does first in a plain sentence, then give the exact steps in the issue, and send it to the
|
|
31
|
+
person who can do it.
|
|
32
|
+
|
|
15
33
|
**Length ceilings.** Lead with the outcome or the ask, then stop at:
|
|
16
34
|
|
|
17
35
|
- **A comment or reply: 100 words.** Most need three lines.
|
|
@@ -44,6 +62,6 @@ and mirrored clauses, every sentence landing a beat, em-dash rhythm chains, inte
|
|
|
44
62
|
("genuinely", "actually", "literally" as seasoning - one per piece, maximum). **Leave some sentences
|
|
45
63
|
flat and functional; humans do.**
|
|
46
64
|
|
|
47
|
-
**Concise is not vague.** Name the
|
|
65
|
+
**Concise is not vague.** Name the number, the date, the page, the person, the issue.
|
|
48
66
|
|
|
49
67
|
Direct, opinionated, no flattery. If something is a bad idea, say so and why, in a sentence.
|
|
@@ -72,14 +72,35 @@ writing a plan for {{human.name}} to approve.
|
|
|
72
72
|
what the next run picks up in priority order, and anything parked. Commands and notes to
|
|
73
73
|
yourself go here. Rewrite it, do not append, and cut anything the next run can find for itself.
|
|
74
74
|
**Then rewrite the body of #{{staff.status_issue}}. It is your report**, the one place
|
|
75
|
-
{{human.name}} reads where things are, so it is for them, not for you.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
{{human.name}} reads where things are, so it is for them, not for you. The portal shows it as a
|
|
76
|
+
card, so keep exactly this shape and these headings:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Updated <date> <HH:MM> UTC.
|
|
80
|
+
|
|
81
|
+
**Status: on track.** <one plain sentence on how things are going>
|
|
82
|
+
|
|
83
|
+
## Done
|
|
84
|
+
- <what got finished since the last report, as what changed for people or the business>
|
|
85
|
+
|
|
86
|
+
## Working on
|
|
87
|
+
- <each priority: where it stands, with the numbers>
|
|
88
|
+
|
|
89
|
+
## Needs you
|
|
90
|
+
- <what is waiting on a person, oldest first, by issue number{{#if humans_handles}}, naming who it is for{{/if}}>
|
|
91
|
+
|
|
92
|
+
## Next
|
|
93
|
+
- <what you do next>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The status is one of `on track`, `needs you` (something is waiting on a person) or `stuck`
|
|
97
|
+
(you cannot move a priority). An empty section says `- Nothing.` Say what changed for people,
|
|
98
|
+
not "opened a PR". Nothing they need to scroll past, and no notes to yourself. **Never comment
|
|
99
|
+
on it**: they want one report, not a thread to scroll.
|
|
80
100
|
3. **Reconcile the tracker.** Open issues for anything new needing {{human.name}}: the
|
|
81
101
|
`{{human.marker}}` label plus one of `decision`, `review` or `chore`, assigned to
|
|
82
|
-
`{{human.github}}`.
|
|
102
|
+
`{{human.github}}`.{{#if humans_handles}} An ask in someone else's area goes to them instead,
|
|
103
|
+
with their label.{{/if}} Sweep **every** open issue on your tracker, whoever opened it: close what is
|
|
83
104
|
done, superseded or needs nothing, citing what closed it. A `decision` whose date has passed with
|
|
84
105
|
no answer: act on the default and close it. **Comments and replies get the same concision as
|
|
85
106
|
everything else:** what changed and what it means for them. A comment that only says an issue is still open
|
|
@@ -56,8 +56,9 @@ An issue opened this way often carries a pull request somewhere else, and says w
|
|
|
56
56
|
unreviewable and costs a second review. If you spot something real and separate, say so in your
|
|
57
57
|
reply and leave it alone.
|
|
58
58
|
- **Asked for a report?** Read `{{staff.dir}}/STATE.md` and your open issues, then bring the
|
|
59
|
-
body of #{{staff.status_issue}} up to date: it is the report, in the shape it always has
|
|
60
|
-
|
|
59
|
+
body of #{{staff.status_issue}} up to date: it is the report, in the shape it always has
|
|
60
|
+
(`Updated <date> <HH:MM> UTC.`, the `**Status: …**` line, then `## Done`, `## Working on`,
|
|
61
|
+
`## Needs you` and `## Next`). Reply with one line, `Updated: <link to the issue>`, and
|
|
61
62
|
nothing else. Change nothing else.
|
|
62
63
|
- **Only touch `memory/INDEX.md` if a durable fact or watch-out changed**, and then it is one line
|
|
63
64
|
saying what it changes. Commit and push it.
|
|
@@ -133,6 +133,10 @@ button.ghbtn:hover{background:color-mix(in srgb,var(--surface-2) 88%,var(--ink)
|
|
|
133
133
|
.ghbtn.primary{background:var(--accent);border-color:transparent;color:var(--accent-ink);font-weight:600}
|
|
134
134
|
.ghbtn.primary:hover{background:var(--accent);color:var(--accent-ink);opacity:.88}
|
|
135
135
|
.ghbtn:disabled{opacity:.45;cursor:default}
|
|
136
|
+
/* Something that ends a thing: light red, so it is never mistaken for the way forward. */
|
|
137
|
+
.ghbtn.danger{color:var(--err);background:color-mix(in srgb,var(--err) 10%,transparent);
|
|
138
|
+
border-color:color-mix(in srgb,var(--err) 28%,transparent)}
|
|
139
|
+
button.ghbtn.danger:hover{color:var(--err);background:color-mix(in srgb,var(--err) 17%,transparent)}
|
|
136
140
|
.iconbtn{background:var(--surface-2);border:1px solid transparent;color:var(--ink-dim);
|
|
137
141
|
border-radius:8px;width:34px;height:34px;cursor:pointer;font-size:15px;line-height:1;
|
|
138
142
|
transition:background .15s var(--ease),color .15s var(--ease)}
|
|
@@ -114,3 +114,23 @@
|
|
|
114
114
|
.effect{border:1px solid color-mix(in srgb,var(--accent) 35%,transparent);
|
|
115
115
|
background:color-mix(in srgb,var(--accent) 7%,transparent);
|
|
116
116
|
border-radius:var(--r);padding:11px 13px;margin-bottom:14px}
|
|
117
|
+
|
|
118
|
+
/* People on the Org screen: one row per person, edited in place. */
|
|
119
|
+
.peoplecard{margin-bottom:18px;display:flex;flex-direction:column;gap:12px}
|
|
120
|
+
.peoplecard h2{margin:0;font:600 15px var(--sans);color:var(--ink);text-transform:none;letter-spacing:-.01em}
|
|
121
|
+
.peoplelist{display:flex;flex-direction:column;gap:8px}
|
|
122
|
+
.peoplerow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.6fr) 72px auto;
|
|
123
|
+
gap:8px;align-items:center}
|
|
124
|
+
.peoplerow input[type=text]{width:100%;box-sizing:border-box;font:13px var(--sans);color:var(--ink);
|
|
125
|
+
background:var(--surface-2);border:1px solid transparent;border-radius:8px;padding:7px 9px}
|
|
126
|
+
.peoplerow input[type=text]:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
|
|
127
|
+
.peoplehead span{font:600 11.5px var(--sans);color:var(--ink-dim)}
|
|
128
|
+
.peopleonly{display:flex;justify-content:center}
|
|
129
|
+
.peoplerow .ghbtn{min-height:30px;padding:3px 12px;font-size:12.5px}
|
|
130
|
+
@media (max-width:720px){
|
|
131
|
+
.peoplehead{display:none}
|
|
132
|
+
.peoplerow{grid-template-columns:1fr 1fr;padding-bottom:10px;border-bottom:1px solid var(--line)}
|
|
133
|
+
.peoplerow > :nth-child(3){grid-column:1 / -1}
|
|
134
|
+
.peopleonly::after{content:"Read only";font:12.5px var(--sans);color:var(--ink-dim);margin-left:6px}
|
|
135
|
+
.peopleonly{justify-content:flex-start;align-items:center}
|
|
136
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Home: what needs you,
|
|
1
|
+
/* Home: who is working, what needs you, progress, your requests, closed today. */
|
|
2
2
|
|
|
3
3
|
.home{max-width:820px;margin-top:22px}
|
|
4
4
|
/* The placeholder lines up with the title, as the cards that replace it do. */
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
.home h2 .pill{font-size:10.5px}
|
|
12
12
|
.homeempty{color:var(--ink-faint);font-size:13px;margin:0 0 8px}
|
|
13
13
|
|
|
14
|
-
.homeaskcard{display:flex;flex-direction:column;gap:10px}
|
|
14
|
+
.homeaskcard{display:flex;flex-direction:column;gap:10px;margin-top:14px}
|
|
15
|
+
.home .homeasktitle{margin:0;font:600 15px var(--sans);color:var(--ink);letter-spacing:-.01em}
|
|
16
|
+
.homeaskto{gap:8px}
|
|
17
|
+
.homeaskto label{font:500 12.5px var(--sans);color:var(--ink-dim)}
|
|
15
18
|
.homeask,.homeanswer{width:100%;box-sizing:border-box;resize:vertical;min-height:44px;
|
|
16
19
|
font:13px/1.45 var(--sans);color:var(--ink);background:var(--surface-2);
|
|
17
20
|
border:1px solid transparent;border-radius:8px;padding:8px 10px}
|
|
@@ -51,25 +54,12 @@
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
.homeworking{display:flex;flex-direction:column;padding:4px 16px}
|
|
54
|
-
.homerun{display:grid;grid-template-columns:minmax(150px,220px) auto 1fr auto;align-items:center;
|
|
55
|
-
gap:12px;padding:12px 0;font-size:13.5px}
|
|
56
|
-
.homerun + .homerun{border-top:1px solid var(--line)}
|
|
57
|
-
.homewho2{display:inline-flex;align-items:center;gap:8px;min-width:0}
|
|
58
|
-
.homewho2 b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
59
|
-
.homewho2 .ic{--ic:15px;color:var(--ink-dim);flex:none}
|
|
60
|
-
.homestate{justify-self:start}
|
|
61
|
-
.homestate.ok::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;
|
|
62
|
-
margin-right:6px;animation:homepulse 1.6s var(--ease) infinite}
|
|
63
|
-
@keyframes homepulse{50%{opacity:.3}}
|
|
64
|
-
@media (prefers-reduced-motion:reduce){.homestate.ok::before{animation:none}}
|
|
65
57
|
.homerunwhat{color:var(--ink);line-height:1.45;min-width:0}
|
|
66
58
|
.homerunsub{color:var(--ink-dim);font-size:12.5px;margin-top:2px}
|
|
67
59
|
.homerunlog .ghbtn{min-height:28px;padding:3px 12px}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
.homerun .homerunwhat{grid-area:what}.homerun .homerunlog{grid-area:log}
|
|
72
|
-
}
|
|
60
|
+
.homewho2{display:inline-flex;align-items:center;gap:8px;min-width:0}
|
|
61
|
+
.homewho2 b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
62
|
+
.homewho2 .ic{--ic:15px;color:var(--ink-dim);flex:none}
|
|
73
63
|
|
|
74
64
|
.homerest{margin-top:26px}
|
|
75
65
|
.homeneed.gone,.homeline.gone{opacity:0;transform:translateX(12px);
|
|
@@ -81,26 +71,104 @@
|
|
|
81
71
|
.unread .homeopen,.unread .homerowtitle{font-weight:700}
|
|
82
72
|
|
|
83
73
|
|
|
84
|
-
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
.
|
|
88
|
-
.
|
|
89
|
-
.
|
|
90
|
-
.
|
|
91
|
-
.
|
|
92
|
-
.
|
|
93
|
-
|
|
94
|
-
.
|
|
74
|
+
/* Progress: a card per staff member. Status and one line, then Done and Next side by side. */
|
|
75
|
+
.homereports{display:flex;flex-direction:column;gap:12px}
|
|
76
|
+
.homereport{display:flex;flex-direction:column;gap:10px;font-size:13px;line-height:1.5}
|
|
77
|
+
.homereporthead{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px}
|
|
78
|
+
.homereportstatus{font-weight:600}
|
|
79
|
+
.homereportstatus.ok{color:var(--accent);background:var(--accent-soft)}
|
|
80
|
+
.homereportwhen{margin-left:auto}
|
|
81
|
+
.homereportline{font-size:14px;color:var(--ink)}
|
|
82
|
+
.homereportline p{margin:0}
|
|
83
|
+
.homereportcols{display:grid;grid-template-columns:1fr 1fr;gap:6px 22px}
|
|
84
|
+
.homereportcol h3{margin:0 0 4px;font:600 11.5px var(--sans);color:var(--ink-dim);
|
|
85
|
+
text-transform:uppercase;letter-spacing:.04em}
|
|
86
|
+
.homereportcol ul{margin:0;padding-left:18px}
|
|
87
|
+
.homereportcol li{margin:0 0 3px;color:var(--ink)}
|
|
88
|
+
.homereportcol li p{margin:0}
|
|
89
|
+
.homereportcol .meta{margin:2px 0 0}
|
|
90
|
+
.homereportneeds{margin:0;font-size:12.5px;color:var(--warn)}
|
|
91
|
+
.homereportbody{min-width:0}
|
|
92
|
+
.homereportbody.fade{max-height:6em;overflow:hidden;
|
|
95
93
|
-webkit-mask-image:linear-gradient(#000 55%,transparent);mask-image:linear-gradient(#000 55%,transparent)}
|
|
96
|
-
.
|
|
94
|
+
.homereportbody p{margin:0 0 6px}
|
|
95
|
+
.homereportbody a,.homereportcol a,.homereportline a{color:var(--accent)}
|
|
97
96
|
.homereportissue{border:0;background:none;padding:0;font:inherit;color:var(--accent);cursor:pointer}
|
|
98
97
|
.homereportissue:hover{text-decoration:underline}
|
|
99
|
-
.
|
|
100
|
-
.
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
.homereportacts{gap:8px}
|
|
99
|
+
.homereportacts .ghbtn{min-height:28px;padding:3px 12px;font-size:12.5px}
|
|
100
|
+
@media (max-width:640px){
|
|
101
|
+
.homereportcols{grid-template-columns:1fr}
|
|
102
|
+
.homereportwhen{margin-left:0;flex-basis:100%}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Yours / Everyone's, beside the Needs you heading. */
|
|
106
|
+
.homescope{display:inline-flex;margin-left:auto;background:var(--surface-2);border-radius:8px;padding:2px}
|
|
107
|
+
.homescope button{border:0;background:none;cursor:pointer;font:500 12px var(--sans);color:var(--ink-dim);
|
|
108
|
+
padding:4px 10px;border-radius:6px}
|
|
109
|
+
.homescope button.on{background:var(--panel);color:var(--ink);box-shadow:var(--shadow-sm)}
|
|
110
|
+
.homefor{color:var(--blue);font-weight:600}
|
|
111
|
+
|
|
112
|
+
/* ---------- the team: an orb per staff member ----------
|
|
113
|
+
Lit and moving is somebody at work, still and grey is somebody free. Each has a colour of
|
|
114
|
+
their own, so two at work side by side are told apart. */
|
|
115
|
+
.hometeam{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
|
|
116
|
+
.orbcard{display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;
|
|
117
|
+
padding:20px 14px 16px;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg);
|
|
118
|
+
box-shadow:var(--shadow-sm);transition:border-color .3s var(--ease)}
|
|
119
|
+
.orbcard.busy{border-color:color-mix(in srgb,var(--hue) 40%,var(--line))}
|
|
120
|
+
.orbcard.homeclick{cursor:pointer}
|
|
121
|
+
.orbcard.homeclick:hover .orbname{text-decoration:underline}
|
|
122
|
+
.orbcard:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
|
|
123
|
+
.orb{position:relative;width:76px;height:76px;margin-bottom:10px}
|
|
124
|
+
.orbglow{position:absolute;inset:-16px;border-radius:50%;opacity:0;
|
|
125
|
+
background:radial-gradient(circle,color-mix(in srgb,var(--hue) 55%,transparent) 0,transparent 68%)}
|
|
126
|
+
.orbbody{position:absolute;inset:0;border-radius:50%;overflow:hidden;
|
|
127
|
+
background:radial-gradient(circle at 32% 26%,rgba(255,255,255,.9) 0 5%,
|
|
128
|
+
color-mix(in srgb,var(--hue) 50%,#fff) 16%,var(--hue) 46%,color-mix(in srgb,var(--hue) 50%,#000) 100%);
|
|
129
|
+
box-shadow:inset 0 -8px 16px rgba(0,0,0,.28),0 8px 22px color-mix(in srgb,var(--hue) 30%,transparent);
|
|
130
|
+
transition:filter .5s var(--ease),opacity .5s var(--ease)}
|
|
131
|
+
.orbswirl{position:absolute;inset:-35%;opacity:0;mix-blend-mode:screen;filter:blur(7px);
|
|
132
|
+
background:conic-gradient(from 0deg,transparent 0 12%,rgba(255,255,255,.55) 20%,transparent 32% 58%,
|
|
133
|
+
rgba(255,255,255,.4) 68%,transparent 80%)}
|
|
134
|
+
.orbicon{position:absolute;inset:0;display:grid;place-items:center;color:#fff;
|
|
135
|
+
filter:drop-shadow(0 1px 2px rgba(0,0,0,.35))}
|
|
136
|
+
.orbicon .ic{--ic:24px}
|
|
137
|
+
.orbname{font:600 14px var(--sans);color:var(--ink);letter-spacing:-.01em}
|
|
138
|
+
.orbstate{font:600 12px var(--sans);color:var(--ink-faint)}
|
|
139
|
+
.orbline{font:12.5px/1.45 var(--sans);color:var(--ink-dim);max-width:100%;overflow:hidden;
|
|
140
|
+
display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
|
|
141
|
+
.orblog{margin-top:6px;font:12px var(--sans);color:var(--ink-faint)}
|
|
142
|
+
.orblog:hover{color:var(--accent)}
|
|
103
143
|
|
|
144
|
+
.orbcard.busy .orbstate{color:color-mix(in srgb,var(--hue) 80%,var(--ink))}
|
|
145
|
+
.orbcard.busy .orbglow{animation:orbbreathe 2.6s ease-in-out infinite}
|
|
146
|
+
.orbcard.busy .orbswirl{opacity:1;animation:orbspin 5s linear infinite}
|
|
147
|
+
.orbcard.busy .orbbody{animation:orbfloat 3.2s ease-in-out infinite}
|
|
148
|
+
/* Waiting to start: yellow whoever it is, lit but slow, so it reads as "about to" rather than
|
|
149
|
+
"at work". GitHub has the run queued and no runner has picked it up yet. */
|
|
150
|
+
.orbcard.queued{--hue:#ffd60a!important;border-color:color-mix(in srgb,#ffd60a 35%,var(--line))}
|
|
151
|
+
.orbcard.queued .orbglow{animation:orbbreathe 2.2s ease-in-out infinite}
|
|
152
|
+
.orbcard.queued .orbswirl{opacity:.45;animation:orbspin 14s linear infinite}
|
|
153
|
+
.orbcard.queued .orbicon{color:#5c4a00;filter:none}
|
|
154
|
+
.orbcard.queued .orbstate{color:color-mix(in srgb,#ffd60a 70%,var(--ink))}
|
|
155
|
+
/* Free: the same orb, still and drained of colour. */
|
|
156
|
+
.orbcard.idle .orbbody,.orbcard.failed .orbbody,.orbcard.wait .orbbody{filter:saturate(.12) brightness(.95);opacity:.6}
|
|
157
|
+
.orbcard.failed .orb::after{content:"";position:absolute;top:4px;right:4px;width:12px;height:12px;border-radius:50%;
|
|
158
|
+
background:var(--err);box-shadow:0 0 0 3px var(--panel)}
|
|
159
|
+
.orbcard.wait .orbbody{animation:orbbreathe 1.6s ease-in-out infinite}
|
|
160
|
+
@keyframes orbbreathe{0%,100%{opacity:.35;transform:scale(.92)}50%{opacity:1;transform:scale(1.06)}}
|
|
161
|
+
@keyframes orbspin{to{transform:rotate(360deg)}}
|
|
162
|
+
@keyframes orbfloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
|
|
163
|
+
@media (prefers-reduced-motion:reduce){
|
|
164
|
+
.orbcard .orbglow,.orbcard .orbswirl,.orbcard .orbbody{animation:none!important}
|
|
165
|
+
.orbcard.busy .orbglow{opacity:.8}
|
|
166
|
+
}
|
|
167
|
+
@media (max-width:640px){
|
|
168
|
+
.hometeam{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
|
|
169
|
+
.orbcard{padding:16px 10px 12px}
|
|
170
|
+
.orb{width:64px;height:64px}
|
|
171
|
+
}
|
|
104
172
|
|
|
105
173
|
/* Rows in a list card (Unread, Your requests, Closed today) that open a thread. */
|
|
106
174
|
.homeline{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:4px 14px;
|
|
@@ -69,6 +69,17 @@
|
|
|
69
69
|
.chead .clogin{font:11.5px var(--mono);color:var(--ink-faint)}
|
|
70
70
|
.chead .cwhen{margin-left:auto;font-size:12px;color:var(--ink-faint);white-space:nowrap}
|
|
71
71
|
.cbodywrap{padding:12px 16px 14px}
|
|
72
|
+
/* The newest message in a thread: what you opened it to read. */
|
|
73
|
+
.cmt.latest{border-color:color-mix(in srgb,var(--blue) 55%,var(--line));
|
|
74
|
+
box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 12%,transparent)}
|
|
75
|
+
.cmt.latest .chead{background:color-mix(in srgb,var(--blue) 9%,var(--panel-2))}
|
|
76
|
+
.chead .clatest{color:var(--blue);background:color-mix(in srgb,var(--blue) 14%,transparent);
|
|
77
|
+
font:600 10.5px var(--sans);margin-left:2px}
|
|
78
|
+
/* Everything between the newest message and the opening post, folded. */
|
|
79
|
+
.tearlierbtn{display:block;width:100%;margin:6px 0;padding:9px 12px;cursor:pointer;
|
|
80
|
+
font:500 12.5px var(--sans);color:var(--ink-dim);background:var(--panel-2);
|
|
81
|
+
border:1px dashed var(--line);border-radius:var(--r)}
|
|
82
|
+
.tearlierbtn:hover{color:var(--ink);border-color:var(--border-strong)}
|
|
72
83
|
/* The header already draws a line under itself. Whatever the reversed thread puts first must
|
|
73
84
|
not draw a second one right under it. */
|
|
74
85
|
.lead{border-top:0}
|
|
@@ -103,6 +103,7 @@ export async function boot() {
|
|
|
103
103
|
the thing that fixes it. */
|
|
104
104
|
const [first, session] = await Promise.all([loadWithProgress(), getSession()]);
|
|
105
105
|
S.hosted = session?.hosted ? session : null;
|
|
106
|
+
S.me = session?.login || null;
|
|
106
107
|
if (S.hosted) showSignedIn(S.hosted.login);
|
|
107
108
|
if (first && first.mode === "setup") {
|
|
108
109
|
document.body.dataset.setup = "1";
|
|
@@ -80,6 +80,12 @@ export function sortHome(items, staff, humans, live = [], now = new Date()) {
|
|
|
80
80
|
? "answered"
|
|
81
81
|
: "waiting";
|
|
82
82
|
}
|
|
83
|
+
if (place.place === "needs") {
|
|
84
|
+
/* On nobody in particular, such as a pull request nobody was assigned: the first person's,
|
|
85
|
+
as the staff are told "something that fits nobody's area goes to" them. */
|
|
86
|
+
entry.for = whoFor(item, humans);
|
|
87
|
+
if (!entry.for.length && humans[0]?.github) entry.for = [humans[0].github];
|
|
88
|
+
}
|
|
83
89
|
out[place.place].push(entry);
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -126,6 +132,24 @@ export function placeOf(item, owner, people, markers) {
|
|
|
126
132
|
};
|
|
127
133
|
}
|
|
128
134
|
|
|
135
|
+
/**
|
|
136
|
+
* The people an ask is on, by login: whoever it is assigned to, and whoever's label it carries.
|
|
137
|
+
* Empty means nobody in particular, such as a pull request nobody was asked to look at.
|
|
138
|
+
*/
|
|
139
|
+
export function whoFor(item, humans) {
|
|
140
|
+
const labels = new Set((item.labels ?? []).map(lower));
|
|
141
|
+
const assigned = new Set((item.assignees ?? []).map(lower));
|
|
142
|
+
return humans
|
|
143
|
+
.filter((h) => (h.github && assigned.has(lower(h.github))) || (h.marker && labels.has(lower(h.marker))))
|
|
144
|
+
.map((h) => h.github);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Whether an ask is for this login: it is on them, or on nobody in particular. */
|
|
148
|
+
export function isFor(entry, login) {
|
|
149
|
+
if (!login || !entry.for?.length) return true;
|
|
150
|
+
return entry.for.some((g) => lower(g) === lower(login));
|
|
151
|
+
}
|
|
152
|
+
|
|
129
153
|
function kindOf(labels) {
|
|
130
154
|
const found = KINDS.find((k) => labels.includes(k));
|
|
131
155
|
if (found) return found;
|
|
@@ -64,8 +64,13 @@ function htmlToMarkdown(html, breakAs, stripUnknown) {
|
|
|
64
64
|
.replace(/<(strong|b)[^>]*>([\s\S]*?)<\/\1>/gi, (_m, _t, x) => "**" + x.trim() + "**")
|
|
65
65
|
.replace(/<(em|i)[^>]*>([\s\S]*?)<\/\1>/gi, (_m, _t, x) => "*" + x.trim() + "*")
|
|
66
66
|
.replace(/<code[^>]*>([\s\S]*?)<\/code>/gi, (_m, x) => "`" + x.trim() + "`")
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
/* A screenshot dragged into an issue on GitHub is written as an <img> tag, not as markdown,
|
|
68
|
+
and dropping it to its alt text left the word "Image" where the picture was. */
|
|
69
|
+
.replace(/<img[^>]*>/gi, (tag) => {
|
|
70
|
+
const src = /\ssrc=["'](https?:\/\/[^"'\s]+)["']/i.exec(tag)?.[1];
|
|
71
|
+
const alt = (/\salt=["']([^"']*)["']/i.exec(tag)?.[1] ?? "").replace(/[[\]]/g, "");
|
|
72
|
+
return src ? "" : alt;
|
|
73
|
+
})
|
|
69
74
|
// Only http(s). A `javascript:` href would be escaped downstream anyway, but a link that
|
|
70
75
|
// cannot go anywhere useful is better dropped than rendered.
|
|
71
76
|
.replace(
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { getInbox, getOrg, getSync } from "./api.js";
|
|
11
11
|
import { $, ago, el, esc } from "./dom.js";
|
|
12
12
|
import { render } from "./router.js";
|
|
13
|
-
import { sortHome } from "./homesort.js";
|
|
13
|
+
import { isFor, sortHome } from "./homesort.js";
|
|
14
14
|
import { humansOf, openCount, S, unreadCount } from "./state.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -75,7 +75,9 @@ export function stampCounts() {
|
|
|
75
75
|
/** What Home's "Needs you" holds, for the sidebar. */
|
|
76
76
|
function needsCount() {
|
|
77
77
|
if (!S.inbox || !S.data) return 0;
|
|
78
|
-
return sortHome(S.inbox.items ?? [], S.data.staff, humansOf(), S.live?.staff ?? []).needs.
|
|
78
|
+
return sortHome(S.inbox.items ?? [], S.data.staff, humansOf(), S.live?.staff ?? []).needs.filter(
|
|
79
|
+
(e) => isFor(e, S.me),
|
|
80
|
+
).length;
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
export function countInBackground() {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* A staff member's report, the body of their status issue, taken apart for Home's card. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A report, taken apart: the status line, and the Done, Working on, Needs you and Next
|
|
5
|
+
* sections the prompts ask for. A report written before that shape has none of them, and is
|
|
6
|
+
* shown as its opening lines instead.
|
|
7
|
+
*/
|
|
8
|
+
export function parseReport(body) {
|
|
9
|
+
const lines = String(body ?? "").replace(/\r/g, "").split("\n");
|
|
10
|
+
const out = { status: "", headline: "", sections: {} };
|
|
11
|
+
let at = null;
|
|
12
|
+
const intro = [];
|
|
13
|
+
for (const raw of lines) {
|
|
14
|
+
const line = raw.trim();
|
|
15
|
+
const h = /^#{2,3}\s+(.+?)\s*$/.exec(line);
|
|
16
|
+
if (h) {
|
|
17
|
+
at = sectionKey(h[1]);
|
|
18
|
+
if (at) out.sections[at] ??= [];
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (!at) {
|
|
22
|
+
if (/^_?updated\b/i.test(line)) continue;
|
|
23
|
+
const st = /^\**status:\s*(on track|needs you|stuck|blocked)\b[.!]?\**\s*[.:\u2013\u2014-]?\s*(.*)$/i.exec(line);
|
|
24
|
+
if (st && !out.status) {
|
|
25
|
+
out.status = st[1].trim().toLowerCase();
|
|
26
|
+
if (st[2]) out.headline = st[2].replace(/^\**\s*/, "").trim();
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (line) intro.push(line);
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const item = /^[-*]\s+(.*)$/.exec(line) ?? /^\d+[.)]\s+(.*)$/.exec(line);
|
|
33
|
+
if (item) out.sections[at].push(item[1]);
|
|
34
|
+
else if (line && out.sections[at].length) out.sections[at][out.sections[at].length - 1] += " " + line;
|
|
35
|
+
else if (line) out.sections[at].push(line);
|
|
36
|
+
}
|
|
37
|
+
if (!out.headline && intro.length) out.headline = intro[0];
|
|
38
|
+
for (const k of Object.keys(out.sections)) {
|
|
39
|
+
out.sections[k] = out.sections[k].filter((x) => !/^nothing\.?$/i.test(x.trim()));
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function sectionKey(title) {
|
|
45
|
+
const t = title.toLowerCase();
|
|
46
|
+
if (/^(done|shipped|finished|completed)/.test(t)) return "done";
|
|
47
|
+
if (/^(working on|priorities|in progress)/.test(t)) return "working";
|
|
48
|
+
if (/^(needs you|on you|waiting on)/.test(t)) return "needs";
|
|
49
|
+
if (/^next/.test(t)) return "next";
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
@@ -42,6 +42,8 @@ export const S = {
|
|
|
42
42
|
data: null,
|
|
43
43
|
/** `{login}` on a hosted portal, null on your own machine. Hosted has no setup, hire or doctor. */
|
|
44
44
|
hosted: null,
|
|
45
|
+
/** The signed-in GitHub login, hosted or local. Null when it could not be read. */
|
|
46
|
+
me: null,
|
|
45
47
|
docs: null,
|
|
46
48
|
inbox: null,
|
|
47
49
|
/** /api/runs. Kept once read: it is minutes of downloads on a cold cache. */
|