Skip to content

[25911] Add Waupaca rider categories and SMS consent disclaimer - #538

Merged
MichaelReyes merged 3 commits into
developfrom
feature/25911-rider-category-selection
Aug 20, 2026
Merged

[25911] Add Waupaca rider categories and SMS consent disclaimer#538
MichaelReyes merged 3 commits into
developfrom
feature/25911-rider-category-selection

Conversation

@MichaelReyes

Copy link
Copy Markdown
Contributor

Pull Request (PR) Checklist

Thank you for your contribution! Please confirm that you've checked all the boxes below before submitting your PR. Use [x] to check a box, e.g., [x], and make sure there's no space around the brackets.

PR Context

  • Type: Feature
  • Issue Link: Redmine Issue
  • Risk Factor: Medium — Updates account completion, profile editing, authenticated Home cards, client configuration decoding, and user appData persistence. The feature is disabled by default and enabled only for Waupaca.

Changes

  • Added server-driven rider-category selection and SMS consent disclaimer support to tripgosdk, guarded by TripGoConfigs.hasRiderCategorySelection().
  • Added Waupaca-only configuration, localized client text resolution, rider-category prompting, selection persistence, and safe merging of category fields into the complete existing appData.
  • Updated account screens with category display/editing, SMS disclaimer text, profile-image fallback, saved-phone preservation, and a loading indicator during submission.
  • Updated authenticated Home-card managers to remove hidden card rows and spacers after sign-out, preventing excessive spacing between Login and Favorites.
  • Added decoding, app-data, repository, ordering, prompting, and view-model test coverage.

Checklist for Reviewers

Documentation and Code Quality

  • KDocs Documentation: New public configuration behavior and relevant functionality are documented.
  • Architectural Patterns: Existing SDK repository, view-model, observable-list, and configuration patterns are followed.

Testing and Reliability

  • Unit Testing: Tests cover client decoding, locale fallback, app-data preservation, category ordering, prompting, and update behavior.
  • Emulator and Real Device Testing: Real-device Waupaca testing was performed; emulator validation remains optional for reviewers.

Error Handling and Logging

  • Error Handling: Failed account saves retain the screen state, dismiss the loader, display an error, and allow retry. Client refresh failures retain cached configuration.
  • Logging: Existing repository and application logging behavior is preserved for API and unexpected failures.

Testing Procedure

  • Sign in to Waupaca using a user without categories_prompted_at. Verify the account completion screen opens once and displays the configured rider categories and SMS disclaimer.
  • Save empty, single, and multiple category selections. Reopen the profile and verify selections persist in configured order and unrelated appData remains intact.
  • Verify English and Spanish server translations and confirm the disclaimer and category description are omitted when absent from the selected client configuration.
  • Open account editing for a user with an existing phone number. Verify the saved number is populated and a loader appears after selecting Done.
  • Sign out and return Home. Verify authenticated-only cards and their spacing are removed, leaving Login, Favorites, and Profile positioned normally.
  • Run:
    • ./gradlew :TripKitData:testDebugUnitTest
    • ./gradlew :tripgosdk:testDebugUnitTest
    • ./gradlew :app:compileWaupacaDebugKotlin

Work-in-Progress (WIP)

  • No known implementation work remains.
  • Ready for review and targeted Waupaca staging validation.

Remember to keep this template updated based on the feedback and evolving project standards.

…y selection flag

- updated WaupacaApplication to enable rider category selection
- updated Client models to decode rider categories, category descriptions, and SMS disclaimers
- added AccountClientConfig for localized server-driven account configuration
- updated UserData to preserve raw appData and expose rider category helpers
- updated UpdateUserRequest and UserApi to support complete appData updates
- updated UserAccountRepository to fetch, merge, and save rider category selections safely
- updated HomeViewModel and HomeFragment with guarded first-time category prompting
- added RiderCategoriesView for reusable editable and read-only category selection
- updated AccountActivity and AccountActivityViewModel to display saved categories and SMS disclaimers
- updated AccountEditActivity and AccountEditViewModel to edit, validate, and save rider categories
- updated account layouts with rider category sections and SMS disclaimer text
- updated account strings with localized rider category labels
- updated AppSelectionFragment and AppSelectionViewModel to refresh cached Waupaca client configuration
- updated CustomBinding to show profile placeholders for missing or failed image URLs
- updated account view models to use ic_profile_round as the profile placeholder
- added client configuration, appData merge, repository, prompting, and locale fallback tests
- updated DefaultServer to use a trailing slash for the beta API URL
- updated ServerTest to validate trailing slashes for all default server URLs
- updated app build configuration with Catch a Ride signing credentials and Leicester version changes
@github-actions

Copy link
Copy Markdown

✅ Unit tests passed successfully!

Test results are available under the "Artifacts" section of this run in GitHub Actions.

Please ensure the code is reviewed before proceeding with the merge.

@github-actions

Copy link
Copy Markdown

✅ Unit tests passed successfully!

Test results are available under the "Artifacts" section of this run in GitHub Actions.

Please ensure the code is reviewed before proceeding with the merge.

@MichaelReyes
MichaelReyes merged commit 738dcb3 into develop Aug 20, 2026
1 check passed
@MichaelReyes
MichaelReyes deleted the feature/25911-rider-category-selection branch August 20, 2026 14:45
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.

1 participant