Skip to content

Reader Spaces: show a not-available state when a space returns 404 or 403#112341

Merged
mlaetitia merged 4 commits into
trunkfrom
add/reader-spaces-not-found-handling
Jul 7, 2026
Merged

Reader Spaces: show a not-available state when a space returns 404 or 403#112341
mlaetitia merged 4 commits into
trunkfrom
add/reader-spaces-not-found-handling

Conversation

@mlaetitia

@mlaetitia mlaetitia commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Fixes: RSM-4589

Proposed Changes

  • Show a "This space isn't available" page when a space returns 404 or 403, instead of a blank page.
  • Skip retrying 4xx on the space query so it shows immediately.

Why are these changes being made?

A 404/403 on a space id looked identical to "still loading" and rendered blank forever, with no way out.

Testing Instructions

  1. Visit /reader/spaces/<bogus-id>.
  2. Expect the not-available message with a "Back to Reader" button; a valid space still loads normally.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

… 403

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Looks like one of the E2E tests has failed.

You can fix them following these steps:

  1. Check out this branch locally:
    gh pr checkout 112341
  2. Start Claude Code in the repo:
    claude
  3. Run the /fix-e2e-tests skill, passing this PR number:
    /fix-e2e-tests 112341
    

@mlaetitia mlaetitia marked this pull request as ready for review July 7, 2026 14:43
@mlaetitia mlaetitia requested a review from a team as a code owner July 7, 2026 14:43
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jul 7, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mlaetitia mlaetitia added this pull request to the merge queue Jul 7, 2026
Merged via the queue into trunk with commit 4fa077d Jul 7, 2026
11 checks passed
@mlaetitia mlaetitia deleted the add/reader-spaces-not-found-handling branch July 7, 2026 15:58
@github-actions github-actions Bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jul 7, 2026
@a8ci18n

a8ci18n commented Jul 7, 2026

Copy link
Copy Markdown

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/34237564

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Hi @mlaetitia, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • Spaces ‹ Reader
  • This space isn’t available
  • It may have been removed, or it’s not one of your spaces.

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants