Skip to content

ADFA-2685: Delete 2nd onboarding slide, move privacy disclosure to slide 3#1331

Merged
hal-eisen-adfa merged 3 commits into
stagefrom
ADFA-2685-Delete-the-2nd-onboarding-page
May 22, 2026
Merged

ADFA-2685: Delete 2nd onboarding slide, move privacy disclosure to slide 3#1331
hal-eisen-adfa merged 3 commits into
stagefrom
ADFA-2685-Delete-the-2nd-onboarding-page

Conversation

@hal-eisen-adfa
Copy link
Copy Markdown
Collaborator

Streamlines onboarding from three slides to two by dropping the informational "Next page: permissions" slide. The Privacy & analytics disclosure dialog — previously triggered on slide 2's onSlideSelected — now fires on the Permissions slide via the same listener hook, preserving the once-per-install preference key so existing users aren't re-prompted.

Removes the now-unused fragment, layout, adapter, model, test helper, and the five permissions_info_* strings (en + id).

…ide 3

Streamlines onboarding from three slides to two by dropping the informational
"Next page: permissions" slide. The Privacy & analytics disclosure dialog —
previously triggered on slide 2's onSlideSelected — now fires on the
Permissions slide via the same listener hook, preserving the once-per-install
preference key so existing users aren't re-prompted.

Removes the now-unused fragment, layout, adapter, model, test helper, and
the five permissions_info_* strings (en + id).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 02b50f69-df15-4c51-b2fd-fe9443fdc539

📥 Commits

Reviewing files that changed from the base of the PR and between 873606b and 3215b1c.

📒 Files selected for processing (2)
  • app/src/androidTest/kotlin/com/itsaky/androidide/EndToEndTest.kt
  • app/src/androidTest/kotlin/com/itsaky/androidide/screens/PermissionsInfoScreen.kt
💤 Files with no reviewable changes (1)
  • app/src/androidTest/kotlin/com/itsaky/androidide/screens/PermissionsInfoScreen.kt

📝 Walkthrough
  • Reduced onboarding from 3 slides to 2 by removing the intermediate "Next page: permissions" informational slide.
  • Moved the Privacy & analytics disclosure so it is now shown from the Permissions slide via SlideSelectionListener (PermissionsFragment.onSlideSelected).
  • Preserved the once-per-install preference key (KEY_PRIVACY_DISCLOSURE_SHOWN) so already-installed users are not re-prompted.
  • Removed UI, model, adapter, and test artifacts associated with the deleted slide:
    • PermissionsInfoFragment and layout (fragment_permissions_info.xml)
    • layout_permission_info_item.xml
    • PermissionInfoAdapter
    • PermissionInfoItem model
    • Test helper OnboardingPermissionsInfoHelper.kt
    • Kaspresso screen PermissionsInfoScreen.kt
  • Removed permissions_info_* string resources from English and Indonesian:
    • permissions_info_intro
    • permissions_info_notifications
    • permissions_info_storage
    • permissions_info_install
    • permissions_info_overlay_accessibility
  • Updated tests (EndToEndTest and navigation scenarios) to assert the privacy dialog on the Permissions slide and to skip the deleted slide.

Risks & best-practice considerations:

  • Dialog timing/UX: presenting the privacy disclosure on the Permissions slide (instead of a dedicated slide) changes the user flow; validate on-device UX to ensure it remains clear and not disruptive.
  • Single responsibility / cohesion: moving privacy dialog logic into PermissionsFragment increases that fragment’s responsibilities; consider refactoring if logic grows further.
  • Error reporting side effects: PermissionsFragment launches an ACTION_VIEW intent and reports exceptions to Sentry—ensure this behavior is appropriate in the slide selection callback and that caught exceptions are actionable.
  • Test coverage: E2E and UI tests were updated, but confirm tests cover both dialog acceptance and “learn more” (external URL) paths and persistence of the shown flag.

Walkthrough

The PR removes the dedicated permissions-info onboarding slide and consolidates its privacy disclosure functionality into the permissions slide. PermissionsFragment now displays the privacy dialog on first selection, with options to accept or view the privacy policy. Onboarding activities, test scenarios, and string resources are updated accordingly to skip the removed slide.

Changes

Permissions onboarding consolidation

Layer / File(s) Summary
Migrate privacy disclosure to Permissions slide
app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt
PermissionsFragment implements SlideSelectionListener and shows a non-cancelable privacy disclosure dialog on first selection. Choosing "accept" dismisses the dialog; "learn more" opens the privacy policy URL via Intent. Both actions set a persisted flag to prevent repeated displays. Imports updated for URI conversion, dialog building, preference management, and Sentry error reporting.
Remove PermissionsInfo from onboarding activity
app/src/main/java/com/itsaky/androidide/activities/OnboardingActivity.kt
PermissionsInfoFragment import removed and slide instantiation deleted from the onboarding sequence, so the flow proceeds directly from greeting to subsequent setup checks.
Update tests and scenarios for removed slide
app/src/androidTest/kotlin/com/itsaky/androidide/scenarios/NavigateToMainScreenScenario.kt, app/src/androidTest/kotlin/com/itsaky/androidide/EndToEndTest.kt
Test helper import for passPermissionsInfoSlideWithPrivacyDialog removed; NavigateToMainScreenScenario no longer advances via a NEXT button past the removed slide. End-to-end tests assert the privacy dialog does not reappear after acceptance and then proceed directly to permission checks and granting.
Remove permissions-info string resources
resources/src/main/res/values/strings.xml, resources/src/main/res/values-in-rID/strings.xml
Permissions-info intro and permission item descriptions (permissions_info_intro, permissions_info_notifications, permissions_info_storage, permissions_info_install, permissions_info_overlay_accessibility) removed from both default and Indonesian resource files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • itsaky-adfa
  • jomen-adfa

