Page MenuHomePhabricator

Remove 'summary' field from reading list sync structures.
Closed, ResolvedPublic

Description

We're currently expecting to see a hydrated summary field in the Reading List structures when we sync them from the server. However, we only use the description and thumbUrl fields from that structure, and even then, those fields will be populated anyway when those reading lists are saved to the user's device. Therefore this dependency on the summary field can be removed safely.

This task is to verify that the presence of the summary field doesn't have any additional impact, and to modify our code to no longer expect to see it.

Event Timeline

JTannerWMF triaged this task as Low priority.
JTannerWMF added a subscriber: JTannerWMF.

@Seddon is your investigation a blocker for moving forward with this

I see this task is tagged for the Android app. Does/will the analysis also apply to iOS, or is that a separate analysis? (Or does this not apply to iOS at all?)

@BPirkle iOS does not use the summary field at all. (in this particular instance)

@BPirkle Dmitry is correct - on the iOS side we handle what we're currently receiving from the reading list endpoints without summary. We don't even try to look into a summary in the responses or a description or thumbnailUrl. It looks like immediately after syncing reading lists, we fetch the summary separately for each article to get what we need (e.g. https://en.wikipedia.org/api/rest_v1/page/summary/Plok!). So as long as page/summary/{title} is still up and running, we should be good to remove summary logic from the /data/lists endpoints.

Here's an example of what's working fine for us:

GET https://en.wikipedia.org/api/rest_v1/data/lists/

Note we do expect description here in the data/lists response, but that's the reading list description, not the description from the article summary endpoint.

{
  "lists": [
    {
      "id": 4348471,
      "name": "Video games",
      "default": false,
      "description": "Test description",
      "created": "2023-10-04T15:48:37Z",
      "updated": "2023-10-04T15:58:52Z"
    },
    {
      "id": 4341414,
      "name": "default",
      "default": true,
      "description": "",
      "created": "2023-09-29T16:39:25Z",
      "updated": "2023-09-29T16:39:25Z"
    }
  ],
  "continue-from": "2023-10-04T16:00:18Z"
}

GET https://en.wikipedia.org/api/rest_v1/data/lists/4348471/entries/

{
  "entries": [
    {
      "id": 62033764,
      "listId": 4348471,
      "project": "https://en.wikipedia.org",
      "title": "Plok!",
      "created": "2023-10-04T15:50:57Z",
      "updated": "2023-10-04T15:50:57Z"
    }
  ]
}

The Android app works fine without having the summary from the reading list sync structures.
https://github.com/wikimedia/apps-android-wikipedia/pull/4202

Thank you all for the clarifications. This unblocks a (hopefully) straightforward implementation plan for T336693: Re-implement reading lists REST interface outside RESTbase.

In summary (pun intended), we intend to replace the /lists/ endpoints from RESTBase with an alternative implementation, but make no changes at this time to the /summary/ endpoints.