Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

Reader Onboarding: Improve empty posts display #95770

Open obenland opened 3 days ago

obenland commented 3 days ago

Quick summary

No response

Steps to reproduce

  1. Go to /read?flags=reader/onboarding
  2. Click "Discover and subscribe to sites you'll love"
  3. Select "DIY Projects" and "Finance" as categories
  4. Click "Load more" a few times until "Mark Stephens" shows up
  5. Select that blog.

What you expected to happen

The list of posts shows up.

What actually happened

Shows a Welcome to Reader message

Impact

One

Available workarounds?

There is no user impact

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

No response

Logs or notes

Posts list response:

{
    "code": 200,
    "headers": [
        {
            "name": "Content-Type",
            "value": "application\/json"
        }
    ],
    "body": {
        "date_range": {
            "before": "",
            "after": ""
        },
        "number": 0,
        "posts": null
    }
}

Image

davemart-in commented 2 days ago

We should prevent sites with zero results from showing here.

allilevine commented 2 days ago

We should prevent sites with zero results from showing here.

@davemart-in I investigated and we do prevent sites with zero posts from being recommended: D159312-code

I can't replicate this site showing up as a recommended site, but it returns posts from the API endpoint correctly, and the feed loads correctly. More details: p1730233920506369/1730142040.227029-slack-C03NLNTPZ2T

@obenland Are you able to replicate this and share the API request URL? That might give us a clue about why no posts were returned.

Otherwise we can improve the empty posts display (as the issue title says).

davemart-in commented 2 days ago

@allilevine I just searched for technology in the reader. If you open up all of the links in that right sidebar, a couple of them had zero recent posts showing:

I'd dig in there. I think we're using the same API to fetch related sites for the reader onboarding stuff.

davemart-in commented 2 days ago

Weird, if you click into the actual site for those links, I'm seeing recent posts:

allilevine commented 2 days ago

Weird, if you click into the actual site for those links, I'm seeing recent posts:

Interesting thanks! I looked up https://wordpress.com/read/feeds/15363560 and it has an invalid address: http://wp.ericgoldman.org. The correct feed is actually: https://wordpress.com/read/feeds/1487273

The other two feeds also have errors. It could be that we need to filter out feeds with errors. And/or clean up our feed data.

davemart-in commented 1 day ago

It could be that we need to filter out feeds with errors

Is there a way to easily do that?

allilevine commented 1 day ago

It could be that we need to filter out feeds with errors

Is there a way to easily do that?

I thought I'd found a way, by checking for these meta errors on the feed, but then I was testing onboarding and an empty feed came up for me! It was TechCrunch. The request is: /rest/v1.2/read/feed/111100674/posts?http_envelope=1&orderBy=date&meta=post%2Cdiscover_original_post&number=4&lang=en&content_width=675

So far I've traced it back to an empty user here: fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Szh%2Qcyhtvaf%2Sfhofpevcgvbaf.cuc%3Se%3Q0o019753%26sv%3Qjcpbz_fhof_trg_srrq%23290-og

allilevine commented 14 hours ago

I opened two follow up issues with my findings: