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

star/unstar: apply change locally then apply to server #69

Closed
redshiftzero opened this issue Oct 25, 2018 · 3 comments
Closed

star/unstar: apply change locally then apply to server #69

redshiftzero opened this issue Oct 25, 2018 · 3 comments

Comments

@redshiftzero
Copy link
Contributor

we should modify the starring logic to apply change locally and then push to server, following decision in #51:

while starring or unstarring, the in-progress UI should prevent the user from sending another API
request to star/unstar (these could get processed out of order and they do not commute)
if success: UI change stays
if failure: remove star (for starring case, add star for the unstarring case, mark source not flagged for the flagging a source case) locally, report error to the user, update UI to reflect local db
if failure due to 404: sync API, source is deleted, report the source was deleted (this delete scenario is why we should avoid enqueuing idempotent changes until we succeed, we can enter a deadlock state if the source was deleted on the server)

wip in c52d6a4

User story: As a SecureDrop journalist, I want my changes to appear rapidly in the UI so that I don't wonder if something went wrong

@ninavizz
Copy link
Member

ninavizz commented Dec 9, 2019

Adding to #650

@eloquence
Copy link
Member

As far as I can tell, starring changes are applied immediately from the user's point of view; is this still an issue?

@redshiftzero
Copy link
Contributor Author

the star updates locally though if you close the client before the server job completes, the state will revert when you open the client again and log in. Choices are:

I'm going to close this and we can show something in the UI (#650) to indicate that the state may either take some time to display or revert if unconfirmed, depending on whatever we decide we can modify the logic here.

legoktm pushed a commit that referenced this issue Dec 11, 2023
Uses incoming timeout value from JSON
legoktm pushed a commit that referenced this issue Dec 11, 2023
validate paths for all tarfile types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants