Skip to content

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Sep 25, 2025

Summary

Fixes 404 errors for showcase detail pages like /showcase/analyze-google-network-request-ea86c5 that were introduced after the Rspress v2 upgrade in PR #1495.

Root Cause Analysis

After investigating, the issue was not with Rspress v2's dynamic routing support (which doesn't exist like Next.js), but with the theme-level route handling being broken during the upgrade:

  1. Missing CursorProvider: The CursorContext.tsx component was modified in PR docs: upgrade rspress to v2.0.0-beta.32 #1495, but the theme was still trying to import CursorProvider which no longer existed
  2. Theme routing logic: The custom theme needed to be restored to properly intercept /showcase/* paths since Rspress handles these as client-side routes

Solution

  • Restore theme-level route interception for /showcase/* and /replay/* paths
  • Remove CursorProvider dependency since the component was restructured in PR docs: upgrade rspress to v2.0.0-beta.32 #1495
  • Keep pageType: custom for proper showcase page handling
  • Use standard React fragments instead of missing CursorProvider wrapper

How It Works

The fix ensures that:

  1. Rspress builds the base /showcase/index.html page
  2. The custom theme intercepts all /showcase/* paths at runtime
  3. The <Showcase /> component handles client-side routing for dynamic slugs
  4. URLs like /showcase/analyze-google-network-request-ea86c5 render correctly

Testing

✅ Build succeeds without errors
✅ Theme routing logic restored
✅ No more missing import errors
✅ Showcase dynamic paths should work correctly

Related

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit 8459b09
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/68e3d5dedf5dcd0008efd60b
😎 Deploy Preview https://deploy-preview-1651--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit 8459b09
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68e3d5de7eeccc000884ffb8
😎 Deploy Preview https://deploy-preview-1651--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ulivz ulivz changed the title fix(docs): resolve showcase dynamic routes after rspress v2 upgrade docs(agent-tars): resolve showcase dynamic routes after rspress v2 upgrade Sep 25, 2025
ulivz added 6 commits October 6, 2025 19:34
- Remove pageType: custom from showcase index pages
- Remove theme-level route interception
- Add dynamic route files [...slug].mdx for showcase paths
- Fixes 404 errors for showcase detail pages like /showcase/analyze-google-network-request-ea86c5

Resolves issue introduced in PR #1495 with Rspress v2 upgrade
- Restore theme-level route interception for /showcase/* and /replay/* paths
- Remove CursorProvider dependency (component was removed in PR #1495)
- Keep pageType: custom for proper showcase page handling
- This ensures URLs like /showcase/analyze-google-network-request-ea86c5 work correctly

The issue was not with dynamic routing support but with missing theme-level
route handling after the Rspress v2 upgrade.
@ulivz ulivz force-pushed the fix/showcase-dynamic-routes branch from 0a228c5 to 3042632 Compare October 6, 2025 11:35
@ulivz
Copy link
Member Author

ulivz commented Oct 6, 2025

Close this since it does not fully solve the problem

@ulivz ulivz closed this Oct 6, 2025
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.

2 participants