Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$500] Chat – Timestamp on the message changes based on the new timezone after page reload. #36891

Closed
3 of 6 tasks
kbecciv opened this issue Feb 20, 2024 · 21 comments
Closed
3 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented Feb 20, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v1.4.43-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4331719
Reporter: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Login as user A and user B in two tabs or devises.
  3. As user B navigate to the conversation with user A.
  4. As user A go to open Settings => Profile => Timezone, change the timezone.
  5. As user B check the timestamp on the message.

Expected Result:

The timestamp on the message changes based on the new timezone.

Actual Result:

Time zone is not updated immediately. The timestamp on the message changes based on the new timezone after page reload.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6385605_1708428414479.Time_zone.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e78c9699bfb3c641
  • Upwork Job ID: 1760731808368078848
  • Last Price Increase: 2024-02-29
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

Triggered auto assignment to @isabelastisser (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@kbecciv
Copy link
Author

kbecciv commented Feb 20, 2024

@isabelastisser
I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@kbecciv
Copy link
Author

kbecciv commented Feb 20, 2024

We think that this bug might be related to #vip-vsb
CC @quinthar

@isabelastisser
Copy link
Contributor

@CortneyOfstad should I add the internal label here?

@CortneyOfstad
Copy link
Contributor

Hi @isabelastisser! Mine is set to external so I believe this one can be too, as I don't see this impacting the BE. Only issue we're experiencing now is that our issue is not reproducible at this stage. Will keep you posted!

@isabelastisser isabelastisser added the External Added to denote the issue can be worked on by a contributor label Feb 22, 2024
@melvin-bot melvin-bot bot changed the title Chat – Timestamp on the message changes based on the new timezone after page reload. [$500] Chat – Timestamp on the message changes based on the new timezone after page reload. Feb 22, 2024
Copy link

melvin-bot bot commented Feb 22, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01e78c9699bfb3c641

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 22, 2024
Copy link

melvin-bot bot commented Feb 22, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External)

@isabelastisser
Copy link
Contributor

Thanks @CortneyOfstad !

@Tony-MK
Copy link
Contributor

Tony-MK commented Feb 23, 2024

This issue may require the pusher to be inspected for a better user experience since the local time in the ProfilePage is also not updated automatically.

However, right after the message is sent in the dev environment, the GetMissingOnyxMessages endpoint is called to synchronize the receiver's updated timezone.

@melvin-bot melvin-bot bot added the Overdue label Feb 26, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Feb 26, 2024

Not overdue.

@melvin-bot melvin-bot bot removed the Overdue label Feb 26, 2024
Copy link

melvin-bot bot commented Feb 26, 2024

@Ollyws, @isabelastisser Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@isabelastisser
Copy link
Contributor

Not overdue. Waiting for updates.

@webbdays
Copy link

webbdays commented Feb 27, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

There is a Timestamp inconsistency for messages posted in chat. Latest timezone is not being used for timestamps.

What is the root cause of that problem?

Was able to reproduce the issue myself.
The problem occur when we change the timezone in two different apps/platfroms. oldDot, newDot. Sync is done only when reload. In oldDot there is no updates to onyx/ no onyx. Currently in NewDot, components use timezone data from local onyx IndexedDB on browser. So, when timezone is updated via oldDot app, onyx is not updated and hence only possible way to reflect on newdot is to ask backend. However, if two newdot tabs are opened in same browser which uses same onyx DB, so able to sync timezone updates.

What changes do you think we should make in order to solve the problem?

Solution 1:
Just show Time Zone string near the timestamp. Then no issue with differentiating message posted times. Issue resolves. And when reload, sync happens then all the messages in chat will show timestamp according to timezone which is configured via profile settings.

What alternative solutions did you explore?

Solution 2:
Poll for timezone updated from backend every 1sec or 2sec. ( may not be efficient)
some kind of webhook?

Solution 3:
As it is the user doing it, user itself need to use the most up to date. whenever different apps or platforms are used for changing data or settings, User need to aware that a refresh is need to see the app latest.

Solution 4:
If online, we post new message to backend and retrive proper timestamp and timezone (updated based on latest timezone in backend) and then show timestamp to the user. Reload the components using the timezone.
When offline/(online but we wait until we get reply from backend) - we show timestamp with a tag "(stale)" beside it.
To inform the user about it meanwhile.

Copy link

melvin-bot bot commented Feb 27, 2024

📣 @webbdays! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot melvin-bot bot added the Overdue label Feb 29, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Feb 29, 2024

This one seems to be a backend issue.

@melvin-bot melvin-bot bot removed the Overdue label Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Mar 4, 2024
Copy link

melvin-bot bot commented Mar 4, 2024

@Ollyws, @isabelastisser Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@isabelastisser isabelastisser added Engineering Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Mar 4, 2024
Copy link

melvin-bot bot commented Mar 4, 2024

Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext.

Copy link

melvin-bot bot commented Mar 4, 2024

Current assignee @Ollyws is eligible for the Internal assigner, not assigning anyone new.

@isabelastisser
Copy link
Contributor

@isabelastisser
Copy link
Contributor

Not a priority. Added to this issue for tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

6 participants