-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: show descriptive error messages for roadmap/ideation failures #1365
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: develop
Are you sure you want to change the base?
fix: show descriptive error messages for roadmap/ideation failures #1365
Conversation
Summary of ChangesHello @AwooOOoo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the user experience by replacing vague error messages with detailed, actionable feedback for roadmap and ideation generation failures. By parsing process output for authentication issues, specific Python exceptions, and general error patterns, users can now quickly understand and address the root cause of generation problems, reducing frustration and improving troubleshooting efficiency. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds error-extraction utilities and constants to Changes
Sequence Diagram(s)(omitted — changes are focused on internal error extraction within a single module and do not introduce a multi-component sequential flow) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request significantly improves the user experience by providing more descriptive error messages for roadmap and ideation generation failures. The extractErrorMessage function effectively parses process output to identify authentication failures, Python exceptions, and provides a sensible fallback. The integration of this new error handling logic into both ideation and roadmap processes is consistent and well-implemented. This change directly addresses the problem of unhelpful 'failed with exit code 1' messages, making it easier for users to diagnose issues.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@apps/frontend/src/main/agent/agent-queue.ts`:
- Around line 593-598: The code currently emits hardcoded, user-facing strings
for ideation errors; change the emitter payload to a structured i18n payload
(e.g., an i18n key plus interpolation params) instead of raw messages: replace
the third argument passed to this.emitter.emit('ideation-error', projectId,
errorMessage) with an object like { key: 'agent.ideation_failed', params: {
detail: errorDetail ?? null, code } } (or similar key/params naming used by the
renderer) and apply the same pattern for the other occurrence mentioned (around
lines 852-858) so the renderer can translate/display the message. Ensure you
reference the same event name ('ideation-error') and keep backward-compatible
shape if consumers expect it.
Previously, roadmap and ideation generation failures showed generic messages like "Roadmap generation failed with exit code 1" which gave users no indication of what went wrong. Now extracts meaningful error details from process output: - Auth failures use the same messaging as agent-process.ts for consistency - Python exceptions (ValueError, TypeError, etc.) are extracted and shown - Falls back to last few lines of output if no specific pattern found This helps users understand and fix issues like missing OAuth tokens, invalid configurations, or other backend errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fe40400 to
6dbac04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@apps/frontend/src/main/agent/agent-queue.ts`:
- Around line 50-85: In extractErrorMessage, the auth-failure branch returns
detectAuthFailure(cleanOutput).message without length restriction; truncate that
message to ERROR_MESSAGE_MAX_LENGTH before returning to enforce the same
max-length guard used elsewhere. Update the code in extractErrorMessage where
authFailure.isAuthFailure is checked (and the return statement for that branch)
to return a substring or slice of authFailure.message limited to
ERROR_MESSAGE_MAX_LENGTH (preserving the existing behavior for null/empty
checks).
♻️ Duplicate comments (1)
apps/frontend/src/main/agent/agent-queue.ts (1)
596-601: Localize user-facing error messages (duplicate of prior comment).These emitted strings are user-visible and should be i18n keys + params rather than hardcoded text. As per coding guidelines, move to structured payloads so the renderer can translate.
As per coding guidelines, ...Also applies to: 856-861
Addresses PR review feedback - ensure auth failure messages are truncated to the same max length as other error messages for consistent behavior across all error types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The message property is optional in AuthFailureDetectionResult, so TypeScript requires a null check even though it's always set when isAuthFailure is true. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
67a743f to
e83e445
Compare
Summary
Problem
When roadmap or ideation generation failed, users saw unhelpful messages like:
This gave no indication of the actual problem (missing OAuth token, backend error, etc.).
Solution
Added
extractErrorMessage()function that parses process output to find meaningful errors:detectAuthFailure()for consistent messaging across the appValueError:,TypeError:, etc. with their messagesExample error message now shown:
Test plan
I have read the CLA Document and I hereby sign the CLA
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.