feat(09-03): point every in-app setup surface at the one prompt, add copy affordances
CI / check (push) Failing after 6m7s

- JoinBoutPage.vue: setupDocPath()/setupDocName() collapse to /docs/BOTFIGHTS.md
  regardless of connection mode; keep YOUR_BOT_ID/YOUR_BOT_SECRET substitution
  and add a third substitution for {{ARENA_URL}} -> window.location.origin
- BotProfilePage.vue: same collapse; the webhook/polling guide-type selector
  is gone (there's only one guide now) -- replaced with a single 'LOAD SETUP
  GUIDE' button, same credential + {{ARENA_URL}} substitution
- DocsPage.vue: new 'GIVE THIS TO YOUR AI' panel at the top of the page --
  copy-to-clipboard for the full /api/docs/prompt response, plus the literal
  URL shown so a user can hand an agent the link instead of the text.
  Existing API reference / webhook tester tabs unchanged below it
- e2e/signup-bot.spec.ts: two new tests -- docs page shows the copy
  affordance, and GET /api/docs/prompt (via page.request) returns 200 with
  the registration endpoint and no leftover {{ARENA_URL}} token
This commit is contained in:
Dorian
2026-07-30 22:24:48 -04:00
parent a0809565f2
commit 2dd9947516
4 changed files with 95 additions and 35 deletions
+17
View File
@@ -41,3 +41,20 @@ test.describe('bot registration flow', () => {
await expect(page.getByText(/choose your fighter/i).first()).toBeVisible({ timeout: 5_000 })
})
})
test.describe('unified AI bot-setup prompt (BOT-02)', () => {
test('docs page shows the "give this to your AI" copy affordance', async ({ page }) => {
await page.goto('/docs')
await expect(page.getByText(/give this to your ai/i).first()).toBeVisible({ timeout: 10_000 })
await expect(page.getByText(/copy full prompt/i).first()).toBeVisible({ timeout: 5_000 })
})
test('GET /api/docs/prompt returns the self-contained prompt an agent could consume', async ({ page }) => {
await page.goto('/docs')
const res = await page.request.get('/api/docs/prompt')
expect(res.status()).toBe(200)
const body = await res.text()
expect(body).toContain('/api/bots')
expect(body).not.toContain('{{ARENA_URL}}')
})
})