Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pm-stack/book/reference/console-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ This chapter covers all 21 console hash views in the survey census, one entry ea

- **What it is:** The intake routing list (`viewIntake`): kinds note, bug, and change, with their label and rank routes (`plan.ts` `ROUTES`; `INTAKE_LABEL = "owner/intake"`).
- **Inputs:** A submission from this view.
- **Behaviour:** Submitting files a GitHub issue and a triage/prompt queue packet, routed by kind through the `ROUTES` table.
- **Behaviour:** Submitting files a GitHub issue and a triage/prompt queue packet, routed by kind through the `ROUTES` table. A change against a capability with a roadmap file is also made by the platform itself, as a pull request against that file alone (`console/src/roadmap-change.ts`), when it can be made mechanically — a row added, moved, marked built, dropped, or retitled; the pull request is recorded on the issue, and a change that cannot be made mechanically says why in the answer and stands as issue and task alone.
- **Failure shapes:** None recorded in the survey.

Sources: PM-SURVEY website census (`pm-stack/console/public/app.js`, `pm-stack/console/src/server.ts`, `pm-stack/console/src/work.ts`, `pm-stack/console/src/ops.ts`, `pm-stack/console/src/plan.ts`), survey files `website-pages.md` and `disagreements.md` (D4, D12, D13), census date 2026-11-23.
4 changes: 3 additions & 1 deletion pm-stack/console/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,9 @@ export function changeAsked(form) {
export function intakeSaid(r) {
if (!r) return "Sent";
const task = r.queued ? "" : "; its task follows when a machine is connected";
return r.commented ? `Note left on #${r.issue}${task}` : `Filed as #${r.issue}${task}`;
if (r.commented) return `Note left on #${r.issue}${task}`;
if (r.pr) return `Filed as #${r.issue}; the roadmap change was made as a pull request: ${r.pr}${task}`;
return `Filed as #${r.issue}${task}`;
}

/** The heading of one phase of a roadmap page: how many it shows, and
Expand Down
52 changes: 51 additions & 1 deletion pm-stack/console/src/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// Everything here reaches GitHub through Ops.gh, so it runs unchanged on
// a machine (the fleet binary's gh) and at the edge (GitHub's REST API).
import { OpError } from "./errors.ts";
import { openRoadmapChangePr } from "./roadmap-change.ts";
import { type Ops, RANK_PRIORITY, RANKS, type Rank, type RunResult, triagePacket } from "./ops.ts";
import type { Work } from "./work.ts";

Expand Down Expand Up @@ -342,6 +343,8 @@ export interface IntakeResult {
/** A comment was left on an existing issue; no issue was made. */
commented: boolean;
queued: boolean;
/** The pull request a change was made as, when the platform made it. */
pr?: string;
note?: string;
}

Expand Down Expand Up @@ -502,6 +505,26 @@ export class Plan {
});
}

/** The platform's half of a change asked for in the app (#13497):
* the change made as a pull request against the roadmap file it
* belongs to. What cannot be made mechanically is refused with its
* reason, and the caller carries on with the issue and the task. */
private async roadmapPr(
cap: Capability,
asked: { action: Change; to: Phase | null; title: string | null },
row: string | null,
words: string,
issue: number,
) {
return openRoadmapChangePr(
this.ops,
this.repo,
cap,
{ action: asked.action, row, title: asked.title, to: asked.to, intent: words },
{ said: changeSaid(asked, row), words, issue, now: this.clock() },
);
}

/**
* Take in a note, a bug or a change, in the owner's words.
*
Expand Down Expand Up @@ -659,7 +682,34 @@ export class Plan {
kind: "triage.enqueue",
args: { issue: made.number, title: made.title, rank: filedRank, at },
}).catch(notQueued);
return { issue: made.number, url: made.html_url, commented: false, ...queuedSaid(queued, "filed") };
const said = queuedSaid(queued, "filed");
const notes = [...(said.note ? [said.note] : [])];
// A change asked for in the app is made by the platform itself, as
// a pull request against the roadmap file (#13497). The issue and
// its task stand either way: with a pull request they are its
// record and its review; without one, they are the work, as before.
let pr: string | undefined;
if (kind === "change" && asked !== null && cap?.file) {
const opened = await this.roadmapPr(cap, asked, aboutRow, words, made.number).catch((e: Error) => e);
if (opened instanceof Error) {
notes.push(`the roadmap change was not made as a pull request: ${opened.message}`);
} else {
pr = opened.url;
await this.ops
.gh(["-X", "POST", `repos/${this.repo}/issues/${made.number}/comments`], {
body: `The platform made this change as a pull request: ${opened.url}\n\nIt changes only \`${cap.file}\`. Reviewing and merging it puts the change on the roadmap; until then the roadmap itself is unchanged.`,
})
.catch(() => {});
}
}
return {
issue: made.number,
url: made.html_url,
commented: false,
queued: said.queued,
...(pr ? { pr } : {}),
...(notes.length ? { note: notes.join("; ").slice(0, 300) } : {}),
};
}
}

Expand Down
Loading