Repository navigation
Fix duplicate class-name announcement in seminar call flow - #160
Merged
Merged
Conversation
Live feedback: calling from a class's own phone repeated the class
name twice back to back ("כיתה יג 1 תשפז" once as its own
announcement, then again as the prefix of the teacher-code prompt),
and the star-escape instructions were read out on every single
teacher-code prompt, including retries.
- Class name is now announced exactly once (SEMINAR.KLASS_CONFIRMED),
regardless of whether the class was resolved by phone or entered
manually
- SEMINAR.TEACHER_CODE_PROMPT dropped to a bare "הקישי קוד מורה" -
no repeated class name, no escape instructions
- The star escape itself still works, just isn't announced anymore
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXGT749AjJ6BDgDqvQXQX2
There was a problem hiding this comment.
🟡 Changes recommended
Current code stops passing {klassName} interpolation values, so old DB text (or deploy-before-migration) will speak raw {klassName} placeholder.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fix Yemot seminar call flow so klass name announced once, teacher-code prompt shorter, less repeated audio noise.
Changes:
- Send
SEMINAR.KLASS_CONFIRMEDfrom seminar flow loop, not fromgetKlassByInput(). - Simplify
SEMINAR.TEACHER_CODE_PROMPTusage and update tests to match new prompt text. - Add TypeORM migration to update default DB text for
SEMINAR.TEACHER_CODE_PROMPT.
File summaries
| File | Description |
|---|---|
| server/src/yemot-handler.service.ts | Move klass confirmation announcement, simplify teacher-code prompt call site |
| server/src/yemot-handler.service.test.ts | Update seeded text value, assert KLASS_CONFIRMED send in phone-recognized + escape flows |
| server/src/migrations/1787500000000-SimplifyTeacherCodePrompt.ts | Update default SEMINAR.TEACHER_CODE_PROMPT text in texts table |
Review details
Suppressed comments (1)
server/src/yemot-handler.service.ts:183
- askForInputByKey no longer receives
{klassName}values. With current text interpolation (only replaces placeholders whenvaluesprovided), any existingSEMINAR.TEACHER_CODE_PROMPTvalue that still contains{klassName}will be read out as-is. Pass{ klassName: klass.name }to preserve template interpolation (even if default prompt no longer uses it).
private async getTeacherOrEscape(): Promise<Teacher | 'ESCAPE'> {
while (true) {
const input = await this.askForInputByKey('SEMINAR.TEACHER_CODE_PROMPT');
if (input === '*') return 'ESCAPE';
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Per Copilot review: the default text no longer uses {klassName}, but
askForInputByKey only interpolates when values are passed - so a
per-tenant override still containing the old placeholder, or a
deploy where the app restarts before the migration runs, would read
the literal "{klassName}" out loud. Keep passing it; unused
placeholders in the current text are simply ignored.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXGT749AjJ6BDgDqvQXQX2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Live feedback from production calls (call log confirms it:
send_message "כיתה יג 1 תשפז"immediately followed byask_input "כיתה יג 1 תשפז, הקישי קוד מורה..."):Fix
SEMINAR.KLASS_CONFIRMED, regardless of whether the class was resolved by phone or entered manuallySEMINAR.TEACHER_CODE_PROMPTis now a bare "הקישי קוד מורה" — no repeated class name, no escape instructions*escape still works, it's just no longer announcedNot included
The second issue reported alongside this (a teacher's entered code "942" not being recognized) isn't a code bug I could confirm from here — no production DB access. Flagged separately to the user to check whether the value actually persisted.
Generated by Claude Code