Skip to content

feat: DBRowSidePanel global error boundary #856

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

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

ernestii
Copy link
Contributor

@ernestii ernestii commented May 26, 2025

Add a global error boundary to DBRowSidePanel.

In order to show the error boundary inside the drawer, I had to split the component into
"inner" and "drawer/container" sections.

image

Copy link

changeset-bot bot commented May 26, 2025

⚠️ No Changeset found

Latest commit: 688faaa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyperdx-v2-oss-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 3:45pm

@ernestii ernestii requested a review from Copilot May 26, 2025 17:27
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a global error boundary around the DBRowSidePanel drawer by splitting the component into an “inner” renderer and a “container” that handles the Drawer and error fallback.

  • Added DBRowSidePanelErrorBoundary to encapsulate Drawer logic, state management, and render an error UI.
  • Refactored the original DBRowSidePanel into an inner component that receives a new setSubDrawerOpen prop.
  • Updated conditional rendering for loading, success, and error states, and removed legacy query‐param and resize logic from the inner panel.
Comments suppressed due to low confidence (2)

packages/app/src/components/DBRowSidePanel.tsx:1

  • Several hooks and utilities used later (useState, useQueryState, parseAsStringEnum, useZIndex, useResizable) are not imported here. Please add those imports to avoid build errors.
import { createContext, Dispatch, SetStateAction, useCallback, useContext, useMemo,

packages/app/src/components/DBRowSidePanel.tsx:411

  • [nitpick] Using _ as a bound variable can be unclear. If you intend to ignore the first value, you can omit it via [, setQueryTab] or give it a more descriptive name.
const [_, setQueryTab] = useQueryState(

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