Skip to content

Improve baseline error handling for the UI dashboard #159

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
3 tasks
Parkreiner opened this issue Jul 8, 2024 · 0 comments
Open
3 tasks

Improve baseline error handling for the UI dashboard #159

Parkreiner opened this issue Jul 8, 2024 · 0 comments
Labels

Comments

@Parkreiner
Copy link
Member

Parkreiner commented Jul 8, 2024

This is a request spurred by recent issues (#13130 and coder/coder#13723). Decided to spin this off into a separate issue instead of piling more stuff on top of the latest issue.

Problem

In the past two months, we have had two breaking issues slip through all of our error handling and lead to the entire UI app blowing up. This issue outlines steps for improving the dashboard's general reliability, and making it much harder for these problems to happen again.

Action items

  • Turn on TypeScript's noUncheckedIndexedAccess compiler setting
    • This setting can present a bit of a difficulty curve depending on how you write your JS/TS, but it basically ensures that we will never accidentally access a property from a null/undefined value again (unless we use type assertions to silence type warnings)
    • I don't think we'll need to change too much of our existing code to make the compiler happy with this setting, but I'm sure there's at least a few lines we'd have to change
    • This setting 100% would've caught Trying to download logs for failed workspace makes entire page for that workspace unusable coder#13723.
  • Investigate why our current top-level error boundary is letting errors slip through as uncaught errors
  • Add an additional error boundary around the main content of the app
    • Even if the top-level error boundary would always trigger when needed, there's still the matter that if an error happens in one part of the app, the entire app unloads for the fallback UI
    • I suggest adding at least one more error boundary around the main content (everything below the nav bar, basically). This would make it so that even if an error happens, the navigation will still likely be enabled. The top-level error boundary should be for completely unprecedented, unrecoverable errors.
@Parkreiner Parkreiner added the good first issue Good for newcomers label Jul 8, 2024
@Parkreiner Parkreiner changed the title Improve error handling for the UI dashboard Improve baseline error handling for the UI dashboard Jul 8, 2024
@stirby stirby transferred this issue from coder/coder Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant