Skip to content
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

fix: Wrap the children of ReactPanel with an ErrorBoundary (#565) #569

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented Jun 21, 2024

  • Cherry pick of fix: Wrap the children of ReactPanel with an ErrorBoundary #565
  • Previously, if a child of the ReactPanel threw, it would cause the panel to close, which could cause the widget to close unexpectedly.
  • Instead, have the ReactPanel catch the error and display an error view.
  • If any of the children of ReactPanel throw, it won't cause the panel to close. It will just show the error in the panel now.
  • Tested against Core with a special branch debug-kill-table
    • Run the following snippet to create a panel with a table in it:
from deephaven import time_table, ui
p = ui.panel(time_table("PT1s"))
  • Open the browser console, and enter the command dhKillTable(). The table stops ticking as it's closed.
  • Hover the mouse over the table. This will trigger a NPE and a debugger breakpoint; hit resume a couple times until things resume. An error will be shown on the panel
  • To simulate "reconnecting", then disable the FetchManager and re-enable it: dhDisableFetchManager(), dhEnableFetchManager()
    • Table should be reloaded and ticking again.

…#565)

- Previously, if a child of the ReactPanel threw, it would cause the
panel to close, which could cause the widget to close unexpectedly.
- Instead, have the ReactPanel catch the error and display an error
view.
- If any of the children of ReactPanel throw, it won't cause the panel
to close. It will just show the error in the panel now.
- Tested against Core with a special branch
[debug-kill-table](https://github.com/mofojed/web-client-ui/tree/debug-kill-table)
  - Run the following snippet to create a panel with a table in it:
```
from deephaven import time_table, ui
p = ui.panel(time_table("PT1s"))
```
- Open the browser console, and enter the command `dhKillTable()`. The
table stops ticking as it's closed.
- Hover the mouse over the table. This will trigger a NPE and a debugger
breakpoint; hit resume a couple times until things resume. An error will
be shown on the panel
- To simulate "reconnecting", then disable the FetchManager and
re-enable it: `dhDisableFetchManager()`, `dhEnableFetchManager()`
  - Table should be reloaded and ticking again.
@mofojed mofojed requested a review from mattrunyon June 21, 2024 13:17
@mofojed mofojed self-assigned this Jun 21, 2024
Copy link
Contributor

@mattrunyon mattrunyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just add that this is a cherry pick in the pr description

@mofojed
Copy link
Member Author

mofojed commented Jun 21, 2024

The cherry-pick is already in the title (in brackets, (#565)) but I added to the description as well to be more explicit.

@mofojed mofojed merged commit dbebdd2 into deephaven:release/ui-v0.15 Jun 21, 2024
4 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.

None yet

2 participants