-
Notifications
You must be signed in to change notification settings - Fork 142
feat(dash): surface actor errors in ui #3743
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
base: 01-03-fix_dash_use_ineligible_icon_for_runners
Are you sure you want to change the base?
feat(dash): surface actor errors in ui #3743
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR Review: feat(dash): surface actor errors in uiSummaryThis PR enhances the frontend UI to display Actor errors, improving the developer experience when debugging Actor failures. The implementation adds error handling and display logic across several components. Code Quality & Best Practices✅ Strengths
🔍 Observations1. Status Determination Priority (queries/index.ts:128-130) if (error) {
return "crashed";
}Consider: Should an Actor with both 2. Query Structure (default-data-provider.tsx:199-204) actorErrorQueryOptions(actorId: ActorId) {
return queryOptions({
...this.actorQueryOptions(actorId),
select: (data) => data.error,
});
}However, this creates a separate query subscription. If the parent 3. Exhaustive Pattern Matching (actor-status-label.tsx:76-97) return match(error)
.with(P.string, (errMsg) =>
match(errMsg)
.with("no_capacity", () => (...))
.exhaustive(),
)
.with(P.shape({ runnerPoolError: P.any }), ...)
.with(P.shape({ runnerNoResponse: P.any }), ...)
.exhaustive();Potential Issue: The inner match on .with(P.string, (errMsg) =>
match(errMsg)
.with("no_capacity", () => (...))
.otherwise(() => <span>Unknown error: {errMsg}</span>),
)Potential Bugs & Issues
|
eaf51c1 to
d9ea998
Compare
PR Review: feat(dash): surface actor errors in uiThank you for this improvement! This PR adds valuable visibility into actor failures. Priority Issues
Other FindingsPerformance (guard-connectable-inspector.tsx:47)
Test Coverage
Strengths
Overall solid improvement! Main concerns are status determination edge cases and potential information disclosure. |

TL;DR
Added error handling and display for Actors in the frontend UI.
What changed?
errorfield to Actor data structure and query optionsactorErrorQueryOptionsfor retrieving Actor errorsRunnerPoolErrorcomponent from runner-config-table to actor-status-label for reuseActorErrorcomponent to display different types of Actor errorsGuardConnectableInspectorto show appropriate error messages based on Actor statusHow to test?
Why make this change?
This change improves the developer experience by providing clearer feedback when Actors fail to start or encounter errors. Previously, error information was limited, making it difficult to diagnose issues. Now, specific error messages are displayed based on the error type, helping users understand and resolve problems more efficiently.