Repository navigation
fix: Sentry triage (unreadable server version, dashboard layout freeze) - #1531
Merged
Merged
Conversation
When Init/Version failed on a started server the minimum-version gate did nothing, so an outdated server reached pages that assumed newer settings (Settings -> General crashed on a missing Logging section). Redirect to the unsupported page with an explanation instead, and stop the gate from reading Server.ReleaseChannel on a response without Server. Fixes SHOKO-WEBUI-25H
The check only ran once the server had started, so a server waiting for first-run setup that could not report its version still reached the wizard and crashed on settings it does not return (AniDb.MyList). Fixes SHOKO-WEBUI-25F
…n't frozen saveLayout assigned currentLayout into an Immer draft. currentLayout shares its items with react-grid-layout's internal state (onLayoutChange hands the grid's own items back), so produce froze them in place. The grid mutates its items while resizing, so after a save the next resize in edit mode threw 'Cannot assign to read only property'. Fixes SHOKO-WEBUI-239
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.
Summary
Fixes three crashes found while triaging recent Sentry issues: two where the Web UI ran against a server whose version it could not read, and one in the dashboard layout editor. Fixes SHOKO-WEBUI-25H, SHOKO-WEBUI-25F and SHOKO-WEBUI-239.
Changes
Fixed
SentryErrorBoundaryWrapper.tsx: the minimum-server-version gate did nothing whenInit/Versionfailed, so an outdated server reached pages that assume newer settings (Settings → General crashed on a missingLoggingsection (25H), the first-run wizard on a missingAniDb.MyList(25F)). Once the server reportsStartedorWaitingand its version still cannot be read, the user is now sent to the unsupported page.StartingandFailedare exempt, sinceInit/Versionerrors are expected while the server boots. The gate also no longer readsServer.ReleaseChannelon a response withoutServer.UnsupportedPage.tsx: explains "unable to read the server version" when that is the reason, and no longer assumesServerexists when showing the version details.DashboardPage.tsx:saveLayoutassignedcurrentLayoutinto an Immer draft.currentLayoutshares its items with react-grid-layout's internal state (onLayoutChangehands the grid's own items back), soproducefroze them in place. The grid mutates its items while resizing, so after a save the next resize in edit mode threwCannot assign to read only property(239). The layout is now copied before it goes into the draft.Notes for review
Init/Versionfailure that outlasts the query retries on a started server will land on the unsupported page. I think that is the right trade-off for a server we cannot identify, but it is a behaviour change.react-grid-layout2.2.4 bump already on master. The compaction code is identical in 2.2.2 and 2.2.4.Testing
pnpm tscheckand the lint hooks pass./apicall mocked): save the layout, re-enter edit mode and resize threw 16 read-only errors without the change and none with it.