Allow includeTranscript in all modes#5
Conversation
…ion.js) Previously the expected/submitted transcript was only written in audio mode (AudioGame.submit). Move it into the shared completion flow so any mode can opt in via config.includeTranscript. completion.js now saves the stats and, when the flag is set, appends both transcripts to stats.txt (layered on the shared serializer so stats.js stays untouched); audio-game.js reverts to just triggering completion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe completion flow now saves statistics through Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/completion.js`:
- Around line 21-23: Update the fetch flow in the completion logic before
reading the response body to validate the returned response’s ok status. If the
request for stats.txt is unsuccessful, handle it as an error and do not append
transcripts or write the resulting content back to the stats file; preserve the
existing processing for successful responses.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2be949fe-86ab-463b-85d2-4d4aecba0095
📒 Files selected for processing (4)
AGENTS.mdREADME.mdclient/completion.jsclient/games/audio-game.js
fetch doesn't reject on HTTP errors, so a missing/errored stats.txt would append transcripts to an error page and save it back. Check response.ok and bail out; the base stats were already saved by saveStatistics, so the file stays intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Makes the
includeTranscriptconfig flag work in any mode, not just audio.Previously the expected/submitted transcript was written only in audio mode (in
AudioGame.submit()). This moves the logic into the shared completion flow so a classic task (e.g. the Long Form email) can also opt in and give the grader the real transcription to compare.completion.js: newsaveCompletionStats()saves the numeric stats and, whenconfig.includeTranscriptis set, appends the Expected (reference) and Submitted (typed) transcriptions tostats.txt. It's layered on top of the shared serializer (read-back + re-post), sostats.jsstays untouched.audio-game.js: reverts to simply triggeringshowCompletionScreen()— no audio-specific transcript save.state.originalText(expected) +state.typedText(submitted), both mode-agnostic.The transcripts are inserted before the
Generated:line instats.txt; the base task'sextract_solution.pysurfaces them in STDOUT for the grader.Testing
npm run buildpasses.allowMistakes+includeTranscript): typed "The quick brown fix." vs "The quick brown fox." →stats.txtcontains the stats and both transcriptions. Audio mode uses the same shared path. No new console errors.🤖 Generated with Claude Code