Skip to content

[$250] [HybridApp] Improvement to HybridApp TTI / NewDot authentication page #49844

Closed

Description

@Julesssss

P/S authored by @staszekscp here

Problem

The TTI on HybridApp is longer than on a standalone NewDot application. In order to determine if a specific user should go to NewDot, HybridApp has to boot OldDot code first. The business logic for OldDot was written in JS in a framework called YAPL, and it runs on JSC.

Potentially also resolves:

Solution

Let’s replace JSC with Hermes! Hermes is known for its advantage over JSC in initial boot time, and it became a standard in the React Native world. Since YAPL is written in JS, theoretically should be able to do that, and get rid of JSC from the project. As bonus the app size would become smaller, too. 💪:skin-tone-2: 🚀

However, I’d like to emphasise that, since YAPL has been written in legacy JavaScript (mostly pre ES2015) there is a chance that the migration may become very time-consuming. Nevertheless I think it is worth to do at least a research, and see how far we can get, because it will speed up the both, OldDot, and HybridApp!

Mateusz' updated Solution

Adjust the current authentication flow on HybridApp to replace the OldDot sign-in page with the NewDot version.

  1. Currently, we perform authentication on the OldDot side and pass all necessary credentials to enable the New Experience and handle authentication/re-authentication. We could reverse this by using the NewDot sign-in page to generate all required credentials. These credentials could then be used to authenticate on the OldDot side. To trigger authentication on YAPL side, native methods can be used.
  2. We also need to decide at the start of sign-in whether the user should be redirected to OldDot or NewDot. The SignInUser command should return an additional field with nvp_tryNewDot, allowing us to determine based on the value of the dismissed key whether to stay on NewDot or transition to OldDot.
  3. Another important aspect from the user’s perspective is error handling. OldDot initialisation might fail, so we should be able to display errors on the SignIn page, just as we do when NewDot authentication fails. We can track OldDot initialisation through native events and store the current state in Onyx. Errors returned by OldDot’s API can then be passed via these events and displayed on the NewDot SignIn page
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021933575711850825609
  • Upwork Job ID: 1933575711850825609
  • Last Price Increase: 2025-06-13
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @sonialiap

Activity

  1. added
    ImprovementItem broken or needs improvement.
    InternalRequires API changes or must be handled by Expensify staff
    on Sep 27, 2024
  2. self-assigned this
    on Sep 27, 2024
  3. staszekscp commented on Sep 27, 2024

    @staszekscp
    Contributor

    Hey! With @WoLewicki we'll be working on this issue!

  4. changed the title [-]Improve HybridApp TTI[/-] [+][HybridApp] Improve HybridApp TTI[/+] on Sep 27, 2024
  5. changed the title [-][HybridApp] Improve HybridApp TTI[/-] [+][HybridApp] Investigate improvement of HybridApp TTI[/+] on Sep 27, 2024
  6. changed the title [-][HybridApp] Investigate improvement of HybridApp TTI[/-] [+][HybridApp] Investigate improvement to HybridApp TTI[/+] on Sep 27, 2024
  7. 241 remaining items

  8. Julesssss commented on Aug 19, 2025

    @Julesssss
    ContributorAuthor

    The feature PRs are testing well and I have asked QA to run through our test cases once before we merge the feature.

  9. Julesssss commented on Aug 20, 2025

    @Julesssss
    ContributorAuthor

    QA testing in progress.

  10. Julesssss commented on Aug 21, 2025

    @Julesssss
    ContributorAuthor

    QA results here 🎉

    Everything seems good to me. We have minor issues on specific platforms but nothing worth blocking over. One deep-link issue is unable to be verified on adhoc builds so we'll test on staging. Just running a final build with updated main before merging. -- I'll also verify notification registration on Android that Marcin highlighted here

  11. Julesssss commented on Aug 21, 2025

    @Julesssss
    ContributorAuthor

    We're just about to merge the feature branches. I'm just waiting for the current checklist to ship to give us a bit longer. We're also blocked by our 1pass rate limit... I should be merging tomorrow.

  12. Julesssss commented on Aug 22, 2025

    @Julesssss
    ContributorAuthor

    I ran a final test today and noticed two related issues on Android signin that will block the PRs a little bit longer. They shouldn't be too complex as we solved a similar issue previously.

    Will check in on Monday, but we're still very close to shipping the feature.

  13. danielrvidal commented on Aug 25, 2025

    @danielrvidal
    Contributor

    Awesome, looking forward to it!

  14. Julesssss commented on Aug 25, 2025

    @Julesssss
    ContributorAuthor

    The Sign-in feature tested great for me today with the new fixes 🎉

    I have merged the feature and it'll hit staging with the next App release (hopefully today/tomorrow). We'll keep on top of any new issues that are noticed with the full regression test suite.

  15. trjExpensify commented on Aug 26, 2025

    @trjExpensify
    Contributor

    🤞 🤞 let's go!!

  16. Julesssss commented on Aug 26, 2025

    @Julesssss
    ContributorAuthor

    Looking good so far. Here are the issues I have noticed:

  17. Julesssss commented on Aug 27, 2025

    @Julesssss
    ContributorAuthor

    Both deploy blockers have been fixed and Mateusz is making progress on the remaining low priority issue that won't block deployment to prod. QA have finished testing so we're looking good!

  18. Julesssss commented on Aug 28, 2025

    @Julesssss
    ContributorAuthor

    NewDot authentication feature is on production 🤩

    Due to the size of this we had quite a few signin related bugs held on this. After retesting a good amount of these are no longer reproducible and have been closed. Here is our current list of follow-up issues, half of which are completed with a few others in progress.

  19. Julesssss commented on Sep 3, 2025

    @Julesssss
    ContributorAuthor

    Closing this issue. The feature has been merged and released without new bugs being raised. We'll now focus on TTI imrpovements and some remaining bugs.

  20. trjExpensify commented on Oct 3, 2025

    @trjExpensify
    Contributor

    approved $250 for @DylanDylann.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DesignEngineeringExternalAdded to denote the issue can be worked on by a contributorImprovementItem broken or needs improvement.InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions