Skip to content

CCCT-2456 Manage Profile Drawer Link And Profile Activity Stub#3761

Merged
conroy-ricketts merged 7 commits into
masterfrom
CCCT-2456-personalid-profile-screen-phase-one
Jun 18, 2026
Merged

CCCT-2456 Manage Profile Drawer Link And Profile Activity Stub#3761
conroy-ricketts merged 7 commits into
masterfrom
CCCT-2456-personalid-profile-screen-phase-one

Conversation

@conroy-ricketts

@conroy-ricketts conroy-ricketts commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

CCCT-2456

Technical Summary

Phase 1 of the Manage Profile feature. Adds an underlined "Manage Profile" link to the nav drawer header that unlocks PersonalID and opens a new stub PersonalIdProfileActivity, which later phases will replace with the Profile / Edit Profile nav graph. The link is dark-launched: visibility is hidden behind a feature flag until the final phase. All strings for the upcoming Profile and Edit Profile screens are front-loaded here so translation happens in one pass.

Screenshot_20260618-105417_CommCare Debug

Safety Assurance

Safety story

What gives confidence:

  • The feature is dark-launched — the link is hidden, so nothing changes for users in this PR.
  • I ran the app with the link's visibility temporarily flipped to VISIBLE, exercised the drawer link, and verified the unlock prompt appeared and the stub activity opened.
  • The diff is almost entirely additive; the only behavior-adjacent changes are the new helper in ConnectNavHelper and the removal of an unreferenced string resource.

Risks to review:

  • The locale translations (especially ha, sw, lt, ti) were machine-generated and have not had native-speaker review; they are dormant until later phases reveal the screens.
  • Most new strings are unreferenced until later phases and will show up as unused resources in lint until then.

conroy-ricketts and others added 5 commits June 10, 2026 15:41
[AI] Added a hidden Manage Profile drawer link that unlocks and launches a new empty PersonalIdProfileActivity, plus the profile/edit/forget/discard/OTP strings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
[AI] Added translations for the new profile/edit/forget/discard/OTP strings to all supported locales (es, fr, ha, hi, lt, no, pt, sw, ti).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
[AI] Increased the Manage Profile drawer link top margin to 6dp.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
[AI] Routed the Manage Profile drawer link through a new ConnectNavHelper.unlockAndGoToProfile, moved the dark-launch visibility into a helper, declared the profile activity non-exported, removed the unused nav_drawer_manage_profile string from all locales, and lifted the drawer's photo launcher registration to a constructor parameter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@conroy-ricketts conroy-ricketts self-assigned this Jun 12, 2026
@conroy-ricketts

Copy link
Copy Markdown
Contributor Author

Suggested Review Order

  • app/res/values/strings.xml — all new strings for this and upcoming phases, plus one removal
  • app/res/layout/nav_drawer_header.xml — the new Manage Profile link view
  • app/src/org/commcare/navdrawer/DrawerViewRefs.kt — binds the new view
  • app/src/org/commcare/activities/connect/PersonalIdProfileActivity.kt — the stub destination activity
  • app/src/org/commcare/connect/ConnectNavHelper.kt — new unlock-and-navigate helper the link routes through
  • app/src/org/commcare/navdrawer/BaseDrawerController.kt — click wiring and dark-launch visibility
  • app/AndroidManifest.xml — registers the new activity, non-exported
  • app/res/values-*/strings.xml — translations of the base strings in 9 locales

@conroy-ricketts conroy-ricketts marked this pull request as ready for review June 12, 2026 15:31
@conroy-ricketts conroy-ricketts requested review from a team, Jignesh-dimagi, OrangeAndGreen and shubham1g5 and removed request for a team June 12, 2026 15:32
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new PersonalID profile management feature to the navigation drawer. The implementation spans localization across 11 locales (English, Spanish, French, Hausa, Hindi, Lithuanian, Norwegian, Portuguese, Swahili, and Tigrinya), a new PersonalIdProfileActivity, and navigation integration. The "Manage Profile" link is wired into the navigation drawer header with unlock-policy-based access control, though the feature is currently hidden behind a shouldShowManageProfile() toggle returning false.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

skip-integration-tests

Suggested reviewers

  • OrangeAndGreen
  • Jignesh-dimagi
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a Manage Profile drawer link and a stub profile activity for Phase 1 of the feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 pull request description provides a clear technical summary, safety assurance with testing details, and acknowledges risks including machine-generated translations and unreferenced strings.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 CCCT-2456-personalid-profile-screen-phase-one

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 and usage tips.

