fix(routes): restore plugin builds with current router error types - #244
Merged
Merged
Conversation
Reviewer's GuideUpdates the shared detail-route error component to use TanStack Router’s Sequence diagram for detail-route error fallbacksequenceDiagram
participant Router as TanStack Router
participant DetailError as DetailRouteErrorComponent
participant Fallback as RouteErrorFallback
Router->>DetailError: render(error: unknown)
alt error instanceof Error
DetailError->>Fallback: render(message: error.message)
else non-Error thrown value
DetailError->>Fallback: render(message: undefined)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.6-luna · Input: 0 · Output: 0 · Cached: 0 |
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
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.
The plugin release builds fail during
pnpm build:pluginbecause the shared detail-route error component requiresError, while TanStack Router now suppliesunknown. That mismatch rejects all four detail routes and also breaks inference of the player loader’sfetchSegmentsdependency.Use the router’s
ErrorComponentPropscontract and narrow Error instances before reading their message. Other thrown values use the existing generic fallback. This restores type inference without changing the route loaders, dependencies, or compiler settings. Eight regression cases cover Error and non-Error throws.Verified with pnpm 10:
build:plugin(including TypeScript), 85 related tests across seven files, scoped lint, and formatting. Browser checks cover the invalid-player-ID error page, Home recovery, and opening an episode with fetched segments. The rebuilt assets were also embedded in the companion Jellyfin 12.1 plugin build and served successfully by a real 12.1 server.This must land on
masterbefore the companion plugin build can pass CI, since that workflow checks out frontendmaster.Summary by Sourcery
Restore plugin build compatibility with current router error types while preserving detail-route error handling.
Bug Fixes:
Tests: