Skip to content

Comments

[Home Page] Upcoming travel section#82958

Open
adamgrzybowski wants to merge 11 commits intoExpensify:mainfrom
software-mansion-labs:@adamgrzybowski/home-add-travel-section
Open

[Home Page] Upcoming travel section#82958
adamgrzybowski wants to merge 11 commits intoExpensify:mainfrom
software-mansion-labs:@adamgrzybowski/home-add-travel-section

Conversation

@adamgrzybowski
Copy link
Contributor

Explanation of Change

Add a new "Upcoming Travel" widget section to the HomePage that displays travel reservations scheduled within the next 7 days. The section shows flights, trains, hotels, and car rentals with contextual information (destination city, relative time, type identifier) and navigates to trip details on tap.

Key changes:

  • UpcomingTravelSection – new widget that fetches trip rooms from Onyx, extracts reservations starting within 7 days, and renders them sorted by start date.
  • UpcomingTravelItem – renders each reservation with an icon, title (e.g. "Flight to Paris"), subtitle with relative time and identifier (e.g. "In 3 days · AA 1234"), and navigates to the trip detail route on press.
  • useUpcomingTravelReservations – hook that filters all trip room reports for upcoming reservations within a 7-day window.
  • TripReservationUtils fix – hotel and car reservations now use address.locality for cityName instead of chainName, so city names display correctly.
  • Translations – added English and Spanish strings for the upcoming travel section.
  • Styles – added homeWidgetIconContainer style and updated homePageRightColumn to include column gap.

Fixed Issues

$ #81529
PROPOSAL:

Tests

Offline tests

QA Steps

  1. Log in to an account with upcoming travel reservations within 7 days
  2. Navigate to the Home page
  3. Verify the "Upcoming travel" section appears with correct reservation details
  4. Tap a reservation and verify navigation to trip details
  5. Verify the section is hidden when there are no upcoming reservations
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-02-19.at.17.01.13.mov

@melvin-bot
Copy link

melvin-bot bot commented Feb 19, 2026

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

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 --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@melvin-bot melvin-bot bot requested review from ZhenjaHorbach and heyjennahay and removed request for a team and heyjennahay February 19, 2026 16:05
@melvin-bot
Copy link

melvin-bot bot commented Feb 19, 2026

@ZhenjaHorbach 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]

@melvin-bot melvin-bot bot removed the request for review from a team February 19, 2026 16:05
Copy link
Contributor

@grgia grgia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR

@grgia
Copy link
Contributor

grgia commented Feb 19, 2026

This is looking so cool from the vids!

@adamgrzybowski adamgrzybowski force-pushed the @adamgrzybowski/home-add-travel-section branch from 1c53ece to dc51b58 Compare February 19, 2026 16:16
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c53ececf8

ℹ️ 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".

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 87.39% <ø> (ø)
src/libs/TripReservationUtils.ts 78.92% <ø> (ø)
src/pages/home/HomePage.tsx 100.00% <100.00%> (ø)
...mingTravelSection/useUpcomingTravelReservations.ts 91.66% <91.66%> (ø)
src/styles/index.ts 46.87% <0.00%> (ø)
src/pages/home/UpcomingTravelSection/index.tsx 20.00% <20.00%> (ø)
.../home/UpcomingTravelSection/UpcomingTravelItem.tsx 0.00% <0.00%> (ø)
... and 27 files with indirect coverage changes

@shawnborton
Copy link
Contributor

Looking sweet!

Can we confirm what this little bullet is in the top eyebrow line?
CleanShot 2026-02-19 at 19 52 31@2x

It looks tiny... ideally it's just a standard unicode bullet. Maybe it is and it's not coming through well on the videos, but just checking!

@ZhenjaHorbach
Copy link
Contributor

Lint issues

@adamgrzybowski
Copy link
Contributor Author

@mountiny 🦜 🙏 🥺

@adamgrzybowski
Copy link
Contributor Author

I think we can ignore spellcheck for this one. It's about a string in tests. The string is the same as in already existing tests

@ZhenjaHorbach
Copy link
Contributor

I think we can ignore spellcheck for this one. It's about a string in tests. The string is the same as in already existing tests

Maybe we can change the string ?😅
I think it's okay for tests

@OSBotify
Copy link
Contributor

🦜 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 diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index b4f14030..3b454dff 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -983,6 +983,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: 'Anstehende To-dos werden hier angezeigt.',
             },
         },
+        upcomingTravel: 'Bevorstehende Reisen',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `Flug nach ${destination}`,
+            trainTo: ({destination}: {destination: string}) => `Zug nach ${destination}`,
+            hotelIn: ({destination}: {destination: string}) => `Hotel in ${destination}`,
+            carRentalIn: ({destination}: {destination: string}) => `Mietwagen in ${destination}`,
+            inOneWeek: 'In 1 Woche',
+            inDays: {one: 'In 1 Tag', other: (count: number) => `In ${count} Tagen`},
+            today: 'Heute',
+        },
     },
     allSettingsScreen: {
         subscription: 'Abonnement',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 809aa739..80cb549a 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -986,6 +986,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: 'Les tâches à venir apparaîtront ici.',
             },
         },
