Public: anyone can read this; the crew can change it.
On you and Needs you are one list with one word and one count, each row saying what it waits for #1771
scout/forge:scout/1603-on-you-and-needs-you-are-one-list-with-o → main 3 commits fork
12 files
changed +460
−71
README.md +6 −4
| @@ -260,11 +260,13 @@ my machine", and the dashboard grows an **On your machine** card listing them. | ||
| 260 | 260 | The server remembers only the choice — nothing about the state of a laptop — |
| 261 | 261 | and `forge sync` below is what acts on it. |
| 262 | 262 | |
| 263 | **Muting a repository from the home**: each ask row on the home carries a "Mute owner/name" chip. A muted repository's asks leave the home, `/api/v1/asks`, the header count and the phone's pushes (the same per-user mute the On you card uses, no new table); the home says "N muted repositories still ask" with a "Listen again" button, and an app's own page still counts them. | |
| 263 | **One list, one count**: work assigned to you and the crew's asks are one list on the home ("Needs you"), counted once in the sentence, the top bar, `/api/v1/asks` (`count`) and the MCP `asks` tool. Every row says what it waits for — "ready to land", "conflicts with main", "your review", "a decision", "assigned to you" — as `waitingFor` in the data and a bold label on the page (`src/web/studio/waiting.ts`). A pull that is both assigned to you and an ask counts once. | |
| 264 | 264 | |
| 265 | **On you, in the terminal**, answers to the same mutes and one-move verbs as | |
| 265 | **Muting a repository from the home**: each ask row on the home carries a "Mute owner/name" chip. A muted repository's asks leave the home, `/api/v1/asks`, the header count and the phone's pushes (the same per-user mute the Needs you card uses, no new table); the home says "N muted repositories still ask" with a "Listen again" button, and an app's own page still counts them. | |
| 266 | ||
| 267 | **Needs you, in the terminal**, shows the web's one count in the pane title ("Needs you (3)") and the same waiting-for label on every row ("assigned to you", "conflicts with main", "a decision"), from the same helpers (`assignedLines`, `waitingForAsk`). It answers to the same mutes and one-move verbs as | |
| 266 | 268 | the web card. Repositories you muted are hidden and counted ("2 repositories |
| 267 | muted"). On the On you card: `space` marks a row, `x` closes the marked rows | |
| 269 | muted"). On the card: `space` marks a row, `x` closes the marked rows | |
| 268 | 270 | (or the row under the cursor) with one reason, `m` mutes their repositories, |
| 269 | 271 | `S` ships them, `u` undoes the latest set within its day, and `L` listens |
| 270 | 272 | again to every muted repository. Each goes through `applyAsksBulk`, so the |
| @@ -272,7 +274,7 @@ per-row access checks and refusals are the web's, shown in the toast. | ||
| 272 | 274 | |
| 273 | 275 | **Let the decider** answers a hand-over card (an issue the crew parked) when |
| 274 | 276 | you would rather not: the third tap on the card, `POST /api/v1/asks/decide` |
| 275 | (`{"item": "parked:<id>"}`), the MCP tool `asks_decide`, or `D` on the On you | |
| 277 | (`{"item": "parked:<id>"}`), the MCP tool `asks_decide`, or `D` on the Needs you | |
| 276 | 278 | card in the terminal. It sees only the direction text, whether you pinned or |
| 277 | 279 | muted the app, the day's spend against the ceiling, your last ten decisions |
| 278 | 280 | there and the card's own evidence; the decision ledger row carries exactly |
scripts/gate.ts +2
| @@ -29,6 +29,8 @@ export const GATE: readonly string[] = [ | ||
| 29 | 29 | "test/cloud-use.test.ts", |
| 30 | 30 | "test/accounts.test.ts", |
| 31 | 31 | "test/asks-mute.test.ts", |
| 32 | "test/inbox.test.ts", | |
| 33 | "test/needs-you.test.ts", | |
| 32 | 34 | "test/agents.test.ts", |
| 33 | 35 | "test/app-domains.test.ts", |
| 34 | 36 | "test/app.test.ts", |
src/tui/screens/dashboard.ts +14 −4
| @@ -20,7 +20,8 @@ import { forgeLane, forgeNeeds } from "../../actions/health.ts"; | ||
| 20 | 20 | import { mayView } from "../../core/sealed.ts"; |
| 21 | 21 | import { pinRepo, unpinRepo } from "../../actions/origins.ts"; |
| 22 | 22 | import { getIssueById, listAssignedTo, type Issue } from "../../core/issues.ts"; |
| 23 | import { askLinesFor } from "../../web/studio/asks.ts"; | |
| 23 | import { askLinesFor, assignedLines } from "../../web/studio/asks.ts"; | |
| 24 | import { assignedWaitingFor, WAITING_FOR } from "../../web/studio/waiting.ts"; | |
| 24 | 25 | import { decideAsk, undoDecideAsk } from "../../actions/asks_decide.ts"; |
| 25 | 26 | import { |
| 26 | 27 | applyAsksBulk, |
| @@ -84,7 +85,7 @@ type PaneId = "repos" | "onyou" | "machine"; | ||
| 84 | 85 | |
| 85 | 86 | const TITLES: Readonly<Record<PaneId, string>> = { |
| 86 | 87 | repos: "Repositories", |
| 87 | onyou: "On you", | |
| 88 | onyou: "Needs you", | |
| 88 | 89 | machine: "On your machine", |
| 89 | 90 | }; |
| 90 | 91 | |
| @@ -113,6 +114,8 @@ export function dashboardScreen(f: Session, ctx: Ctx): Screen { | ||
| 113 | 114 | /** Why planning is paused, for the autonomous apps where it is; as on the board. */ |
| 114 | 115 | let holds = new Map<string, string>(); |
| 115 | 116 | let forge: string[] | undefined; |
| 117 | /** The one count the web shows too: asks, the forge's own needs and assigned work, once each. */ | |
| 118 | let needs = 0; | |
| 116 | 119 | /** The check lane, as the board's strip says it; null when nothing is queued. */ |
| 117 | 120 | let lane: string | null = null; |
| 118 | 121 | const filter = new Filter(); |
| @@ -143,6 +146,13 @@ export function dashboardScreen(f: Session, ctx: Ctx): Screen { | ||
| 143 | 146 | }), |
| 144 | 147 | ); |
| 145 | 148 | forge = forgeNeeds(f.app, f.user); |
| 149 | if (f.user !== undefined) { | |
| 150 | const asked = askLinesFor(f.db, f.user); | |
| 151 | needs = | |
| 152 | asked.length + | |
| 153 | (forge?.length ?? 0) + | |
| 154 | assignedLines(f.db, f.user, new Set(asked.flatMap((r) => r.items))).length; | |
| 155 | } | |
| 146 | 156 | lane = forgeLane(f.app, f.user); |
| 147 | 157 | // "Yours" is ownership plus the orgs you are on a team of; typing in the |
| 148 | 158 | // filter reaches every repository you can see. |
| @@ -618,7 +628,7 @@ export function dashboardScreen(f: Session, ctx: Ctx): Screen { | ||
| 618 | 628 | const on = focus === "onyou"; |
| 619 | 629 | const footer = onYouFooter(); |
| 620 | 630 | const inner = card(s, r, c, { |
| 621 | title: `${icon("person", set)} ${TITLES.onyou}`, | |
| 631 | title: `${icon("person", set)} ${TITLES.onyou}${needs > 0 ? ` (${needs})` : ""}`, | |
| 622 | 632 | focused: on, |
| 623 | 633 | ...(footer === undefined ? {} : { footer }), |
| 624 | 634 | }); |
| @@ -644,7 +654,7 @@ export function dashboardScreen(f: Session, ctx: Ctx): Screen { | ||
| 644 | 654 | : ISSUE_MARK; |
| 645 | 655 | return { |
| 646 | 656 | title: `${marked.has(item.issue.id) ? "[x] " : ""}${item.hand === true ? "parked " : ""}${mark} #${item.issue.number} ${item.issue.title}`, |
| 647 | meta: `${item.repo.ownerName}/${item.repo.name}`, | |
| 657 | meta: `${item.hand === true ? WAITING_FOR.parked : assignedWaitingFor(f.db, item.issue)} · ${item.repo.ownerName}/${item.repo.name}`, | |
| 648 | 658 | }; |
| 649 | 659 | }), |
| 650 | 660 | on, |
src/web/pages/site.ts +7 −38
| @@ -9,22 +9,20 @@ | ||
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | import { limitValue } from "../../settings/limits.ts"; |
| 12 | import { mayView } from "../../core/sealed.ts"; | |
| 12 | import { ASSIGNED_WAITING_FOR, assignedTo } from "../studio/waiting.ts"; | |
| 13 | 13 | import { signOutHere } from "../../actions/signins.ts"; |
| 14 | 14 | import { clientAddress } from "../../http/peer.ts"; |
| 15 | 15 | import { verifyEmail } from "../../actions/verify.ts"; |
| 16 | 16 | import { STRANGER_MAX } from "../../http/limits.ts"; |
| 17 | 17 | import { createRepo } from "../../actions/repos.ts"; |
| 18 | 18 | import { HUMAN_CHECK_MESSAGE, signUp } from "../../actions/users.ts"; |
| 19 | import { listAssignedTo, type Issue } from "../../core/issues.ts"; | |
| 19 | import { type Issue } from "../../core/issues.ts"; | |
| 20 | 20 | import { joinMany } from "../../core/pulls.ts"; |
| 21 | 21 | import { conflictsOf } from "../../crew/stale_asks.ts"; |
| 22 | 22 | import { accessAllows, listOrgsForUser, orgAccess } from "../../core/orgs.ts"; |
| 23 | 23 | import { listPins } from "../../core/pins.ts"; |
| 24 | 24 | import { |
| 25 | canRead, | |
| 26 | 25 | getReposByIds, |
| 27 | listReposVisibleTo, | |
| 28 | 26 | type Repo, |
| 29 | 27 | } from "../../core/repos.ts"; |
| 30 | 28 | import { createSession } from "../../core/sessions.ts"; |
| @@ -34,7 +32,6 @@ import { cookieValue, crossOrigin, type Ctx } from "../../http/context.ts"; | ||
| 34 | 32 | import { studioDoor, studioHome } from "../studio/home.ts"; |
| 35 | 33 | import { homeTop, onYouBulk } from "../studio/asks_page.ts"; |
| 36 | 34 | import { latestUndoable } from "../../actions/asks_bulk.ts"; |
| 37 | import { mutedRepos } from "../../core/interactions.ts"; | |
| 38 | 35 | import { edgeLoginUrl } from "../../http/edge.ts"; |
| 39 | 36 | import { sshCommand } from "../../ssh/command.ts"; |
| 40 | 37 | import { hostOf, pageHead, signInFirst } from "../chrome.ts"; |
| @@ -182,37 +179,7 @@ const threadPath = (repo: Repo, issue: Issue): string => | ||
| 182 | 179 | /** Open issues and pulls assigned to the viewer, anywhere they can see. */ |
| 183 | 180 | export function onYouCard(ctx: Ctx, user: User): Html | undefined { |
| 184 | 181 | const db = ctx.app.db; |
| 185 | const assigned = listAssignedTo(db, user.id, 20); | |
| 186 | if (assigned.length === 0) return undefined; | |
| 187 | const repos = getReposByIds( | |
| 188 | db, | |
| 189 | assigned.map((issue) => issue.repoId), | |
| 190 | ); | |
| 191 | // `listAssignedTo` has no visibility filter of its own (an assignment can | |
| 192 | // outlive the access that made it), so each repo needs a real `canRead`. | |
| 193 | // Checking it straight would cost one query per row for any repo the | |
| 194 | // viewer does not own outright — `canRead` resolves org ownership from | |
| 195 | // the database. `listReposVisibleTo` answers the common case with one | |
| 196 | // query for the whole page; `canRead` only runs for the rare repo it | |
| 197 | // did not reach (its own cap), so the cost stays flat as rows grow. | |
| 198 | const visible = new Set( | |
| 199 | listReposVisibleTo(db, user, { limit: 200 }).map((repo) => repo.id), | |
| 200 | ); | |
| 201 | const muted = mutedRepos(db, user.id); | |
| 202 | const shown: { issue: Issue; repo: Repo }[] = []; | |
| 203 | // Muted repositories that hold work assigned to the viewer: said, never silent. | |
| 204 | const silenced = new Map<string, Repo>(); | |
| 205 | for (const issue of assigned) { | |
| 206 | const repo = repos.get(issue.repoId); | |
| 207 | if (!repo) continue; | |
| 208 | if (!visible.has(repo.id) && !canRead(db, repo, user)) continue; | |
| 209 | if (!mayView(db, repo, issue, user)) continue; | |
| 210 | if (muted.has(repo.id)) { | |
| 211 | silenced.set(repo.id, repo); | |
| 212 | continue; | |
| 213 | } | |
| 214 | shown.push({ issue, repo }); | |
| 215 | } | |
| 182 | const { shown, silenced } = assignedTo(db, user); | |
| 216 | 183 | // Two or more can be given one move: a box each, and one form for the set. |
| 217 | 184 | const bulk = shown.length >= 2; |
| 218 | 185 | const heads = new Map( |
| @@ -243,7 +210,9 @@ export function onYouCard(ctx: Ctx, user: User): Html | undefined { | ||
| 243 | 210 | ? html`<a href="${threadPath(repo, issue)}">${issue.title}</a>` |
| 244 | 211 | : issue.title, |
| 245 | 212 | titleAttr: issue.title, |
| 246 | meta: html`${repo.ownerName}/${repo.name} #${issue.number} · updated | |
| 213 | meta: html`<b class="ask-kind" | |
| 214 | >${conflicts > 0 ? "conflicts with main" : ASSIGNED_WAITING_FOR}</b | |
| 215 | >${repo.ownerName}/${repo.name} #${issue.number} · updated | |
| 247 | 216 | ${time(issue.updatedAt)}${conflicts > 0 |
| 248 | 217 | ? html` · <span class="conflicts">Conflicts in ${conflicts} |
| 249 | 218 | ${conflicts === 1 ? "file" : "files"}</span>` |
| @@ -261,7 +230,7 @@ export function onYouCard(ctx: Ctx, user: User): Html | undefined { | ||
| 261 | 230 | ); |
| 262 | 231 | return listCard(rows, { |
| 263 | 232 | head: html`${icon("user")} |
| 264 | <h2>On you</h2>`, | |
| 233 | <h2>Needs you</h2>`, | |
| 265 | 234 | ...(bulk || last !== undefined || silenced.size > 0 |
| 266 | 235 | ? { |
| 267 | 236 | foot: onYouBulk( |
src/web/studio/asks.ts +43 −6
| @@ -52,6 +52,7 @@ import { | ||
| 52 | 52 | import { breakerParked, WAITING_NOTES } from "../../crew/breaker.ts"; |
| 53 | 53 | import { CHECK_FAILED_LIMIT } from "../../crew/dispatch.ts"; |
| 54 | 54 | import { isStalePull, mergesAgainSince } from "../../crew/stale_asks.ts"; |
| 55 | import { assignedTo, assignedWaitingFor, waitingForAsk } from "./waiting.ts"; | |
| 55 | 56 | import { waitsForPerson, waitsForReviewer, type ReviewWait } from "../../crew/review.ts"; |
| 56 | 57 | import type { Ctx } from "../../http/context.ts"; |
| 57 | 58 | import { vitals } from "../../kernel/vitals.ts"; |
| @@ -738,6 +739,8 @@ export function askLinesFor( | ||
| 738 | 739 | items: string[]; |
| 739 | 740 | /** The decision, its options and what happens if nobody acts (`ASK_WORDS`). */ |
| 740 | 741 | words: AskWords; |
| 742 | /** What it waits for, in a few words: "ready to land", "a decision" (`WAITING_FOR`). */ | |
| 743 | waitingFor: string; | |
| 741 | 744 | /** Why it ranks where it does; rows come most consequential first. */ |
| 742 | 745 | consequence: Consequence; |
| 743 | 746 | }[] { |
| @@ -753,24 +756,28 @@ export function askLinesFor( | ||
| 753 | 756 | consequence: row.consequence, |
| 754 | 757 | }; |
| 755 | 758 | const only = row.items.length === 1 ? row.items[0]! : undefined; |
| 759 | const waitingFor = waitingForAsk(db, row.kind, only?.pull); | |
| 756 | 760 | if (only === undefined) |
| 757 | 761 | return { |
| 758 | 762 | ...about, |
| 763 | waitingFor, | |
| 759 | 764 | line: `${row.repo.name}: ${rowLine(row.kind, row.items.length)}`, |
| 760 | 765 | link: `/#${askAnchor(row.id)}`, |
| 761 | 766 | }; |
| 762 | 767 | const line = `${row.repo.name}${only.kind === "paused" ? " " : ": "}${lineOf(only)}`; |
| 763 | 768 | if (only.kind === "paused") |
| 764 | return { ...about, line, link: `${base}/settings/autonomy` }; | |
| 769 | return { ...about, waitingFor, line, link: `${base}/settings/autonomy` }; | |
| 765 | 770 | if (only.kind === "parked" || only.kind === "declined") |
| 766 | 771 | return { |
| 767 | 772 | ...about, |
| 773 | waitingFor, | |
| 768 | 774 | line, |
| 769 | 775 | number: only.issue!.number, |
| 770 | 776 | link: `${base}/issues/${only.issue!.number}`, |
| 771 | 777 | }; |
| 772 | 778 | return { |
| 773 | 779 | ...about, |
| 780 | waitingFor, | |
| 774 | 781 | line, |
| 775 | 782 | number: only.pull!.number, |
| 776 | 783 | link: `${base}/changes/${only.pull!.number}`, |
| @@ -1019,13 +1026,33 @@ export function forgeNeedsFor(ctx: Ctx, user: User | undefined): Degraded[] { | ||
| 1019 | 1026 | */ |
| 1020 | 1027 | export function askCountFor(ctx: Ctx, user: User | undefined): number { |
| 1021 | 1028 | if (!user) return 0; |
| 1022 | const repos = listReposVisibleTo(ctx.app.db, user, { limit: 200 }); | |
| 1029 | const db = ctx.app.db; | |
| 1030 | const rows = askRows(waitingOn(db, user, listReposVisibleTo(db, user, { limit: 200 }))); | |
| 1023 | 1031 | return ( |
| 1024 | askRows(waitingOn(ctx.app.db, user, repos)).length + | |
| 1025 | forgeNeedsFor(ctx, user).length | |
| 1032 | rows.length + | |
| 1033 | forgeNeedsFor(ctx, user).length + | |
| 1034 | assignedTo(db, user, idsOf(rows)).shown.length | |
| 1026 | 1035 | ); |
| 1027 | 1036 | } |
| 1028 | 1037 | |
| 1038 | /** The ids of every item the asks hold: what assigned work is not counted twice against. */ | |
| 1039 | export const idsOf = (rows: readonly { items: readonly { id: string }[] }[]): Set<string> => | |
| 1040 | new Set(rows.flatMap((r) => r.items.map((c) => c.id))); | |
| 1041 | ||
| 1042 | /** The work assigned to the viewer that no ask already holds, as rows of the one list. */ | |
| 1043 | export function assignedLines(db: Database, user: User, taken: ReadonlySet<string>) { | |
| 1044 | return assignedTo(db, user, taken).shown.map(({ issue, repo }) => ({ | |
| 1045 | id: `assigned:${issue.id}`, | |
| 1046 | kind: "assigned" as const, | |
| 1047 | repoId: repo.id, | |
| 1048 | line: `${repo.name}: ${issue.title}`, | |
| 1049 | number: issue.number, | |
| 1050 | link: `/${repo.ownerName}/${repo.name}/${issue.kind === "pull" ? "changes" : "issues"}/${issue.number}`, | |
| 1051 | items: [`issue:${issue.id}`], | |
| 1052 | waitingFor: assignedWaitingFor(db, issue), | |
| 1053 | })); | |
| 1054 | } | |
| 1055 | ||
| 1029 | 1056 | /** The single sentence the asks page leads with, and the dashboard links with. */ |
| 1030 | 1057 | export function askSentence(count: number): string { |
| 1031 | 1058 | return count === 0 |
| @@ -1041,9 +1068,19 @@ export function askSentence(count: number): string { | ||
| 1041 | 1068 | */ |
| 1042 | 1069 | export function asksAnswer(ctx: Ctx, user: User) { |
| 1043 | 1070 | const since = new Date(Date.now() - 7 * 86_400_000).toISOString(); |
| 1071 | const rows = askLinesFor(ctx.app.db, user); | |
| 1072 | const assigned = assignedLines( | |
| 1073 | ctx.app.db, | |
| 1074 | user, | |
| 1075 | new Set(rows.flatMap((r) => r.items)), | |
| 1076 | ); | |
| 1077 | const forge = forgeNeedsFor(ctx, user).map((d) => needLine(d)); | |
| 1044 | 1078 | return { |
| 1045 | rows: askLinesFor(ctx.app.db, user), | |
| 1046 | forge: forgeNeedsFor(ctx, user).map((d) => needLine(d)), | |
| 1079 | /** The one count: what the top bar and the home's sentence say. */ | |
| 1080 | count: rows.length + forge.length + assigned.length, | |
| 1081 | rows, | |
| 1082 | assigned, | |
| 1083 | forge, | |
| 1047 | 1084 | measure: { days: 7, ...askMeasure(ctx.app.db, user.id, since) }, |
| 1048 | 1085 | }; |
| 1049 | 1086 | } |
src/web/studio/asks_page.ts +7 −12
| @@ -46,11 +46,13 @@ import { | ||
| 46 | 46 | decisionForm, |
| 47 | 47 | decisionsFor, |
| 48 | 48 | forgeNeedsFor, |
| 49 | idsOf, | |
| 49 | 50 | silencedRepos, |
| 50 | 51 | type AskRow, |
| 51 | 52 | type Consequence, |
| 52 | 53 | type Decision, |
| 53 | 54 | } from "./asks.ts"; |
| 55 | import { assignedTo, waitingForAsk } from "./waiting.ts"; | |
| 54 | 56 | import { changeHref } from "./nouns.ts"; |
| 55 | 57 | |
| 56 | 58 | /** The kinds, in a word each, for "select by kind". */ |
| @@ -156,16 +158,6 @@ const clause = ( | ||
| 156 | 158 | > |
| 157 | 159 | </p>`; |
| 158 | 160 | |
| 159 | /** The kind, in two words: what a phone's row says in place of the sentence under it. */ | |
| 160 | const KIND_LABEL: Readonly<Record<Decision["kind"], string>> = { | |
| 161 | look: "Ready to ship", | |
| 162 | review: "Needs review", | |
| 163 | stopped: "Stopped", | |
| 164 | parked: "Parked", | |
| 165 | declined: "Declined", | |
| 166 | paused: "Paused", | |
| 167 | }; | |
| 168 | ||
| 169 | 161 | /** |
| 170 | 162 | * An ask's actions: the one that decides, then the rest. A wide screen |
| 171 | 163 | * lays them in a line; a phone puts the decider at the trailing edge, 44 px |
| @@ -200,7 +192,7 @@ function decisionCard(ctx: Ctx, d: Decision, picked: ReadonlySet<string>): Html | ||
| 200 | 192 | head: html`${pick(d, picked)} |
| 201 | 193 | <h2>${title}</h2> |
| 202 | 194 | <span class="ask-meta muted small" |
| 203 | ><b class="ask-kind">${KIND_LABEL[d.kind]}</b>${d.repo.ownerName}/${d.repo.name}</span | |
| 195 | ><b class="ask-kind">${waitingForAsk(ctx.app.db, d.kind, d.pull)}</b>${d.repo.ownerName}/${d.repo.name}</span | |
| 204 | 196 | >`, |
| 205 | 197 | }, |
| 206 | 198 | ); |
| @@ -366,7 +358,10 @@ export function needsYouSection( | ||
| 366 | 358 | > |
| 367 | 359 | <button type="submit" class="btn btn-sm btn-ghost">Listen again</button> |
| 368 | 360 | </form>`; |
| 369 | const count = rows.length + needs.length; | |
| 361 | const count = | |
| 362 | rows.length + | |
| 363 | needs.length + | |
| 364 | assignedTo(ctx.app.db, user, idsOf(rows)).shown.length; | |
| 370 | 365 | if (count === 0 && top === undefined) |
| 371 | 366 | return { |
| 372 | 367 | body: html`<h2 id="asks-sentence" class="sr-only">${askSentence(0)}</h2>${silencedNote}`, |
src/web/studio/waiting.ts added +101
| @@ -0,0 +1,101 @@ | ||
| 1 | /** | |
| 2 | * What waits on a person, in one word each. The asks (decisions the crew | |
| 3 | * raised) and the work assigned to the viewer are one list: they share a | |
| 4 | * count (the top bar, the home's sentence, `/api/v1/asks`, the MCP) and each | |
| 5 | * row says what it waits for — "ready to land", "conflicts with main", "a | |
| 6 | * decision", "your review", "assigned to you". | |
| 7 | */ | |
| 8 | ||
| 9 | import type { Database } from "bun:sqlite"; | |
| 10 | import { mutedRepos } from "../../core/interactions.ts"; | |
| 11 | import { listAssignedTo, type Issue } from "../../core/issues.ts"; | |
| 12 | import { joinMany } from "../../core/pulls.ts"; | |
| 13 | import { mayView } from "../../core/sealed.ts"; | |
| 14 | import { | |
| 15 | canRead, | |
| 16 | getReposByIds, | |
| 17 | listReposVisibleTo, | |
| 18 | type Repo, | |
| 19 | } from "../../core/repos.ts"; | |
| 20 | import type { User } from "../../core/users.ts"; | |
| 21 | import { conflictsOf } from "../../crew/stale_asks.ts"; | |
| 22 | import type { DecisionKind } from "./asks.ts"; | |
| 23 | ||
| 24 | /** What each kind of ask waits for, when nothing about the thing says more. */ | |
| 25 | export const WAITING_FOR: Readonly<Record<DecisionKind, string>> = { | |
| 26 | look: "ready to land", | |
| 27 | review: "your review", | |
| 28 | stopped: "a decision", | |
| 29 | parked: "a decision", | |
| 30 | declined: "a decision", | |
| 31 | paused: "a decision", | |
| 32 | }; | |
| 33 | ||
| 34 | /** What work assigned to the viewer waits for. */ | |
| 35 | export const ASSIGNED_WAITING_FOR = "assigned to you"; | |
| 36 | ||
| 37 | /** A green pull that cannot merge waits for a fix, not a landing. */ | |
| 38 | export function waitingForAsk( | |
| 39 | db: Database, | |
| 40 | kind: DecisionKind, | |
| 41 | pull: { id: string; headOid: string } | undefined, | |
| 42 | ): string { | |
| 43 | if (kind === "look" && pull !== undefined && conflictsOf(db, pull.id, pull.headOid) > 0) | |
| 44 | return "conflicts with main"; | |
| 45 | return WAITING_FOR[kind]; | |
| 46 | } | |
| 47 | ||
| 48 | /** What a piece of assigned work waits for: a pull that cannot merge says so. */ | |
| 49 | export function assignedWaitingFor(db: Database, issue: Issue): string { | |
| 50 | if (issue.kind !== "pull") return ASSIGNED_WAITING_FOR; | |
| 51 | const head = joinMany(db, [issue])[0]?.headOid ?? ""; | |
| 52 | return conflictsOf(db, issue.id, head) > 0 ? "conflicts with main" : ASSIGNED_WAITING_FOR; | |
| 53 | } | |
| 54 | ||
| 55 | export interface Assigned { | |
| 56 | readonly issue: Issue; | |
| 57 | readonly repo: Repo; | |
| 58 | } | |
| 59 | ||
| 60 | /** | |
| 61 | * Open issues and pulls assigned to the viewer that they may see: `shown`, | |
| 62 | * and the repositories they muted that hold some, `silenced` (said, never | |
| 63 | * silent). Work that is already one of `taken` — an ask's item ids — is | |
| 64 | * left out: a row is counted once. | |
| 65 | */ | |
| 66 | export function assignedTo( | |
| 67 | db: Database, | |
| 68 | user: User, | |
| 69 | taken: ReadonlySet<string> = new Set(), | |
| 70 | ): { shown: Assigned[]; silenced: Map<string, Repo> } { | |
| 71 | const shown: Assigned[] = []; | |
| 72 | const silenced = new Map<string, Repo>(); | |
| 73 | const assigned = listAssignedTo(db, user.id, 20); | |
| 74 | if (assigned.length === 0) return { shown, silenced }; | |
| 75 | const repos = getReposByIds( | |
| 76 | db, | |
| 77 | assigned.map((issue) => issue.repoId), | |
| 78 | ); | |
| 79 | // `listAssignedTo` has no visibility filter of its own (an assignment can | |
| 80 | // outlive the access that made it), so each repo needs a real `canRead`. | |
| 81 | // `listReposVisibleTo` answers the common case with one query for the | |
| 82 | // whole page; `canRead` only runs for the rare repo it did not reach. | |
| 83 | const visible = new Set( | |
| 84 | listReposVisibleTo(db, user, { limit: 200 }).map((repo) => repo.id), | |
| 85 | ); | |
| 86 | const muted = mutedRepos(db, user.id); | |
| 87 | for (const issue of assigned) { | |
| 88 | const repo = repos.get(issue.repoId); | |
| 89 | if (!repo) continue; | |
| 90 | if (!visible.has(repo.id) && !canRead(db, repo, user)) continue; | |
| 91 | if (!mayView(db, repo, issue, user)) continue; | |
| 92 | if (muted.has(repo.id)) { | |
| 93 | silenced.set(repo.id, repo); | |
| 94 | continue; | |
| 95 | } | |
| 96 | if (["look", "review", "stopped", "parked"].some((k) => taken.has(`${k}:${issue.id}`))) | |
| 97 | continue; | |
| 98 | shown.push({ issue, repo }); | |
| 99 | } | |
| 100 | return { shown, silenced }; | |
| 101 | } |
test/home-feed.test.ts +1 −1
| @@ -370,7 +370,7 @@ describe("home is the feed", () => { | ||
| 370 | 370 | expect(assignIssue(app, alice, repo, issue, alice).ok).toBe(true); |
| 371 | 371 | const text = await (await get("/", aliceCookie)).text(); |
| 372 | 372 | const card = text.slice(text.indexOf('id="live-on-you"')).replace(/\s+/g, " "); |
| 373 | expect(card).toContain("On you"); | |
| 373 | expect(card).toContain("Needs you"); | |
| 374 | 374 | expect(card).toContain(`value="issue:${one.value.id}"`); |
| 375 | 375 | expect(card).toContain(`value="issue:${two.value.id}"`); |
| 376 | 376 | expect((card.match(/form="onyou-bulk"/g) ?? []).length).toBeGreaterThanOrEqual(2); |
test/inbox.test.ts added +110
| @@ -0,0 +1,110 @@ | ||
| 1 | /** | |
| 2 | * One list: what is assigned to the viewer and what the crew asks of them | |
| 3 | * share one word ("Needs you"), one count (the home's sentence, the top bar, | |
| 4 | * `/api/v1/asks`, the MCP) and a "waiting for" on every row. | |
| 5 | */ | |
| 6 | ||
| 7 | import { afterAll, beforeAll, describe, expect, test } from "bun:test"; | |
| 8 | import { mkdtemp, rm } from "node:fs/promises"; | |
| 9 | import { tmpdir } from "node:os"; | |
| 10 | import { join } from "node:path"; | |
| 11 | import { createApp, type App } from "../src/app.ts"; | |
| 12 | import { assignIssue } from "../src/actions/issues.ts"; | |
| 13 | import { createRepo } from "../src/actions/repos.ts"; | |
| 14 | import { createIssue } from "../src/core/issues.ts"; | |
| 15 | import type { Repo } from "../src/core/repos.ts"; | |
| 16 | import { createToken } from "../src/core/tokens.ts"; | |
| 17 | import { createUser, type User } from "../src/core/users.ts"; | |
| 18 | import { serve, type Servers } from "../src/http/server.ts"; | |
| 19 | import { onYouCard } from "../src/web/pages/site.ts"; | |
| 20 | import { askCountFor, asksAnswer } from "../src/web/studio/asks.ts"; | |
| 21 | import { needsYouSection } from "../src/web/studio/asks_page.ts"; | |
| 22 | import { quietLogs } from "./helpers/globals.ts"; | |
| 23 | ||
| 24 | quietLogs(); | |
| 25 | ||
| 26 | describe("one list on you", () => { | |
| 27 | let dataDir = ""; | |
| 28 | let app: App; | |
| 29 | let servers: Servers; | |
| 30 | let alice: User; | |
| 31 | let repo: Repo; | |
| 32 | let token = ""; | |
| 33 | const ctx = () => ({ app, auth: { user: alice } }) as never; | |
| 34 | ||
| 35 | beforeAll(async () => { | |
| 36 | dataDir = await mkdtemp(join(tmpdir(), "forge-inbox-")); | |
| 37 | app = createApp({ dataDir, port: 0 }); | |
| 38 | servers = await serve(app); | |
| 39 | const a = await createUser(app.db, { | |
| 40 | trusted: true, | |
| 41 | username: "alice", | |
| 42 | email: "[email protected]", | |
| 43 | password: "a-long-inbox-passphrase", | |
| 44 | adminIfFirst: true, | |
| 45 | }); | |
| 46 | if (!a.ok) throw new Error(a.error); | |
| 47 | alice = a.value; | |
| 48 | const made = await createRepo(app, alice, { name: "garden", visibility: "public" }); | |
| 49 | if (!made.ok) throw new Error(String(made.error)); | |
| 50 | repo = made.value; | |
| 51 | token = createToken(app.db, alice.id, "ro", "ro").token; | |
| 52 | }, 30_000); | |
| 53 | ||
| 54 | afterAll(async () => { | |
| 55 | await servers.stop(); | |
| 56 | await rm(dataDir, { recursive: true, force: true }); | |
| 57 | }); | |
| 58 | ||
| 59 | test("nothing assigned, nothing asked: zero, and All fine", () => { | |
| 60 | expect(askCountFor(ctx(), alice)).toBe(0); | |
| 61 | expect(needsYouSection(ctx(), alice).body.text).toContain("All fine"); | |
| 62 | expect(onYouCard(ctx(), alice)).toBeUndefined(); | |
| 63 | }); | |
| 64 | ||
| 65 | test("work assigned to you is counted once by the header, the home, the API and the MCP, and says what it waits for", async () => { | |
| 66 | const made = createIssue(app.db, { | |
| 67 | repoId: repo.id, | |
| 68 | authorId: alice.id, | |
| 69 | title: "Water the beans", | |
| 70 | }); | |
| 71 | if (!made.ok) throw new Error(made.error); | |
| 72 | expect(assignIssue(app, alice, repo, made.value, alice).ok).toBe(true); | |
| 73 | ||
| 74 | expect(askCountFor(ctx(), alice)).toBe(1); | |
| 75 | const section = needsYouSection(ctx(), alice).body.text.replace(/\s+/g, " "); | |
| 76 | expect(section).toContain("1 thing needs you"); | |
| 77 | ||
| 78 | const card = onYouCard(ctx(), alice)?.text.replace(/\s+/g, " ") ?? ""; | |
| 79 | expect(card).toContain("<h2>Needs you</h2>"); | |
| 80 | expect(card).not.toContain("On you"); | |
| 81 | expect(card).toContain("assigned to you"); | |
| 82 | expect(card).toContain("Water the beans"); | |
| 83 | ||
| 84 | const answer = asksAnswer(ctx(), alice); | |
| 85 | expect(answer.count).toBe(1); | |
| 86 | expect(answer.assigned.map((r) => r.waitingFor)).toEqual(["assigned to you"]); | |
| 87 | ||
| 88 | const res = await fetch(`${servers.url}/mcp`, { | |
| 89 | method: "POST", | |
| 90 | headers: { | |
| 91 | "content-type": "application/json", | |
| 92 | accept: "application/json, text/event-stream", | |
| 93 | authorization: `Bearer ${token}`, | |
| 94 | }, | |
| 95 | body: JSON.stringify({ | |
| 96 | jsonrpc: "2.0", | |
| 97 | id: 1, | |
| 98 | method: "tools/call", | |
| 99 | params: { name: "asks", arguments: {} }, | |
| 100 | }), | |
| 101 | }); | |
| 102 | const body = (await res.json()) as { result: { content: { text: string }[] } }; | |
| 103 | const seen = JSON.parse(body.result.content[0]!.text) as { | |
| 104 | count: number; | |
| 105 | assigned: { waitingFor: string }[]; | |
| 106 | }; | |
| 107 | expect(seen.count).toBe(1); | |
| 108 | expect(seen.assigned[0]!.waitingFor).toBe("assigned to you"); | |
| 109 | }); | |
| 110 | }); |
test/needs-you.test.ts added +160
| @@ -0,0 +1,160 @@ | ||
| 1 | /** | |
| 2 | * The one list's hard parts (#1603): a pull that is both assigned to you and | |
| 3 | * an ask counts once everywhere; each row says what it waits for; a green | |
| 4 | * pull that cannot merge says "conflicts with main"; a muted repository is | |
| 5 | * still said to be silenced; and the terminal shows the same count and label. | |
| 6 | */ | |
| 7 | ||
| 8 | import { afterAll, beforeAll, describe, expect, test } from "bun:test"; | |
| 9 | import { mkdtemp, rm } from "node:fs/promises"; | |
| 10 | import { tmpdir } from "node:os"; | |
| 11 | import { join } from "node:path"; | |
| 12 | import { createApp, type App } from "../src/app.ts"; | |
| 13 | import { addToCrew, createAgent } from "../src/actions/crew.ts"; | |
| 14 | import { openPull } from "../src/actions/pulls.ts"; | |
| 15 | import { commitToBranch, createRepo } from "../src/actions/repos.ts"; | |
| 16 | import { muteRepo } from "../src/core/interactions.ts"; | |
| 17 | import { setAssignee } from "../src/core/issues.ts"; | |
| 18 | import type { Pull } from "../src/core/pulls.ts"; | |
| 19 | import type { Repo } from "../src/core/repos.ts"; | |
| 20 | import { claimRun, createRun, finishRun } from "../src/core/runs.ts"; | |
| 21 | import { createUser, getUserByName, type User } from "../src/core/users.ts"; | |
| 22 | import { sweepStaleAsks } from "../src/crew/stale_asks.ts"; | |
| 23 | import { onYouCard } from "../src/web/pages/site.ts"; | |
| 24 | import { | |
| 25 | askCountFor, | |
| 26 | askLinesFor, | |
| 27 | asksAnswer, | |
| 28 | assignedLines, | |
| 29 | type DecisionKind, | |
| 30 | } from "../src/web/studio/asks.ts"; | |
| 31 | import { needsYouSection } from "../src/web/studio/asks_page.ts"; | |
| 32 | import { WAITING_FOR, waitingForAsk } from "../src/web/studio/waiting.ts"; | |
| 33 | import { quietLogs } from "./helpers/globals.ts"; | |
| 34 | ||
| 35 | quietLogs(); | |
| 36 | ||
| 37 | describe("one list: dedupe, waiting for, conflicts, mutes", () => { | |
| 38 | let dataDir = ""; | |
| 39 | let app: App; | |
| 40 | let alice: User; | |
| 41 | let repo: Repo; | |
| 42 | const ctx = () => ({ app, auth: { user: alice } }) as never; | |
| 43 | const flat = (text: string): string => text.replace(/\s+/g, " "); | |
| 44 | ||
| 45 | const pullFor = async (slug: string, path: string, content: string): Promise<Pull> => { | |
| 46 | await commitToBranch(app, alice, repo, { | |
| 47 | branch: `bot/${slug}`, | |
| 48 | base: "main", | |
| 49 | message: slug, | |
| 50 | files: [{ path, content }], | |
| 51 | }); | |
| 52 | const opened = await openPull(app, getUserByName(app.db, "bot")!, repo, { | |
| 53 | title: `Bot: ${slug}`, | |
| 54 | body: "", | |
| 55 | baseBranch: "main", | |
| 56 | headBranch: `bot/${slug}`, | |
| 57 | }); | |
| 58 | if (!opened.ok) throw new Error(String(opened.error)); | |
| 59 | const run = createRun(app.db, { | |
| 60 | repoId: repo.id, | |
| 61 | kind: "check", | |
| 62 | issueId: opened.value.id, | |
| 63 | env: `pull-${opened.value.number}`, | |
| 64 | commitOid: opened.value.headOid, | |
| 65 | reason: "pull", | |
| 66 | }); | |
| 67 | claimRun(app.db, run.id); | |
| 68 | finishRun(app.db, run.id, { state: "ok", summary: "green" }); | |
| 69 | return opened.value; | |
| 70 | }; | |
| 71 | ||
| 72 | beforeAll(async () => { | |
| 73 | dataDir = await mkdtemp(join(tmpdir(), "forge-needs-you-")); | |
| 74 | app = createApp({ dataDir, port: 0 }); | |
| 75 | const a = await createUser(app.db, { | |
| 76 | trusted: true, | |
| 77 | username: "alice", | |
| 78 | email: "[email protected]", | |
| 79 | password: "a-long-needs-passphrase", | |
| 80 | adminIfFirst: true, | |
| 81 | }); | |
| 82 | if (!a.ok) throw new Error(a.error); | |
| 83 | alice = a.value; | |
| 84 | const made = await createRepo(app, alice, { name: "orchard", visibility: "public" }); | |
| 85 | if (!made.ok) throw new Error(String(made.error)); | |
| 86 | repo = made.value; | |
| 87 | await commitToBranch(app, alice, repo, { | |
| 88 | message: "seed", | |
| 89 | files: [{ path: "README.md", content: "# orchard\n" }], | |
| 90 | }); | |
| 91 | await createAgent(app, alice, { username: "bot" }); | |
| 92 | addToCrew(app, alice, repo, "bot"); | |
| 93 | }, 30_000); | |
| 94 | ||
| 95 | afterAll(async () => { | |
| 96 | await rm(dataDir, { recursive: true, force: true }); | |
| 97 | }); | |
| 98 | ||
| 99 | let apples: Pull; | |
| 100 | ||
| 101 | test("a pull that is an ask and assigned to you counts once, everywhere", async () => { | |
| 102 | apples = await pullFor("apples", "APPLES.md", "apples\n"); | |
| 103 | expect(askCountFor(ctx(), alice)).toBe(1); | |
| 104 | setAssignee(app.db, apples.id, alice.id); | |
| 105 | ||
| 106 | expect(askCountFor(ctx(), alice)).toBe(1); | |
| 107 | const answer = asksAnswer(ctx(), alice); | |
| 108 | expect(answer.count).toBe(1); | |
| 109 | expect(answer.rows).toHaveLength(1); | |
| 110 | expect(answer.assigned).toHaveLength(0); | |
| 111 | expect(assignedLines(app.db, alice, new Set())).toHaveLength(1); | |
| 112 | expect(flat(needsYouSection(ctx(), alice).body.text)).toContain("1 thing needs you"); | |
| 113 | // The assigned card does not list it a second time. | |
| 114 | expect(onYouCard(ctx(), alice)).toBeDefined(); | |
| 115 | }); | |
| 116 | ||
| 117 | test("an ask row says what it waits for, in the data and on the page", () => { | |
| 118 | const [row] = asksAnswer(ctx(), alice).rows; | |
| 119 | expect(row!.waitingFor).toBe("ready to land"); | |
| 120 | expect(flat(needsYouSection(ctx(), alice).body.text)).toContain("ready to land"); | |
| 121 | }); | |
| 122 | ||
| 123 | test("every kind of ask has a label, and a review or a decision says so", () => { | |
| 124 | const kinds = Object.keys(WAITING_FOR) as DecisionKind[]; | |
| 125 | expect(kinds.length).toBeGreaterThanOrEqual(6); | |
| 126 | expect(waitingForAsk(app.db, "review", undefined)).toBe("your review"); | |
| 127 | for (const k of ["stopped", "parked", "declined", "paused"] as const) | |
| 128 | expect(waitingForAsk(app.db, k, undefined)).toBe("a decision"); | |
| 129 | expect(waitingForAsk(app.db, "look", undefined)).toBe("ready to land"); | |
| 130 | }); | |
| 131 | ||
| 132 | test("a green pull that conflicts with main says so, as an ask label and as an assigned row", async () => { | |
| 133 | const plums = await pullFor("plums", "README.md", "# plums\n"); | |
| 134 | setAssignee(app.db, plums.id, alice.id); | |
| 135 | await commitToBranch(app, alice, repo, { | |
| 136 | message: "main moves", | |
| 137 | files: [{ path: "README.md", content: "# orchard, renamed\n" }], | |
| 138 | }); | |
| 139 | await sweepStaleAsks(app); | |
| 140 | expect(waitingForAsk(app.db, "look", plums)).toBe("conflicts with main"); | |
| 141 | expect(waitingForAsk(app.db, "look", apples)).toBe("ready to land"); | |
| 142 | const lines = assignedLines(app.db, alice, new Set()); | |
| 143 | expect(lines.find((l) => l.id === `assigned:${plums.id}`)!.waitingFor).toBe("conflicts with main"); | |
| 144 | const answer = asksAnswer(ctx(), alice); | |
| 145 | expect(answer.assigned.map((l) => l.waitingFor)).toEqual(["conflicts with main"]); | |
| 146 | expect(answer.count).toBe(answer.rows.length + 1); | |
| 147 | expect(flat(onYouCard(ctx(), alice)!.text)).toContain("conflicts with main"); | |
| 148 | }); | |
| 149 | ||
| 150 | test("a muted repository leaves the count and is still said to be silenced", () => { | |
| 151 | muteRepo(app.db, alice.id, repo.id); | |
| 152 | expect(askLinesFor(app.db, alice)).toHaveLength(0); | |
| 153 | expect(askCountFor(ctx(), alice)).toBe(0); | |
| 154 | expect(asksAnswer(ctx(), alice).count).toBe(0); | |
| 155 | const section = flat(needsYouSection(ctx(), alice).body.text); | |
| 156 | expect(section).toContain("1 muted repository still asks"); | |
| 157 | expect(section).toContain("Listen again"); | |
| 158 | expect(flat(onYouCard(ctx(), alice)?.text ?? "")).toContain("muted"); | |
| 159 | }); | |
| 160 | }); |
test/tui-apps.test.ts +7 −4
| @@ -401,7 +401,7 @@ describe("terminal: apps, runs and the crew", () => { | ||
| 401 | 401 | } |
| 402 | 402 | }, 30_000); |
| 403 | 403 | |
| 404 | test("the dashboard: an On you pane, enterable, and no Apps pane", async () => { | |
| 404 | test("the dashboard: a Needs you pane, enterable, and no Apps pane", async () => { | |
| 405 | 405 | const mine = openIssue(forge, alice, site, { |
| 406 | 406 | title: "Tune the drums", |
| 407 | 407 | body: "", |
| @@ -413,8 +413,11 @@ describe("terminal: apps, runs and the crew", () => { | ||
| 413 | 413 | |
| 414 | 414 | const h = boot(forge, identityFor(alice)); |
| 415 | 415 | try { |
| 416 | await h.until("On you"); | |
| 416 | await h.until("Needs you"); | |
| 417 | 417 | expect(h.text()).toContain("Tune the drums"); |
| 418 | // The web's one count and its waiting-for label, in the terminal. | |
| 419 | expect(h.text()).toContain("Needs you (1)"); | |
| 420 | expect(h.text()).toContain("assigned to you"); | |
| 418 | 421 | expect(h.text()).not.toContain("Apps"); |
| 419 | 422 | // repos → on you. |
| 420 | 423 | await h.press("tab", "enter"); |
| @@ -439,7 +442,7 @@ describe("terminal: apps, runs and the crew", () => { | ||
| 439 | 442 | expect(hidden.ok).toBe(true); |
| 440 | 443 | const h = boot(forge, identityFor(bob)); |
| 441 | 444 | try { |
| 442 | await h.until("On you"); | |
| 445 | await h.until("Needs you"); | |
| 443 | 446 | expect(h.text()).not.toContain("alice/alices-lantern"); |
| 444 | 447 | await h.press("/"); |
| 445 | 448 | await h.type("alices"); |
| @@ -456,7 +459,7 @@ describe("terminal: apps, runs and the crew", () => { | ||
| 456 | 459 | test("the removed screens are unreachable: no palette entry, no dashboard or account key", async () => { |
| 457 | 460 | const h = boot(forge, identityFor(alice)); |
| 458 | 461 | try { |
| 459 | await h.until("On you"); | |
| 462 | await h.until("Needs you"); | |
| 460 | 463 | // alice is the site admin, so the crew entry would have been there. |
| 461 | 464 | const ids = forgeCommands(h.session)(h.app.ctx).map((c) => c.id); |
| 462 | 465 | for (const gone of ["apps", "app", "runs", "new-app", "crew"]) |
test/web-apps.test.ts +2 −2
| @@ -823,9 +823,9 @@ describe("apps, runs and the crew on the web", () => { | ||
| 823 | 823 | }); |
| 824 | 824 | expect(assigned.status).toBe(303); |
| 825 | 825 | const dash = await bodyOf(alice, "/"); |
| 826 | expect(dash).toContain("<h2>On you</h2>"); | |
| 826 | expect(dash).toContain("<h2>Needs you</h2>"); | |
| 827 | 827 | expect(dash).toContain("Say hello"); |
| 828 | expect(await bodyOf(bob, "/")).not.toContain("<h2>On you</h2>"); | |
| 828 | expect(await bodyOf(bob, "/")).not.toContain("<h2>Needs you</h2>"); | |
| 829 | 829 | |
| 830 | 830 | // Needs you: a pull the crew opened, in a repository alice can write. |
| 831 | 831 | expect(addToCrew(app, aliceUser, hello, "bot").ok).toBe(true); |
new above
offline