monome / maiden

web based editor and repl for norns
GNU General Public License v3.0
47 stars 34 forks source link

automatic catalog refresh #184

Closed tehn closed 3 years ago

tehn commented 4 years ago

moved from https://github.com/monome/norns/issues/1159

while it's documented that users need to refresh the community catalog to pull in new scripts, it often requires reiteration. eg: https://llllllll.co/t/grd/33768/63

curious if there's a way to automatically refresh the catalog once a network is detected, or once the user connects to maiden, so that any scripts which might have been released while the user was offline are presented without additional actions from the user?

dndrks commented 4 years ago

bump for visibility! @ngwese + @tehn , does this make sense to live on the maiden load side or just when norns connects to WIFI?

ngwese commented 4 years ago

i can look into refreshing the catalogs when the backend starts up (easy) or via some periodic event (not sure which event to hook into, possibly something to do asynchronous to in the background when the available page is accessed)

ngwese commented 4 years ago

i'm testing out a quick pass at something which will hopefully solve the problem or at least mitigate some of the confusion. essentially the logic is such that when the maiden server starts it:

https://github.com/monome/maiden/commit/247b93a4881317d60e56f8dec8076726b88ba2a5

the logic is crude at best. improvements could be made but would require more restructuring of the code than i'd like to get into right now. obviously this logic fails if:

if i can locate a go library that packages up monitoring of whether or not linux networking is up/down then i will consider changing the logic to check on changes to the networking status on the device...

tehn commented 4 years ago

i think your proposal is totally adequate for our purposes, which is to simply reduce the issues.

perhaps we should alternatively consider changing the UI for refreshing catalogs... ie something like a button at the top which is "check for new scripts"

(i'm curious if we've ever had a script removed from the community catalog??)

ngwese commented 4 years ago

i saw the additional posts / confusion. will look into some ui tweaks as well.