Skip to content

Opportunity Home L10n Screenshots - #4012

Merged
OrangeAndGreen merged 4 commits into
masterfrom
dv/l10n-connect-screens
Nov 6, 2026
Merged

OrangeAndGreen merged 4 commits into
masterfrom
dv/l10n-connect-screens

Conversation

@OrangeAndGreen

@OrangeAndGreen OrangeAndGreen commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Technical Summary

Follow-up to #3987: extends the opt-in localization screenshots to the Opportunity Home surfaces that #3955 introduced. OpportunityHomeScreenshotTest adds 7 tests (sdk 34, native graphics) for the job intro, the learn modules sheet, learning progress (3 of 5 modules), and the Dashboard, Payment, Visits and More delivery tabs.

  • Each test opens the real Opportunity Home through a job-status link, so the app picks the screen from the opportunity's state rather than the test forcing it.
  • The mock Connect server can now be told what to answer (still {} by default). Learn and delivery progress go through the app's real parsers.
  • A screen-wide capture grabs every window, so the modules bottom sheet shows up in its screenshot.

The screenshots found several layout and translation problems (tab label truncation in en too, the gauge label running into its arc, untranslated lt/no/ha strings, ₹ vs INR). Those are filed as CCCT-3033; this PR doesn't fix them.

7 new views are included in the screenshots:

  • Job Intro
  • Learning Progress
  • Learning Modules bottom sheet
  • Delivery Progress - Dashboard tab
  • Delivery Progress - Payments tab
  • Delivery Progress - Visits tab
  • Delivery Progress - More tab

Comparisons of each of the 7 new views across both languages and screen sizes can be found here.
Latest full results by language and screen size.

Safety Assurance

Safety story

Risk: Low. Opt-in screenshot tests only; no app code changes.

What gives confidence:

  • Test-only change: nothing under app/src changes. All four files are under app/unit-tests/src/org/commcare/l10n/.
  • The new tests stay excluded from normal unit test runs unless -Pl10n.locale is set; without the flag only L10nScreenshotsTest runs (10 pass).
  • 7 of 7 pass in en, every image checked by eye; 63 of 63 pass across fr, es, pt, sw, hi, ti, ha, lt and no, checked on contact sheets. All 16 l10n classes pass in en, so the base-class change broke nothing. ktlint clean.

Risks to review:

  • captureScreenRoboImage is marked experimental in Roborazzi.
  • Each delivery test waits for exactly two server calls. If the app drops the second, those tests fail loudly rather than render a stale screen.

Automated test coverage

The new tests are themselves the coverage: screenshots for review by eye, not compared against a baseline.

🤖 Generated with Claude Code

Adds opt-in l10n screenshots of the job intro, learn modules sheet, learning
progress and the four delivery tabs. The mock Connect server now serves learn
and delivery progress through the real parsers, and a screen-wide capture
picks up the bottom sheet's own window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The change adds shared fixture data for learning and delivery progress, extends the screenshot mock API to select response bodies by request path, and adds parameterized localization screenshots for Opportunity Home. The tests cover the job intro, learning modules and progress, and delivery dashboard, payment, visits, and more screens. The screenshot helper also adds full-screen capture.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

Suggested reviewers: jignesh-dimagi, conroy-ricketts

Merge Risk: Low · up to b32b8

Screenshot dates can change without a UI change, creating review noise. Freeze the fixture clock for repeatable captures.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Title check Passed The title clearly identifies the main change: localization screenshots for Opportunity Home. It is concise and specific.
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.
Description check Passed The description clearly explains the purpose, visible changes, technical design, linked follow-up issue, safety assessment, test coverage, risks, and reported validation results. It does not include e…
Full details: Description check

Explanation

The description clearly explains the purpose, visible changes, technical design, linked follow-up issue, safety assessment, test coverage, risks, and reported validation results. It does not include explicit Documentation or Labels and Review sections, but the description is otherwise substantially complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 4 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 78ae1e9e-193c-4687-92f0-a1905ccf9ed7
Commits

Reviewing files that changed from the base of the PR and between 49309c7 and b32b82c.

Files selected for processing: 4

  • app/unit-tests/src/org/commcare/l10n/BaseConnectScreenshotTest.kt
  • app/unit-tests/src/org/commcare/l10n/ConnectScreenshotData.kt
  • app/unit-tests/src/org/commcare/l10n/L10nScreenshots.kt
  • app/unit-tests/src/org/commcare/l10n/OpportunityHomeScreenshotTest.kt

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Fix comments: Fix CodeRabbit comments on this PR

@OrangeAndGreen OrangeAndGreen self-assigned this Nov 4, 2026
@OrangeAndGreen OrangeAndGreen added the skip-integration-tests Skip android tests. label Nov 4, 2026
@OrangeAndGreen
OrangeAndGreen marked this pull request as ready for review November 4, 2026 19:30
@OrangeAndGreen
OrangeAndGreen requested review from a team and conroy-ricketts and removed request for a team November 4, 2026 19:32
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.77%. Comparing base (a590815) to head (abb3a46).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4012      +/-   ##
============================================
- Coverage     33.77%   33.77%   -0.01%     
  Complexity     5110     5110              
============================================
  Files           782      782              
  Lines         51871    51871              
  Branches       6535     6535              
============================================
- Hits          17520    17519       -1     
  Misses        32052    32052              
- Partials       2299     2300       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OrangeAndGreen OrangeAndGreen added the Low Risk Small blast radius; unlikely to break existing behavior label Nov 5, 2026
conroy-ricketts
conroy-ricketts previously approved these changes Nov 6, 2026
Builders that return JSON now say so, per review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OrangeAndGreen
OrangeAndGreen merged commit 8ede429 into master Nov 6, 2026
12 of 16 checks passed
@OrangeAndGreen
OrangeAndGreen deleted the dv/l10n-connect-screens branch November 6, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Low Risk Small blast radius; unlikely to break existing behavior skip-integration-tests Skip android tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants