-
Couldn't load subscription status.
- Fork 305
feat: add auto-refresh functionality to UI #987
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
base: main
Are you sure you want to change the base?
feat: add auto-refresh functionality to UI #987
Conversation
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
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.
Instead of implementing our own polling mechanisms, we should look into using an existing library -- e.g. https://swr.vercel.app/docs/getting-started -- I think that one should implement everything we need for automatic reloads/refreshes.
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
|
after your feedback i replaced the custom polling mechanisms with SWR which you suggest. |
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: Rishabh Choudhary <[email protected]>
…, remove unused getApiUrl function Signed-off-by: rishabh998186 <[email protected]>
|
@peterj, please review my new changes and let me know if there are any other issues that need to be fixed |
Signed-off-by: Rishabh Choudhary <[email protected]>
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.
there are some CORS issues and I can't make this to work
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
|
@peterj i tested everything and its all working properly and also the CORS middleware is configured correctly in the Go controller and i tested it with the actual port-forwarding scenario you mentioned and there are no more CORS errors showing up in the console. The auto-refresh feature is working when i create or delete agents via kubectl, they show up or disappear in the UI automatically without needing to manually refresh the page. One small thing I changed that the refresh interval was set to 30 seconds which is to slow, so I changed it into 5 seconds and now the UI feels way more responsive and updates almost immediately when you make changes. Please let me know if you spot any other issues. |
Screencast.from.2025-10-11.13-01-05.webmauto refreshing after every 5 sec |
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.
added some comments that need to be address - specifically the one about re-using the existing fetch functions from the /actions folder (and probabyl removing the CORS).
Signed-off-by: Rishabh Choudhary <[email protected]>
…tions Signed-off-by: rishabh998186 <[email protected]>
3078b90 to
868bc82
Compare
Signed-off-by: rishabh998186 <[email protected]>
e54c826 to
5ed4aac
Compare
|
I removed the unwanted changes as you suggested. The code is working correctly now and the agents list is coming in alphabetical order consistently on every refresh. Ready for review |
|
@peterj |
the problem that when you create a new agent or mcp servers you need to refresh the page to see the changes in ui .
so i implemented an auto-refresh system that automatically updates the UI when data changes.
What's Changed
fixes #975