@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.

🧹 Nitpick comments (1)
app/res/values/strings.xml (1)

632-632: ⚡ Quick win

Keep the underline out of the localized string.

Inlining <u> into a translatable resource is brittle; this repo already has the failure mode in app/res/values-ha/strings.xml where underline markup was escaped and would render literally. Keep personalid_manage_profile plain text in every locale and apply the underline where the TextView is configured instead.

🤖 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/res/values/strings.xml` at line 632, Remove the inline underline markup
from the translatable resource by changing the string resource
personalid_manage_profile to plain text ("Manage Profile") in all locales, and
instead apply the underline when configuring the TextView that displays this
resource (e.g., in the layout or the Activity/Fragment that calls setText for
personalid_manage_profile) using a view-side approach such as setting paint
flags, android:textStyle/span, or a Spannable with UnderlineSpan so the
localization remains markup-free across locales.
🤖 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/res/values/strings.xml`:
- Line 632: Remove the inline underline markup from the translatable resource by
changing the string resource personalid_manage_profile to plain text ("Manage
Profile") in all locales, and instead apply the underline when configuring the
TextView that displays this resource (e.g., in the layout or the
Activity/Fragment that calls setText for personalid_manage_profile) using a
view-side approach such as setting paint flags, android:textStyle/span, or a
Spannable with UnderlineSpan so the localization remains markup-free across
locales.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7042fbd7-7871-46ce-8d20-55728c0047a6

📥 Commits

Reviewing files that changed from the base of the PR and between 86afe78 and 6a4d9b9.

📒 Files selected for processing (16)
  • app/AndroidManifest.xml
  • app/res/layout/nav_drawer_header.xml
  • app/res/values-es/strings.xml
  • app/res/values-fr/strings.xml
  • app/res/values-ha/strings.xml
  • app/res/values-hi/strings.xml
  • app/res/values-lt/strings.xml
  • app/res/values-no/strings.xml
  • app/res/values-pt/strings.xml
  • app/res/values-sw/strings.xml
  • app/res/values-ti/strings.xml
  • app/res/values/strings.xml
  • app/src/org/commcare/activities/connect/PersonalIdProfileActivity.kt
  • app/src/org/commcare/connect/ConnectNavHelper.kt
  • app/src/org/commcare/navdrawer/BaseDrawerController.kt
  • app/src/org/commcare/navdrawer/DrawerViewRefs.kt

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3761   +/-   ##
=========================================
  Coverage     25.87%   25.88%           
- Complexity     4389     4393    +4     
=========================================
  Files           950      951    +1     
  Lines         57186    57205   +19     
  Branches       6810     6812    +2     
=========================================
+ Hits          14799    14808    +9     
- Misses        40558    40567    +9     
- Partials       1829     1830    +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.

shubham1g5
shubham1g5 previously approved these changes Jun 16, 2026

private fun shouldShowNotifications(): Boolean = PersonalIdManager.getInstance().isloggedIn() && isFeatureEnabled(NOTIFICATIONS)

private fun shouldShowManageProfile(): Boolean = false

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.

this can be moved to PersonalIdFeatureFlagChecker to keep all local release flags together.

@conroy-ricketts conroy-ricketts Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OrangeAndGreen
OrangeAndGreen previously approved these changes Jun 16, 2026
conroy-ricketts and others added 2 commits June 17, 2026 15:17
[AI] Moved the manage-profile visibility flag into PersonalIdFeatureFlagChecker and gated it on login state, matching the other nav drawer feature checks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Jignesh-dimagi

Jignesh-dimagi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

@conroy-ricketts

The ticket description is slightly inaccurate regarding 'the link is dark-launched: visibility is hard-coded to GONE until the final phase.' It should instead mention that the 'manage profile feature flag will be disabled until the final phase.'

Also, could you please add a screenshot to preview the UI?

Comment thread app/AndroidManifest.xml
@conroy-ricketts

Copy link
Copy Markdown
Contributor Author

@Jignesh-dimagi Thanks for the reminder, I added a screenshot of the link in the sidebar. I chose not to provide a screenshot of the Profile screen since it's a blank white screen for now. I'll also update both the JIRA tickets and this PR description to mention the local feature flag - the implementation drifted from the Claude plan during code review.

@conroy-ricketts conroy-ricketts merged commit e7b31c0 into master Jun 18, 2026
37 of 41 checks passed
@conroy-ricketts conroy-ricketts deleted the CCCT-2456-personalid-profile-screen-phase-one branch June 18, 2026 18:06
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.

4 participants