Activity tab - Dedupe in-flight summary requests#5679
Merged
tonisevener merged 4 commits intomainfrom Feb 10, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce duplicate REST page/summary calls by deduping concurrent (in-flight) summary requests per title for the Activity tab.
Changes:
- Updates the Growth Tasks data controller test to use the shared
WMFArticleSummaryDataControllerinstance (instead of constructing a new one), aligning with a singleton-based summary fetching approach.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
l-olson1214
approved these changes
Feb 10, 2026
Collaborator
l-olson1214
left a comment
There was a problem hiding this comment.
LGTM! Should we set up some service like this that can be reused elsewhere (checks if something's in flight? Is that possible to make generic?)
Collaborator
Author
Good idea, tracking this here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phabricator: https://phabricator.wikimedia.org/T417033
Notes
When watching network calls for instrumentation, I noticed a large influx of calls to the page/summary endpoint with the same title. For my particular account, it was partly due to a lot of edits to the same article (my user talk page). Since they are all distinct items on the timeline, they all tried fetching the summary at the same time. The existing caching didn't work yet because the first summary fetch had not yet completed.
This PR dedupes these by keeping track of a dictionary of in-flight requests. Once the first one starts, the next ones simply queue up the completion handler. Then once the first one completes, it calls all of the completion handlers.
Test Steps
Screenshots/Videos