"🐰
A permissions page, no longer shown,
Now whispers its secrets in Permissions alone,
The privacy dialog hops forward with grace,
One simpler slide keeps onboarding in place,
Hooray — fewer hops, more carrot cake!"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing the 2nd onboarding slide and moving the privacy disclosure dialog to the 3rd (now 2nd) slide, which is the primary objective of the changeset.
Description check ✅ Passed The description clearly relates to the changeset, explaining the streamlined onboarding flow, the privacy disclosure relocation, and removed components, which aligns with all the file changes summarized.
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.

✏️ 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 ADFA-2685-Delete-the-2nd-onboarding-page

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt (1)

398-405: ⚡ Quick win

Narrow exception handling in openPrivacyPolicy().

Line 403 catches Exception, which can hide unrelated runtime failures. Catch the specific launch failure (ActivityNotFoundException) and keep other exceptions visible.

Proposed patch
+import android.content.ActivityNotFoundException
 import android.content.Context
 import android.content.Intent
@@
 	private fun openPrivacyPolicy() {
-		try {
-			val privacyPolicyUrl = getString(R.string.privacy_policy_url)
-			val intent = Intent(Intent.ACTION_VIEW, privacyPolicyUrl.toUri())
-			startActivity(intent)
-		} catch (e: Exception) {
-			Sentry.captureException(e)
-		}
+		val privacyPolicyUrl = getString(R.string.privacy_policy_url)
+		val intent = Intent(Intent.ACTION_VIEW, privacyPolicyUrl.toUri())
+		try {
+			startActivity(intent)
+		} catch (e: ActivityNotFoundException) {
+			Sentry.captureException(e)
+		}
 	}

Based on learnings: In Kotlin files, prefer narrow exception handling that catches only the specific exception type reported in crashes (such as IllegalArgumentException) instead of a broad catch-all (e.g., catch (e: Exception)).

🤖 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/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt`
around lines 398 - 405, In openPrivacyPolicy(), narrow the broad catch block so
you only handle the launch-specific failure: replace catch (e: Exception) with
catch (e: ActivityNotFoundException) (import it), call
Sentry.captureException(e) there, and let any other exceptions (e.g.,
IllegalArgumentException from toUri() or other runtime errors) propagate so they
aren't accidentally swallowed; locate the code around privacyPolicyUrl,
Intent(Intent.ACTION_VIEW, privacyPolicyUrl.toUri()), and startActivity(intent)
to make the change.
🤖 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/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt`:
- Around line 398-405: In openPrivacyPolicy(), narrow the broad catch block so
you only handle the launch-specific failure: replace catch (e: Exception) with
catch (e: ActivityNotFoundException) (import it), call
Sentry.captureException(e) there, and let any other exceptions (e.g.,
IllegalArgumentException from toUri() or other runtime errors) propagate so they
aren't accidentally swallowed; locate the code around privacyPolicyUrl,
Intent(Intent.ACTION_VIEW, privacyPolicyUrl.toUri()), and startActivity(intent)
to make the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 529b68ef-bef0-44ca-bf05-7f4dcb69423e

📥 Commits

Reviewing files that changed from the base of the PR and between a479086 and 873606b.

📒 Files selected for processing (11)
  • app/src/androidTest/kotlin/com/itsaky/androidide/helper/OnboardingPermissionsInfoHelper.kt
  • app/src/androidTest/kotlin/com/itsaky/androidide/scenarios/NavigateToMainScreenScenario.kt
  • app/src/main/java/com/itsaky/androidide/activities/OnboardingActivity.kt
  • app/src/main/java/com/itsaky/androidide/adapters/onboarding/PermissionInfoAdapter.kt
  • app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsInfoFragment.kt
  • app/src/main/java/com/itsaky/androidide/models/PermissionInfoItem.kt
  • app/src/main/res/layout/fragment_permissions_info.xml
  • app/src/main/res/layout/layout_permission_info_item.xml
  • resources/src/main/res/values-in-rID/strings.xml
  • resources/src/main/res/values/strings.xml
💤 Files with no reviewable changes (10)
  • app/src/main/res/layout/fragment_permissions_info.xml
  • app/src/main/res/layout/layout_permission_info_item.xml
  • app/src/main/java/com/itsaky/androidide/activities/OnboardingActivity.kt
  • resources/src/main/res/values/strings.xml
  • app/src/main/java/com/itsaky/androidide/models/PermissionInfoItem.kt
  • resources/src/main/res/values-in-rID/strings.xml
  • app/src/androidTest/kotlin/com/itsaky/androidide/helper/OnboardingPermissionsInfoHelper.kt
  • app/src/main/java/com/itsaky/androidide/adapters/onboarding/PermissionInfoAdapter.kt
  • app/src/androidTest/kotlin/com/itsaky/androidide/scenarios/NavigateToMainScreenScenario.kt
  • app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsInfoFragment.kt

EndToEndTest had three steps hardcoded to the deleted permissions-info slide
that would have asserted against missing R.id.intro_text / R.id.permissions_list
or thrown looking for a NEXT button on the (now chrome-hidden) Permissions
slide. The privacy dialog assertions now run directly against the Permissions
slide after advancePastWelcomeScreen(). The orphan PermissionsInfoScreen
Kaspresso object is also removed.
@hal-eisen-adfa hal-eisen-adfa merged commit 7d87f50 into stage May 22, 2026
2 checks passed
@hal-eisen-adfa hal-eisen-adfa deleted the ADFA-2685-Delete-the-2nd-onboarding-page branch May 22, 2026 23:21
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.

2 participants