What is the problem?
If you start editing a page for which you have expired Edit Recovery data, that data will be restored while at the same time deleted in indexedDB.
This might lead to confusing or unexpected behaviour for the user.
For example, if they trigger an edit recovery save (e.g. editing the page, switching tabs) the edit recovery data will be saved again with a new expiry date. If not, the next time they start editing the page the data will not be recovered.
I suggest the least confusing thing is to delete the expired data and not recover it. The data has expired so this is what the user should expect.
This only applies to when the page you are editing matches the edit recovery data. Edit recovery data for other pages is deleted.
Steps to reproduce problem
- In LocalSettings.php, put something like $wgEditRecoveryExpiry = 10;
- Start editing a page (but don't save)
- Close the editing window and wait 10 seconds (or however long you set the expiry for)
- Open the editing page again
Expected behaviour: Edits from step 2 are not recovered. You don't see a popup. If you look in indexedDB, the data for the page is cleared.
Observed behaviour: Edits from step 2 are recovered. You see a popup. Data for the page is cleared in indexedDB (as long as you have not triggered a save of the edit recovery data by, for example, switching tabs or windows).
Environment
Browser: Firefox 115. Chromium 120.
Wiki(s): Local docker MediaWiki 1.42.0-alpha (0b1b808) 02:37, 16 January 2024.
Editor: WikiEditor 0.5.4 (8f16d58) 13:55, 12 January 2024.
QA Results - Local
AC | Status | Details |
---|---|---|
1 | ✅ | https://phabricator.wikimedia.org/T355101 here |