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

[$250] Task - Task name not updated in chat when it got changed offline #50209

Open
2 of 6 tasks
IuliiaHerets opened this issue Oct 4, 2024 · 21 comments
Open
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 4, 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: 9.0.44.8
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5042712
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Open any chat
  3. Click on "+" > Assign task
  4. Add the the task name and create a task
  5. Disable internet connection
  6. Change the task name to something else
  7. Return to the chat if needed

Expected Result:

The updated task name is displayed in the chat

Actual Result:

The old task name is still displayed in the chat

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6623583_1727981806919.Recording__836.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021842218862975991434
  • Upwork Job ID: 1842218862975991434
  • Last Price Increase: 2024-10-04
Issue OwnerCurrent Issue Owner: @ishpaul777
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

Triggered auto assignment to @flodnv (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Oct 4, 2024

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 4, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@mkzie2
Copy link
Contributor

mkzie2 commented Oct 4, 2024

Edited by proposal-police: This proposal was edited at 2024-10-04 09:12:30 UTC.

Proposal

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

The old task name is still displayed in the chat when updating task name offline

What is the root cause of that problem?

There have been an unsynchronization issue between Onyx data subscribed in component via useOnyx and the data in utils file:

const taskTitle = Str.htmlEncode(TaskUtils.getTaskTitle(taskReportID, action?.childReportName ?? ''));

const taskReport = ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${taskReportID}`] ?? {};

Causing the utils file data to be stale (not updated).

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

There have been many issues like #49551 to remove usages of using Onyx.connect in utils files, we should pass Onyx data directly from component instead and let these utils file only handle its utility.

So in this case, update getTaskTitle to receive taskReport directly instead of taskReportID and pass it from TaskPreview.

There are 2 usages of getTaskTitle, we need to update them accordingly.

What alternative solutions did you explore (Optional)?

We can update the task's parent report action's childReportName optimistically when editing task title:

function editTask(report: OnyxTypes.Report, {title, description}: OnyxTypes.Task) {

because it's used as a fallback task title:

const taskTitle = Str.htmlEncode(TaskUtils.getTaskTitle(taskReportID, action?.childReportName ?? ''));

@mkzie2
Copy link
Contributor

mkzie2 commented Oct 4, 2024

Update proposal

  • Add alternative solution

@flodnv flodnv added the External Added to denote the issue can be worked on by a contributor label Oct 4, 2024
@melvin-bot melvin-bot bot changed the title Task - Task name not updated in chat when it got changed offline [$250] Task - Task name not updated in chat when it got changed offline Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

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

melvin-bot bot commented Oct 4, 2024

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

@flodnv
Copy link
Contributor

flodnv commented Oct 4, 2024

@mkzie2 any idea which PR caused this regression?

@ishpaul777 what are your thoughts on the proposal?

@ishpaul777
Copy link
Contributor

looking 👀

@ishpaul777
Copy link
Contributor

ishpaul777 commented Oct 4, 2024

@mkzie2's Proposal makes sense and seems to be working, but we should know the offending PR before moving forward with a fix and assigning a contributor

@mkzie2
Copy link
Contributor

mkzie2 commented Oct 4, 2024

I tried reverting PR #49686, specifically this change and it fixed the issue though I haven't understood why.

@ishpaul777
Copy link
Contributor

reverting here to confirm if its the offending PR

@ishpaul777
Copy link
Contributor

Confirmed that reverting it fixes the issue

Screen.Recording.2024-10-04.at.10.14.47.PM.mov

@ishpaul777
Copy link
Contributor

ishpaul777 commented Oct 4, 2024

Since we can't understand why the PR causes the issue, instead of rushing a fix i think we should revert to unblock the deploy and let orignal author take care of this in a second try. Any thoughts @flodnv @jasperhuangg ??


The given solution works in my testing and i dont think there will be any side effects, its just that proposal does not provide enough Root cause Analysis

@jasperhuangg
Copy link
Contributor

@ishpaul777 I'm happy with that, thanks a lot for investigating the revert.

@jasperhuangg jasperhuangg added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 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 Oct 4, 2024
@isagoico
Copy link

isagoico commented Oct 4, 2024

Unable to reproduce this issue on build v9.0.44-10. Task name got updated while offline and the changes were still displayed after going back online.
image

@jasperhuangg jasperhuangg removed the DeployBlockerCash This issue or pull request should block deployment label Oct 4, 2024
@jasperhuangg
Copy link
Contributor

@dylanexpensify @ishpaul777 is owed $250 for this issue, no other payments required

@rayane-djouah
Copy link
Contributor

RCA: #49086 (comment)

@dylanexpensify
Copy link
Contributor

dylanexpensify commented Oct 7, 2024

Payment summary:

Contributor+: @ishpaul777 $250 via Upwork

Please apply/request!

@dylanexpensify
Copy link
Contributor

@ishpaul777 apply here! 🙇‍♂️

@ishpaul777
Copy link
Contributor

@dylanexpensify Please send in invite 🙇

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. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants