Skip to content

fix: Sentry triage (unreadable server version, dashboard layout freeze) - #1531

Merged
hidden4003 merged 3 commits into
masterfrom
fix/sentry-triage-2
Nov 12, 2026
Merged

hidden4003 merged 3 commits into
masterfrom
fix/sentry-triage-2

Conversation

@hidden4003

Copy link
Copy Markdown
Member

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 when Init/Version failed, so an outdated server reached pages that assume newer settings (Settings → General crashed on a missing Logging section (25H), the first-run wizard on a missing AniDb.MyList (25F)). Once the server reports Started or Waiting and its version still cannot be read, the user is now sent to the unsupported page. Starting and Failed are exempt, since Init/Version errors are expected while the server boots. The gate also no longer reads Server.ReleaseChannel on a response without Server.
  • UnsupportedPage.tsx: explains "unable to read the server version" when that is the reason, and no longer assumes Server exists when showing the version details.
  • DashboardPage.tsx: 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 (239). The layout is now copied before it goes into the draft.

Notes for review

  • The gate now fails closed. A transient Init/Version failure 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.
  • 239 is not fixed by the react-grid-layout 2.2.4 bump already on master. The compaction code is identical in 2.2.2 and 2.2.4.
  • Not included: 23X and 23R are the axios status-0 bug (old axios resolves a cancelled request as an empty success). They are already fixed by the axios 1.20.0 upgrade on this branch's base, so they need no code change. 25J (one event, cause unknown) is left open with a note on the issue.

Testing

  • pnpm tscheck and the lint hooks pass.
  • 239 was reproduced in a browser (Playwright against the dev server, with every /api call mocked): save the layout, re-enter edit mode and resize threw 16 read-only errors without the change and none with it.
  • The gate changes were checked against the Sentry breadcrumbs but not exercised in a browser.

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
@hidden4003
hidden4003 merged commit 4465d00 into master Nov 12, 2026
3 checks passed
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