Public: anyone can read this; the crew can change it.

The new_app card leaves out the first run: a card is drawn once, the receipt's line follows the run #16364

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

talk/card → main 0 commits 1 thread · 1 unresolved

  • Merged. talk/card was merged into main as ace8323.

Review

Sign in to review this change.
3 files changed +6 −5
src/http/mcp/tools/new_app.ts +1 −1
@@ -20,7 +20,7 @@ async function fromSentence(app: App, user: User, sentence: string, input: Omit<
2020
2121 export const tool: Tool = {
2222 name: "new_app",
23 doc: "`{ name?, sentence?, description?, owner?, visibility?, agent?, pick?, template? }`: make an app from a sentence: with `sentence` and no `name` the name is derived from it (`-2`, `-3` when taken), as the web and terminal do; `name` and `sentence` together keep the name; the first issue is `description`, else `sentence`; answers `{ repo, url, issue, agent, run }` (`run` is the first run's state, or `none`) and draws the `ui://forge/app` card: name, production URL, first issue, agent, first run; refused as `POST /api/v1/apps` is (unverified, app_limit, no_such_agent, name_taken)",
23 doc: "`{ name?, sentence?, description?, owner?, visibility?, agent?, pick?, template? }`: make an app from a sentence: with `sentence` and no `name` the name is derived from it (`-2`, `-3` when taken), as the web and terminal do; `name` and `sentence` together keep the name; the first issue is `description`, else `sentence`; answers `{ repo, url, issue, agent, run }` (`run` is the first run's state, or `none`) and draws the `ui://forge/app` card: name, production URL, first issue, agent; refused as `POST /api/v1/apps` is (unverified, app_limit, no_such_agent, name_taken)",
2424 description:
2525 "Make an app from a sentence: a repo, production, and with `description` a first issue.",
2626 inputSchema: {
src/web/studio/cards.ts +2 −3
@@ -591,8 +591,8 @@ export function cardFor(
591591 if (tool === "new_app") {
592592 const made = obj(value);
593593 const repo = text(made["repo"]);
594 const run = text(made["run"]);
595 status = run === "none" || run === "" ? "alive" : `alive · first run ${run}`;
594 // The run is not on the card: a card is drawn once, and the line under the receipt follows the run.
595 status = "alive";

The comment says the live line under the receipt follows the run, but I found no code that does. Point to where it lives, or the first run is now shown nowhere on the card or under it. Also update the new_app tool doc in src/http/mcp/tools/new_app.ts, which still lists 'first run' among the card's rows.

596596 rows.push({ label: "App", value: repo, ...(web(origin) && slugOf(repo) ? { link: `${origin}/${repo}` } : {}) });
597597 if (made["url"]) {
598598 const url = text(made["url"]);
@@ -609,7 +609,6 @@ export function cardFor(
609609 rows.push({ label: "First issue", value: `#${n}`, ...(web(origin) && slugOf(repo) && /^[1-9]\d*$/.test(n) && here(origin, path) ? { link: origin + path } : {}) });
610610 }
611611 if (made["agent"]) rows.push({ label: "Agent", value: text(made["agent"]) });
612 rows.push({ label: "First run", value: run === "" ? "none" : run });
613612 if (repo !== "")
614613 actions.push({ label: `Tell ${repo}`, tool: "tell", args: { repo, context: {} }, words: true });
615614 return { kind, title: "New app", status, rows, actions };
test/mcp-forge-new-app.test.ts +3 −1
@@ -54,7 +54,9 @@ describe("the forge over MCP: new-app", () => {
5454 expect(byLabel("App")).toBe("alice/carded");
5555 expect(byLabel("First issue")).toBe("#1");
5656 expect(byLabel("Agent")).toBe("newappbot");
57 expect(byLabel("First run")).toBeDefined();
57 // A card is drawn once: the run's state is the live line's, never a snapshot on the card.
58 expect(byLabel("First run")).toBeUndefined();
59 expect(card.status).toBe("alive");
5860 const seen = (await tool(rw, "apps")) as any;
5961 const row = seen.value.find((r: any) => r.app === "alice/sentence");
6062 expect(row).toBeDefined();

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs