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
Display a loading bar for the merging process #3864
Conversation
@maxpatiiuk , why is loadingBar doesn't pick up the change of mergeId and therefore doesn't display the Status dialog? |
in your useEffect, you set loadingBar to true on change to mergeId - you never set it to false (except if user clicks on the abort button), and so loading bar never disappears |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need loadingBar
state at all - it only adds complication
loadingBar should only be visible if mergeId is not undefined, right?
so just do this:
Solution
const [mergeId, setMergeId] = React.useState<string | undefined>(undefined);
// later:
mergeId === undefined
// and:
()=>setMergeId(undefined)
@maxpatiiuk, I am facing the same issue where mergeId state is not being updated |
NOTES: the setError(undefined) on line 268 is not working neither. |
@melton-jason @realVinayak if you have input on this.. |
NOTES: ==> mergeId is still undefined |
NOTES: |
sorry, I just realized that I left comments but forgot to publish them 😭 |
No. Reasons:
|
I don't like this solution at all. Your mergeId issue could have been caused by any of the other things I left a comment about |
Merge this as soon as we can! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The progress bar doesn't appear for quick merges
Screen.Recording.2023-08-12.at.10.44.24.AM.mov
Bigger merges do get the progress bar after a loading dialog.
However, it will tell you success but then send a fail notification
https://drive.google.com/file/d/1zehhB45CYmOHkdRnEZ_vK3JtxUz90NCz/view?usp=sharing
(drive for privacy)
Also, the progress bar time countdown will display with dashes when resized:
Maybe move it to the top or bottom instead of the side?
https://drive.google.com/file/d/1-BGoZFdP0lktlbZ1qybW10adoySrK9Q-/view?usp=sharing
This is not for quick merges, only when merging exactly two agents
This is a backend-related problem. The backend endoint for getting the merge status always states the merge is a success. Should be fixed if we fix that endpoint |
This fixes a bug in which the Merging Dialog was closing right when beginning the merge for exactly two agents.
Can this be tested again? And the remaining time should now also be displayed below the loading bar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the correct dialog when merging two agents now! Remaining time doesn't show though
Screen.Recording.2023-08-14.at.11.51.48.AM.mov
if you increase the height of the dialog can you see it? Or also sometime if the merge is too fast there is no remaining time showing up |
@CarolineDenis, resizing the dialog has no change Screen.Recording.2023-08-14.at.1.40.24.PM.mov |
Thank you for checking, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be merged after bronwyn approves it?
As far as I know, the only remaining problem that needs to be addressed related to this is to fix the bug where the backend returns a SUCCESS when calling the merge status endpoint even when the merge fails.
However, this PR has gotten quite lengthy and the fix for that should probably be its own PR, in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not seeing the time remaining
Screen.Recording.2023-08-15.at.11.05.03.AM.mov
That part was not addressed. Here's the problem:
Essentially, the frontend fetches the merging status from the backend in "chunks". |
@melton-jason @bronwyncombs |
No description provided.