Skip to content

fix(docs): enable trailingSlash to prevent 404 flash on direct navigation#3039

Merged
fallenbagel merged 1 commit into
developfrom
docs/fix-404-flash
May 16, 2026
Merged

fix(docs): enable trailingSlash to prevent 404 flash on direct navigation#3039
fallenbagel merged 1 commit into
developfrom
docs/fix-404-flash

Conversation

@fallenbagel
Copy link
Copy Markdown
Collaborator

@fallenbagel fallenbagel commented May 16, 2026

Description

Since #2981 added per-endpoint webpack chunks for OpenAPI docs, the chunk count tripled (~100 to ~300). This made the docs site's JS bundle large enough that a previously imperceptible flash of PAGE NOT FOUND became visible when navigating directly to any URL with a trailing slash (e.g. /getting-started/).

(previously with 100 chunks):

Screen_Recording_20260406_040014_Firefox.Beta.mp4

With trailingSlash: false, Docusaurus outputs pages as getting-started.html rather than getting-started/index.html. When GitHub Pages receives a request for /getting-started/, it cannot find the file and serves 404.html, which then loads the full React app to client-side redirect to the correct page. With ~100 chunks this was fast enough to go unnoticed. With ~300 chunks the JS takes long enough to parse and execute that the 404 page is briefly visible before the redirect happens.

This PR changes the setting trailingSlash: true making Docusaurus output getting-started/index.html instead, so GitHub Pages serves the file directly without the 404 detour and no JS is required for the initial render, thus, no flash.

This was identified as a side effect of the JS minimizer fix in d88242f (context: #3035 (comment)).

How Has This Been Tested?

Locally built and tested.

Screenshots / Logs (if applicable)

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Summary by CodeRabbit

  • Documentation

    • Fixed Plex integration documentation link path for the Watchlist Auto Request feature.
  • Chores

    • Updated documentation URL configuration to use trailing slashes consistently.

Review Change Stack

@fallenbagel fallenbagel requested a review from a team as a code owner May 16, 2026 07:00
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e03e0abc-5eb2-4a72-9d43-5824ce944a8f

📥 Commits

Reviewing files that changed from the base of the PR and between d88242f and a423713.

📒 Files selected for processing (2)
  • docs/using-seerr/plex/index.md
  • gen-docs/docusaurus.config.ts

📝 Walkthrough

Walkthrough

Docusaurus trailing slash handling is enabled in configuration, and Plex documentation link paths are adjusted to reflect the new URL structure. Two minimal, coordinated changes affecting documentation URL generation and relative navigation.

Changes

Documentation URL Configuration Alignment

Layer / File(s) Summary
Docusaurus trailing slash configuration and documentation path adjustment
gen-docs/docusaurus.config.ts, docs/using-seerr/plex/index.md
Trailing slash handling enabled in Docusaurus config. Plex "Watchlist Auto Request" feature link path adjusted from ./plex/watchlist-auto-request to ./watchlist-auto-request to match the new URL structure.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A slash at the end, a path made anew,
Config and docs, aligned just true.
Two tiny changes, both small and pure,
Documentation links, now structured secure.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: enabling trailingSlash in Docusaurus config to fix 404 flash issues on direct navigation, which is the primary objective of this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fallenbagel fallenbagel merged commit df105b8 into develop May 16, 2026
20 of 21 checks passed
@fallenbagel fallenbagel deleted the docs/fix-404-flash branch May 16, 2026 07:04
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.

1 participant