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

[FEATURE] Refresh button when branch changes #18427

Open
kdumontnu opened this issue Jan 27, 2022 · 13 comments · May be fixed by #20511
Open

[FEATURE] Refresh button when branch changes #18427

kdumontnu opened this issue Jan 27, 2022 · 13 comments · May be fixed by #20511
Labels
issue/bounty This issue has a bounty associated. Whoever opens a PR and gets it merged can claim the bounty. type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@kdumontnu
Copy link
Contributor

kdumontnu commented Jan 27, 2022

Bountysource

Feature Description

Sometimes when reviewing large PRs, reviewers can be reviewing stale data if the branch has been updated since last loading the page. GitHub has a nice little feature that pops up an orange "refresh" button if the underlying branch changes. It would be great if Gitea had something similar.

From zeripath: "there are a couple of things that could be used for this. Probably the best thing to do would be for the webpage to register with the eventsource and get that to listen for the notify"

Screenshots

image

@kdumontnu kdumontnu added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jan 27, 2022
@silverwind
Copy link
Member

Yes, eventsource can be used in theory for server-to-client updates. I have the general impression that our eventsource is rather unstable and I think in the long run, we'd be better to switch it to websockets.

@lunny
Copy link
Member

lunny commented Jan 27, 2022

Yes, switching to websocket is a final way we need to do.

@kdumontnu kdumontnu added the issue/bounty This issue has a bounty associated. Whoever opens a PR and gets it merged can claim the bounty. label Mar 18, 2022
@zeripath
Copy link
Contributor

Honestly when I wrote the eventsource I looked at all of the alternatives and thought that as we only needed server side events a websocket was not the way to go.

@zeripath
Copy link
Contributor

Yes, eventsource can be used in theory for server-to-client updates. I have the general impression that our eventsource is rather unstable and I think in the long run, we'd be better to switch it to websockets.

What evidence do you have that the eventsource is unstable?

@kdumontnu
Copy link
Contributor Author

Can this not be completed as easily using the eventsource? Or is the idea that we don't want to keep adding to it?

@anbraten
Copy link
Contributor

Eventsource works basically fine. Its heavily being used for similar usecases in some projects like woodpecker. But the most sustainable solution would probably be following the graphql (#14721) idea. Adding eventsources / own websocket protocols for such large projects like gitea don't scale in my opinion. If you are really searching for a quick and dirty solution, I would rather suggest to use some kind of polling with setTimeout / setInterval every 3 seconds as those api endpoints already exists.

@lunny
Copy link
Member

lunny commented Mar 19, 2022

An uniform websocket service could be used in many pages/features. Gitea should move forward to be more instantly in code review or other collabrations.
i.e. We need to update the new comments when we stay in the issue page, need to see the review comment update and the refresh button on code review page.
EventSource will need server-side long pull technical which belongs to HTTP 1.1. By Websocket, we could send and receive multiple types messages in one page. And because of Golang's high performance, over 1M connection could also be possible.

@more-pepsi
Copy link

more-pepsi commented Mar 29, 2022

Any progress on this? Would love to add lazy loading of large pull requests as-well. Happy to pull or do some little tasks for ya'll

@kdumontnu
Copy link
Contributor Author

Any progress on this? Would love to add lazy loading of large pull requests as-well. Happy to pull or do some little tasks for ya'll

I have not heard of any progress yet. I think it's probably important to point out that these three things are separate issues:

@maxbol
Copy link

maxbol commented Jul 27, 2022

I'm up for solving this if the bounty still stands and noone else is working on it?

@maxbol maxbol linked a pull request Jul 27, 2022 that will close this issue
@more-pepsi
Copy link

@maxbol
Copy link

maxbol commented Jul 27, 2022

@MarwaNoorullahKhan1
Copy link

why does my github not have refresh button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bounty This issue has a bounty associated. Whoever opens a PR and gets it merged can claim the bounty. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants