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] Room-A "workspace" visibility room is created via whisper from a "public" visibility room #49544

Closed
3 of 6 tasks
IuliiaHerets opened this issue Sep 20, 2024 · 36 comments
Closed
3 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 20, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v9.0.39-0
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Tap fab -- start chat
  3. Create a public visibility room
  4. Create 2 room via whisper by sending message - eg : #35 #799
  5. From the whisper message, tap yes
  6. Note room created is highlighted
  7. Now tap on room header -- settings -- visibility
  8. Note room is a "public" visibility room
  9. Now tap on any room highlighted ( created via whisper)
  10. Now tap on room header -- settings -- visibility
  11. Note room created is a workspace visibility room

Expected Result:

A "public" visibility room must be created via whisper from a "public" visibility room.

Actual Result:

A "workspace" visibility room is created via whisper from a "public" visibility room.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6609907_1726835399664.screenrecorder-2024-09-20-16-47-00-591_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021837194850505873695
  • Upwork Job ID: 1837194850505873695
  • Last Price Increase: 2024-09-20
  • Automatic offers:
    • DylanDylann | Reviewer | 104139929
    • nkdengineer | Contributor | 104139931
Issue OwnerCurrent Issue Owner: @Christinadobrzyn
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

Triggered auto assignment to @Christinadobrzyn (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.

@IuliiaHerets
Copy link
Author

@Christinadobrzyn FYI 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

@Christinadobrzyn
Copy link
Contributor

I can reproduce this with the steps in the OP. I think this can be external - let's start there and see what we think!

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Sep 20, 2024
@melvin-bot melvin-bot bot changed the title Room-A "workspace" visibility room is created via whisper from a "public" visibility room [$250] Room-A "workspace" visibility room is created via whisper from a "public" visibility room Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

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

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

melvin-bot bot commented Sep 20, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

A "workspace" visibility room is created via whisper from a "public" visibility room.

What is the root cause of that problem?

When we click on Yes, BE will create a room with visibility as restricted

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

In this function, if resolution is created, we should create an optimistic room with visibility as the visibility of the current report and a created action for this room in optimistic data (Also reset it in failure data).

App/src/libs/actions/Report.ts

Lines 3883 to 3887 in 513e6b3

function resolveActionableReportMentionWhisper(
reportId: string,
reportAction: OnyxEntry<ReportAction>,
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_REPORT_MENTION_WHISPER_RESOLUTION>,
) {

Then we can pass the reportID and visibility of the new room as a param of ResolveActionableReportMentionWhisper API. BE will use this reportID and visibility to create a new room.

What alternative solutions did you explore? (Optional)

If we don't want to create an optimistic room, we can pass visibility param to ResolveActionableReportMentionWhisper API then BE can use this to create the room with the correct visibility.

Copy link

melvin-bot bot commented Sep 23, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2024
@Christinadobrzyn
Copy link
Contributor

@DylanDylann, can you check out the proposal? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Sep 23, 2024
@DylanDylann
Copy link
Contributor

I like @nkdengineer's idea to create the optimistic room data. With this approach, we have the ability to create a new room offline but still need to modify the visibility field on the BE side.

On the other hand, If we don't want to support this action offline, we can handle this issue on the BE totally by modifying the visibility field

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 24, 2024

Triggered auto assignment to @justinpersaud, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@Christinadobrzyn
Copy link
Contributor

Heads up - I'm going to be ooo till 9/30. I'm not going to assign a BZ buddy to this since we're reviewing proposals. If you need someone in the meantime, feel free to reach out to the Bug team for a volunteer. thanks!

@justinpersaud
Copy link
Contributor

I think it's fine to support offline, proposal sounds good to me

@DylanDylann
Copy link
Contributor

@justinpersaud Could you give the final assignment to @nkdengineer ? Then we can start on PR

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Sep 26, 2024

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@justinpersaud
Copy link
Contributor

Assigned

@nkdengineer
Copy link
Contributor

@justinpersaud We need to introduce a new param to send the list ID of new rooms when we create this via whisper action then BE can use this list ID to create new rooms on the backend side.

@justinpersaud
Copy link
Contributor

@nkdengineer do you have a suggested name for this new param you're proposing?

@nkdengineer
Copy link
Contributor

@justinpersaud I think it can be reportIDList

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 4, 2024
@nkdengineer
Copy link
Contributor

@justinpersaud friendly bump

@justinpersaud
Copy link
Contributor

Sorry I was out sick. I'll look into what we need to do for the backend changes to get this out.

@justinpersaud
Copy link
Contributor

Sorry, now that I am looking into this a bit more, what are we expecting the outcome will be in the event that there is a collision on the room name if we try to create a room offline and it was already created?

@Christinadobrzyn
Copy link
Contributor

@nkdengineer can you take a peek at these questions when you have a moment? TY! #49544 (comment)

@nkdengineer
Copy link
Contributor

@justinpersaud If the report was created, please send the preexistingReportID as the existing reportID for the report data of the reportID according to the room name in the API param. And then frontend already have the logic the clear the optimistic report.

@DylanDylann
Copy link
Contributor

@justinpersaud Could you help to check the above comment? Thanks

@justinpersaud
Copy link
Contributor

Yeah, just trying to prioritize when we'll get the backend change done. I haven't had a chance to do it just yet with other priorities.

@justinpersaud
Copy link
Contributor

I'm wrapping up some other tasks right now internally, but hoping to look at the backend changes required later this week

@DylanDylann
Copy link
Contributor

@justinpersaud Kindly bump

@justinpersaud
Copy link
Contributor

Looked at the backend change just now and see we are defaulting to workspace visibility as we reported here, but I am asking if there is a specific reason why in our product channel

@justinpersaud
Copy link
Contributor

@DylanDylann @nkdengineer I am newer to working on these proposals so you'll have to bear with me here, but why are we passing in reportIDList, implying we would pass a number of reportIDs to the backend, right?

Won't we ever only be sending a single reportID to the backend to be created? Or are we going to queue up a backend call to ResolveActionableReportMentionWhisper with multiple reportIDs?

@Christinadobrzyn
Copy link
Contributor

@DylanDylann and @nkdengineer can you follow up on this - #49544 (comment)

@nkdengineer
Copy link
Contributor

nkdengineer commented Oct 29, 2024

Won't we ever only be sending a single reportID to the backend to be created? Or are we going to queue up a backend call to ResolveActionableReportMentionWhisper with multiple reportIDs?

@justinpersaud I will send an array of reportIDs because ResolveActionableReportMentionWhisper can have multiple new rooms.

@justinpersaud
Copy link
Contributor

Hey all,

I circled back internally and discovered this feature is actually working as designed. We want the visibility of rooms to always be set to workspace, regardless of where it is created by default.

Thanks for the initial work and investigation. I'll leave it with @Christinadobrzyn for any outstanding payment for work that was already done.

@Christinadobrzyn
Copy link
Contributor

Ah thanks @justinpersaud!
It looks like a PR was created but not merged to production so our standard reasoning for payment isn't applicable.

@DylanDylann @nkdengineer let me know if there's anything compensation you feel should be considered for the work you spent. Thanks!

@DylanDylann
Copy link
Contributor

@Christinadobrzyn
Copy link
Contributor

Okay sounds reasonable since the proposals were reviewed and the PR was created.

Payouts due:

No regression test needed. Closing this out!

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants