I have discovered the following:
- Bob adds User talk:Bob to his watchlist. wl_notificationtimestamp is set to NULL.
- Jane edits User talk:Bob. wl_notificationtimestamp is set to the current time.
- John edits User talk:Bob. wl_notificationtimestamp is set to the current time.
- Bob views User talk:Bob. wl_notificationtimestamp is set to NULL.
(for those who wonder: wl_notificationtimestamp is a database field in the watchlist table)
This means wl_notificationtimestamp stores the timestamp of the last unseen edit (in this case John's) rather than the timestamp of the last time Bob viewed the page. The latter not only makes more sense to me, it would also allow for some nice new features (see below).
I propose this:
On the short term:
- Change User.php so that when a user views a watched page, wl_notificationtimestamp is set to the current time (rather than NULL).
- Change UserMailer.php so that when a watched page is edited, wl_notificationtimestamp is unharmed.
On the long term:
- Replace the wl_notificationtimestamp field with a wl_lastseenrev field which stores the last viewed revision ID.
The benefits:
- The "(changed since last visit)" text in the history can be replaced by a "(last visit)" text which is placed next to the revision you've last seen. This way you can easily see which edits have been made since your last visit.
- Add a "This page has been changed since your last visit." banner on top of a watched page, with a "view changes" link which shows all changes since the last visit.
- The wl_lastseenrev field will reduce the amount of times the watchlist table needs to be updated.
Now I can go ahead and write a patch for all of this (except for the lastseenrev field), but I first wanted to now whether this idea is supported by the community. Please give your opinion here on whether this should be done or not.
Version: 1.11.x
Severity: enhancement