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

Replace per-post read tracker with per-thread one #1800

Merged
merged 30 commits into from
Sep 3, 2024

Conversation

rafalp
Copy link
Owner

@rafalp rafalp commented Aug 24, 2024

This PR brings back "classic" read tracker to Misago.

This tracker actually tracks two separate read times:

  • Timestamp of when user has read everything in a category
  • Timestamp of latest read post in a thread

Whenever user sees new post, we create or update existing entry for a thread. We also check if there are other unread threads in this category and if there aren't, we update the category entry. This second step forums perform life, but we could delay it to a celery task to keep thread view speedy.

Fixes #956 #1585 #1618

Superseds #1449

TODO

  • Get categories read status
  • Get threads read status
  • Get thread posts read status
  • Update thread read status when posts are read
  • Update category read status when posts are read
  • Mark all threads as read
  • Mark all private threads as read
  • Mark category as read
  • Mark all categories as read
  • Move "Mark as read" base templates to misago/mark_as_read/...
  • Update category read status if there are no unread threads on list
  • Add util on user model to clear their unread_private_threads if its not zero
  • Update watched thread read time
  • Add "unread" filter to threads lists
  • Update clearreadtracker management command
  • Regenerate hooks reference

@rafalp rafalp added area: backend This issue involves Python, Django or dependency (eg. database) feature: read tracker Tracks read and unread threads and posts feature: threads list Lists of threads feature: thread page Thread and private thread pages feature: categories Categories page labels Aug 24, 2024
@rafalp rafalp added this to the Next feature release milestone Aug 24, 2024
@rafalp rafalp self-assigned this Aug 24, 2024
@rafalp
Copy link
Owner Author

rafalp commented Sep 3, 2024

There are 146 tests failing. I will fix those in future PRs.

@rafalp rafalp merged commit ee00407 into main Sep 3, 2024
1 check failed
@rafalp rafalp deleted the fix-1618-track-reads-per-thread-not-post branch September 3, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend This issue involves Python, Django or dependency (eg. database) feature: categories Categories page feature: read tracker Tracks read and unread threads and posts feature: thread page Thread and private thread pages feature: threads list Lists of threads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unread private messages count gets stuck after readtracker expires, until its recount again with new PM
1 participant