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
Check · Review · Land · Live done — Landed and live in production.
talk/card → main 0 commits 1 thread · 1 unresolved
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< | ||
| 20 | 20 | |
| 21 | 21 | export const tool: Tool = { |
| 22 | 22 | 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)", | |
| 24 | 24 | description: |
| 25 | 25 | "Make an app from a sentence: a repo, production, and with `description` a first issue.", |
| 26 | 26 | inputSchema: { |
src/web/studio/cards.ts +2 −3
| @@ -591,8 +591,8 @@ export function cardFor( | ||
| 591 | 591 | if (tool === "new_app") { |
| 592 | 592 | const made = obj(value); |
| 593 | 593 | 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"; | |
| 596 | 596 | rows.push({ label: "App", value: repo, ...(web(origin) && slugOf(repo) ? { link: `${origin}/${repo}` } : {}) }); |
| 597 | 597 | if (made["url"]) { |
| 598 | 598 | const url = text(made["url"]); |
| @@ -609,7 +609,6 @@ export function cardFor( | ||
| 609 | 609 | rows.push({ label: "First issue", value: `#${n}`, ...(web(origin) && slugOf(repo) && /^[1-9]\d*$/.test(n) && here(origin, path) ? { link: origin + path } : {}) }); |
| 610 | 610 | } |
| 611 | 611 | if (made["agent"]) rows.push({ label: "Agent", value: text(made["agent"]) }); |
| 612 | rows.push({ label: "First run", value: run === "" ? "none" : run }); | |
| 613 | 612 | if (repo !== "") |
| 614 | 613 | actions.push({ label: `Tell ${repo}`, tool: "tell", args: { repo, context: {} }, words: true }); |
| 615 | 614 | 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", () => { | ||
| 54 | 54 | expect(byLabel("App")).toBe("alice/carded"); |
| 55 | 55 | expect(byLabel("First issue")).toBe("#1"); |
| 56 | 56 | 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"); | |
| 58 | 60 | const seen = (await tool(rw, "apps")) as any; |
| 59 | 61 | const row = seen.value.find((r: any) => r.app === "alice/sentence"); |
| 60 | 62 | expect(row).toBeDefined(); |
new above
offline
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_apptool doc in src/http/mcp/tools/new_app.ts, which still lists 'first run' among the card's rows.