feat(android): Android permission UX for camera, location, push (PR #101 rebased)#120
Open
ericmt-98 wants to merge 4 commits into
Open
feat(android): Android permission UX for camera, location, push (PR #101 rebased)#120ericmt-98 wants to merge 4 commits into
ericmt-98 wants to merge 4 commits into
Conversation
feat: Android permission UX for camera, location and push - usePermission hook: 3 hooks, 4 states each (prompt/granted/denied/permanently_denied) - PermissionGate component: rationale, denied, settings CTA, fallback slot - PushPermissionBanner: check-on-mount, inbox works without push - ExploreMap: rationale gate before OS dialog, zone fallback when denied - MerchantInbox: camera gate, manual paste fallback, appStateChange recovery - AndroidManifest: POST_NOTIFICATIONS + hardware features required=false - Wire capacitor-push-notifications into Android build)
main no compilaba: tres pantallas tenian artefactos de merges previos que rompian el parseo, y faltaban piezas de API que dejaron imports sin resolver. Tras estos arreglos `vite build` vuelve a generar el bundle. - Explore.tsx: revertir al estado sano previo a #113 (el parche metia un useEffect dentro del JSX, borraba la apertura <main> y duplicaba el footer). - ExploreMap.tsx (#102): reconstruir merchantToOffer (estaba fusionado con las ofertas demo hardcodeadas), restaurar el markup de la tarjeta secundaria y definir las 4 pantallas de estado que se usaban sin existir (LoadingSkeleton, LocationDenied, FetchError, EmptyState). - MerchantInbox.tsx (#108): reconstruir handleScan (perdio el useCallback y la derivacion del trade_id; usaba parseQRPayload), conectar el render de la maquina de estados scanView (estaba seteada pero nunca pintada), importar SupportLink y getMerchantTrades/merchantConfirmScan. - api.ts (#102): agregar getMerchantsAvailable + tipo AvailableMerchant que el hook useMerchantsAvailable importaba pero no existian en el cliente. - apiError.ts: agregar ApiError + toApiError (api.ts los usaba sin definir) y tipar request_id/support_code en el payload. Nota: `tsc` aun reporta ~31 errores de tipos en otras pantallas (MerchantSettings, TradeDetail, App.tsx, offline queue, errorMap.js) que vite no valida; quedan catalogados como remediacion pendiente. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…gate
Issues resolved in this commit against WAVE5_DRIPS.md:
Issue 4 (P0): /trade/:id route now mounted; HistoryRoute.onSelectTrade
navigates to /trade/${trade.id} instead of being a no-op.
Issue 7 (P1): MerchantSettings mounted at /merchant-settings; hidden from
BottomNav; accessible only to seller sessions.
Issue 13 (P2): Explore.tsx feature-gates CETES/Blend via showDefi prop
(false when backend reports demo+mock mode); replaces the broken useEffect
that #113 introduced inside JSX.
Issue 1 (P0): Login.tsx and Register.tsx rewritten with real flows:
- Login uses getAuthToken (challenge-response with device keypair).
- Register generates keypair then calls registerUser; no password fields
(auth is keypair-based, not password-based).
- Both styled on-brand, handling loading and error states in Spanish.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Integra PR #101 (xJeffx23:feat/android-permission-ux) sobre main actualizado. - useGeolocation.ts: version mejorada con manejo de denied/permanently-denied y solicitud explicita antes de usar Geolocation - useQRScanner.ts: permission gate para camara antes de intentar scan; mensaje de error si el usuario niega o el dispositivo no soporta camara - AndroidManifest.xml + capacitor.build.gradle: permisos declarados (CAMERA, ACCESS_FINE_LOCATION, RECEIVE_BOOT_COMPLETED) - Componentes PermissionGate.tsx y PushPermissionBanner.tsx: pantallas de racional para permisos de camara, ubicacion y push Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integración de PR #101 (xJeffx23:feat/android-permission-ux) sobre
mainactual.Resuelve conflictos en hooks y páginas preservando las fixes de buildability previas.
Issue 22 (P1): Android Permissions UX
useGeolocation.ts: solicitud explícita de permisos antes de usar; manejo de denied/permanently-denieduseQRScanner.ts: permission gate para cámara antes del scan; fallback si el usuario niegaAndroidManifest.xml: CAMERA, ACCESS_FINE_LOCATION, RECEIVE_BOOT_COMPLETED declaradosPermissionGate.tsx+PushPermissionBanner.tsx: componentes de racional para permisosSupersede PR #101.
Test plan
🤖 Generated with Claude Code