-
Notifications
You must be signed in to change notification settings - Fork 5.3k
fix(web): guard unguarded data derefs causing work-item and layout crashes #9546
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
Merged
sriramveeraghanta
merged 11 commits into
preview
from
fix/crash-guards-issue-peek-labels
Aug 4, 2026
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a063aba
fix: filter out undefined label options in issue properties components
codingwolf-at 508b0a5
fix: ensure array checks for results in various components
codingwolf-at c845542
fix: wrap children in LayoutErrorBoundary for improved error handling
codingwolf-at c46109c
fix: optimize handleRefresh with useCallback in PrevExports component
codingwolf-at 63bd51f
fix: enhance LayoutErrorBoundary with retry functionality and improve…
codingwolf-at 77838ae
fix: improve label option handling and array checks in various compon…
codingwolf-at 27cc807
fix: refactor ProfileActivity component for improved loading and data…
codingwolf-at ff9141f
fix: improve type safety and array handling in integration card and s…
codingwolf-at bbf74e1
fix: enhance handleRefresh in PrevExports component with error handling
codingwolf-at 4e9ea5a
style: fix oxfmt formatting flagged by CI check:format
codingwolf-at 54020f8
style: reformat defaultLabelOptions logic for consistency
codingwolf-at File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /** | ||
| * Copyright (c) 2023-present Plane Software, Inc. and contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-only | ||
| * See the LICENSE file for details. | ||
| */ | ||
|
|
||
| import { Component } from "react"; | ||
| import type { ErrorInfo, ReactNode } from "react"; | ||
| import { AlertTriangle } from "lucide-react"; | ||
| import { Button } from "@plane/propel/button"; | ||
|
|
||
| type Props = { | ||
| children: ReactNode; | ||
| }; | ||
|
|
||
| type State = { | ||
| hasError: boolean; | ||
| }; | ||
|
|
||
| // Catches render crashes from a single issue layout (list/kanban/spreadsheet/calendar/gantt) | ||
| // so a bad group/column shape degrades to a local fallback instead of taking down the whole page. | ||
| export class LayoutErrorBoundary extends Component<Props, State> { | ||
| state: State = { hasError: false }; | ||
|
|
||
| static getDerivedStateFromError(): State { | ||
| return { hasError: true }; | ||
| } | ||
|
|
||
| componentDidCatch(error: Error, info: ErrorInfo) { | ||
| // eslint-disable-next-line no-console | ||
| console.error("Issue layout crashed", error, info); | ||
| } | ||
|
|
||
| render() { | ||
| if (this.state.hasError) { | ||
| return ( | ||
| <div className="flex h-full w-full flex-col items-center justify-center gap-3 text-center"> | ||
| <AlertTriangle className="size-8 text-tertiary" /> | ||
| <p className="text-14 text-secondary">Something went wrong while loading this view.</p> | ||
| <Button variant="secondary" size="sm" onClick={() => this.setState({ hasError: false })}> | ||
| Try again | ||
| </Button> | ||
| </div> | ||
| ); | ||
| } | ||
| return this.props.children; | ||
| } | ||
| } |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.