Skip to content

fix: ideation view not showing result and were stuck in loading phase#641

Closed
Shironex wants to merge 1 commit intomainfrom
fix/ideation-view
Closed

fix: ideation view not showing result and were stuck in loading phase#641
Shironex wants to merge 1 commit intomainfrom
fix/ideation-view

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 21, 2026

  • Removed unused navigate function and job status update logic from the PromptList component.
  • Enhanced the useGenerateIdeationSuggestions hook to include jobId and promptTitle for better tracking and toast notifications.
  • Updated success and error handling to ensure job status updates are managed directly from the hook, improving component unmount behavior.

Summary by CodeRabbit

  • Refactor
    • Improved error handling for suggestion generation with better user notifications when operations fail.
    • Centralized job status management for more reliable state tracking and consistent user feedback across the application.
    • Enhanced error recovery mechanisms to help users troubleshoot failed suggestion operations more effectively.

✏️ Tip: You can customize this high-level summary in your review settings.

- Removed unused navigate function and job status update logic from the PromptList component.
- Enhanced the useGenerateIdeationSuggestions hook to include jobId and promptTitle for better tracking and toast notifications.
- Updated success and error handling to ensure job status updates are managed directly from the hook, improving component unmount behavior.
@Shironex Shironex self-assigned this Jan 21, 2026
@Shironex Shironex added the Bug Something isn't working label Jan 21, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, 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 resolves an issue where the ideation view would become unresponsive or stuck in a loading state after initiating a suggestion generation. The primary solution involves centralizing the asynchronous job status management and user feedback (toast notifications) within the useGenerateIdeationSuggestions hook. This architectural change ensures that the application's state and user interface are consistently updated, regardless of the lifecycle of the PromptList component, thereby enhancing the robustness and user experience of the ideation feature.

Highlights

  • Refactored Job Status Handling: Job status updates and toast notifications for ideation suggestions have been moved from the PromptList component into the useGenerateIdeationSuggestions React Query hook. This ensures that job completion or error states are processed and communicated reliably, even if the PromptList component unmounts during the asynchronous operation.
  • Enhanced useGenerateIdeationSuggestions Hook: The useGenerateIdeationSuggestions hook now accepts jobId and promptTitle as part of its input. This allows the hook to directly manage job status updates via the useIdeationStore and display more informative toast messages upon success or failure.
  • Simplified PromptList Component: The PromptList component has been simplified by removing the useNavigate function and the direct updateJobStatus logic. Its generateMutation.mutate call now only passes necessary input, with onSuccess and onError responsibilities fully delegated to the mutation hook, improving component unmount behavior.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

Centralized ideation mutation lifecycle handling by moving onSuccess and onError logic from the component to the custom hook, extended mutation input/output with jobId and promptTitle fields, changed suggestion type from IdeaSuggestion to AnalysisSuggestion, and removed component-level navigation and job status updates.

Changes

Cohort / File(s) Summary
Prompt List Component Simplification
apps/ui/src/components/views/ideation-view/components/prompt-list.tsx
Removed useNavigate hook and navigation redirect logic; removed onSuccess/onError mutation handlers; extended mutation payload to include jobId and promptTitle; added onSettled callback for local loading state cleanup.
Ideation Mutations Hook Enhancement
apps/ui/src/hooks/mutations/use-ideation-mutations.ts
Changed suggestion type from IdeaSuggestion to AnalysisSuggestion; extended GenerateSuggestionsInput and GenerateSuggestionsResult types with jobId and promptTitle; added centralized onSuccess handler to update job status via store and display toast notification; added onError handler for error state management and user feedback.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #358: Modifies prompt-list.tsx and alters ideation job payload structures; related through shared component changes and mutation input/output extension patterns.

Poem

🐰 The mutations now dance in harmony's song,
With payloads enriched as they journey along,
Job states and titles in perfect array,
The hook takes the load, in a cleaner new way! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: resolving the issue where the ideation view was not displaying results and remained stuck in a loading state.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 effectively addresses the issue of the ideation view getting stuck in a loading phase by refactoring the job status update and toast notification logic. By moving the onSuccess and onError handlers from the PromptList component into the useGenerateIdeationSuggestions hook, the application now handles these side effects more robustly, especially when the PromptList component unmounts quickly after initiating a generation job. This improves the reliability of status updates and user feedback. Additionally, the change from IdeaSuggestion to AnalysisSuggestion in the mutation hook appears to be a beneficial type correction, aligning the data structures with the intended use. Overall, these changes enhance the maintainability and correctness of the ideation feature.

@Shironex Shironex added the Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging. label Jan 21, 2026
@Shironex Shironex closed this Jan 22, 2026
@Shironex Shironex deleted the fix/ideation-view branch February 15, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant