You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how strongly people feel about having such a feature. Just throwing this idea out there.
Requirements:
User can toggle the status of an article between read/unread.
Only the site owner can toggle such status, otherwise, random visitors can mess up your feed status.
Only the site owner can see such status, for privacy reasons.
Reading activity cannot be stored in plaintext on server side, because the repos are considered public.
I don't want to maintain a centralized database or have other people's credentials.
Solution:
User provides their GitHub developer token to client A, using browser local storage, for later use.
When user marks articles as read/unread, the activity is encrypted on the client side (using GitHub developer token as encryption key) and pushed to the server side via GitHub REST API, which also requires a token for authentication
When user opens the feed from client B, the encrypted activity is downloaded, along with feed content.
User provides the same developer token to client B, to decrypt and display read/unread status.
Potential issues:
User can lose their token (github only displays it once) and hence lose the ability to add more clients.
Consider allowing user to provide an alternative easy-to-remember key for encryption. This decouples the encryption of the activities from the authentication of the REST API call.
Reading activity can grow infinitely long, undermining performance
Similar to limiting max days of articles, we can limit max days of activities
Read/unread activities can be changed while the browser is offline, ultimately causing merge conflict
If we query the latest activities just before we upload the activities, the chance of conflict would be nearly zero.
If user closes the browser, we might not have enough time to perform a query + activity upload
If the browser is offline, the activities can be saved in local storage, waiting for next online session
Conflicts are resolved locally, using "later write wins" algorithm. This requires tracking timestamp of each activity.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm not sure how strongly people feel about having such a feature. Just throwing this idea out there.
Requirements:
Solution:
Potential issues:
Beta Was this translation helpful? Give feedback.
All reactions