Lane 10 PR 7a: the Test the bot pages (#736) #902

Merged
claude-bot merged 3 commits from build/lane10-7a-test-the-bot-pages into main 2026-09-28 03:24:59 +00:00
Collaborator

Part of #736 (lane 10). Frontend only, on main. It's built on PR 6's existing /recording-tests routes, with no new endpoints.

What it builds

  • Settings → Recording, "Test the bot" (#testbot, inside "Starting a recording", as drawn):
    • you choose to keep or delete the results;
    • "no Discord" is known before you press, and every other refusal gives the server's own sentence;
    • the running stages poll every 2 s: recording, handing over, transcribing, summarising;
    • the result shows each stage's tick and timing, what it heard, and the summary.
    • A failure's title follows the drawing: "Stopped at transcription", "Stopped at the summary", "Nothing heard".
    • It also lists the kept test runs, with a confirmed delete.
  • The session page: while Start is refused as too early (D149), a "Test the bot ›" link opens that section (D222).
  • D223:
    • an administrator of this server reads "you run this server", with a link to Admin → Discord for a bot refusal or Admin → AI for a transcriber failure;
    • everyone else reads the named-administrators sentence.
    • A summariser failure is the campaign's own setting, so it reads the same for everyone.

Departures

  1. Only "no Discord" is known before the press. "Bot not set up" and "bot too old" arrive after it, in the server's words, and nothing is recorded by a refused press. The campaign payload carries no bot-reachability flag.
  2. The transcript is one paragraph, not per-speaker lines, because the server returns a single string.

Checks

  • vitest: 200 files, 2670 passed. eslint: 0 errors.
  • Tests: unit tests for the state machine and wording, including both readers of D223, plus the page and RecordingPanel tests.
  • Render check: I looked at the shots myself. Two faults were fixed: the failure titles, and the result chip wrapping at narrow widths.
    • ⚠️ The phone width isn't confirmed yet. Headless Edge on Windows crops rather than narrows below about 500 px. This PR waits for a real-390 pass on a running stack before it merges, together with #900.

🤖 Generated with Claude Code

Part of #736 (lane 10). Frontend only, on main. It's built on PR 6's existing `/recording-tests` routes, with no new endpoints. ## What it builds - **Settings → Recording, "Test the bot"** (`#testbot`, inside "Starting a recording", as drawn): - you choose to keep or delete the results; - "no Discord" is known before you press, and every other refusal gives the server's own sentence; - the running stages poll every 2 s: recording, handing over, transcribing, summarising; - the result shows each stage's tick and timing, what it heard, and the summary. - A failure's title follows the drawing: "Stopped at transcription", "Stopped at the summary", "Nothing heard". - It also lists the kept test runs, with a confirmed delete. - **The session page:** while Start is refused as too early (D149), a "Test the bot ›" link opens that section (D222). - **D223:** - an administrator of this server reads "you run this server", with a link to **Admin → Discord** for a bot refusal or **Admin → AI** for a transcriber failure; - everyone else reads the named-administrators sentence. - A summariser failure is the campaign's own setting, so it reads the same for everyone. ## Departures 1. **Only "no Discord" is known before the press.** "Bot not set up" and "bot too old" arrive after it, in the server's words, and nothing is recorded by a refused press. The campaign payload carries no bot-reachability flag. 2. **The transcript is one paragraph,** not per-speaker lines, because the server returns a single string. ## Checks - **vitest:** 200 files, 2670 passed. **eslint:** 0 errors. - **Tests:** unit tests for the state machine and wording, including both readers of D223, plus the page and `RecordingPanel` tests. - **Render check:** I looked at the shots myself. Two faults were fixed: the failure titles, and the result chip wrapping at narrow widths. - **⚠️ The phone width isn't confirmed yet.** Headless Edge on Windows crops rather than narrows below about 500 px. **This PR waits for a real-390 pass on a running stack** before it merges, together with #900. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Builds D124's "Test the bot": the launch (30s, stoppable early, keep-or-
delete), the running stages, the result (per-stage timing, transcript,
summary, a plain failure sentence naming who can fix it) and the kept
test runs, under Settings -> Recording, retention & AI, polling the
existing /recording-tests routes. The session page's recording panel
offers a link to it while Start is refused for being early (D149, D222).

New: src/api/recordingTests.js, src/pages/recording-test/*.
RecordingPanel now takes `routed` as a prop (matching RecordingSection's
existing pattern) rather than calling useNavigate() itself, so tests that
render it standalone don't need a Router.

Known departures from the drawing (see TestTheBot.jsx's header comment):
"the bot isn't set up" / "the bot needs updating" surface only after a
press, since the campaign payload carries no such flag yet; D223's
administrator-aware wording is not implemented (same sentence for every
reader).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
feat(webapp): D223, an administrator's own wording for Test the bot's server-matter failures
Some checks failed
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 58s
CI / Bot tests and audit (pull_request) Successful in 2m5s
CI / Backend lint (ruff) (pull_request) Successful in 1m29s
CI / Feedback site tests (pull_request) Successful in 47s
CI / Does this change touch the recording path? (pull_request) Successful in 22s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 1m13s
CI / Docker image build (pull_request) Successful in 5m21s
CI / End-to-end journeys (desktop, phone, keyboard-only) (pull_request) Has been cancelled
CI / Backend migration, tests, and audit (pull_request) Has been cancelled
CI / Frontend tests, audit, and build (pull_request) Has been cancelled
62253707e0
An administrator reads "you run this server" with a link into the right
part of Admin; everyone else keeps the server's own sentence, which
already names the administrators. Applies to:
- a start refusal that is the server's to fix (not set up, unreachable,
  or too old -> Admin -> Discord), never "nobody's in the voice channel"
  or "the bot is busy", which are about the moment;
- a failed test's transcriber stage (Admin -> AI).

The summariser failure is left as it is for every reader: it already
names the campaign's own settings, which is the GM's to fix whether or
not they also administer the server (flagged in the handback for the
coordinator to overrule if they want it treated as a server matter too).

testTheBot.js: isServerMatter/BOT_TOO_OLD_TEXT (mirrors the backend's
own refusal shape by status/text, since the frontend has no other way
to tell "needs updating" apart from "busy"), failureAdminLink,
failureSentence's new isAdmin parameter.

TestTheBot.jsx now reads useAuth() for is_admin, which needed
useAuth.jsx mocked in CampaignSettingsRecording.test.jsx (TestTheBot
mounts inside that page) and TestTheBot.test.jsx, following the
existing CampaignSettingsArchive.test.jsx pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix(webapp): Test the bot's card and Test runs get room of their own (#902)
All checks were successful
CI / Backend lint (ruff) (pull_request) Successful in 29s
CI / Feedback site tests (pull_request) Successful in 45s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m50s
CI / Bot/backend version sync (pull_request) Successful in 27s
CI / Bot tests and audit (pull_request) Successful in 1m59s
CI / Docker image build (pull_request) Successful in 45s
CI / Does this change touch the recording path? (pull_request) Successful in 21s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Frontend tests, audit, and build (pull_request) Successful in 22m14s
CI / Backend migration, tests, and audit (pull_request) Successful in 44m8s
CI / End-to-end journeys (desktop, phone, keyboard-only) (pull_request) Successful in 22m55s
2a40914157
On a phone the running card sat flush against the window field's hint above
it and "Test runs" butted onto its bottom edge; neither neighbour brings a
margin. Seen in the real-390 render check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Collaborator

The phone check is done, on a real seeded stack. Playwright ran inside the stack's container at a true 390×844 and at 1440, in light and dark, covering: launch, a real running test against the fake bot, a real finished result, and the session page's "Test the bot ›" link. Every shot passes scrollWidth <= innerWidth, and I looked at them myself.

One fault fixed (2a409141): on a phone, the running card sat flush against the field hint above it, and "Test runs" butted onto the card's bottom edge. The fix adds vertical margins, scoped to this component.

**The phone check is done, on a real seeded stack.** Playwright ran inside the stack's container at a true 390×844 and at 1440, in light and dark, covering: launch, a real running test against the fake bot, a real finished result, and the session page's "Test the bot ›" link. Every shot passes `scrollWidth <= innerWidth`, and I looked at them myself. **One fault fixed (2a409141):** on a phone, the running card sat flush against the field hint above it, and "Test runs" butted onto the card's bottom edge. The fix adds vertical margins, scoped to this component.
Sign in to join this conversation.
No description provided.