Skip to content

feat: implement global error states and toast notifications#126

Open
Jayant-kernel wants to merge 1 commit intoc2siorg:mainfrom
Jayant-kernel:feat/global-error-toast
Open

feat: implement global error states and toast notifications#126
Jayant-kernel wants to merge 1 commit intoc2siorg:mainfrom
Jayant-kernel:feat/global-error-toast

Conversation

@Jayant-kernel
Copy link

feat: implement global error states and toast notifications (#125)

This Pull Request fixes #125.

Description

Previously, when the system failed to communicate with the gdbui_server (e.g. backend crash, misconfigured endpoint, initial loading timeouts), Axios errors within data-fetching try/catch blocks were silently swallowed and logged to the console. This resulted in the UI freezing with no user feedback.

This UI enhancement completely solves this developer experience gap by lifting react-toastify into the <App /> root and plumbing toast.error dispatchers directly into all component-level exception handlers.

  • Extracted the local <ToastContainer /> from Breakpoint.jsx and mounted it at the global level with proper theme propagation inside App.jsx.

  • Replaced the dead console.log(error) fallback logic inside Stack.jsx, Functions.jsx, TerminalComp.jsx, and DataContext.jsx with descriptive, immediate boolean feedback via toast.error("...") alerts.


Additional context

cc: @charithccmc @Ammoniya for review!

@Jayant-kernel
Copy link
Author

This PR implements global error toasts! I elevated <ToastContainer /> to App.jsx and added toast.error() to the exception handlers in Stack, Functions, TerminalComp, and DataContext. Now, if the backend crashes or times out, the user gets a clear red visual alert instead of a frozen UI.

Could you please review and merge? @charithccmc @Ammoniya

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.

Enhancement: Implement Global UI Error States & Toast Notifications

1 participant