+        upcomingTravel: 'Voyages à venir',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `Vol vers ${destination}`,
+            trainTo: ({destination}: {destination: string}) => `Train pour ${destination}`,
+            hotelIn: ({destination}: {destination: string}) => `Hôtel à ${destination}`,
+            carRentalIn: ({destination}: {destination: string}) => `Location de voiture à ${destination}`,
+            inOneWeek: 'Dans 1 semaine',
+            inDays: {one: 'Dans 1 jour', other: (count: number) => `Dans ${count} jours`},
+            today: 'Aujourd’hui',
+        },
     },
     allSettingsScreen: {
         subscription: 'Abonnement',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index ebba8e0b..42644818 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -982,6 +982,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: 'Le prossime attività da fare verranno visualizzate qui.',
             },
         },
+        upcomingTravel: 'Prossimi viaggi',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `Volo per ${destination}`,
+            trainTo: ({destination}: {destination: string}) => `Treno per ${destination}`,
+            hotelIn: ({destination}: {destination: string}) => `Hotel a ${destination}`,
+            carRentalIn: ({destination}: {destination: string}) => `Noleggio auto a ${destination}`,
+            inOneWeek: 'Tra 1 settimana',
+            inDays: {one: 'Tra 1 giorno', other: (count: number) => `Tra ${count} giorni`},
+            today: 'Oggi',
+        },
     },
     allSettingsScreen: {
         subscription: 'Abbonamento',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index f9942a74..a9dcb23e 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -977,6 +977,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: '今後のTo-doはここに表示されます。',
             },
         },
+        upcomingTravel: '今後の出張',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `${destination} 行きのフライト`,
+            trainTo: ({destination}: {destination: string}) => `${destination} 行きの電車`,
+            hotelIn: ({destination}: {destination: string}) => `${destination}のホテル`,
+            carRentalIn: ({destination}: {destination: string}) => `${destination}でのレンタカー`,
+            inOneWeek: '1週間後',
+            inDays: {one: '1日後', other: (count: number) => `${count}日後`},
+            today: '今日',
+        },
     },
     allSettingsScreen: {
         subscription: 'サブスクリプション',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 95d7cd4f..5dcd7e82 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -981,6 +981,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: 'Aankomende taken verschijnen hier.',
             },
         },
+        upcomingTravel: 'Aankomende reizen',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `Vlucht naar ${destination}`,
+            trainTo: ({destination}: {destination: string}) => `Trein naar ${destination}`,
+            hotelIn: ({destination}: {destination: string}) => `Hotel in ${destination}`,
+            carRentalIn: ({destination}: {destination: string}) => `Autoverhuur in ${destination}`,
+            inOneWeek: 'Over 1 week',
+            inDays: {one: 'Over 1 dag', other: (count: number) => `Over ${count} dagen`},
+            today: 'Vandaag',
+        },
     },
     allSettingsScreen: {
         subscription: 'Abonnement',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 59a3b885..0fca0d12 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -982,6 +982,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: 'Nadchodzące zadania pojawią się tutaj.',
             },
         },
+        upcomingTravel: 'Nadchodząca podróż',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `Lot do ${destination}`,
+            trainTo: ({destination}: {destination: string}) => `Pociąg do ${destination}`,
+            hotelIn: ({destination}: {destination: string}) => `Hotel w ${destination}`,
+            carRentalIn: ({destination}: {destination: string}) => `Wynajem samochodu w ${destination}`,
+            inOneWeek: 'Za 1 tydzień',
+            inDays: {one: 'Za 1 dzień', other: (count: number) => `Za ${count} dni`},
+            today: 'Dzisiaj',
+        },
     },
     allSettingsScreen: {
         subscription: 'Subskrypcja',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index cb056498..70b26ffc 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -980,6 +980,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: 'Os próximos afazeres aparecerão aqui.',
             },
         },
+        upcomingTravel: 'Próximas viagens',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `Voo para ${destination}`,
+            trainTo: ({destination}: {destination: string}) => `Trem para ${destination}`,
+            hotelIn: ({destination}: {destination: string}) => `Hotel em ${destination}`,
+            carRentalIn: ({destination}: {destination: string}) => `Aluguel de carro em ${destination}`,
+            inOneWeek: 'Em 1 semana',
+            inDays: {one: 'Em 1 dia', other: (count: number) => `Em ${count} dias`},
+            today: 'Hoje',
+        },
     },
     allSettingsScreen: {
         subscription: 'Assinatura',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index de176b57..cd83a45b 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -964,6 +964,16 @@ const translations: TranslationDeepObject<typeof en> = {
                 upcomingTodos: '即将到来的待办事项会显示在这里。',
             },
         },
+        upcomingTravel: '即将出行',
+        upcomingTravelSection: {
+            flightTo: ({destination}: {destination: string}) => `飞往 ${destination} 的航班`,
+            trainTo: ({destination}: {destination: string}) => `前往 ${destination} 的火车`,
+            hotelIn: ({destination}: {destination: string}) => `${destination}的酒店`,
+            carRentalIn: ({destination}: {destination: string}) => `在 ${destination} 租车`,
+            inOneWeek: '1 周后',
+            inDays: {one: '1 天后', other: (count: number) => `在 ${count} 天后`},
+            today: '今天',
+        },
     },
     allSettingsScreen: {
         subscription: '订阅',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

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.

5 participants