fix: [MR-159] add Curious Reader language to user_sessions_data metadata#277
fix: [MR-159] add Curious Reader language to user_sessions_data metadata#277janfb-codev wants to merge 3 commits into
Conversation
# Conflicts: # app/src/main/java/org/curiouslearning/container/MyApplication.java
📝 WalkthroughWalkthrough
ChangesSession payload language enrichment
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (1)
app/src/main/java/org/curiouslearning/container/core/subapp/handler/DefaultAppEventPayloadHandler.java (1)
199-206: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression coverage for enrichment scope and fallback behavior.
Please cover: selected language on
user_sessions_data,"unknown"for missing/blank/invalid values, and absence of this field fromsummary_data.🤖 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 `@app/src/main/java/org/curiouslearning/container/core/subapp/handler/DefaultAppEventPayloadHandler.java` around lines 199 - 206, Add regression tests for the enrichment logic around resolveLanguage and payload metadata: verify the selected language is written to user_sessions_data, missing, blank, and invalid language values resolve to "unknown", and summary_data does not receive a language field. Keep existing enrichment behavior unchanged and exercise both valid and fallback cases.
🤖 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.
Nitpick comments:
In
`@app/src/main/java/org/curiouslearning/container/core/subapp/handler/DefaultAppEventPayloadHandler.java`:
- Around line 199-206: Add regression tests for the enrichment logic around
resolveLanguage and payload metadata: verify the selected language is written to
user_sessions_data, missing, blank, and invalid language values resolve to
"unknown", and summary_data does not receive a language field. Keep existing
enrichment behavior unchanged and exercise both valid and fallback cases.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: db776425-0581-4dce-b9c2-a7cd07d4eadb
📒 Files selected for processing (1)
app/src/main/java/org/curiouslearning/container/core/subapp/handler/DefaultAppEventPayloadHandler.java
Changes
user_sessions_dataevent with the Curious Reader selected language, written tometadata.language.user_sessions_dataonly,summary_datapayloads are unaffected.How to test
LEVEL_COMPLETEDevent, and confirm the newuser_sessions_datadocument in Firestore includesmetadata.languagematching the selected language.Ref: MR-159
Summary by CodeRabbit