fix(tickets): recover from a GraphQL field skew instead of a raw error page - #261
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
…r page One field the deployed schema does not declare fails validation for the whole tickets document. The table and board rendered the raw server error full-page with no retry, blocking a core flow for the rest of the session. - Prune an undeclared leaf field and retry once in `TicketService`, so a single field skew (e.g. `escalatedByUser`) degrades to a missing badge, not an empty board or list. - Replace the raw `PageError` on the table and board with an inline `LoadError` that keeps the page chrome and offers a working retry; never show the raw server payload. - Skip react-query retries for deterministic schema-validation errors. - Wrap the tickets route in `ContentErrorBoundary`, matching sibling routes. Generated-By: PostHog Desktop Task-Id: fd82f8ce-ef9a-454e-994c-518cf8907ec2
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.
Problem
/ticketsand the raw server payload is dumped on screen with no way to recover — a core flow blocked for the rest of the session (two independent session recordings, six days apart, one tenant and one QA host).extractGraphQlDatathrows the first GraphQL error, the hook passeserror.messagestraight through, and the table/board render it as<PageError message={error} />— a raw banner with no retry.escalatedByUser(frontend gated onai-escalation, backend field added later) and the label→tag rename.Changes
TicketService.fetchGraphQldetects aFieldUndefinedvalidation error, prunes the undeclared leaf field, and retries once — soescalatedByUserjust comes back absent (no badge) rather than emptying the board.LoadErrorwith generic copy and a working retry, keeping the page chrome (title, back button, view switch) so the page stays usable. Removed the duplicate raw-message toast.retry: 2→ guarded)./ticketsroute inContentErrorBoundary, matching the notifications / logs / scripts routes.escalatedByUser)Test plan
vitest run— addedutils/graphql.test.ts(undefined-field parsing, leaf pruning, typed validation error); full suite 58 passing.biome checkclean on changed files.tscintroduces no new errors in the touched files (pre-existing@/__generated__/*relay-codegen errors are unrelated).Note
The tickets UI lives in this repo; the originating report is filed against
openframe-saas-tenant, which deploys this shared frontend. Not deployed here, so the fix was verified by unit tests and the exact render-path change rather than a live reproduction.Created with PostHog Desktop from this inbox report.