-
Notifications
You must be signed in to change notification settings - Fork 1.8k
docs(agent-tars): resolve showcase dynamic routes after rspress v2 upgrade #1651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for tarko ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for agent-tars-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- 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.
This reverts commit 0bac513.
0a228c5 to
3042632
Compare
Member
Author
|
Close this since it does not fully solve the problem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 404 errors for showcase detail pages like
/showcase/analyze-google-network-request-ea86c5that 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:
CursorContext.tsxcomponent was modified in PR docs: upgrade rspress to v2.0.0-beta.32 #1495, but the theme was still trying to importCursorProviderwhich no longer existed/showcase/*paths since Rspress handles these as client-side routesSolution
/showcase/*and/replay/*pathspageType: customfor proper showcase page handlingHow It Works
The fix ensures that:
/showcase/index.htmlpage/showcase/*paths at runtime<Showcase />component handles client-side routing for dynamic slugs/showcase/analyze-google-network-request-ea86c5render correctlyTesting
✅ Build succeeds without errors
✅ Theme routing logic restored
✅ No more missing import errors
✅ Showcase dynamic paths should work correctly
Related