Skip to content

usertest: sound check before Start, and separate error messages - #229

Merged
michielbdejong merged 2 commits into
mainfrom
claude/usertest-sound-check
Sep 30, 2026
Merged

michielbdejong merged 2 commits into
mainfrom
claude/usertest-sound-check

Conversation

@michielbdejong

Copy link
Copy Markdown
Contributor

Adds a sound check before a user-testing session starts, and gives each start failure its own message. Until now, any failure showed "Could not start the session (…). Is the invite link complete?". Everything is in usertest/; nothing shared is touched.

Sound check (a new card; Start moves to its own card):

  • "Test microphone" shows a live level meter and passes after 3 readings at level 8 or higher. An optional speech check shows the recognized words.
  • "Test speakers" plays a line in the moderator's voice for the current language (Dutch when Nederlands is selected).
  • "Type instead" uses typed answers (in the user testing app, allow the user to type in case their microphone doesn't work #199).
  • Start needs consent, a code that wasn't rejected, and either a passed microphone check or typed answers. The microphone from the check is reused for the recording, so there's no second prompt.
  • Screen sharing stays at Start, because sharing starts the recording.

Separate errors, in en and nl (61 keys, identical sets):

  • missing code, and wrong code (only on the moderator's 403);
  • a bad session plan (400), and no sessions left today (429);
  • server unreachable or 5xx, with a "Try again" button;
  • microphone blocked, with the Chrome/Edge re-allow steps;
  • no microphone, and other microphone errors;
  • speech recognition unsupported;
  • screen sharing cancelled, and other screen errors.
    api() now throws an ApiError carrying the status. The moderator gets GET /check, so a wrong code shows on page load; an older moderator's 404 is ignored.

Tests (headless only): node usertest/e2e/run.mjs passes 13/13 against the real server.mjs with a stubbed Claude API. It covers the happy path, typed answers, a denied mic, no mic, no speech recognition, a cancelled screen share, wrong and missing code, a bad plan, the moderator down and retry, an aborted request, and Dutch.

Not verifiable headlessly: real speech recognition, whether the speakers are audible and which voice real Chrome/Edge picks, real permission prompts, and whether the level threshold is right in a quiet room.

Note on Polle's error: the old page already fell back to typing on microphone failures. So "Could not start the session (…)" probably came from a moderator error or another screen or recorder failure, which the "(…)" names. Now each has its own message.

Deploy: after merging, run deploy.sh and restart the moderator (for /check). Restarting ends running sessions. Droplet deploys need Michiel's OK (board rule 10).

🤖 Generated with Claude Code

Michiel de Jong and others added 2 commits September 30, 2026 13:21
The page reported every start failure as "Is the invite link complete?",
also when the microphone permission was the problem. Now a sound check
(microphone level meter, optional speech-recognition check, speaker test
in the moderator's voice, or type instead) gates Start, api() errors carry
the HTTP status, and only the moderator's 403 is reported as a code
problem. The moderator gets GET /check so the page tests the code on load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
usertest/e2e/run.mjs runs the moderator with a dummy code against a
stand-in Claude API and drives Chromium's new headless mode (fake media,
or the microphone denied): 13 checks incl. Dutch. oxfmt on the page.

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

gitguardian Bot commented Sep 30, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
37751178 Triggered Generic High Entropy Secret 94a0aab usertest/e2e/run.mjs View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@michielbdejong
michielbdejong merged commit 634e1dc into main Sep 30, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant