Page MenuHomePhabricator

"maxTasksPerDay" is not applied when pre-opening many suggestions in multiple tabs
Open, HighPublicBUG REPORT

Description

Currently, we check the maximum number of tasks per day when displaying the task to the user. Once the editor is loaded, the user is always allowed to complete (and publish the task). As a result, if you go to Special:Homepage and open several tasks in individual tabs, you will be able to complete all of them. Since the default limit is 25 tasks, this is usually not a problem (users generally do not open more than 25 tasks at once). However, there are wikis with significantly lower limits. For example, hewiki set the value to 1, which makes this problem significantly more visible.

Original description

From this report.

Hebrew wikipedia Community Configuration set maxTasksPerDay at 1. This field is label as "The maximum number of 'Add a link' suggested tasks a newcomer can complete daily" in Community Configuration. However, this setting does not apply to all users it seems.

Example 1: 16 Add-a-link tasks done on Dec 29
Example 2: 3 or 4 Add-a-link tasks done regularly

When imported on July 2024, the configuration already had that 1 task per day limit set. More recent edits haven't changed this threshold.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Thanks for the task, @Trizek-WMF! I checked what might be happening, and I found out that if you open multiple Add Link sessions in separate tabs, then you are able to complete all of them. This is because the quality gate limit is checked when you open Special:Homepage and when showing the recommendation to the user, but once you have the recommendation on the screen, you can always complete it.

This would explain the relatively low number of Add Link edits; it is completely practical to open 3 or 4 recommendations in tabs, but you probably wouldn't do that with a hundred of recommendations. It also explains why we noticed the bug only now (although T344163 was another subtle bug in the same feature).

I'm wondering whether there is any way to verify the user is indeed loading multiple suggestions at once, or whether we should just fix that possibility (given it exists) and hope it would solve the issue the community reported. @Trizek-WMF, do you have any thoughts on this?

Urbanecm_WMF changed the subtype of this task from "Task" to "Bug Report".
Urbanecm_WMF moved this task from Inbox to Estimated tasks backlog on the Growth-Team board.

@Trizek-WMF - thx, for pinging me. Yes, the issue happens just as @Urbanecm_WMF described in the comment above.

Urbanecm_WMF renamed this task from [investigate] "maxTasksPerDay" seems not applied to all users to "maxTasksPerDay" is not applied when pre-opening many suggestions in multiple tabs.Jan 11 2025, 6:15 PM

I edited the description to make it about fixing the bug, as the investigation happened. Let's take a look at it during the next sprint planning meeting.

Good catch!

I'm wondering whether there is any way to verify the user is indeed loading multiple suggestions at once, or whether we should just fix that possibility (given it exists) and hope it would solve the issue the community reported. @Trizek-WMF, do you have any thoughts on this?

It could be tricky.
AFACT, you can't prevent links from being opened in new tabs.
Would it be possible to catch the process while the new tab loads, to show a message saying that you exceeded the number of tasks for the day? It could be super frustrating if this number is lower than the number of tasks you are ready to tackle. In particular when this number is really low.
I guess we all agree on not showing a blocker when the user completes the tasks and is ready to save. This would be super counter productive.

The problem is that if you open ten tabs in the background, all ten start to load, so at the point it loads, the places are still available.

What about introducing some kind of locking? When VE loads with the suggested edit, it acquires a lock (of which one can acquire as many as they have remaining suggested edits for the day), which is released when one exits VE without saving. If there are no remaining locks, VE waits for one to become available (or for all edits to be saved, at which point it can give up). Maybe there could be a “Retry” button instead of automatically noticing the lock release, as the button is much easier to implement in a client/server architecture.