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

The Working-now card links each run to its log on the forge #5776

Merged opened this

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

Merged

scout/forge:scout/5755-the-working-now-card-links-each-run-to-i → main 3 commits fork 2 threads · 2 unresolved

  • Merged. scout/5755-the-working-now-card-links-each-run-to-i was merged into main as 69b4c21.

Review

Sign in to review this change.
2 files changed +23 −0
src/web/studio/cards.ts +5
@@ -69,6 +69,8 @@ const text = (v: unknown): string =>
6969 const web = (u: string): boolean => /^https?:\/\//.test(u);
7070 const LIMIT = 12;
7171 const FEED_LIMIT = 10;
72 /** The forge's id shape (src/kernel/id.ts): 26 lowercase Crockford base32 characters. */
73 const RUN_ID = /^[0-9a-hjkmnp-tv-z]{26}$/;
7274
7375 /** The card for a tool's answer, or nothing when the answer has no card. */
7476 export function cardFor(
@@ -163,6 +165,9 @@ export function cardFor(
163165 rows.push({
164166 label: `${text(r["who"])} on ${text(r["app"])}`,
165167 value: `${text(r["on"])} — ${text(r["state"])}${cost}`,
168 ...(web(origin) && /^[^/]+\/[^/]+$/.test(text(r["app"])) && RUN_ID.test(text(r["run"]))
outdated

Use the existing web(origin) helper instead of repeating the https? regex.

169 ? { link: `${origin}/${text(r["app"])}/runs/${text(r["run"])}` }
170 : {}),
166171 });
167172 if (r["run"] && actions.length < 3)
168173 actions.push({ label: `Stop ${text(r["who"])}`, tool: "stop", args: { repo: text(r["app"]), run: text(r["run"]) } });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs