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

The studio tells you to add an agent below, and there is nothing below #204

Merged opened this

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

Merged

Pushed.

shipped production is serving it deploy aafe9dc

opened this

Pushed.

The studio's crew panel (src/web/studio/crew.ts) said "Add an agent below" even when there was nothing below — the only case where available.length === 0 and crew.length === 0 is when no agents exist on the forge at all, since there's nowhere else to add one from.

Now, when a repo has no crew and no agents exist:

  • A forge admin sees "No agents exist on this forge yet." with a button straight to /settings/crew (dev's agent-creation page), reachable in one click without leaving studio mode (no ?mode=dev, no cookie flip).
  • Anyone else sees "No agents exist on this forge yet. An admin can add one." — no link, since posting there would just 404 them.

The case where agents exist but aren't on this crew is untouched: the "Add an agent below" wording and the add-form still render exactly as before.

Added test/studio.test.ts coverage that walks the full path (app page → studio settings → the door) for a forge admin, checks a non-forge-admin repo admin (an org team lead) gets told who can add an agent instead of a link that would refuse them, and confirms these fail against the old code. Ran bun x tsc --noEmit and the full forge.json check suite — the only failures are 6 pre-existing ones unrelated to this change (git-binary/sandbox environment issues present before my edits too).

Closes #196

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs