Skip to content

fix speaking error - #142

Merged
ahmedyousry27 merged 3 commits into
mainfrom
speaking-exercise
Jul 16, 2026
Merged

ahmedyousry27 merged 3 commits into
mainfrom
speaking-exercise

Conversation

@ahmedyousry27

@ahmedyousry27 ahmedyousry27 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace everyday speaking content with a software-engineering interview track
  • Add English and German localized content
  • Provide exactly 3 lessons with 3 speaking exercises each
  • Preserve existing legacy speaking plans and saved attempts
  • Fix speaking evaluation to consistently use target_language

Speaking lessons

  1. Introduction and Motivation
  2. Projects and Problem Solving
  3. Engineering Practices and Collaboration

Each lesson contains three speaking_prompt exercises with localized prompts, expected answers, and keyword hints.

API changes

  • Require target_language for speaking submissions
  • Use the selected language for exercise lookup and GenAI evaluation
  • Preserve the selected language after frontend lesson refresh

Compatibility

Existing Everyday Speaking Practice plans are not modified. Existing users receive the new speaking track once without duplicate creation.

Testing

  • Learning-service full test suite passed
  • Progress-feedback-service full test suite passed
  • Frontend tests passed: 8/8
  • Frontend lint passed
  • Frontend production build passed

Summary by CodeRabbit

  • New Features

    • Added a software engineering speaking practice track in English and German.
    • Speaking exercises now support localized prompts, expected answers, and format labels.
    • Added a loading overlay and disabled controls while switching languages.
    • Preserved the selected language when loading lessons and submitting speaking answers.
  • Bug Fixes

    • Speaking submissions now require a supported, non-empty target language.
    • Improved language-specific exercise retrieval, evaluation, and answer storage.
    • Prevented duplicate creation of the new speaking track.

@ahmedyousry27 ahmedyousry27 added this to the milestone 8 milestone Jul 16, 2026
@ahmedyousry27 ahmedyousry27 self-assigned this Jul 16, 2026
@AET-DevOps26 AET-DevOps26 deleted a comment from coderabbitai Bot Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds a catalog-backed software-engineering speaking track, localizes learning responses and exercise formats, requires target language for speaking submissions, propagates it through evaluation, and adds frontend language-switch loading behavior.

Changes

Speaking language flow

Layer / File(s) Summary
Speaking catalog and seeding
backend/learning-service/src/main/java/.../service/catalog/DefaultExerciseTemplate.java, backend/learning-service/src/main/java/.../service/LearningPlanSeeder.java, backend/learning-service/src/main/resources/default-learning-plans.json, backend/learning-service/src/test/...
Adds the software-engineering speaking catalog entry, template subtype and expected-answer fields, catalog-backed seeding, and stricter catalog/seeder tests.
Localized learning responses
backend/learning-service/src/main/java/.../service/LearningPlanService.java, backend/learning-service/src/main/java/.../service/LessonService.java, backend/learning-service/src/test/...
Prevents duplicate speaking-plan seeding and maps localized goals, expected answers, and German subtype-specific exercise formats.
Target-language speaking answers
api/openapi.yaml, api/services/progress-feedback-service.yaml, backend/progress-feedback-service/src/main/java/..., backend/progress-feedback-service/src/test/...
Requires and validates target_language, then passes its normalized value through localized exercise retrieval, GenAI evaluation, and answer persistence.
Frontend language switching
frontend/src/App.jsx, frontend/src/api/client.test.js, frontend/src/components/LanguageSwitchOverlay.jsx, frontend/src/pages/LanguagePage.jsx, frontend/src/styles.css
Adds target-language-aware lesson and answer requests, disables language controls during switching, and renders a localized loading overlay with reduced-motion support.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: backend

Suggested reviewers: julian-kraus

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is relevant but too generic to summarize the main change in the PR. Use a specific title like "Require target_language for speaking submissions and add software-engineering speaking content".
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description covers summary, API changes, compatibility, and testing, though it omits the related issue and explicit changes checklist.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch speaking-exercise

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ahmedyousry27
ahmedyousry27 merged commit 18dea7f into main Jul 16, 2026
13 of 14 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
backend/learning-service/src/main/resources/default-learning-plans.json (1)

1445-1445: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Standardize the German register in this track. Several prompts mix informal du/deine and formal Sie/Ihre phrasing in the same entry, e.g. Nimm deine Antwort auf: Warum interessieren Sie sich .... Pick one tone and apply it consistently across the new German catalog items.

🤖 Prompt for 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.

In `@backend/learning-service/src/main/resources/default-learning-plans.json` at
line 1445, Review the new German catalog entries in default-learning-plans.json
and standardize each entry to a single register, consistently using either
informal du/deine or formal Sie/Ihre phrasing. Update mixed prompts such as
those combining “Nimm deine” with “Sie” so all instructions and pronouns within
each track use the selected tone.
🤖 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 `@backend/learning-service/src/main/resources/default-learning-plans.json`:
- Line 1331: Update the German question prompts in the listed learning-plan
entries to use consistent informal address: replace formal Sie/Ihre wording with
du/dein forms and use informal imperatives such as “Erzähle”. Apply the same
wording consistently to the entries at the referenced question locations while
preserving their existing meaning and answer-duration requirements.

---

Nitpick comments:
In `@backend/learning-service/src/main/resources/default-learning-plans.json`:
- Line 1445: Review the new German catalog entries in
default-learning-plans.json and standardize each entry to a single register,
consistently using either informal du/deine or formal Sie/Ihre phrasing. Update
mixed prompts such as those combining “Nimm deine” with “Sie” so all
instructions and pronouns within each track use the selected tone.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d186979b-c729-4119-a51a-22ef970b2e63

📥 Commits

Reviewing files that changed from the base of the PR and between 3c02071 and c8118ce.

📒 Files selected for processing (19)
  • api/openapi.yaml
  • api/services/progress-feedback-service.yaml
  • backend/learning-service/src/main/java/de/tum/aet/devops26/learning_service/service/LearningPlanSeeder.java
  • backend/learning-service/src/main/java/de/tum/aet/devops26/learning_service/service/LearningPlanService.java
  • backend/learning-service/src/main/java/de/tum/aet/devops26/learning_service/service/LessonService.java
  • backend/learning-service/src/main/java/de/tum/aet/devops26/learning_service/service/catalog/DefaultExerciseTemplate.java
  • backend/learning-service/src/main/resources/default-learning-plans.json
  • backend/learning-service/src/test/java/de/tum/aet/devops26/learning_service/service/LearningPlanSeederTests.java
  • backend/learning-service/src/test/java/de/tum/aet/devops26/learning_service/service/LearningPlanServiceTests.java
  • backend/learning-service/src/test/java/de/tum/aet/devops26/learning_service/service/LessonServiceTests.java
  • backend/learning-service/src/test/java/de/tum/aet/devops26/learning_service/service/catalog/DefaultLearningPlanCatalogTests.java
  • backend/progress-feedback-service/src/main/java/de/tum/aet/devops26/progress_feedback_service/api/impl/ProgressFeedbackServiceController.java
  • backend/progress-feedback-service/src/main/java/de/tum/aet/devops26/progress_feedback_service/service/UserAnswerService.java
  • backend/progress-feedback-service/src/test/java/de/tum/aet/devops26/progress_feedback_service/service/UserAnswerServiceTests.java
  • frontend/src/App.jsx
  • frontend/src/api/client.test.js
  • frontend/src/components/LanguageSwitchOverlay.jsx
  • frontend/src/pages/LanguagePage.jsx
  • frontend/src/styles.css

"topic": "Präsentiere deinen Hintergrund, deine Motivation und deine Stärken als Kandidatin oder Kandidat im Software Engineering.",
"exercises": [
{
"question": "Nimm eine 45-sekündige Antwort auf: Erzählen Sie mir etwas über sich als Kandidatin oder Kandidat im Software Engineering.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use one form of address throughout the German prompts.

These strings mix informal wrappers such as “Nimm deine Antwort auf” with formal Sie/Ihre questions, while their expected answers use du. Prefer consistent informal wording such as “Erzähle”, “interessierst du dich”, and “deiner”.

Also applies to: 1342-1342, 1353-1353, 1370-1370, 1381-1381, 1392-1392, 1431-1431

🤖 Prompt for 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.

In `@backend/learning-service/src/main/resources/default-learning-plans.json` at
line 1331, Update the German question prompts in the listed learning-plan
entries to use consistent informal address: replace formal Sie/Ihre wording with
du/dein forms and use informal imperatives such as “Erzähle”. Apply the same
wording consistently to the entries at the referenced question locations while
preserving their existing meaning and answer-duration requirements.

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