Repository navigation
Conversation
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.
This pull request introduces the "Share Trip" and "SOS" emergency safety features for riders during active trips.
Created
SafetyActionsBar.tsx(mobile/src/components/SafetyActionsBar.tsx):**Built a responsive, dark-themed safety action bar containing the "Share Trip" and "SOS" buttons.
Integrated Share Trip functionality: calls the backend sharing endpoint and utilizes native OS sharing (
react-nativeShare API) on mobile or writes the tracking URL directly to the clipboard on web platforms.Integrated SOS functionality: triggers a confirmation modal warning the user, non-blockingly launches the emergency dialer (
tel:112), and concurrently logs the user's live GPS coordinates (lat,lng) to the server.Rider Screen Integration (
mobile/app/(rider)/ride/[id].tsx):Integrated the
SafetyActionsBarinto the active rider interface sheet.Configured conditional rendering to display the safety controls dynamically across active ride states (
driver_assigned,driver_arrived, andin_progress).Expanded API Interface (
mobile/src/lib/api.ts):Added
shareTrip(rideId)to fetch secure tracking URLs from the FastAPI backend.Added
triggerSOS(rideId, lat, lng)to transmit real-time emergency coordinates and record safety logs.Backend Database & Schemas (
backend/):Added Alembic migrations to support ride sharing and emergency SOS event logging in the database schema.
Implemented corresponding FastAPI endpoints (
/rides/{id}/shareand/rides/{id}/sos) to handle token generation and emergency telemetry.Passed all TypeScript type checks (
npx tsc --noEmit), linter evaluations (npx eslint), and Python test suites (python test_all.py --quick).Closes #19