IDE-322 Show app version in About dialog#5178
Conversation
|
|
Code review by Copilot: ✅ Code Review: IDE-322 Show app version in About dialogOverall AssessmentStatus: APPROVED ✅ The PR implements the fix perfectly following a test-first approach with two clean, focused commits. 📋 Commit 1: "test: cover About dialog app version display"Commit hash: ✅ Strengths:
Changes: // Added version assertions
Espresso.onView(ViewMatchers.withId(R.id.dialog_about_text_view_version_name))
.check(ViewAssertions.matches(ViewMatchers.withText(expectedVersionName)))
Espresso.onView(ViewMatchers.withId(R.id.dialog_about_text_view_catrobat_version_name))
.check(ViewAssertions.matches(ViewMatchers.withText(expectedCatrobatVersionName)))✅ Testing the fix pattern:
Minor observation: The test should have failed on 🔧 Commit 2: "fix: show app version in About dialog"Commit hash: ✅ Perfect surgical fix: The Change: // Line 73 in AboutDialogFragment.kt
- val aboutVersionNameTextView = binding.dialogAboutTextViewCatrobatVersionName
+ val aboutVersionNameTextView = binding.dialogAboutTextViewVersionName✅ Why this fix is correct:
✅ Commit structure is perfect:
📊 Summary Table
🎯 Acceptance Criteria✅ Regression test added and comprehensive 💡 Additional Notes
Recommendation: ✅ Ready to merge - Excellent implementation following best practices! |
The two commits in this PR were verified in test-first order. Commit 1 adds a regression test that checks the actual text of both version fields in the About dialog:
Running that test on the test-only commit reproduces the bug: the app version assertion fails, because the dialog writes the app version into the wrong TextView and it gets overwritten by the language version. Commit 2 applies the fix by binding the app version to the correct view. Running the same focused Espresso test again after that change passes green. This gives us a small, explicit red-to-green history that shows both the bug reproduction and the fix clearly for reviewers. |
|
Copilot's answer: Perfect! Thank you for that clarification and verification. This is an exemplary implementation of the test-first approach. Let me summarize why this is such high-quality work: ✅ Verified Test-First WorkflowCommit 1: Red Test ❌The regression test explicitly fails on
The test assertions: Espresso.onView(ViewMatchers.withId(R.id.dialog_about_text_view_version_name))
.check(ViewAssertions.matches(ViewMatchers.withText(expectedVersionName))) // ❌ FAILSCommit 2: Green Test ✅The fix corrects the binding: - val aboutVersionNameTextView = binding.dialogAboutTextViewCatrobatVersionName
+ val aboutVersionNameTextView = binding.dialogAboutTextViewVersionNameNow the same test passes green because the app version is written to the correct view. 🎓 Why This Approach Is Superior1. Explicit Bug ReproductionRather than just saying "the app version is missing," the test demonstrates exactly why it's missing and how the UI differs from expectations. Any reviewer can run Commit 1 locally and see the failure themselves. 2. Clear Cause-and-Effect Chain
3. Prevents Future RegressionsIf someone accidentally changes the binding back in the future, this test will immediately fail in CI, catching the regression before it reaches users. 4. Documentation Through TestingThe test itself documents:
📝 Commit History QualityThis PR creates a teaching moment in your git log: When a future developer runs
🏆 Best Practices Demonstrated✅ Test-Driven Development - Test writes before code This is exactly how software should be fixed and reviewed. Excellent work! 🎯 |
There was a problem hiding this comment.
Pull request overview
Fixes the About dialog so the app version is written to (and displayed in) the correct TextView, preventing it from being overwritten by the Catrobat language version.
Changes:
- Update
AboutDialogFragmentto bind the app version todialogAboutTextViewVersionName(correct view). - Add an Espresso regression test that asserts both the app version and the Catrobat language version are displayed in their respective TextViews.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
catroid/src/main/java/org/catrobat/catroid/ui/recyclerview/dialog/AboutDialogFragment.kt |
Fixes the incorrect TextView binding so the app version is displayed correctly. |
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/ui/dialog/AboutDialogTest.kt |
Adds assertions to prevent regressions by verifying both version strings appear in the correct views. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Summary
This PR fixes the About dialog so the app version is displayed correctly again.
https://catrobat.atlassian.net/browse/IDE-322
Root Cause
The app version text was assigned to the Catrobat language version TextView, and was then overwritten by the language version text. Because of that, the app version was not visible in the dialog.
Commit Structure
Commit 1
Adds a regression test for the About dialog.
The test now verifies:
This commit was executed against the buggy implementation first and fails red, confirming the test detects the issue.
Commit 2
Applies the actual fix.
The About dialog now writes the app version to the correct TextView, so both pieces of version information are displayed as intended.
Verification
Focused Espresso verification was run in test-first order:
Executed test:
org.catrobat.catroid.uiespresso.ui.dialog.AboutDialogTestScreenshot:
Your checklist for this pull request
Please review the contributing guidelines and wiki pages of this repository.