Handle reconnection while there is an ongoing GPS trip#79558
Handle reconnection while there is an ongoing GPS trip#79558AndrewGable merged 14 commits intoExpensify:mainfrom
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
|
…gps/handle-reconnection
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 7e71f6db..0875f154 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1195,7 +1195,7 @@ const translations: TranslationDeepObject<typeof en> = {
other: 'Sind Sie sicher, dass Sie diese Ausgaben löschen möchten?',
}),
deleteReport: 'Bericht löschen',
- deleteReportConfirmation: 'Sind Sie sicher, dass Sie diesen Bericht löschen möchten?',
+ deleteReportConfirmation: 'Möchten Sie diesen Bericht wirklich löschen?',
settledExpensify: 'Bezahlt',
done: 'Fertig',
settledElsewhere: 'Anderswo bezahlt',
@@ -7989,12 +7989,12 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
subtitle: 'Protokolliere Meilen oder Kilometer automatisch mit GPS und verwandle Fahrten sofort in Ausgaben.',
button: 'App herunterladen',
},
- notification: {title: 'GPS-Tracking läuft', body: 'Wechsel zur App, um abzuschließen'},
+ notification: {title: 'GPS-Tracking läuft', body: 'Gehe zur App, um abzuschließen'},
continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
+ title: 'GPS-Aufzeichnung der Fahrt fortsetzen?',
+ prompt: 'Es sieht so aus, als ob die App während deiner letzten GPS-Fahrt geschlossen wurde. Möchtest du die Aufzeichnung dieser Fahrt fortsetzen?',
+ confirm: 'Reise fortsetzen',
+ cancel: 'Reise anzeigen',
},
},
};
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index b3ced316..246a590a 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1194,7 +1194,7 @@ const translations: TranslationDeepObject<typeof en> = {
other: 'Voulez-vous vraiment supprimer ces dépenses ?',
}),
deleteReport: 'Supprimer le rapport',
- deleteReportConfirmation: 'Voulez-vous vraiment supprimer ce rapport ?',
+ deleteReportConfirmation: 'Êtes-vous sûr de vouloir supprimer ce rapport ?',
settledExpensify: 'Payé',
done: 'Terminé',
settledElsewhere: 'Payé ailleurs',
@@ -7996,10 +7996,10 @@ Voici un *reçu test* pour vous montrer comment cela fonctionne :`,
},
notification: {title: 'Suivi GPS en cours', body: 'Allez dans l’application pour terminer'},
continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
+ title: 'Continuer l’enregistrement du trajet GPS ?',
+ prompt: 'Il semble que l’application se soit fermée pendant votre dernier trajet GPS. Souhaitez-vous continuer l’enregistrement à partir de ce trajet ?',
+ confirm: 'Continuer le voyage',
+ cancel: 'Afficher le voyage',
},
},
};
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 1bdec0d8..ecb0fd33 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1189,7 +1189,7 @@ const translations: TranslationDeepObject<typeof en> = {
one: 'Sei sicuro di voler eliminare questa spesa?',
other: 'Sei sicuro di voler eliminare queste spese?',
}),
- deleteReport: 'Elimina resoconto',
+ deleteReport: 'Elimina report',
deleteReportConfirmation: 'Sei sicuro di voler eliminare questo report?',
settledExpensify: 'Pagato',
done: 'Fatto',
@@ -7971,12 +7971,12 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
subtitle: 'Registra automaticamente miglia o chilometri con il GPS e trasforma i viaggi in spese all’istante.',
button: 'Scarica l’app',
},
- notification: {title: 'Tracciamento GPS in corso', body: "Vai all'app per completare"},
+ notification: {title: 'Monitoraggio GPS in corso', body: "Vai all'app per completare"},
continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
+ title: 'Continuare la registrazione del viaggio GPS?',
+ prompt: 'Sembra che l’app si sia chiusa durante il tuo ultimo viaggio GPS. Vuoi continuare a registrare da quel viaggio?',
+ confirm: 'Continua viaggio',
+ cancel: 'Visualizza viaggio',
},
},
};
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index d5e9dd3a..f66deaf2 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7892,10 +7892,10 @@ Expensify の使い方をお見せするための*テストレシート*がこ
desktop: {title: 'スマートフォンで距離を記録する', subtitle: 'GPS で自動的にマイルまたはキロメートルを記録し、移動をすぐに経費に変換します。', button: 'アプリをダウンロード'},
notification: {title: 'GPS追跡を実行中', body: '完了するにはアプリに移動'},
continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
+ title: 'GPS の走行記録を続けますか?',
+ prompt: '前回のGPS移動中にアプリが終了したようです。その移動の記録を続けますか?',
+ confirm: '出張を続ける',
+ cancel: '出張を表示',
},
},
};
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 4eda6818..9cc8579d 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1190,7 +1190,7 @@ const translations: TranslationDeepObject<typeof en> = {
other: 'Weet je zeker dat je deze uitgaven wilt verwijderen?',
}),
deleteReport: 'Rapport verwijderen',
- deleteReportConfirmation: 'Weet u zeker dat u dit rapport wilt verwijderen?',
+ deleteReportConfirmation: 'Weet je zeker dat je dit rapport wilt verwijderen?',
settledExpensify: 'Betaald',
done: 'Gereed',
settledElsewhere: 'Elders betaald',
@@ -7953,12 +7953,12 @@ Hier is een *testbon* om je te laten zien hoe het werkt:`,
},
preciseLocationRequiredModal: {title: 'Precieze locatie vereist', prompt: 'Schakel "precieze locatie" in de instellingen van je apparaat in om GPS-afstandsregistratie te starten.'},
desktop: {title: 'Volg afstand op je telefoon', subtitle: 'Leg kilometers of mijlen automatisch vast met GPS en zet ritten direct om in uitgaven.', button: 'Download de app'},
- notification: {title: 'GPS-tracking bezig', body: 'Ga naar de app om af te ronden'},
+ notification: {title: 'GPS-tracking bezig', body: 'Ga naar de app om te voltooien'},
continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
+ title: 'GPS-reisregistratie voortzetten?',
+ prompt: 'Het lijkt erop dat de app is afgesloten tijdens je laatste GPS-rit. Wil je de opname van die rit hervatten?',
+ confirm: 'Reis voortzetten',
+ cancel: 'Reis bekijken',
},
},
};
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index b49fa894..12bb40ed 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7935,12 +7935,12 @@ Oto *paragon testowy*, który pokazuje, jak to działa:`,
subtitle: 'Automatycznie rejestruj mile lub kilometry za pomocą GPS i natychmiast zamieniaj podróże w wydatki.',
button: 'Pobierz aplikację',
},
- notification: {title: 'Śledzenie GPS w toku', body: 'Przejdź do aplikacji, aby zakończyć'},
+ notification: {title: 'Trwa śledzenie GPS', body: 'Przejdź do aplikacji, aby dokończyć'},
continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
+ title: 'Kontynuować rejestrowanie trasy GPS?',
+ prompt: 'Wygląda na to, że aplikacja została zamknięta podczas Twojej ostatniej trasy GPS. Czy chcesz kontynuować rejestrowanie z tamtej trasy?',
+ confirm: 'Kontynuuj podróż',
+ cancel: 'Zobacz podróż',
},
},
};
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index c9b2b28d..15a8d033 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7947,12 +7947,12 @@ Aqui está um *recibo de teste* para mostrar como funciona:`,
subtitle: 'Registre milhas ou quilômetros automaticamente com o GPS e transforme viagens em despesas instantaneamente.',
button: 'Baixar o app',
},
- notification: {title: 'Rastreamento de GPS em andamento', body: 'Vá para o app para finalizar'},
+ notification: {title: 'Rastreamento por GPS em andamento', body: 'Vá para o app para finalizar'},
continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
+ title: 'Continuar gravação da viagem por GPS?',
+ prompt: 'Parece que o app foi fechado durante sua última viagem com GPS. Você gostaria de continuar a gravação dessa viagem?',
+ confirm: 'Continuar viagem',
+ cancel: 'Ver viagem',
},
},
};
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index ce017274..87bc3bf8 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1172,7 +1172,7 @@ const translations: TranslationDeepObject<typeof en> = {
other: '您确定要删除这些报销吗?',
}),
deleteReport: '删除报表',
- deleteReportConfirmation: '您确定要删除此报表吗?',
+ deleteReportConfirmation: '您确定要删除此报告吗?',
settledExpensify: '已支付',
done: '完成',
settledElsewhere: '在其他地方已支付',
@@ -7742,12 +7742,7 @@ ${reportName}
preciseLocationRequiredModal: {title: '需要精确位置', prompt: '请在设备设置中启用“精确位置”以开始 GPS 距离跟踪。'},
desktop: {title: '在手机上跟踪距离', subtitle: '使用 GPS 自动记录英里或公里,并将行程即时转换为报销费用。', button: '下载应用程序'},
notification: {title: '正在进行 GPS 跟踪', body: '前往应用完成'},
- continueGpsTripModal: {
- title: 'Continue GPS trip recording?',
- prompt: 'Looks like the app closed during your last GPS trip. Would you like to continue recording from that trip?',
- confirm: 'Continue trip',
- cancel: 'View trip',
- },
+ continueGpsTripModal: {title: '是否继续记录 GPS 行程?', prompt: '看起来在您上一次的 GPS 行程中应用已关闭。您想从那次行程继续记录吗?', confirm: '继续行程', cancel: '查看行程'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
…gps/handle-reconnection
…gps/handle-reconnection
…gps/handle-reconnection
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/components/GPSTripStateChecker/useUpdateGpsTripOnReconnect.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bfa9f6bd9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return; | ||
| } | ||
|
|
||
| const startAddress = await addressFromGpsPoint(gpsPoint); |
There was a problem hiding this comment.
| const startAddress = await addressFromGpsPoint(gpsPoint); | |
| const address = await addressFromGpsPoint(gpsPoint); |
| if (startAddress !== null) { | ||
| setAddress({value: startAddress, type: 'address'}); | ||
| } | ||
| }; |
There was a problem hiding this comment.
| if (startAddress !== null) { | |
| setAddress({value: startAddress, type: 'address'}); | |
| } | |
| }; | |
| if (address !== null) { | |
| setAddress({value: address, type: 'address'}); | |
| } | |
| }; |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-29.at.11.32.44.movAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-01-29.at.11.29.17.moviOS: mWeb SafariMacOS: Chrome / Safari |
|
Left some minor comments, the rest looks good |
|
@AndrewGable All yours! |
da50be2 to
5c8a4d2
Compare
|
🚧 @AndrewGable has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Explanation of Change
Reverse geocoding can't be run when the user has no internet access. Adding logic that updates start/end addresses using reverse geocoding when user gains internet access
Fixed Issues
$ #77227
PROPOSAL: N/A
Tests
Start)Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-01-28.at.12.11.45.mov
Screen.Recording.2026-01-28.at.12.12.26.mov
iOS: Native
Screen.Recording.2026-01-28.at.12.18.26.mov