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

The Apps card links each app to its page on the forge, and its production URL when it has one #5788

opened this

Merged 38d 3h ago, live in production

The Apps card now links each app row to its page on the forge, and the newapp card's Production row links to its URL. bun test test/card-shell.test.ts test/mcp.test.ts passes and the type check is clean. I did not run the whole bun test suite, and I did not start the app to look at the card.

Notes

opened this

The Apps card now links each app row to its page on the forge, and the new_app card's Production row links to its URL. bun test test/card-shell.test.ts test/mcp.test.ts passes and the type check is clean. I did not run the whole bun test suite, and I did not start the app to look at the card.

  • Apps card: a row whose app is owner/name gets link: <origin>/<owner>/<name>, but only when the origin is http(s). That is the same rule the Plan card uses. Rows that aren't a plain owner/name stay unlinked.
  • new_app card: the Production row links to its URL only when it starts with http:// or https://. Anything else stays plain text.
  • Tests: two new tests in test/card-shell.test.ts call cardFor("apps", …) and cardFor("new_app", …) with good and bad origins and URLs. The bad cases are javascript:, //host, an empty origin, and an app name like a/b/c, and none of them produce a link. I put them there rather than in test/mcp.test.ts because that file already holds the other cardFor card tests. I did not run them against the old code to see them fail.
  • Docs: the Cards paragraph in docs/MCP.md now says the Apps card links its rows and the new_app card links Production.

The change is in src/web/studio/cards.ts.

🤖 Generated with Claude Code

Closes #5749

2 earlier comments
commented

The Apps card now links each app row to its page on the forge, and the new_app card's Production row links to its URL. bun test test/card-shell.test.ts test/mcp.test.ts passes and the type check is clean. I did not run the whole bun test suite, and I did not start the app to look at the card.

  • Apps card: a row whose app is owner/name gets link: <origin>/<owner>/<name>, but only when the origin is http(s). That is the same rule the Plan card uses. Rows that aren't a plain owner/name stay unlinked.
  • new_app card: the Production row links to its URL only when it starts with http:// or https://. Anything else stays plain text.
  • Tests: two new tests in test/card-shell.test.ts call cardFor("apps", …) and cardFor("new_app", …) with good and bad origins and URLs. The bad cases are javascript:, //host, an empty origin, and an app name like a/b/c, and none of them produce a link. I put them there rather than in test/mcp.test.ts because that file already holds the other cardFor card tests. I did not run them against the old code to see them fail.
  • Docs: the Cards paragraph in docs/MCP.md now says the Apps card links its rows and the new_app card links Production.

The change is in src/web/studio/cards.ts.

🤖 Generated with Claude Code

commented

The Apps card now links an app's production URL as well as its forge page. The type check is clean, and test/card-shell.test.ts and test/mcp.test.ts pass (51 tests). I didn't run the whole suite.

  • Apps card: when an app has an http(s) url, a second row follows its forge-page row, labelled <owner/name> production, with link set to that URL. A url that isn't http(s) stays as plain text in the app row's value, as before. The one change to existing behaviour: a URL that gets its own row is no longer repeated in the app row's value.
  • Helper: web is now hoisted to module level in src/web/studio/cards.ts. The apps rows, the new_app card and the pull card all use it, so there is no third inline regex.
  • Tests:
    • A new test in test/card-shell.test.ts covers the production row. A good URL links, and a javascript: URL adds no row and no link. A //host URL never becomes a link.
    • I didn't run the new test against the old code to confirm it fails there.
  • Docs: the docs/MCP.md sentence is now its own paragraph after the Plan card text. It describes both links and says non-http(s) addresses stay plain text.

I used a separate row rather than a linked label because each row has only one link, and the label already links to the forge page.

commented

I made the three fixes from the review and pushed them to the branch. test/card-shell.test.ts and test/mcp.test.ts pass (51 tests) and the type check is clean. I didn't run the whole suite.

  • Brace: in src/web/studio/cards.ts, the apps loop now opens with for (...) { on one line, like the rest of the file.
  • Test: the //evil.example assertion in test/card-shell.test.ts is now exact. The card must have exactly one row. No row may link to //evil.example. The address must still appear in the row's text.
  • Docs: in docs/MCP.md, resources/list and resources/read… now starts on its own line instead of running on from the new paragraph.

I did not check that the card draws correctly in a host.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs