Conversation
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR expands BCSC-specific error handling and user safety flows by adding third‑party keyboard detection (Android), introducing “account updated” informative alerts driven by token metadata changes, and refining login rejection error handling.
Changes:
- Added native module APIs + app hook to detect third‑party keyboards and optionally open the keyboard picker on Android.
- Added credential-metadata comparison + a startup system check to display “Account Updated” alerts when BCSC token metadata changes.
- Updated error-handling APIs/policies (e.g.,
emitErrorModalrename, login-rejection policies) and token clearing behavior.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/bcsc-core/src/index.ts | Exposes new keyboard-related native calls from the bcsc-core JS entrypoint. |
| packages/bcsc-core/src/NativeBcscCore.ts | Extends TurboModule spec with keyboard detection/selector APIs. |
| packages/bcsc-core/ios/BcscCore.swift | Adds iOS stubs for keyboard detection/selector behavior. |
| packages/bcsc-core/android/src/oldarch/BcscCoreSpec.kt | Extends old-arch Android native spec with keyboard APIs. |
| packages/bcsc-core/android/src/main/java/com/bcsccore/BcscCoreModule.kt | Implements Android keyboard detection and input-method picker opening. |
| app/src/store.tsx | Adds persisted state for keyboard warning dismissal and account-update metadata/alert reasoning. |
| app/src/services/system-checks/InformativeBCSCAlertsSystemCheck.ts | New system check to show “Account Updated” alert based on stored alert reasoning. |
| app/src/services/system-checks/InformativeBCSCAlertSystemCheck.test.ts | Unit tests for the new “Account Updated” system check behavior. |
| app/src/screens/Splash.tsx | Removes unused error-alert usage from splash initialization dependencies. |
| app/src/screens/ErrorAlertTest.tsx | Updates test screen to use renamed emitErrorModal API. |
| app/src/localization/pt-br/index.ts | Adds new localized strings for additional-card invalidation and new alerts. |
| app/src/localization/fr/index.ts | Adds new localized strings for additional-card invalidation and new alerts. |
| app/src/localization/en/index.ts | Adds new localized strings for additional-card invalidation and new alerts. |
| app/src/contexts/ErrorAlertContext.tsx | Renames emitError to emitErrorModal for clarity and updates provider value. |
| app/src/contexts/ErrorAlertContext.test.tsx | Updates tests for the renamed error emission API. |
| app/src/bcwallet-theme/features/person-flow/screens/PersonCredentialLoading.tsx | Updates app-to-app flow to use emitErrorModal. |
| app/src/bcsc-theme/navigators/RootStack.tsx | Updates state-load error handling to use emitErrorModal. |
| app/src/bcsc-theme/hooks/useCreateSystemChecks.tsx | Adds the new informative “Account Updated” system check and wires alert emitter. |
| app/src/bcsc-theme/hooks/useCreateSystemChecks.test.tsx | Updates system-check list expectations and adds additional device-info mocks. |
| app/src/bcsc-theme/features/verify/email/EnterEmailScreen.tsx | Triggers third-party keyboard warning on mount. |
| app/src/bcsc-theme/features/verify/email/EnterEmailScreen.test.tsx | Wraps screen in ErrorAlertProvider for new warning hook dependencies. |
| app/src/bcsc-theme/features/verify/ManualSerialScreen.tsx | Triggers third-party keyboard warning on mount. |
| app/src/bcsc-theme/features/verify/ManualSerialScreen.test.tsx | Wraps screen in ErrorAlertProvider for new warning hook dependencies. |
| app/src/bcsc-theme/features/pairing/ManualPairing.tsx | Triggers third-party keyboard warning on mount. |
| app/src/bcsc-theme/features/onboarding/CreatePINScreen.tsx | Triggers third-party keyboard warning on mount. |
| app/src/bcsc-theme/features/onboarding/CreatePINScreen.test.tsx | Wraps screen in ErrorAlertProvider for new warning hook dependencies. |
| app/src/bcsc-theme/features/modal/DeviceInvalidated.tsx | Adds destructive invalidation reason handling for additional-card scenario. |
| app/src/bcsc-theme/contexts/BCSCIdTokenContext.tsx | Derives/stores credential metadata from token and emits alert reasoning on change. |
| app/src/bcsc-theme/api/hooks/usethirdPartyKeyboardWarning.tsx | Implements third-party keyboard warning hook using the new native APIs. |
| app/src/bcsc-theme/api/hooks/useThirdPartyKeyboardWarning.test.ts | Adds a test file (currently not testing the intended hook). |
| app/src/bcsc-theme/api/hooks/useFactoryReset.tsx | Switches from direct token mutation to client.clearTokens(). |
| app/src/bcsc-theme/api/hooks/useFactoryReset.test.ts | Updates tests to reflect clearTokens() behavior. |
| app/src/bcsc-theme/api/clientErrorPolicies.ts | Adds login-rejection error policies for client metadata and device authorization failures. |
| app/src/bcsc-theme/api/client.ts | Adds clearTokens() helper to reset token state consistently. |
| app/package.json | Renames setup scripts to setup:ios / setup:android and updates setup. |
app/src/services/system-checks/InformativeBCSCAlertsSystemCheck.ts
Outdated
Show resolved
Hide resolved
packages/bcsc-core/android/src/main/java/com/bcsccore/BcscCoreModule.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Al Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
…t-mobile into feat/errors-21-30
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
|
Pulling and testing locally 👍🏼 |
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
|
In progress testing: Note: From my testing so far, alerts 21 - 23 are rendering the incorrect content (title, description) but the actions and the onPress events are correct. Alerts: |
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
…stacks Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
|


Summary of Changes
Testing Instructions
Keyboard check:
** This alert should only appear once for the user
Testing Account updated:
Testing Account removals
Testing additional cards
Acceptance Criteria
Replace this text with the acceptance criteria that must be met for this PR to be approved.
Screenshots, videos, or gifs
Replace this text with embedded media for UI changes if they are included in this PR. If there are none, simply enter N/A
Related Issues
Replace this text with tagged issue #'s that are relevant to this PR. If there are none, simply enter N/A