dlvhdr / gh-dash

A beautiful CLI dashboard for GitHub 🚀
https://dlvhdr.github.io/gh-dash
MIT License
6.77k stars 191 forks source link

fix: duplicate record display on rapid consecutive refreshes #360

Closed szktkfm closed 1 month ago

szktkfm commented 2 months ago

Summary

This PR addresses https://github.com/dlvhdr/gh-dash/issues/294

I have implemented a modification to retain the TaskID for each fetch task within the model. This TaskID is identical to the one included in the msg sent upon the completion of a record fetch. Saving taskID within the model is a Last-Write-Wins basis, ensuring that only the most recent TaskID is stored in the model.

The PR and issue lists within the model are updated only if the TaskID in the model matches the TaskID in the incoming message.

How did you test this change?

I manually tested this change following the procedures shown in the video below. I confirmed that the issue was resolved without negatively impacting other functionalities such as paging or searching.

Images/Videos

https://github.com/dlvhdr/gh-dash/assets/27483768/a78eb21e-f217-4771-8865-d3f2a76a32d6