webxdc / store

XDC store, migrated to codeberg
https://codeberg.org/webxdc/store
5 stars 0 forks source link

feat: Make it possible to remove apps from the store #133

Closed link2xt closed 1 year ago

link2xt commented 1 year ago

Command xdcstore list or xdcstore ls should list existing applications on the command line for admin to inspect. It should output applications with unique IDs that can be used in other commands.

xdcstore remove <app-id> or xdcstore rm <app-id> should remove the application from the database.

Ideally both commands should work regardless of whether the bot is running or not.

hpk42 commented 1 year ago

i wonder what it takes to make a removal of app/version also work in the frontend? cc @septias

Septias commented 1 year ago

Reintroducing the 'removed' array in the update response.

hpk42 commented 1 year ago

Suppose i import a new version of an app, and then find out it's broken and then want to remove the version of the app from the store. How to do that?

"Remove whole app, re-add the last working version of the app" would work but a more direct way to invalidate a version is worth a thought i think.

On Mon, Jul 03, 2023 at 10:37 -0700, Sebastian Klähn wrote:

Reintroducing the 'removed' array in the update response.

-- Reply to this email directly or view it on GitHub: https://github.com/webxdc/store/issues/133#issuecomment-1618929484 You are receiving this because you commented.

Message ID: @.***>

Septias commented 1 year ago

Atm .xdcs with the same same are simply overwritten, so rolling back a version without rewriting that is impossible

adbenitez commented 1 year ago

Atm .xdcs with the same same are simply overwritten, so rolling back a version without rewriting that is impossible

to keep it simple, I think that behavior is fine for now, and you likely used the old version already in some chat (that is why you downloaded it) so user can reuse that already sent instances, we can think about fancy stuff like rolling back to previous downloaded version in the future but I think it is fine to keep it simple for now :pray:

hpk42 commented 1 year ago

k, so @adbenitez and @septias : you are in favor of just removing a whole app-id then, as @link2xt suggested, right? fine for me for now -- so just to be sure everything is simple and easy:

What would be the effect on the frontend,

Would myapp/v1 now be the thing i share/forward, or still myapp/v2?

link2xt commented 1 year ago

Would myapp/v1 now be the thing i share/forward, or still myapp/v2?

I think downgrade should work the same way as upgrade. If currently downloaded version is v2, and v3 or v1 becomes available in the index, it should be proposed for download. Sharing old version without downloading a new one should also be possible, because the user might be offline and just wants to put already downloaded version into "saved messages" and use it.

adbenitez commented 1 year ago

Would myapp/v1 now be the thing i share/forward, or still myapp/v2?

local cache should always be in sync with remote cache from bot, if bot says now that the latest release is v1 then discard v2 and download v1, if bot is downgrading is probably because v2 had a bug, so better not to try to be too smart and keeping local cache because it is bigger version etc

btw, (context: the CLI) then when importing there could be an option to force the overriding of a newer version, oth removing and then adding the old version will work as well