Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Bug: duplicate repositories can be added to dashboard #1219

Closed
1 task done
git-srinivas opened this issue Oct 9, 2021 · 17 comments · Fixed by #1468
Closed
1 task done

Bug: duplicate repositories can be added to dashboard #1219

git-srinivas opened this issue Oct 9, 2021 · 17 comments · Fixed by #1468
Assignees

Comments

@git-srinivas
Copy link
Contributor

git-srinivas commented Oct 9, 2021

Describe the bug

When a user login to the app, there are see two sections on the dashboard. One is the repo recommendations list and the other is dashboard repo list.

Expected behaviour:
When user try to add a recommended repo item for one time or multiple times, it should be added to the dashboard repo list only once.

Actual behaviour:
When the user add a recommended repo item for multiple times, it gets added to the dashboard list for multipl times. Which is causing duplicate records of the same repo item in the dashboard list. Which is redundant and not expected.

Proposed solution:
We can keep a block loader or spinner on the recommended repo list, till the repo item disappers( or till the sync action completes)?

I am attaching a screenshot (from my mobile browser) below, which depicts the same
Screenshot_20211010-003135_Chrome

Steps to reproduce

1.Login to the app
2. Go to repository recommendation list
3. Click on add button continuously for 2 or more times
4. Reload the app and you can see duplicate repositories on the dashboard repo list

Affected services

opensauced.pizza

Platforms

Desktop, Mobile, Tablet

Browsers

Chrome

Environment

Production

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mtfoley
Copy link
Contributor

mtfoley commented Oct 9, 2021

@git-srinivas thanks for filing this issue!

In my opinion, this is related to issue #832.

@0-vortex
Copy link
Contributor

Cannot reproduce, could you provide additional instructions

@git-srinivas
Copy link
Contributor Author

git-srinivas commented Oct 10, 2021

  1. Go to repository recommendations
  2. Click on add button for 2 or more times. Dont wait for 30 seconds or sync to complete
  3. just click on add button continuously
  4. Reload the app and you can see the duplicate repo records
    Here is my data json that contains the same

@0-vortex
Copy link
Contributor

What + symbol? Tried both desktop and mobile already before posting the cannot reproduce comment.

@0-vortex
Copy link
Contributor

Managed to reproduce but only on desktop.

Duplicate repositories can be added to dashboard. As a user, if I added a repo as favorite. A single list item would be sufficient to track updates.

Understand this is a real issue now but In the future, could you kindly check with @open-sauced/triage before filing bugs with missing information? It helps us reduce the back and forth for a fix that could be a few lines of code!

@git-srinivas
Copy link
Contributor Author

What + symbol? Tried both desktop and mobile already before posting the cannot reproduce comment.

It is add button in recommendations. I mentioned in the steps to reproduce. My wording could be much better

@git-srinivas
Copy link
Contributor Author

Managed to reproduce but only on desktop.

Duplicate repositories can be added to dashboard. As a user, if I added a repo as favorite. A single list item would be sufficient to track updates.

Understand this is a real issue now but In the future, could you kindly check with @open-sauced/triage before filing bugs with missing information? It helps us reduce the back and forth for a fix that could be a few lines of code!

Since our app is a web application, the bug can be replicated in both desktop and mobile. I added the screen shot from my mobile browser only.

@0-vortex If you feel the bug is redundant, I can close this and update the triage bug?

@0-vortex
Copy link
Contributor

Since our app is a web application, the bug can be replicated in both desktop and mobile. I added the screen shot from my mobile browser only.

Please stick to the topic - I understand the screenshot is from mobile, my question was whether or not you actually used the mobile platform to produce the bug.

@0-vortex If you feel the bug is redundant, I can close this and update the triage bug?

That is not helpful in any way, updating the issue with proper description and steps would be the way to go, especially if any of the triage team wants to take a look at this or a contributor is willing to pick it up.
If you do not plan to contribute to this issue, is better issue wording, rather than commenting, an unreasonable request?

@git-srinivas
Copy link
Contributor Author

git-srinivas commented Oct 10, 2021

@0-vortex My apologies. This is the first bug i ever raised with open source projects/apps. Thanks for the guidance. I updated the bug description and steps to reproduce. Please check and let me know if it is fine :)

@mtfoley
Copy link
Contributor

mtfoley commented Oct 11, 2021

@git-srinivas Thanks again for submitting the issue. I think you've put enough information in here for contributors to know what to work on.

The PR you had already submitted #1215 helps with this issue somewhat, but only if the goals list is updated after adding a goal, so that the recommendations list can remove the goal. As I mentioned before, there are some bugs with the application's state getting updated correctly when adding/removing goals (as described in #832).

@mtfoley mtfoley mentioned this issue Oct 12, 2021
15 tasks
@mtfoley
Copy link
Contributor

mtfoley commented Oct 13, 2021

I got a chance to re-reproduce this tonight after #1220 landed - the situation is a little better since repo does get added in goals list when using + button in recommendations list. However, the recommendations list doesn’t repopulate with the newly added goal filtered out. Seems like stars variable may need to be refactored to implement useState()

const data = repository && repository.data && repository.data.text && JSON.parse(repository.data.text);
const viewerStars = repository && repository.stars && repository.stars.text && JSON.parse(repository.stars.text);
const stars = remainingStars(data, viewerStars);

@git-srinivas
Copy link
Contributor Author

.take

@github-actions
Copy link
Contributor

Thanks for taking this on! If you have not already, join the conversation in our Discord

@0-vortex
Copy link
Contributor

A visual and sorting fix is dropping in #1247 - that doesn't solve the issue of adding repositories in the UI or to the open-sauced-goals repository however it should simplify the local state changes required to make adding duplicates impossible from the UI.

Hope this helps!

@0-vortex
Copy link
Contributor

0-vortex commented Jan 1, 2022

@git-srinivas are you still keen to work on this?

@github-actions
Copy link
Contributor

Thanks for being interested in this issue. It looks like this ticket is already assigned to a contributor. Please communicate with the assigned contributor to confirm the status of the issue.

github-actions bot pushed a commit that referenced this issue Oct 24, 2022
### [0.53.5](v0.53.4...v0.53.5) (2022-10-24)

### 🐛 Bug Fixes

* correct duplicate repositories added to dashboard ([#1468](#1468)) ([a3bd798](a3bd798)), closes [#1459](#1459) [#1219](#1219)
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 0.53.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants